суббота, 10 ноября 2012 г.
lock the viruses to be run from user's temp folder
https://www.virustotal.com/file/b4a1a5e40b85cbb415cbf37036be852335a731f6a89c59ddfeeff0f08343cd76/analysis/
Причина по которой словился вирус: кто-то ( не будем говорить кто) сидел за компом используя IE9, а уж всем известно что там ооочень и очень много эксплойтов под него.
Результат: при следующем запуске компа получил удачный скриншот с просьбой оплаты :)))
Конечно, я с этим тут же разобрался и вылечил систему.
locker проиался в автозапуск из паки TEMP :
C:\Users\<username>\AppData\Local\Temp
Что делать, если вдруг какой-то любой другой гаденыш сюда зелезет и пропишется в автозауск ?
Идеи:
Блокируем запуск всех программ кот-е в папке C:\Users\<username>\AppData\Local\Temp
Для этого:
1. используем Локальные олитики безопасности
2. Создаем новую политику для Ограниченного использования программ:
3. Вбиваем туда наш Зловестный путь:
И вуаля - больше ничто никогда не запустится с этой папки....
Конечно же, я проверил это на том же зловреде.
вот рузультат :
Имя журнала: Application
Источник: Microsoft-Windows-SoftwareRestrictionPolicies
Дата: 10.11.2012 17:04:46
Код события: 866
Категория задачи:Отсутствует
Уровень: Предупреждение
....
....
Доступ к C:\Users\test\AppData\Local\Temp\1.4667602781955421E7.exe был ограничен по расположению; администратор применил правило политики {0758567e-1c6d-4330-9feb-d76b01c814d2} к пути C:\Users\test\AppData\Local\Temp.
......
среда, 3 октября 2012 г.
вторник, 11 сентября 2012 г.
Microsoft QA Days video (march, 2012)
Техники тест-дизайна ( translated by w1zle )
суббота, 7 января 2012 г.
как гугл тестирует ПО
вторник, 13 декабря 2011 г.
Traum Library - БИБЛИОТЕКА ТРАУМА
Недавно наткнулся в сети на Traum library - это огромнейшая библиотека электронных книг в
формате fb2, epub и т.п. Советую всем - тут можно взять уже готовый сборник .
вторник, 21 июня 2011 г.
python script which finds hex values in a file
Thus, I created a simple python script ( thanx Google :) ) which looks for hex values in a file using regexp . Actually, this script walks through a specified folder where files are and then creates parsed output files containing HEX values with an additional '_hex.txt' extension in their names
Here is a script:
import os
import re
def look_for_hex_in_files(filepath,writefilepath):
f = open(filepath, 'r')
fwr = open(writefilepath, 'w')
for line in f:
b = line
for b1 in re.finditer('0x0*[0-9a-fA-F][0-9a-fA-F]*', b):
a = (b1.group(0))
print(a)
fwr.write(a+'\n')
f.close()
fwr.close()
#this is a path to folder containing input log files to be parsed
dirname = "C:\ProgramData\log1"
for filename in os.listdir(dirname):
b1 = (os.path.join(dirname,filename))
if os.path.isfile(b1):
print(b1)
filepath = b1;
writefilepath = (b1+"_hex.txt")
look_for_hex_in_files(filepath,writefilepath)
пятница, 29 октября 2010 г.
the case of inline hook by RkU
RkUnhooker report generator v0.7
==============================================
Rootkit Unhooker kernel version: 3.8.380.580
==============================================
Windows Major Version: 5
Windows Minor Version: 1
Windows Build Number: 2600
==============================================
ntkrnlpa.exe+0x0006ECBE, Type: Inline - RelativeJump 0x80545CBE [ntkrnlpa.exe]
I've decided to investigate what the real problem was.
First thing I did was checking nt image loaded into memory:
kd> !chkimg -d nt
80537028-8053702c 5 bytes - nt!ExAllocatePool (+0x3c7ae )
also here were about 4 hooks with 5 bytes each ....
Here we can see that real address of nt!ExAllocatePool (0x8053702c) is changed to 0x80537028
I viewed disassembling of the real 0x8053702c address
0: kd> u 8053702c
nt!ExAllocatePool+0x4:
8053702c 39684e cmp dword ptr [eax+4Eh],
ebp
8053702f 6f outs dx,dword ptr [esi]
80537030 6e outs dx,byte ptr [esi]
80537031 65ff750c push dword ptr gs:[ebp+0Ch]
80537035 ff7508 push dword ptr [ebp+8]
80537038 e82b490100 call nt!ExAllocatePoolWithTag (8054b968)
8053703d 5d pop ebp
8053703e c20800 ret 8
Then I wanted to see what code has been at 0x80537028 address:
0: kd> u 80537028
nt!ExAllocatePool:
*** ERROR: Module load completed but symbols could not be loaded for svenbowm.SYS
80537028 e90c98e939 jmp svenbowm+0x839 (ba3d0839)
8053702d 684e6f6e65 push 656E6F4Eh
80537032 ff750c push dword ptr [ebp+0Ch]
80537035 ff7508 push dword ptr [ebp+8]
80537038 e82b490100 call nt!ExAllocatePoolWithTag (8054b968)
8053703d 5d pop ebp
8053703e c20800 ret 8
80537041 cc int 3
So here's an answer: the module svenbown made inline hook at address 0x80537028 .
This module <svenbown> refers to RkU driver.
So I had no fear that my system had been infected by some malicious software. It was only RkU's inline hook :-) which had been set as soon as RkU's driver had been loaded .
среда, 20 октября 2010 г.
windbg: view IAT table of kernel modules
First you need to do in windbg is to view file headers of module and get IAT address :
0: kd> !dh -f ntfs
File Type: EXECUTABLE IMAGE
FILE HEADER VALUES
0 DLL characteristics
0 [ 0] address [size] of Export Directory
86674 [ 50] address [size] of Import Directory
17B80 [ 51C] address [size] of Import Address Table Directory
............................................................................
Then you need to find out module's start address:
0: kd> lm m ntfs
start end module name
b9e35000 b9ec1600 Ntfs (deferred)
And now when you know IAT directory address and module's start address you can look whole list of functions in IAT of Ntfs module
0: kd> dds b9e35000+17b80
b9e4cb80 806e69f0 hal!KeAcquireInStackQueuedSpinLock
b9e4cb84 806e6940 hal!ExAcquireFastMutex
b9e4cb88 806e6aa8 hal!KeReleaseQueuedSpinLock
b9e4cb8c 806e6a4c hal!KeAcquireQueuedSpinLock
b9e4cb90 806e6900 hal!KfReleaseSpinLock
b9e4cb94 806e699c hal!ExTryToAcquireFastMutex
b9e4cb98 806e6974 hal!ExReleaseFastMutex
b9e4cb9c 806e6aa0 hal!KeReleaseInStackQueuedSpinLock
b9e4cba0 806e6830 hal!KfAcquireSpinLock
b9e4cba4 00000000
b9e4cba8 b9ec3022 KSecDD!GenerateSessionKey
b9e4cbac b9ec2fdc KSecDD!EfsGenerateKey
b9e4cbb0 b9ec3002 KSecDD!GenerateDirEfs
b9e4cbb4 b9ec28f4 KSecDD!InitSecurityInterfaceW
b9e4cbb8 b9ec3012 KSecDD!EfsDecryptFek
b9e4cbbc 00000000
b9e4cbc0 8054705c nt!ExRaiseStatus
b9e4cbc4 804ec29a nt!FsRtlNormalizeNtstatus
b9e4cbc8 804e41b4 nt!CcFlushCache
b9e4cbcc 80535b9e nt!ExIsResourceAcquiredExclusiveLite
b9e4cbd0 8052e79c nt!RtlInitUnicodeString
b9e4cbd4 80546168 nt!InterlockedPopEntrySList
b9e4cbd8 8054618c nt!RtlpInterlockedPushEntrySList
b9e4cbdc 804f7e92 nt!KeQuerySystemTime
b9e4cbe0 80546210 nt!RtlCompareMemory
b9e4cbe4 8056d1b6 nt!FsRtlAreNamesEqual
b9e4cbe8 804eb004 nt!FsRtlCheckLockForWriteAccess
As yu may noticed, it lists not only functions regarding to ntoskrnl.exe , so it seems like Ntfs module contains exports to a few modules like hal.dll , KSecDD and ntoskrnl.exe. To ensure, we may use PEtools utility ( see screen below):
By the way, if you are too lazy to use windbg :-) you can use PEtools.
использование более чем 4Гб физической памяти на 32х битной системе
Этот режим позволяет использовать боле 4Гбайт физической памяти ПК.
Однако стоить помнить что приложения могут адресовать макс 4Гб памяти виртуального адресного пространства.
Подробнее можете прочесть на официальном сайте Microsoft
Тут же поговорим как включить режим РАЕ .
- XP, windows 2000: дописать в boot.ini: /pae
- 2003 server - PAE включен по умолчанию :-)
- Vista, Win7: bcdedit /set {ID} pae ForceEnable
вторник, 14 сентября 2010 г.
Force WinDbg to load symbols
For cases when you have not corresponding pdb file but you'd like to see the callstack and so on you should use following WinDbg command:
.symopt 0x40For more info about symbol options visit msdn .
среда, 3 марта 2010 г.
Windbg 6.12.2.633 is included in WDK 7.1.0.
But, let's back to the topic:
New in Windbg, as Microsoft says (visit WinDbg page ):
1. | Several bug fixes in extensions to only use public symbols | ||||
2. | General BugCheck Analysis Updates including:
| ||||
3. | Fixed user-mode minidump generation problem. | ||||
4. | Fixed buffer overrun in schannel transport. | ||||
5. | Fixed several kernel debugger transport issues. | ||||
6. | Fixed problem with debugger reporting incorrect FPO information. | ||||
7. | Allowed stack dumps deeper than 65535 if specified explicitly. | ||||
8. | Changed ".outmask /a" and ".outmask /d" to be set only instead of or/xor. | ||||
9. | The old ADPlus.vbs is being replaced by ADPlus.exe which requires the .Net Framework 2.0. For those cases where the .Net Framework isn't available we are still shipping the older version renamed to adplus_old.vbs. For detailed documentation of the new ADPlus.exe as well as for its new companion ADPlusManager.exe please see adplus.doc located in the same folder as adplus.exe. |
вторник, 2 марта 2010 г.
Crash dump analysis checklist . ( © www.dumpanalysis.org )
http://www.dumpanalysis.org/blog/index.php/2007/06/20/crash-dump-analysis-checklist/
I've copied posts to my webpage.
all copyrights are by dumpanalysis.org :-)
• Internal database(s) search
• Google or Microsoft search for suspected components as this could be a known issue. Sometimes a simple search immediately points to the fix on a vendor’s site
• The tool used to save a dump (to flag false positive, incomplete or inconsistent dumps)
• OS/SP version (version)
• Language
• Debug time
• System uptime
• Computer name (dS srv!srvcomputername or !envvar COMPUTERNAME)
• List of loaded and unloaded modules (lmv or !dlls)
• Hardware configuration (!sysinfo)
• .kframes 100
• Critical sections (!locks and !locks -v, !cs -s -l -o) for both crashes and hangs
• Component timestamps, duplication and paths. DLL Hell? (lmv and !dlls)
• Do any newer components exist?
• Process threads (~*kv or !uniqstack)
• Process uptime
• Your components on the full raw stack of the problem thread
• Your components on the full raw stack of the main application thread
• Process size
• Number of threads
• Gflags value (!gflag)
• Time consumed by thread (!runaway)
• Environment (!peb)
• Import table (!dh)
• Hooked functions (!chkimg)
• Exception handlers (!exchain)
• Computer name (!envvar COMPUTERNAME)
• ERESOURCE contention (!locks)
• Processes and virtual memory including session space (!vm 4)
• Important services are present and not hanging (for example, terminal or IMA services for Citrix environments)
• Pools (!poolused)
• Waiting threads (!stacks)
• Critical system queues (!exqueue f)
• I/O (!irpfind)
• The list of all thread stack traces (!process 0 ff for W2K3/XP/Vista, ListProcessStacks script for W2K)
• LPC/ALPC chain for suspected threads (!lpc message or !alpc /m after search for “Waiting for reply to LPC” or “Waiting for reply to ALPC” in !process 0 ff output)
• Mutants (search for “Mutants - owning thread” in !process 0 ff output)
• Critical sections for suspected processes (!ntsdexts.locks, !cs -l -o -s)
• Sessions, session processes (!session, !sprocess)
• Processes (size, handle table size) (!process 0 0)
• Running threads (!running)
• Ready threads (!ready)
• DPC queues (!dpcs)
• The list of APCs (!apc)
• Internal queued spinlocks (!qlocks)
• Computer name (dS srv!srvcomputername)
• File cache, VACB (!filecache)
• Pool address (!pool)
• Component timestamps (lmv)
• Processes and virtual memory (!vm 4)
• Current threads on other processors
• Raw stack
• Bugcheck description (including ln exception address for corrupt or truncated dumps)
• Bugcheck callback data (!bugdump for systems prior to Windows XP SP1)
• Bugcheck secondary callback data (.enumtag)
• Computer name (dS srv!srvcomputername)
• Hardware configuration (!sysinfo)
понедельник, 1 марта 2010 г.
Driver Profilers ( профайлеры драйверов )
Profiler:
http://blogs.msdn.com/profiler/
http://msdn.microsoft.com/en-us/magazine/cc337887.aspx?pr=blog
http://blogs.msdn.com/colinth/archive/2007/05/07/basic-profiler-scenarios.aspx
http://developer.amd.com/cpu/codeanalyst/codeanalystwindows/Pages/default.aspx
http://www.intel.com/cd/software/products/asmo-na/eng/239144.htm
kernrate:
http://www.nynaeve.net/?p=45
KrView
http://www.microsoft.com/whdc/system/sysperf/krview.mspx
четверг, 28 января 2010 г.
Интересные задачки
Тест на логическое мышление. Используйте только ту информацию, которая имеется в тексте вопроса, не полагайтесь на свой жизненный опыт.
1. Некоторые улитки являются горами. Все горы любят кошек.
Значит, все улитки любят кошек.
а) правильно
б) неправильно
2. Все крокодилы умеют летать. Все великаны являются крокодилами.
Значит, все великаны могут летать.
а) правильно
б) неправильно
3. Некоторые головки капусты - паровозы. Некоторые паровозы играют на рояле.
Значит, некоторые головки капусты играют на рояле.
a) правильно
б) неправильно
4. Две поляны никогда не похожи одна на другую. Сосны и ели выглядят совершенно одинаково.
Значит, сосны и ели не являются двумя полянами.
а) правильно
б) неправильно
5. Никто из людей не может стать президентом, если у него красный нос. У всех людей нос красный.
Значит, никто из людей не может стать президентом.
а) правильно
б) неправильно
6. Все вороны собирают картины. Некоторые собиратели картин сидят в птичьей клетке.
Значит, некоторые вороны сидят в птичьей клетке.
a) правильно
б) неправильно
7. Только плохие люди обманывают или крадут. Катя - хорошая.
а) Катя обманывает
б) Катя крадет
в) Катя не крадет
г) Катя обманывает и крадет
д) ни одно из вышеперечисленных
8. Все воробьи не умеют летать. У всех воробьев есть ноги.
а) без ног воробьи не могут летать
б) некоторые воробьи не имеют ног
в) все воробьи, у которых есть ноги, не могут летать
г) воробьи не могут летать, потому что у них есть ноги
д) воробьи не могут летать и у них нет ног
е) ни одно из вышеперечисленных
9. Некоторые люди - европейцы. Европейцы имеют три ноги.
а) люди с двумя ногами не являются европейцами
б) европейцы, которые являются людьми, иногда имеют три ноги
в) европейцы с двумя ногами иногда являются людьми
г)Людей не европейцев, с тремя ногами не бывает
д)Люди имеют три ноги потому что они европейцы
е)ни одно из вышеперечисленных
10. Цветы - это зеленые звери. Цветы пьют водку.
а) все зеленые звери пьют водку
б) все зеленые звери являются цветами
в) некоторые зеленые звери пьют водку
г) Зеленые звери не пьют водку
д) зеленые звери не являются цветами
е)ни одно из вышеперечисленных
11. Каждый квадрат круглый. Все квадраты красные.
а) бывают квадраты с красными углами
б) бывают квадраты с круглыми углами
в) бывают круглые красные углы
г) углы и квадраты - круглые и красные
д) ни одно из вышеперечисленных
12. Хорошие начальники падают с неба. Плохие начальники могут петь.
а) Плохие начальники летят с неба вниз.
б) Хорошие начальники, которые умеют летать - могут петь.
в) некоторые плохие начальники не могут петь.
г) некоторые хорошие начальники -плохие, так как они умеют петь.
д) ни одно из вышеперечисленных
Правильные ответы:
1б
2а
3б
4а
5а
6б
7в
8в
9а
10в
11д
12д
вторник, 26 января 2010 г.
Thunderbird 3 memory leak
After 2 days of using Thunderbird 3.0.1 I've found a memory leak, and posted a bug to mozilla.org. So, if you also has the same visit Thunderbird 3 Memory Drainer ? to see what exactly problem do you have.
At least, you can add an additional info to bug I've posted - Thunderbird 3 - memory laeks, all add-ons are disabled
It was a really sad to experience such bug in one of my favourite mail client.
I hope, developers will fix it soon.
What is IRQL and why is it important?
When people first hear the term IRQL (pronounced Er-kel) their thoughts sometimes turn to the sitcom "Family Matters" and Jaleel White's alter ego, Steve Urkel. However, we're not going to be taking a trip down Television's Memory Lane today. Instead we're going to talk about Interrupt Request Levels - aka IRQL's. If you develop device drivers or spend a lot of time debugging, IRQL's are familiar territory for you. An interrupt request level (IRQL) defines the hardware priority at which a processor operates at any given time. In the Windows Driver Model, a thread running at a low IRQL can be interrupted to run code at a higher IRQL. The number of IRQL's and their specific values are processor-dependent.
Processes running at a higher IRQL will pre-empt a thread or interrupt running at a lower IRQL. An IRQL of 0 means that the processor is running a normal Kernel or User mode process. An IRQL of 1 means that the processor is running an Asynchronous Procedure Call (APC) or Page Fault. IRQL 2 is used for deferred procedure calls (DPC) and thread scheduling. IRQL 2 is known as the DISPATCH_LEVEL. When a processor is running at a given IRQL, interrupts at that IRQL and lower are blocked by the processor. Therefore, a processor currently at DISPATCH_LEVEL can only be interrupted by a request from an IRQL greater than 2. A system will schedule all threads to run at IRQL's below DISPATCH_LEVEL - this level is also where the thread scheduler itself will run. So if there is a thread that has an IRQL greater than 2, that thread will have exclusive use of the processor. Since the scheduler runs at DISPATCH_LEVEL, and that interrupt level is now blocked off by the thread at a higher IRQL, the thread scheduler cannot run and schedule any other thread. So far, this is pretty straightforward - especially when we're talking about a single processor system.
On a multi-processor system, things get a little complicated. Since each processor can be running at a different IRQL, you could have a situation where one processor is running a driver routine (Device Interrupt Level - aka DIRQL), while another processor is running driver code at IRQL 0. Since more than one thread could attempt to access shared data at the same time, drivers should protect the shared data by using some method of synchronization. Drivers should use a lock that raises the IRQL to the highest level at which any code that could access the data can run. We're not going to get too much into Locks and Deadlocks here, but for the sake of our discussion, an example would be a driver using a spin lock to protect data accessible at DISPATCH_LEVEL. On a single processor system, raising the IRQL to DISPATCH_LEVEL or higher would have the same effect, because the raising of the IRQL prevents the interruption of the code currently executing.
That will actually wrap it up for this post. It's a fairly short post, but hopefully you now have a basic understanding of IRQL. Until next time ...
Additional Resources:
| Share this post : |
BHO's, Security and Shell Extensions
Today we're going to wrap up our overview of Browser Helper Objects with a look at BHO's and Security as well as similarities between BHO's and Shell Extensions. If you recall from our first post on BHO's, a BHO is an extension to Internet Explorer that adds customization and functionality. The API's used by Browser Helper objects expose hooks that allow them to access the Document Object Model (DOM) of the current page and to control navigation. This leads to malware applications that have been created as Browser Helper Objects.
For example, the Download.ject exploit installed a BHO that would activate upon detecting a secure HTTP connection to a financial institution, record the user's keystrokes (intending to capture passwords) and transmit the information to a website used by Russian computer criminals. Other BHOs such as the MyWay Searchbar track users' browsing patterns and pass the information they record to third parties. Although many BHO's install toolbars in Internet Explorer, there is no requirement that a BHO have a user interface. Therefore it is possible that a user may not know that they have a malicious BHO installed on an unprotected machine.
Since a BHO does not need permission to install additional components, malicious programs and spyware may be spread without the user's knowledge. Since writing a BHO is fairly simple, many poorly written BHO's may harm the computer, compromise its security and may even destroy valuable data or corrupt system files. That having been said, there are many good anti-spyware programs available that will monitor a computer for suspicious or harmful activity including BHO activity. You can also use the Add-On manager in Internet Explorer to list which BHO's are installed and enable or disable BHO's as needed.
Let's now move on to take a look at commonalities BHO's and Shell Extensions. Windows shell extensions are COM in-process servers that Windows Explorer loads when it is about to perform a certain action on a document - for example, displaying the context menu. By writing a COM module that implements a few COM interfaces, it is possible to add new items to the context menu and then handle them properly. A shell extension must also be registered in such a way that Windows Explorer can find it. A Browser Helper Object follows the same pattern - the difference being which interfaces to implement. Also, there is a difference in the trigger that causes a BHO to be loaded. Despite the implementation differences, however, shell extensions and BHO's share a common nature, as the following table demonstrates.
| Feature | Shell Extension | Browser Helper Object |
| Loaded By | Windows Explorer | Internet Explorer (and Windows Explorer for shell version 4.71 and later) |
| Triggered By | User's action on a document of a certain class (that is, right-click) | Opening of the browser's window |
| Unloaded When | A few seconds later the reference count goes to 0 | The browser window that caused it to load gets closed |
| Implemented as | COM in-process DLL | COM in-process DLL |
| Registration requirements | Usual entries for a COM server plus other entries, depending on the type of shell extension and the document type that it will apply to | Usual entries for a COM server plus one entry to qualify it as a BHO |
| Interfaces needed | Depends on the type of the shell extension | IObjectWithSite |
Windows Explorer for shell version 4.71 and above includes Windows 95 and Windows NT 4.0 with Internet Explorer 4.0 with the Active Desktop Shell update release.
And that will do it for our overview of BHO's, Security and Shell Extensions. Until next time ...
Additional Resources:
- MSDN: Browser Helper Objects: The Browser the Way You Want It
- IE Browser Helper Objects - Steven M. Cohn's WebLog
human resources / Собеседование — фундаментальные принципы
human resources / Собеседование — фундаментальные принципы: "Извиняюсь если кому-то это покажется тривиальным. Но примеры пройденных мной собеседований, которые оказывались самой сложной задачей за время работы в фирме (я не шучу), или звонки от HR-ов через месяц-другой после отсылки резюме доказывают — большинству HR-ов и технических интервьюеров эти принципы неизвестны или непонятны. Кадровики жалуются на нехватку профессионалов, на неприязнь со стороны соискателей, и не понимают что ответ прост — их процесс отбора сотрудников в корне неправилен.
Поэтому позволю себе напомнить общественности про эти принципы. Надеюсь, после этого число сторонников светлой стороны Силы хоть немного увеличится ;)
"
Google Chrome / Chrome 4.0 Stable
Только что в блоге разработчиков Google сообщили, что выпущена 4я стабильная версия браузера.
Скачать online-установщик (пока только Windows — версия)
Версия 4.0 содержит:
- Расширения (пожалуй, главное нововведение)
- Синхронизация закладок
- Расширенные инструменты для разработчиков
- HTML5: Уведомления, веб базы данных, веб-сокеты, поддержка Ruby
- Улучшение производительности v8
- Улучшение производительности графической библиотеки Skia
- Полное прохождение ACID3 теста благодаря вновь добавленной поддержке загружаемых шрифтов.
- Еще безопаснее (множество исправлений + новые механизмы безопасности)
