Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C Loader stub flagged by AV #165

Open
jack898 opened this issue Dec 18, 2024 · 2 comments
Open

C Loader stub flagged by AV #165

jack898 opened this issue Dec 18, 2024 · 2 comments

Comments

@jack898
Copy link

jack898 commented Dec 18, 2024

I have used Donut for a while with no issues--my typical usage looks like this:

  1. Make a C/C++ program
  2. Compile with g++ or gcc
  3. Convert the executable to a standalone shellcode with "donut -i program.exe -o program.bin", then inject this binary into a process via CreateRemoteThread.

This worked without issue on Windows 11, even with Windows Defender Real-Time Protection enabled, until a month ago. Now Defender aborts the process before the injected shellcode executes.

Out of curiosity I made a simple windows messagebox shellcode and uploaded it to VirusTotal, and found 15/61 AVs flagging it, presumably via the loader stub.

Defender still seemed to flag it when I used different -e options.. (presumably the stubs for each of these are in the AV databases).

Is there another option I'm missing to obfuscate/change the ASM loader stub itself? Otherwise is there a plan to modify this stub to avoid antivirus detection?

Thanks!

@howmp
Copy link

howmp commented Dec 19, 2024

Try ollvm loader: https://github.com/howmp/donut_ollvm

@jack898
Copy link
Author

jack898 commented Dec 20, 2024

@howmp Thanks for sharing--the shellcode binary gets no hits when I use donut_ollvm to generate it, but still when I inject it via CreateRemoteThread, with Real-time Protection enabled on Defender, the process fast fails via Defender and Defender says threat detected. (Tested injection in Notepad.exe but also a non-Windows process, same results)

Does a different injection technique avoid this? I am able to use CreateRemoteThread with the pe-to-shellcode generated shellcode with no Defender popups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants