Usa msfencode: link
Gli 0 di cui stai parlando sono null byte , che sono essenzialmente terminatori. Quando il programma incontra un byte nullo, il programma viene terminato. Usando msgencode puoi usare l'opzione -b
per evitare l'uso di byte null.
Inoltre potresti voler evitare altri caratteri come 0x0A e 0x0D che sono interruzioni di riga.
root@kali:~# msfencode -h
Usage: /usr/bin/msfencode >options>
OPTIONS:
-a >opt> The architecture to encode as
-b >opt> The list of characters to avoid: '\x00\xff'
-c >opt> The number of times to encode the data
-d >opt> Specify the directory in which to look for EXE templates
-e >opt> The encoder to use
-h Help banner
-i >opt> Encode the contents of the supplied file path
-k Keep template working; run payload in new thread (use with -x)
-l List available encoders
-m >opt> Specifies an additional module search path
-n Dump encoder information
-o >opt> The output file
-p >opt> The platform to encode for
-s >opt> The maximum size of the encoded data
-t >opt> The output format: bash,c,csharp,dw,dword,java,js_be,js_le,num,perl,pl,powershell,ps1,py,python,raw,rb,ruby,sh,vbapplication,vbscript,asp,aspx,aspx-exe,dll,elf,exe,exe-only,exe-service,exe-small,loop-vbs,macho,msi,msi-nouac,psh,psh-net,psh-reflection,vba,vba-exe,vbs,war
-v Increase verbosity
-x >opt> Specify an alternate executable template