Lets check different Cobalt Strike shellcodes and stages in the shellcodes emulator SCEMU.
This stages are fully emulated well and can get the IOC and the behavior of the shellcode.
But lets see another first stage big shellcode with c runtime embedded in a second stage.
In this case is loading tons of API using GetProcAddress at the beginning, then some encode/decode pointer and tls get/set values to store an address. And ends up crashing because is jumping an address that seems more code than address 0x9090f1eb.
Here there are two types of allocations:
Lets spawn a console on -c 3307548 and see if some of this allocations has the next stage.
The "m" command show all the memory maps but the "ma" show only the allocations done by the shellcode.
Dumping memory with "md" we see that there is data, and dissasembling this address with "d" we see the prolog of a function.
So we have second stage unpacked in alloc_e40064
With "mdd" we do a memory dump to disk we found the size in previous screenshot, and we can do some static reversing of stage2 in radare/ghidra/ida
In radare we can verify that the extracted is the next stage:
I usually do correlation between the emulation and ghidra, to understand the algorithms.
If wee look further we can realize that the emulator called a function on the stage2, we can see the change of code base address and is calling the allocated buffer in 0x4f...
And this stage2 perform several API calls let's check it in ghidra.
We can see in the emulator that enters in the IF block, and what are the (*DAT_...)() calls
Before a crash lets continue to the SEH pointer, in this case is the way, and the exception routine checks IsDebuggerPresent() which is not any debugger pressent for sure, so eax = 0;
So lets say yes and continue the emulation.
Both IsDebuggerPresent() and UnHandledExceptionFilter() can be used to detect a debugger, but the emulator return what has to return to not be detected.
Nevertheless the shellcode detects something and terminates the process.
Lets trace the branches to understand the logic:
target/release/scemu -f shellcodes/unsuported_cs.bin -vv | egrep '(\*\*|j|cmp|test)'
Lets see from the console where is pointing the SEH chain item:
to be continued ...
https://github.com/sha0coder/scemu
Continue reading
- Hacker Tools For Mac
- What Is Hacking Tools
- Hack Tools
- New Hacker Tools
- Hacker Tools Github
- Hacking Tools For Windows Free Download
- Hack Tools Pc
- Hacking Tools Windows 10
- Best Pentesting Tools 2018
- Hacker Tools Apk
- Pentest Tools Download
- Hacking Tools For Beginners
- Pentest Tools List
- Hacker
- How To Make Hacking Tools
- Hack App
- Hack Tools
- Pentest Tools For Ubuntu
- Pentest Tools Android
- Pentest Tools Free
- Hacking Tools For Beginners
- Hack Apps
- Underground Hacker Sites
- Pentest Tools Alternative
- Hacker Tools Github
- Hacking Tools For Beginners
- Hacker Tools
- Best Hacking Tools 2020
- Github Hacking Tools
- Hacking Tools Hardware
- Hack Tools For Ubuntu
- How To Install Pentest Tools In Ubuntu
- Hackrf Tools
- Hack Tool Apk No Root
- Pentest Recon Tools
- Hackers Toolbox
- Pentest Tools Windows
- Hack Tool Apk No Root
- Pentest Tools Bluekeep
- Hacker Tools Hardware
- Hacker Tools Linux
- New Hack Tools
- Usb Pentest Tools
- Tools For Hacker
- Hacker Security Tools
- Pentest Tools Windows
- Best Hacking Tools 2019
- Pentest Tools Url Fuzzer
- Hacker Tools
- Pentest Tools Nmap
- Hak5 Tools
- Ethical Hacker Tools
- Pentest Tools Review
- Hacker Hardware Tools
- Hack Tool Apk No Root
- Pentest Tools Bluekeep
- New Hacker Tools
- Android Hack Tools Github
- Hacker Tools Github
- Pentest Tools Url Fuzzer
- Hackrf Tools
- Hacking Tools Online
- Hacking Tools Mac
- Pentest Tools For Android
- Hacking Tools
- What Is Hacking Tools
- Best Hacking Tools 2019
- Free Pentest Tools For Windows
- Pentest Tools
- Hack Tools Mac
- Nsa Hacker Tools
- Hacker Hardware Tools
- Hacking Tools Mac
- Wifi Hacker Tools For Windows
- Pentest Tools Review
- Install Pentest Tools Ubuntu
- Hacking Tools For Mac
- Hacks And Tools
- Best Hacking Tools 2019
- Physical Pentest Tools
- Pentest Tools Port Scanner
- Hacking Tools 2020
- Hack Tools For Windows
- Hacking Tools Mac
- Hacker Tools 2019
- Hacking Tools Kit
- Install Pentest Tools Ubuntu
- Underground Hacker Sites
- Easy Hack Tools
- Hackrf Tools
- Hacker
- New Hacker Tools
- Tools For Hacker
- Pentest Recon Tools
- Hacker Techniques Tools And Incident Handling
- Pentest Box Tools Download
- Pentest Automation Tools
- Hacking Tools For Mac
- Hack App
- Pentest Tools Linux
- Pentest Recon Tools
- Hacker Tools Hardware
- Hacker Tools Github
- Hack Rom Tools
- Hacking Tools For Games
- Hack Tools For Ubuntu
- Growth Hacker Tools
- Hackrf Tools
- Hacking Tools For Pc
- Hacker Tools 2020
- Hack Tools Download
- How To Install Pentest Tools In Ubuntu
- Hacker Hardware Tools
- Hacker Tools
- Pentest Reporting Tools
- Beginner Hacker Tools
- Hacking Tools Name
- Hacking Tools Download
- Hacker Tools For Ios
- Hacking Tools For Kali Linux
- Hacking Tools Free Download
- Termux Hacking Tools 2019
- Hacking Tools Github
- Hacking Tools Pc
- Underground Hacker Sites
- Wifi Hacker Tools For Windows
- Hacking Tools
- Pentest Tools Free
- Free Pentest Tools For Windows
- Pentest Automation Tools
- Hack Tools Pc
- Hack Rom Tools
- Pentest Tools
- Kik Hack Tools
- Easy Hack Tools
- Easy Hack Tools
- Hack Rom Tools
- Pentest Tools For Ubuntu
- Hacker
- Pentest Tools Review
- Hacking Tools Download
- Hacking Tools For Windows 7
- Hacking Tools For Mac
- Hack Tools For Mac
- Hacker Tools 2020
- Hacking Tools For Windows
- New Hack Tools
- New Hacker Tools
- Hacking Tools Hardware
- Blackhat Hacker Tools
- Hacker Search Tools
- Free Pentest Tools For Windows
- Easy Hack Tools
- Nsa Hack Tools Download
- Pentest Automation Tools
- Black Hat Hacker Tools
- Bluetooth Hacking Tools Kali
- Hacker Security Tools
- Pentest Tools Nmap
- Pentest Tools Windows
- Install Pentest Tools Ubuntu
- Growth Hacker Tools
- Pentest Tools Alternative
- Hacking Tools For Beginners
- Hack Tools Pc
- What Are Hacking Tools
- New Hacker Tools
- Pentest Tools Download
- Wifi Hacker Tools For Windows
- Pentest Tools Open Source
- Hacking Tools Download
- How To Make Hacking Tools
- Hack Website Online Tool
- Hacker Tools Software
No comments:
Post a Comment