보안관제 이벤트 분석

[보안관제] 검증 안된 리다이렉트 탐지(Unverified Redirect)

jarvis-concert 2024. 11. 21. 14:01
반응형

공격설명

웹 페이지가 변조되어, 페이지 방문 시 타 사이트로 자동 전환시키는 공격을 탐지하는 정책이다.300 ~ 307 응답 헤더의 Redirect URL이 HTTP 요청 헤더의 호스트와 다를 경우 검증안된 리다이렉트로 간주한다.

 

공격구문

GET /recipe-lab/archive/how-to-make-ssamjang HTTP/1.1
Host: 70th.sempio.com
Connection: keep-alive
Accept-Language: en-US,en;q=0.5
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Linux; Android 5.0) AppleWebKit/537.36 (KHTML, like Gecko) Mobile Safari/537.36 (compatible; Bytespider; spider-feedback@bytedance.com)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/heif,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate, br

 

→ 접근하려는 주소는 www.sempio.com 이지만 전혀 다른 주소인 semie.cooking로 redirect 된다 

 

-> 응답값

HTTP/1.1 301 Moved Permanently
Server: nginx/1.24.0
Date: Thu, 21 Nov 2024 01:10:01 GMT
Content-Type: text/html
Content-Length: 169
Connection: keep-alive
Location: https://semie.cooking
X-UA-Compatible: IE=edge

<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.24.0</center>
</body>
</html>

 

301 Moved Permanently

HTTP 301 Moved Permanently 리디렉션 상태 응답 코드는 요청한 리소스가 Location 헤더에 주어진 URL로 완전히 옮겨졌다는 것을 나타낸다. 브라우저는 이 페이지로 리디렉트하고, 검색 엔진은 해당 리소스로 연결되는 링크를 갱신다.

 

대처방안

Redirect Location 주소는 호스트와 동일하게 설정한다.

반응형