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

  • The shellcode writes %SystemRoot%\System32\1.exe and executes it.

  • The shellcode downloads a file from a URL stored within the encoded payload, writes it to disk, and executes it.

  • ). You can set OllyDbg as your just-in-time debugger by selecting Options ▸ Just-in-Time Debugging ▸ Make OllyDbg Just-in-Time Debugger. If you do not set a just-in-time debugger, you can still run the program by specifying the shellcode_launcher.exe program as the executable to debug, but you must also be sure to provide the program arguments as well.

    The shellcode decoder starts at in . It uses an alphabetic encoding with each encoded byte between 0x41 (A) and 0x50 (P). Each payload byte is stored in the low 4-bit nibble of two encoded bytes. The decoder loads each pair of encoded bytes, subtracts the base value 0x41, shifts and adds the two values, and stores the value back to memory. The push shown at is used to transfer control to the payload with the retn at .

    to manually resolve import functions. The findKernel32Base function returns the location of kernel32.dll in memory, and the findSymbolByHash function manually parses the provided DLL in memory, looking for the export symbol whose name hashes to the given DWORD value. These function pointers are stored back onto the stack for use later. shows the decoded shellcode searching for function imports.

    sss
    sss

    © RuTLib.com 2015-2018