its-a-feature / Mythic

A collaborative, multi-platform, red teaming framework
Other
3.22k stars 430 forks source link

How can I generate a raw shell code in C format? #79

Closed akshay-1994 closed 3 years ago

akshay-1994 commented 3 years ago

I have been using mythic for doing some amazing Red Team engagements. For MAC envs, Mythic is my go to. KUDOS to you people! However, when I generated payload for windows, I got blocked by defender and EDR solutions. Then I had to write my own shell code and .NET wrapper to evade both of them. I wanted to check if I can use the raw shell code generated by mythic in my wrapper to make a connect back to C2. Right now it's meagre reverse shell on Metasploit. I just need a way to convert raw shell code to C format shell code which I can use in my payload generation.

its-a-feature commented 3 years ago

The raw shellcode options that are generated by Apollo and atlas leverage https://github.com/TheWover/donut to convert the .NET code to PIC shellcode. At that point you have a few options:

With that second option you'll be able to automatically keep generating your c-arrays without having to run scripts locally.

its-a-feature commented 3 years ago

I'm gonna close this since it's been a month, but if you still have questions or issues, feel free to respond to this still