Книга: Practical Malware Analysis: The Hands-On Guide to Dissecting Malicious Software
Назад: Lab 10-2 Solutions
Дальше: Lab 11-1 Solutions

. We now examine what it did to our system. First, we check to see if the service was successfully installed and verify that the malicious .sys file is used as part of the service. Simultaneously, we notice that after about 30 seconds, the program pops up the advertisement again and does so about once every 30 seconds. Opening Task Manager in an effort to terminate the program, we see that the program isn’t listed. And it’s not listed in Process Explorer either.

The program continues to open advertisements, and there’s no easy way to stop it. It’s not in a process listing, so we can’t stop it by killing the process. Nor can we attach a debugger to the process because the program doesn’t show up in the process listing for WinDbg or OllyDbg. At this point, our only , because the input and output parameters passed as arguments to it will be sent to the kernel code, which we will need to analyze separately.

, except that the call to the navigate function is inside a loop that runs continuously and sleeps for 30 seconds between each call.

, we see that it calls IoCreateDevice at to create a device named \Device\ProcHelper at .

, the function then calls IoCreateSymbolicLink at to create a symbolic link named \DosDevices\ProcHelper at for the user-space program to access.

. The output of !devobj tells us where the DriverObject at is stored.

.

shows the code that handles DeviceIoControl.

at .

.

changes the EPROCESS structure of the process in front of it and behind it in the linked list of processes. These six instructions hide the current process by unlinking it from the linked list of loaded processes, as shown in .

, Process 2 has been hidden by this rootkit. When the OS iterates over the linked list of processes, the hidden process is always skipped.

You might wonder how this process continues to run without any problems, even though it’s not in the OS’s list of processes. To answer this, remember that a process is simply a container for various threads to run inside. The threads are scheduled to execute on the CPU. As long as the threads are still properly accounted for by the OS, they will be scheduled, and the process will continue to run as normal.

Назад: Lab 10-2 Solutions
Дальше: Lab 11-1 Solutions

sss
sss

© RuTLib.com 2015-2018