테스트 랩에서 호스트 헤더 삽입

테스트 랩에서 호스트 헤더 삽입

테스트 랩에서 서버가 호스트 헤더 삽입에 취약한지 여부를 확인하려고 합니다. 호스트 헤더를 "www.cow.com"으로 삽입한 두 번째 시나리오에서는 여전히 302 Found가 표시됩니다. 이것은 이것이 호스트 주입에 취약하다는 것을 의미합니까? 그렇지 않은 경우 404를 찾을 수 없다고 표시됩니까?

시나리오 1:

kali01:~$ curl -v http://10.10.10.10/login.html

* Trying 10.10.10.10:80...

* TCP_NODELAY set

* Connected to 10.10.10.10 (10.10.10.10) port 80 (#0)

> GET /login.html HTTP/1.1

> Host: 10.10.10.10

> User-Agent: curl/7.67.0

> Accept: */*

>

* Mark bundle as not supporting multiuse

< HTTP/1.1 302 Found

< Location: https://10.10.10.10:443/login.html

< Connection: close

< Strict-Transport-Security: max-age=15552000, preload

< X-Frame-Options: DENY

< Content-Length: 0
  1. 시나리오 2:

호스트 헤더일 때www.cow.com삽입해도 여전히 302 Found가 표시됩니다.

kali01:~$ curl -H "Host:www.cow.com" -v http://10.10.10.10/login.html

* Trying 10.10.10.10:80...

* TCP_NODELAY set

* Connected to 10.10.10.10 (10.10.10.10) port 80 (#0)

> GET /login.html HTTP/1.1

> Host:www.cow.com

> User-Agent: curl/7.67.0

> Accept: */*

>

* Mark bundle as not supporting multiuse

< HTTP/1.1 302 Found

< Location: https://www.cow.com:443/login.html

< Connection: close

< Strict-Transport-Security: max-age=15552000, preload

< X-Frame-Options: DENY

< Content-Length: 0

<

* Closing connection 0

관련 정보