TheWover / donut

Generates x86, x64, or AMD64+x86 position-independent shellcode that loads .NET Assemblies, PE files, and other Windows payloads from memory and runs them with parameters
BSD 3-Clause "New" or "Revised" License
3.38k stars 610 forks source link

capturing stdout of a donut #135

Open djn3m0 opened 10 months ago

djn3m0 commented 10 months ago

hi,

i load the donut file like so,

    void* exec = VirtualAlloc(0, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
     memcpy(exec, data, size);
    ((void(*) ())exec)();

how can i capture the output of the donut? i tried to redirect stdout and stderr but my code after ((void(*) ())exec)() never gets executed so I cannot even tell if my stdout redirection worked or not!

i would appreaciate any help, thanks

djn3m0 commented 9 months ago

I would appreciate any clue. Thanks