[SK쉴더스 Rookies 19기] 클라우드 기반 스마트 융합보안 과정
https://portswigger.net/web-security/file-path-traversal/lab-simple
Lab: File path traversal, simple case | Web Security Academy
This lab contains a path traversal vulnerability in the display of product images. To solve the lab, retrieve the contents of the /etc/passwd file. Solution ...
portswigger.net
가. 문제점
[CASE 9] Directory Traversal
Web Security Academy 서비스 내 일부 페이지에서 다운로드를 담당하는 변수 입력 값에 대한 필터링 검증이 부재하여 웹페이지 접속 시 파일 다운로드 소스로 붙어 있는 파라미터 값을 변조하여 웹을 통해 웹 어플리케이션의 소스파일 및 시스템 파일에 접근하거나 읽을 수 있는 가능성이 존재합니다.
나. 관련 URL
번호 | 경로 | URL |
1 | / | / |
2 | /image?filename= |
다. 해결 방안
파일이 위치하는 경로를 변수로 사용하지 않고 해당 파일의 키 값을 변수로 사용하여 다운로드 기능을 구현해야 합니다. 파일 위치 경로 변수를 사용할 경우, “../”, ”..\”, ”.\”, “%” 등 특수문자의 적절한 보안 필터링을 해야 합니다.
728x90