Logo di Sh Kb Ssrf

Sh Kb Ssrf

Community
dmdhrumilmistry
sh-kb-ssrf

Knowledge base for finding Server-Side Request Forgery - when the server makes outbound requests to attacker-controlled destinations. Use when hunting SSRF or reviewing URL/host inputs that reach HTTP/network clients. CWE-918, OWASP A10:2021-SSRF.

Panoramica

Pubblicato dadmdhrumilmistry
Repositorysecurity-harness
Nome della skillsh-kb-ssrf
Stelle
42
Fork
11
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da dmdhrumilmistry su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Sh Kb Ssrf in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/dmdhrumilmistry/security-harness/tree/main/plugins/security-harness/skills/sh-kb-ssrf
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dmdhrumilmistry/security-harness.git /tmp/security-harness
mkdir -p .claude/skills
cp -r /tmp/security-harness/plugins/security-harness/skills/sh-kb-ssrf .claude/skills/sh-kb-ssrf
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Sh Kb Ssrf in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Sh Kb Ssrf non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Sh Kb Ssrf non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Server-Side Request Forgery (SSRF) - Hunter Knowledge Base

The server fetches a URL the attacker controls, letting them reach internal services, cloud metadata, or the loopback interface from the server's trusted position.

When to hunt this

Features that fetch remote resources: webhooks, URL preview/unfurl, image/PDF fetchers, import-from-URL, SSO/OIDC discovery, PDF/HTML renderers, avatar-by-URL, proxy endpoints, XML/SVG with remote refs.

Sources

Any user-supplied URL/host/IP/port: request params/body, redirect targets, Location following, filenames that become URLs, hostnames in config uploaded by users.

Sinks (grep targets)

  • Python: requests.get/post(, urllib.request.urlopen(, httpx., aiohttp, urllib3.
  • JS/TS: fetch(, axios(, http.get/request(, got(, node-fetch, request(.
  • Java: URL(...).openConnection(), HttpClient.send(, RestTemplate, OkHttpClient.
  • Go: http.Get/Post(, http.NewRequest(. PHP: curl_exec, file_get_contents($url), fopen.
  • Also: SVG/XML parsers, PDF generators (wkhtmltopdf/headless Chrome), image libraries fetching remote.

Detection recipe

  1. graft grep "requests\.|urlopen|fetch\(|axios|http\.Get|HttpClient|curl_exec|file_get_contents" --json.
  2. Check whether the destination URL/host derives from user input.
  3. Look for the (usually missing) allowlist / SSRF guard: DNS-resolve + IP range check, scheme check, blocking of 169.254.169.254, 127.0.0.1, ::1, metadata.google.internal, RFC1918, .internal.

Payloads / PoC

  • Cloud metadata: http://169.254.169.254/latest/meta-data/iam/security-credentials/ (AWS), http://metadata.google.internal/computeMetadata/v1/ (GCP, header Metadata-Flavor: Google), http://169.254.169.254/metadata/instance?api-version=2021-02-01 (Azure).
  • Internal scan: http://127.0.0.1:<port>/, http://localhost/admin, internal hostnames.
  • Bypasses: http://0/, http://0177.0.0.1, http://2130706433 (decimal IP), http://127.0.0.1.nip.io, redirect chains (allowed host 302s to internal), DNS rebinding, http://[::], http://[::ffff:127.0.0.1].
  • Non-HTTP schemes: file://, gopher:// (craft raw TCP to Redis/SMTP), dict://, ftp://.
  • URL-parser confusion (differential parsing, per Orange Tsai's research): if the validator and the actual HTTP client parse the URL with different libraries/standards, craft a URL both parse differently - e.g. http://expected-host\@evil.com (backslash before @): WHATWG-URL-based parsers normalize \ to / and treat evil.com as the host, while an RFC-3986-only parser may read expected-host as the userinfo host. Also test embedded credentials (http://expected-host@evil.com), http://evil.com#@expected-host, and mixed-case/percent-encoded hosts if the validator and the fetch call use different URL parsers.
  • PoC: point the fetcher at a collaborator/attacker host and confirm the server connects (out-of-band).

False-positive filters

  • Destination is a hardcoded/allowlisted host or a fixed base URL with only a path from the user.
  • A real SSRF guard runs: scheme allowlist (https only) and resolved-IP range check after DNS resolution, with redirects disabled or re-validated (validating the string before resolving is bypassable).
  • The validation step and the fetch step use the same URL-parsing library/call to extract the host (no parser-confusion gap) - if they differ (e.g. a regex/manual parse for the allowlist check vs. the language's URL/HTTP-client parser for the actual request), still flag even with an allowlist present.
  • Egress is network-restricted to specific hosts (note as mitigation, still flag if the code guard is absent).

CWE / OWASP / severity

CWE-918. OWASP A10:2021. critical when it reaches cloud metadata/credentials or internal admin; high for internal network access; medium if only blind/limited.

Chaining hints

SSRF -> cloud metadata -> IAM credentials -> account/infra takeover; SSRF -> internal unauth admin API -> RCE; SSRF + gopher -> Redis/DB command exec; pairs with open-redirect (to bypass allowlists) and XXE.

Mitigation

Allowlist destinations (scheme + host); resolve DNS then verify the IP is public and not in blocked ranges, re-checking on each redirect (or disable redirects); drop non-HTTP schemes; isolate egress; use a dedicated metadata-blocking proxy; enforce IMDSv2 on AWS.

Domande frequenti

Cosa fa la skill IA Sh Kb Ssrf?

Knowledge base for finding Server-Side Request Forgery - when the server makes outbound requests to attacker-controlled destinations. Use when hunting SSRF or reviewing URL/host inputs that reach HTTP/network clients. CWE-918, OWASP A10:2021-SSRF.

Perché usare Sh Kb Ssrf su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Sh Kb Ssrf è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Sh Kb Ssrf in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/dmdhrumilmistry/security-harness/tree/main/plugins/security-harness/skills/sh-kb-ssrf. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Sh Kb Ssrf?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Sh Kb Ssrf?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Sh Kb Ssrf: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Sh Kb Ssrf è gratuita?

Sì. È pubblicata su GitHub da dmdhrumilmistry con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇