local 에서는 flag 가 보이는데, remote 에서는 flag 파일이 안보입니다
ubuntu 18.04 docker 환경설정해서 local 에서는 정상적으로 동작하는 것을 확인했습니다.
그런데 remote 로 연결하면 flag 파일이 보이지 않는데, 제가 뭘 잘 못한 걸까요?
local 실행 결과
root@9d8cef7e6f20:/home/fho# python fho.py
[+] Starting local process './fho': pid 5869
[!] Could not populate PLT: future feature annotations is not defined (unicorn.py, line 2)
[*] '/home/fho/fho'
Arch: amd64-64-little
RELRO: Full RELRO
Stack: Canary found
NX: NX enabled
PIE: PIE enabled
[!] Could not populate PLT: future feature annotations is not defined (unicorn.py, line 2)
[*] '/lib/x86_64-linux-gnu/libc-2.27.so'
Arch: amd64-64-little
RELRO: Partial RELRO
Stack: Canary found
NX: NX enabled
PIE: PIE enabled
[*] Switching to interactive mode
$ ls
fho fho.py fho2.py flag venv
$ cat flag
DH{**flag**}
remote 실행결과
root@9d8cef7e6f20:/home/fho# python fho.py
[+] Opening connection to host3.dreamhack.games on port 17073: Done
[!] Could not populate PLT: future feature annotations is not defined (unicorn.py, line 2)
[*] '/home/fho/fho'
Arch: amd64-64-little
RELRO: Full RELRO
Stack: Canary found
NX: NX enabled
PIE: PIE enabled
[!] Could not populate PLT: future feature annotations is not defined (unicorn.py, line 2)
[*] '/lib/x86_64-linux-gnu/libc-2.27.so'
Arch: amd64-64-little
RELRO: Partial RELRO
Stack: Canary found
NX: NX enabled
PIE: PIE enabled
[*] Switching to interactive mode
[*] Got EOF while reading in interactive
$ ls
$ cat flag
$
#pwnable
작성자 정보
답변
1
kimht
공부벌레
안녕하세요, 피노님.
혹시 도커 컨테이너 내부에서 gdb나 pwndbg를 설치하셨을까요?
gdb나 pwndbg를 설치하면 도커 컨테이너 내부의 libc 버전이 미세하게 달라질 수 있습니다.
따라서 익스플로잇 코드에서,
도커 컨테이너 내부의 libc 파일(/lib/x86_64-linux-gnu/libc-2.27.so
) 대신 첨부파일로 제공되는 libc-2.27.so
파일을 사용해 보시기를 바랍니다.
감사합니다.