donut icon indicating copy to clipboard operation
donut copied to clipboard

Building MinGW32 + Clang 10 + wclang on Ubuntu 20.04

Open janedoe-lab opened this issue 3 years ago • 4 comments

These changes required to make master branch of donut compile using Clang 10 with Mingw32 under Ubuntu 20.04.

Things working for me:

  • Compiling release version of donut and loader 32/64bit in Ubuntu 20.04 using clang+lld from LLVM 10 running under mingw32 and wclang
  • Generating donut shellcode using wine donut.exe -o shellcode.bin -b 1 -a 1 exec.exe
  • Both 32 and 64 shellcodes work

What doesn't work:

  • AMSI bypass does NOT work - it crashes right now inside generated shellcode's loader
  • Debug version of loader32.exe/loader64.exe fail to load debug instance - fails on "Resolving address of CreateThread"
  • dev branch does not work with these changes for me

janedoe-lab avatar Mar 11 '22 13:03 janedoe-lab

Nice work @janedoe-lab ! One question: Do you happen to know how to tell clang that it should use Intel syntax from the inline assembly?

S4ntiagoP avatar Mar 14 '22 16:03 S4ntiagoP

Sorry, not experienced much in all these tools. This branch is a result of bruteforcing a right set of options to get it going, and not based on any prior knowledge of these tools :)

janedoe-lab avatar Mar 14 '22 19:03 janedoe-lab

understood, thanks 😄

S4ntiagoP avatar Mar 14 '22 19:03 S4ntiagoP

Since this is incomplete but may still be valuable to anyone attempting to do the same thing, I will not merge it for version 1.0 but will mark it as invalid and may revisit later.

TheWover avatar Dec 05 '22 17:12 TheWover