2022. 10. 5. 11:09ㆍsystem(pwnable)시스템(포너블)/Dreamhack wargame
python pwntool exploit script 작성팁
import from pwn import * 접속 원격 접속 nc process=remote ("pwnable.kr",9000) 원격 접속 ssh shell=ssh("note","pwnable.kr",port=2222,password="guest") p=shell.run('/bin/sh') p.sendline("nc 0 9019")..
oulth.tistory.com
📌파이썬으로 pwntool exploit 스크립트 작성하는 방법
1. import하기
from pwn import *
2. 원격 접속(tcp connection 만들기)
nc
r =remote ("주소", 포트 넘버)
ssh
p1 = ssh("계정명", "서버주소", port=포트, password="비밀번호")
#해당 바이너리에 argv 주고싶으면 3-5라인처럼 추가하기
argv1 = ["" for i in range(argc)]
argv1[1] = "AAAA"
argv2[2] = "BBBB"
p = p1.process("실행할 바이너리 절대경로")
https://angelikaros.github.io/pwntools/
pwndbg 사용법 정리
pwntools 한줄 설치 ``` python3 -m pip install –upgrade pwntools
angelikaros.github.io
https://dreamhack.io/wargame/challenges/2/
basic_exploitation_000
Description 이 문제는 서버에서 작동하고 있는 서비스(basicexploitation000)의 바이너리와 소스 코드가 주어집니다. 프로그램의 취약점을 찾고 익스플로잇해 셸을 획득한 후, "flag" 파일을 읽으세요. "fla
dreamhack.io
중간에 이런 오류가 발생했었다. 간단히 말하면 DNS가 정상작동을 하지 않아서 발생하는 문제였다.
아래 블로그가 문제 해결에 도움이 되었다.

https://wan2.land/posts/2017/03/22/ubuntu-resolvconf-settings-summary/
우분투 resolv.conf 세팅 정리
서버는 AWS EC2(Ubuntu 16.04) + RDS 를 사용하고 있습니다. 일단, 문제의 발단은 다음 에러였습니다. SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known PDO쪽에서 Exception이 발생했
wan2.land

'system(pwnable)시스템(포너블) > Dreamhack wargame' 카테고리의 다른 글
| [Dreamhack] Return to Library (0) | 2023.01.18 |
|---|---|
| [Dreamhack] shell_basic (0) | 2022.11.03 |
| pwndbg, pwntools 설치 오류 (0) | 2022.10.02 |
| [Dreamhack]basic_exploitation_000 빌드업(pwntools, gdb peda사용법) (0) | 2022.09.25 |