I am trying to modify .byte 0x0e and .byte 0x04. I tried to use inc byte ptr [rip+offset]
to get to the address of .byte 0x0e
and .byte 0x04
and change them. I ran gef and got SIGSEGV at those command. The offset should be correct as I ran objdump and it shows the index byte of hex correctly.
I tried to use lea r11, [_start]
to get to the address but it did not work when I assemble the code.
.global _start
_start:
.intel_syntax noprefix
mov rdx, 0x00000067616c662f
push rdx
mov rax, 2
mov rdi, rsp
xor rsi,rsi
inc byte ptr [rip+0xc]
inc byte ptr [rip+0x6]
inc byte ptr [rip+0x1]
.byte 0x0d
.byte 0x04
.byte 0x0d
should be modified as .byte 0x0f.byte 0x04
should be modified as .byte 0x05- Then a syscall should be initiated with 0f 05