straylight Posted October 9, 2009 Posted October 9, 2009 Hello All, this is my first post to tuts4you! Hopefully my question is a simple one. I'm trying to load a DLL (dropped by malware) into Olly. I have made the changes to the characteristics section of binary so that olly sees the DLL as a .exe to bypass loaddll. The following is the EP of the malicious dll when opening in olly: 100037A1 >/$ 8BFF MOV EDI,EDI ; ntdll.7C910228100037A3 |. 55 PUSH EBP100037A4 |. 8BEC MOV EBP,ESP100037A6 |. 33C0 XOR EAX,EAX100037A8 |. 40 INC EAX100037A9 |. 3945 0C CMP DWORD PTR SS:[EBP+C],EAX100037AC |. 75 09 JNZ SHORT Copy_of_.100037B7100037AE |. 8B4D 08 MOV ECX,DWORD PTR SS:[EBP+8]100037B1 |. 890D A4E50010 MOV DWORD PTR DS:[1000E5A4],ECX100037B7 |> 5D POP EBP100037B8 \. C2 0C00 RETN 0C I have read the post titled "Unpacking DLLs and Drivers with OllyDbg" however I can't seem to get that method (described in the post) to work. When I hit the "RETN 0C" listed above it jumps off into Kernel32 and terminates. The DLL seems to be obfuscated in someway as it makes a request out to the internet.... and the address of the requested site is not visible in the strings listing. Any ideas on how to load and successfully step through this DLL in a debugger? Thanks!
SunBeam Posted October 16, 2009 Posted October 16, 2009 Always provide the target when asking SPECIFIC questions! Do post it..
What Posted October 16, 2009 Posted October 16, 2009 That is the entrypoint for a dll.DllMain(HINSTANCE handle, DWORD reason, *VOID reserved);Dlls do not run like normal applications, you have to call an export of the dll, usually from an executable file. This particular code is just saving the handle of the dll when DLL_PROCESS_ATTACH is the reason. Thats it.
delldell Posted November 22, 2009 Posted November 22, 2009 if you upload the [dll] so we can have a look to have an idea of the dll
rhboarder Posted November 24, 2009 Posted November 24, 2009 when you 1st load it into Olly, do a search of all intermodular calls and set a breakpoint on the call that makes the request. One common networking dll is ws2_32, if it's that look for calls to connect, send, sendto, WSAConnect, etc. Once you find that you can work around it, hopefully.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now