Post

Root-me File upload Double extensions

File upload - Double extensions



1
2
3
4
5
6
Author
g0uZ,  24 December 2012

Statement
Your goal is to hack this photo galery by uploading PHP code.
Retrieve the validation password in the file .passwd at the root of the application.






Solution



웹셸을 작성한 후 파일명을 확장자를 두 개를 해주면 된다.
webshell.php.png

업로드를 해준 뒤 .passwd 파일을 출력해주면 되는데, 이 파일은 확인해보니 현재 경로에서 ../../../로 가면 파일이 있다.

따라서 ?cmd=cd ../../../; cat .passwd를 해주면 비밀번호가 출력된다.






This post is licensed under CC BY 4.0 by the author.