jm33-m0 / emp3r0r

Linux/Windows post-exploitation framework made by linux user
https://infosec.exchange/@jm33
MIT License
1.26k stars 232 forks source link

Reduce agent binary size #163

Closed c0okB closed 1 year ago

c0okB commented 1 year ago

I have benefited a lot from reading your newly modified code. There is a small demand, corresponding to the windows system, and the generated agent.exe has a size of 10 megabytes. Whether it can support the generation of smaller Trojan horses in the future only requires the function of uploading and downloading files and executing system commands. Because shellcode generation is not supported for the time being,I wonder if the Trojan can be made smaller so as to better perform the subsequent bypass AV operations.

jm33-m0 commented 1 year ago

Thanks. The resulting binary file can be packed with UPX so you may end up with 5MB or so.

Shellcode can act as a downloader so you can better stage your operation. For example you can write shellcode that downloads a PE loader, then the PE loader can download the actual agent binary and load it into its own memory space.

github-actions[bot] commented 1 year ago

Stale issue message

jm33-m0 commented 1 year ago

In https://github.com/jm33-m0/emp3r0r/commit/9fca402d7eb52a76fb67d0bfa72057e196a38486 bash binary was removed, the resulting agent binary (Linux) will be approximately 1MB smaller