Learn How to Unpack PECompact Tutorial

Subscribers:
178,000
Published on ● Video Link: https://www.youtube.com/watch?v=gGqyYJj5HgY



Category:
Tutorial
Duration: 6:46
5,247 views
0


Learn how to to unpack PECompact tutorial, teaching you how to unpack a binary which is packed using PECompact .

Zero2Auto 10% Coupon Code = "GUIDEDHACKING"
https://courses.zero2auto.com/?coupon=GUIDEDHACKING
^Automatically applied with the link above^

This was originally a 1 hour unpacking tutorial but we broke it down into smaller parts for easier viewing in our How to Unpack Malware tutorial series.

A packer is a piece of software which obfuscates the original binary on disk, they started as very simple programs which just did a simple xor against the original bytes. The original code would be replaced with a stub, and the stub would xor the original binary, map it into memory and then execute the original code. In this way, static analysis is impossible. But in this How to Unpack tutorial series you will learn the ins and outs of unpacking binaries, including malware samples. Unpacking malware is something as a malware analyst you would have to do quite frequently, as almost all malware uses packers to evade antivirus detection. While packers have become increasing complicated over the years, unpacking them still follows the same steps and has the same goal. The point of unpacking a binary is to enable static analysis, once you have dumped the original binary to disk, you can begin to reverse engineer it.

Discussion: https://guidedhacking.com/threads/how-to-unpack-pecompact-tutorial.16854/

Complete Playlist: https://www.youtube.com/playlist?list=PLt9cUwGw6CYGfoSL9PUlpKi23z0_R2gz-

In this How to Unpack Tutorial you will learn how to unpack a PECompact protected binary. PECompact is a cryptor or packer which compresses, obfuscates & protects programs, you use it if you want stop people from reversing engineering your software. PECompact works on all versions of Windows and can support any executables, DLLs and other executable file types. It is a good packer solution, offering multiple customization options including compression types, export compression, resource compression, code integrity check, preserve overlay, import table options.

But let's talk about this packed file and how to unpack PECompact. When we first open the file, it's clearly packed because the main function is very small and clearly packed, and this main function can't be analyzed by IDA, the stack pointer analysis fails, which typically means it's packed. We can see the import table is stripped and the strings are encrypted. After browsing around the code we find a function which is called via a function pointer in EDX, then we move into x64 dbg to take a better look, putting breakings on VirtualAllocate() and VirtualProtect() so we can catch it allocating memory for the decrypted code. After a few jumps we find the buffer filled with zeros, which then gets overwritten with data, indicating an unpacking routine. We watch the PECompact unpack routine calling virtual protect on all the sections and beginning to unpack the binary, the strings are still empty, but after a few more loops we see strings appear, indicating the unpacking has finished, at which point we can probably dump it by indicating the original entry point in Scylla. And that's it, you have successfully learned how to unpack PECompact.

Malware Hashes (MD5 - all on VirusBay):
Ammyy: 7fb83e646cbabc50bec4b33c8130b5ae
ASPack: 9cc1b039aa8e4a98da3c390fdacc414c
PECompact: ad8cd029b32568830c8304f6075bb805
Ramnit: 6ee3d4e6b9cec67165e90f7ee7c9c33b
VMProtect: a39b4f74b5108a2b9f1a33b2feb22cc5

Support us on Patreon: http://bit.ly/38mnveC
Donate on our Forum : http://bit.ly/2HkOco9

Follow us on Facebook : http://bit.ly/2vvHfhk
Follow us on Twitter : http://bit.ly/3bC7J1i
Follow us on Twitch : http://bit.ly/39ywOZ2
Follow us on Reddit : http://bit.ly/3bvOB57
Follow us on GitHub : http://bit.ly/2HoNXIS
Follow us on Instagram : http://bit.ly/2SoDOlu
#TryHackMe #Unpacking #PeCompact







Tags:
PECompact
how to unpack pecompact
pecompact packer
unpack pecompact
pecompact unpacker
pecompact tutorial
how to unpack pecompact tutorial
how to unpack
pecompact unpack
unpacking tutorial
malware analysis
malware analysis tutorial
malware unpacking
how to unpack binaries
malware analysis for beginners
malware analysis and reverse engineering
malware analysis tools