Logo di Hardcoded Credential Hunt

Hardcoded Credential Hunt

CommunityPopolare
uphiago
hardcoded-credential-hunt

Detect hardcoded passwords in HTML forms, JavaScript, and API responses.

Add to TypingMind

Panoramica

Pubblicato dauphiago
Repositoryrecon-skills
Nome della skillhardcoded-credential-hunt
Stelle
1.3K
Fork
213
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 uphiago su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Hardcoded Credential Hunt 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/uphiago/recon-skills/tree/main/recon/hardcoded-credential-hunt
  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/uphiago/recon-skills.git /tmp/recon-skills
mkdir -p .claude/skills
cp -r /tmp/recon-skills/recon/hardcoded-credential-hunt .claude/skills/hardcoded-credential-hunt
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Hardcoded Credential Hunt 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 Hardcoded Credential Hunt 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 Hardcoded Credential Hunt 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à.

Hardcoded Credential Hunt

Detect credentials baked into client-side code or HTML responses. Targets include master passwords in form value attributes, secret keys in inline scripts, API tokens in configuration endpoints, and plaintext credentials leaked through debug error pages. This class of vulnerability bypasses authentication entirely — no brute force required.

When to Use

  • An application serves HTML forms with pre-filled or hidden password fields.
  • A configuration endpoint (/api/config, /env, /settings) returns JSON with credential-like strings.
  • A debug/error page leaks application secrets in JavaScript variables.
  • An unauthenticated API endpoint returns data that controls authentication (reset, exit registration, admin actions).
  • JavaScript bundles contain string assignments matching password patterns.

Prerequisites

  • terminal with curl and python3.
  • A target serving HTML, JSON, or JavaScript without proper authentication on configuration/settings endpoints.
  • Access to at least one public page, form, or API endpoint.

Quick Detection

bash
# Scan HTML for password fields with pre-filled values
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/PATH" | grep -Eoi '(?:password|passwd|senha|pass|pwd|secret)\s*[=:"]\s*"?[^"&\s]{4,30}"?' | head -10

# Scan JSON config endpoints for credential-like keys
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/api/config" | python3 -c "
import sys, json, re
try:
    data = json.load(sys.stdin)
    for k, v in data.items() if isinstance(data, dict) else []:
        if any(x in k.lower() for x in ['pass','secret','key','token','auth']):
            print(f'{k}: {v}')
except: pass
"

# Scan inline JavaScript for hardcoded secrets
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/" | grep -Eo '(?:SECRET|PASSWORD|API_KEY|TOKEN)\s*=\s*"[^"]{8,}"' | head -10

Procedure

Phase 1 — HTML Form Inspection

Look for password fields with value attributes or hidden inputs containing credentials:

bash
# Extract all password inputs
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/PATH" | python3 -c "
import sys, re
html = sys.stdin.read()
# Inputs with type=password and non-empty value
for m in re.finditer(r'<input[^>]*type\s*=\s*[\"\']password[\"\'][^>]*value\s*=\s*[\"\']([^\"\']+)[\"\']', html):
    print(f'PASSWORD FIELD: {m.group(1)}')
# Hidden inputs that look like passwords
for m in re.finditer(r'<input[^>]*type\s*=\s*[\"\']hidden[\"\'][^>]*name\s*=\s*[\"\']([^\"\']*(?:pass|senha|secret|token|key)[^\"\']*)[\"\'][^>]*value\s*=\s*[\"\']([^\"\']+)[\"\']', html, re.IGNORECASE):
    print(f'HIDDEN CREDENTIAL: {m.group(1)} = {m.group(2)}')
"

Phase 2 — Configuration Endpoint Probing

Probe common config endpoints that may leak credentials:

bash
for path in /api/config /api/settings /env /api/env /config.json /api/config.json \
            /api/v1/config /api/configuration /api/v2/settings /api/status; do
  result=$(curl --max-time 30 --connect-timeout 10 -sk "https://target.com$path" -w "\n%{http_code}" 2>/dev/null)
  code=$(echo "$result" | tail -1)
  if [ "$code" = "200" ]; then
    echo "=== $path (200) ==="
    echo "$result" | python3 -c "
import sys, json, re
data = sys.stdin.read()
# Try JSON
try:
    obj = json.loads(data)
    for k, v in obj.items() if isinstance(obj, dict) else []:
        if any(x in str(k).lower() for x in ['pass','secret','key','token','auth','jwt']):
            print(f'  {k}: {v}')
except:
    # Try regex on plain text
    for m in re.finditer(r'(?:password|passwd|secret|token|api[_-]?key)\s*[=:]\s*[\"']([^\"']{4,})[\"']', data, re.I):
        print(f'  {m.group(0)}')
" | head -20
  fi
done

Phase 3 — Debug Error Page Analysis

Werkzeug, Django, and Express debug pages often leak secrets in inline JavaScript:

bash
# Trigger an error and check for credential leaks
curl --max-time 30 --connect-timeout 10 -sk "https://target.com:PORT/ERROR_TRIGGER_PATH" | python3 -c "
import sys, re
html = sys.stdin.read()
# Werkzeug debugger SECRET
match = re.search(r'SECRET\s*=\s*[\"]([^\"\']+)[\"]', html)
if match: print(f'WERKZEUG_SECRET: {match.group(1)}')
# Django settings
for m in re.finditer(r'SECRET_KEY\s*=\s*[\"]([^\"\']+)[\"]', html):
    print(f'DJANGO_SECRET: {m.group(1)}')
# Generic credential patterns
for m in re.finditer(r'(?:PASSWORD|PASS|TOKEN|API_KEY)\s*=\s*[\"]([^\"\']{6,})[\"']", html, re.I):
    print(f'LEAKED: {m.group(0)}')
"

Phase 4 — Authentication Bypass Testing

When a hardcoded password is found, test it against all authentication endpoints:

bash
PASSWORD="found_password"
# Test against common auth endpoints
for endpoint in /login /api/login /api/auth/login /auth /admin /api/admin; do
  for user in admin administrator root; do
    code=$(curl --max-time 30 --connect-timeout 10 -sk -o /dev/null -w "%{http_code}" \
      -d "username=$user&password=$PASSWORD" \
      "https://target.com$endpoint")
    if [ "$code" = "302" ] || [ "$code" = "200" ]; then
      echo "SUCCESS: $user:$PASSWORD at $endpoint (HTTP $code)"
    fi
  done
done

Pitfalls

  • Placeholder values look real. Test password123, changeme, and empty strings before reporting — they are often development defaults.
  • The credential may be scoped. A password for "exit registration" is not a full admin password. Map the credential to its actual permissions before scoring.
  • Form values may be dynamic. Check if the password changes per session (CSRF token pattern) vs. being truly static.
  • Base64 is not encryption. Decode any base64-looking strings found in JavaScript — they frequently contain credentials.
  • Rate limiting may block testing. Space authentication attempts 2-3 seconds apart.

Verification

  1. Confirm the credential is static: fetch the page/endpoint three times and verify the password value is identical each time.
  2. Confirm it grants access: use the credential at the intended endpoint and verify the response differs from a failed attempt (HTTP 200/302 vs 401/403).
  3. Map the privilege level: test the credential against other endpoints to determine scope (read-only, write, admin, reset).
  4. Check for audit trail: repeat the access with a unique identifier in the request to verify the action appears in logs (confirms real impact).

Related Skills

  • api-noauth-hunt — Exploiting API endpoints that lack authentication entirely.
  • js-secrets-extraction — Finding API keys and tokens in JavaScript bundles.
  • source-leak-hunt — Detecting exposed configuration files (.env, wp-config, etc.).
  • flask-werkzeug-attack — Exploiting Werkzeug debugger SECRET leaks and traceback disclosure.

Domande frequenti

Cosa fa la skill IA Hardcoded Credential Hunt?

Detect hardcoded passwords in HTML forms, JavaScript, and API responses.

Perché usare Hardcoded Credential Hunt su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Hardcoded Credential Hunt è 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 Hardcoded Credential Hunt in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/uphiago/recon-skills/tree/main/recon/hardcoded-credential-hunt. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Hardcoded Credential Hunt?

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 Hardcoded Credential Hunt?

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

La skill IA Hardcoded Credential Hunt è gratuita?

Sì. È pubblicata su GitHub da uphiago 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 👇