정보보호
파일 업로드 취약점
ljy98
2021. 9. 7. 08:46
1. 파일 업로드 취약점 개요
2. 파일 업로드 취약점 종류
1. 파일 업로드 취약점 개요
2. 파일 업로드 취약점 이해
2.1. 악성파일 업로드
(1) 파일 업로드 기능 찾기
- 게시판의 HTML Editor 첨부 기능 확인
- 홈페이지 내의 구현된 첨부 기능 확인
(2) 개발운영환경에서 실행 가능한 언어로 작성된 악성파일 업로드 시도
PHP | php, php3, php4, php5, phtml, inc |
JSP | jsp, jsf |
ASP | Asp, asa, cds, cer 등 |
ASP.NET | aspx, asax, ascx, ashx, asmx, axd, config, cs, csproj, licx, rem, resources, resx, soap, vb, vbproj, vsdisco |
(3) 우회기법
- CSS(Client Side Script) 조작을 통한 업로드 시도
- 확장자 연장: webshell.txt.asp / webshell.txt.jpg.hwp.asp
- 종단문자: webshell.asp%00.txt
2.2. 악성파일 실행
(1) 업로드 성공 시 저장된 서버 경로명 확인
- 파일 다운로드 구현 시 요청한 파일 이름을 매개변수로 활용하는 동적 방식인 경우 경로명 노출
ex) http://XXX.XXX.XXX.XXX/demoshop/shop_board/shop_download.asp?strFileName=webshell(23).asp&f_path=upload_file
(2) 업로드를 통해 저장된 악성파일명과 경로명을 조합한 URL 구문을 이용하여 요청
- URL 직접접근을 통한 페이지 호출
ex) http://XXX.XXX.XXX.XXX/demoshop/shop_board/upload_file/webshell(23).asp