일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 정처기
- web3 보안
- web3
- amazon s3 트리거
- Session Manager
- 정보처리기사
- AWS SSM
- metacode
- File Upload
- 스마트 컨트랙트
- web shell
- aws 트리거
- 탈중앙화
- metacodem
- systems manager
- Path Traversal
- web security academy
- 티스토리챌린지
- aws lambda
- 오블완
- AWS CLI
- 보안 그룹
- 메타코드M
- 정처기필기
- 메타코드
- ELB
- 정처기 필기
- splunk db connect
- 블록체인
- 스마트컨트랙트
- Today
- Total
min8282
[File upload] Remote code execution via web shell upload 본문
[File upload] Remote code execution via web shell upload
min8282 2025. 4. 17. 16:34This 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 filesystem.
To solve the lab, upload a basic PHP web shell and use it to exfiltrate the contents of the file /home/carlos/secret. Submit this secret using the button provided in the lab banner.
You can log in to your own account using the following credentials: wiener:peter
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
실습 페이지로 이동하면 블로그 형태의 웹페이지로 이동된다.
문제에서 주어진 계정으로 로그인을 한다.(wiener/peter)
로그인에 성공하면 My Account 페이지로 이동하게 되고, 해당 페이지에는 업로드 기능이 존재한다.
먼저 정상적인 케이스를 시도하기 위해 임의의 이미지 파일을 업로드 한다.
출력된 메시지를 보아 avatars라는 폴더 하위에 이미지가 업로드된 것을 알 수 있다.
다시 My Account 페이지로 돌아와보면 업로드한 이미지 파일을 볼 수 있다.
이번에는 웹 셸을 업로드 해봤다. 웹 셸 코드는 다음과 같다.
<?php echo file_get_contents('/home/carlos/secret'); ?>
웹 셸 파일도 아무런 필터링 없이 업로드된 것을 알 수 있다.
버프스위트를 사용해서 요청 데이터와 응답 데이터를 확인해 보면 위와 같이 플래그?를 확인할 수 있다.
상단 배너에 있는 솔루션 제출 버튼을 클릭하고
응답 데이터에서 찾은 플래그를 입력한다.
문제 해결 완료
'Web Security Academy' 카테고리의 다른 글
[Path traversal] File path traversal, traversal sequences stripped with superfluous URL-decode (0) | 2025.04.18 |
---|---|
[File upload] Web shell upload via extension blacklist bypass (1) | 2025.04.17 |