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.53k stars 628 forks source link

Shellcode it is not closed properly in certain conditions #81

Closed jarilaos closed 3 years ago

jarilaos commented 3 years ago

If the format used is c or ruby the shellcode it is not closed properly when the last string is longer than 14 bytes.

If the length of the last string is 15 bytes the shellcode ends as follows: "\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00;

If the length of the last string is 16 bytes the shellcode ends in a new line as follows: ";

Something similar happens with py_template.

It causes that it is not possible to compile.