This article presents information on manual unpacking of protected malicious Windows executables using the OllyDbg debugger. It also involve in fully rebuild the import table so the file can be restored to its original state and executed. Many anti-virus vendors are categorized UPX, NsPack, ASpack and many other PE packers as malicious software.
UPX, NsPack, ASpack are the most common packers, here I will concentrate more in NSpack 3.7. For this analysis we need good knowledge on few topics: PE file format, Basic on Win32 API and few tools are required like OllyDebug 1.10 , OllyScript Plug-in, OllyDump plug-in, Import ReConstructor.
Packers ???
A 'Packer' is a compression routine that squeezes an executable file. These programs created to reduce disk space and make downloads faster. It makes difficult to understand the original file and make it tricky to match the file signature of a compressed file.
Packers initially send PE internal structures and then it identifies PE header, Export table, and import table in new structures & attaches code segment before OEP, called as STUB .i.e. the compressed executable is shifted to data section of newly created file. PE header & section header is no more useful since data is compressed means packer added the stub function.
Manual Unpacking using Olly
Here we deal about unpacking Nspack compressed executables using Olly. Extra care should be taken while unpacking malware samples in Olly .i.e. creating isolated host (VMware or sun virtualBox or non-networked system) for all these experiments on malware samples. To create a isolated safe environment, you will find lot of supporting documents by GÖÖGLING & very important is to be a good friend of Google.
Before we start unpacking, we need to configure Olly & environment:
Get OllyDbg program along with OllyDump plug-in, this is very common plug & very easy to find. Extract ‘OllyDump.dll’ (OllyDump plug-in) in the plug-in directory, for example: C:\Olly\Plug-in… when you execute Olly & check it should be something similar to below figure.
So having this done we move on to load Nspack in Olly. While loading we get an alert, something similarly to this:
UPX, NsPack, ASpack are the most common packers, here I will concentrate more in NSpack 3.7. For this analysis we need good knowledge on few topics: PE file format, Basic on Win32 API and few tools are required like OllyDebug 1.10 , OllyScript Plug-in, OllyDump plug-in, Import ReConstructor.
Packers ???
A 'Packer' is a compression routine that squeezes an executable file. These programs created to reduce disk space and make downloads faster. It makes difficult to understand the original file and make it tricky to match the file signature of a compressed file.
Packers initially send PE internal structures and then it identifies PE header, Export table, and import table in new structures & attaches code segment before OEP, called as STUB .i.e. the compressed executable is shifted to data section of newly created file. PE header & section header is no more useful since data is compressed means packer added the stub function.
Manual Unpacking using Olly
Here we deal about unpacking Nspack compressed executables using Olly. Extra care should be taken while unpacking malware samples in Olly .i.e. creating isolated host (VMware or sun virtualBox or non-networked system) for all these experiments on malware samples. To create a isolated safe environment, you will find lot of supporting documents by GÖÖGLING & very important is to be a good friend of Google.
Before we start unpacking, we need to configure Olly & environment:
Get OllyDbg program along with OllyDump plug-in, this is very common plug & very easy to find. Extract ‘OllyDump.dll’ (OllyDump plug-in) in the plug-in directory, for example: C:\Olly\Plug-in… when you execute Olly & check it should be something similar to below figure.
OllyDump Plug-in |
So having this done we move on to load Nspack in Olly. While loading we get an alert, something similarly to this:
No comments:
Post a Comment