Iriton's log

[Dreamhack] Lv.1 command-injection-chatgpt 본문

WebHacking/WarGame

[Dreamhack] Lv.1 command-injection-chatgpt

Iriton 2023. 11. 15. 18:30

소스코드를 확인하면 입력받은 값을 별다른 필터링 없이 cmd 명령어 ping으로 넣는다.

개발자가 원한 건 저기에 IP 주소를 넣는 것이겠지만 이를 우회해야 한다.

명령어를 한 줄에 두 번 사용하려면 세미콜론(:)으로 구분해주면 된다.

ls . 으로 현재 디렉토리에 있는 파일을 확인해 보자.

 

flag.py가 있다.

이 파일의 데이터를 읽어들이는 cat 명령어를 사용하면 볼 수 있을 것이다.

 

8.8.8.8; cat flag.py

 

'WebHacking > WarGame' 카테고리의 다른 글

[Dreamhack] Lv.1 Command Injection Advanced  (1) 2023.11.21
[webhacking.kr] old-44 : command injection  (1) 2023.11.21
[Dreamhack] Lv.1 csrf - 1  (0) 2023.11.14
[Webhacking.kr] Challenge 23  (0) 2023.11.14
[Dreamhack] Lv.1 csrf-2  (0) 2023.11.13
Comments