Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
HTTP methods define the type of action to be performed on a resource. While GET and POST are commonly used, other methods like PUT, DELETE, TRACE, and OPTIONS may be enabled and exploitable. This test identifies which HTTP methods are supported by the web server and checks for potential security issues such as arbitrary file upload (PUT), file deletion (DELETE), cross-site tracing (TRACE), and access control bypasses.
# Test all methods
methods=("GET""POST""HEAD""PUT""DELETE""OPTIONS""TRACE""CONNECT""PATCH""PROPFIND""PROPPATCH""MKCOL""COPY""MOVE""LOCK""UNLOCK")
for method in"${methods[@]}"; do
status=$(curl -s -o /dev/null -w "%{http_code}" -X $method https://target.com/)
echo"$method: $status"done
Step 3: Test PUT Method (File Upload)
# Test PUT for file upload
curl -X PUT https://target.com/test.txt -d "test content"
curl -X PUT https://target.com/test.html -d "<h1>Test</h1>"
curl -X PUT https://target.com/test.php -d "<?php phpinfo(); ?>"# Check if file was created
curl -s https://target.com/test.txt
curl -s https://target.com/test.html
curl -s https://target.com/test.php
# WebDAV PUT
curl -X PUT https://target.com/test.txt \
-H "Content-Type: text/plain" \
-d "test content"
# Test TRACE
curl -X TRACE https://target.com/ -v
# TRACE should echo the request back# If enabled, can be used for XST attacks to steal cookies# Check response# 200 with request echo = Vulnerable# 405 = Method disabled (secure)
Step 6: Test Access Control Bypass
# Test protected page with different methods
protected_url="https://target.com/admin/"# Normal request (may redirect to login)
curl -sI "$protected_url"# Try different methodsfor method in HEAD POST PUT OPTIONS PATCH; doecho"=== $method ==="
curl -s -o /dev/null -w "%{http_code}" -X $method"$protected_url"done# Try arbitrary method
curl -s -o /dev/null -w "%{http_code}" -X FAKE "$protected_url"
curl -s -o /dev/null -w "%{http_code}" -X FOO "$protected_url"
Step 7: Test Method Override Headers
# Method override through headers# If PUT returns 405, try override# X-HTTP-Method-Override
curl -X POST https://target.com/resource \
-H "X-HTTP-Method-Override: PUT" \
-d "content=test"# X-HTTP-Method
curl -X POST https://target.com/resource \
-H "X-HTTP-Method: DELETE"# X-Method-Override
curl -X POST https://target.com/resource \
-H "X-Method-Override: PUT"# _method parameter (Rails, Laravel)
curl -X POST https://target.com/resource \
-d "_method=DELETE"
# Apply same authorization for all methods@app.route('/resource', methods=['GET', 'POST', 'PUT', 'DELETE'])@require_authenticationdefresource():
# Authorization applied to all methodspass
4. Disable Method Override
# Django - don't use X-HTTP-Method-Override middleware# Remove: 'django.middleware.http.MethodOverrideMiddleware'
Risk Assessment
CVSS Score
Finding
CVSS
Severity
PUT enabled (file upload)
9.8
Critical
DELETE enabled
8.1
High
TRACE enabled
5.3
Medium
Auth bypass via method
8.8
High
WebDAV enabled
7.5
High
PUT Enabled Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H