Saltar al contenido
Skillpedia
Seguridad35 mil · #8153

investigating-phishing-email-incident

Qué hace

Esta herramienta investiga los correos de phishing que se reportan. Analiza los detalles del correo, comprueba si los enlaces y los archivos adjuntos son peligrosos, identifica quién más recibió el correo y toma medidas para que el ataque no se extienda.

Cuándo usarla

  • ✓Un usuario reporta un correo sospechoso.
  • ✓Un correo peligroso ha superado los filtros iniciales.
  • ✓Necesitamos saber hasta dónde se ha extendido un ataque de phishing.

Link de la skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/investigating-phishing-email-incident/SKILL.md

Có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

Usa esta skill para ayudarme: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/investigating-phishing-email-incident/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Investiga este correo de phishing que me llegó.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La herramienta examina las cabeceras del correo para comprobar su origen y autenticidad. Después prueba los enlaces y los archivos adjuntos en un entorno seguro para ver si son maliciosos. Por último, busca otros correos parecidos y toma medidas para bloquear el ataque.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

Investigating Phishing Email Incident

When to Use

Use this skill when:

  • A user reports a suspicious email via the phishing report button or helpdesk ticket
  • Email security gateway flags a message that bypassed initial filters
  • Automated detection identifies credential harvesting URLs or malicious attachments
  • A phishing campaign targeting the organization requires scope assessment

Do not use for spam or marketing emails without malicious intent — route those to email administration for filter tuning.

Prerequisites

  • Access to email gateway logs (Proofpoint, Mimecast, or Microsoft Defender for Office 365)
  • Splunk or SIEM with email log ingestion (O365 Message Trace, Exchange tracking logs)
  • Sandbox access (Any.Run, Joe Sandbox, or Hybrid Analysis) for URL/attachment detonation
  • Microsoft Graph API or Exchange Admin Center for email search and purge operations
  • URLScan.io and VirusTotal API keys

Workflow

Step 1: Extract and Analyze Email Headers

Obtain the full email headers (.eml file) from the reported message:

import email
from email import policy

with open("phishing_sample.eml", "rb") as f:
    msg = email.message_from_binary_file(f, policy=policy.default)

# Extract key headers
print(f"From: {msg['From']}")
print(f"Return-Path: {msg['Return-Path']}")
print(f"Reply-To: {msg['Reply-To']}")
print(f"Subject: {msg['Subject']}")
print(f"Message-ID: {msg['Message-ID']}")
print(f"X-Originating-IP: {msg['X-Originating-IP']}")

# Parse Received headers (bottom-up for true origin)
for header in reversed(msg.get_all('Received', [])):
    print(f"Received: {header[:120]}")

# Check authentication results
print(f"Authentication-Results: {msg['Authentication-Results']}")
print(f"DKIM-Signature: {msg.get('DKIM-Signature', 'NONE')[:80]}")

Key checks:

  • SPF: Does Return-Path domain match sending IP? Look for spf=pass or spf=fail
  • DKIM: Is the signature valid? dkim=pass confirms the email was not modified in transit
  • DMARC: Does the From domain align with SPF/DKIM domains? dmarc=fail indicates spoofing

Step 2: Analyze URLs and Attachments

URL Analysis:

import requests

# Submit URL to URLScan.io
url_to_scan = "https://evil-login.example.com/office365"
response = requests.post(
    "https://urlscan.io/api/v1/scan/",
    headers={"API-Key": "YOUR_KEY", "Content-Type": "application/json"},
    json={"url": url_to_scan, "visibility": "unlisted"}
)
scan_id = response.json()["uuid"]
print(f"Scan URL: https://urlscan.io/result/{scan_id}/")

# Check VirusTotal for URL reputation
import vt
client = vt.Client("YOUR_VT_API_KEY")
url_id = vt.url_id(url_to_scan)
url_obj = client.get_object(f"/urls/{url_id}")
print(f"VT Score: {url_obj.last_analysis_stats}")
client.close()

Attachment Analysis:

import hashlib

# Calculate file hashes
with open("attachment.docx", "rb") as f:
    content = f.read()
    md5 = hashlib.md5(content).hexdigest()
    sha256 = hashlib.sha256(content).hexdigest()

print(f"MD5: {md5}")
print(f"SHA256: {sha256}")

# Submit to MalwareBazaar for lookup
response = requests.post(
    "https://mb-api.abuse.ch/api/v1/",
    data={"query": "get_info", "hash": sha256}
)
print(response.json()["query_status"])

Submit to sandbox (Any.Run or Joe Sandbox) for dynamic analysis of macros, PowerShell execution, and C2 callbacks.

Step 3: Determine Campaign Scope

Search for all recipients of the same phishing email in Splunk:

index=email sourcetype="o365:messageTrace"
(SenderAddress="attacker@evil-domain.com" OR Subject="Urgent: Password Reset Required"
 OR MessageId="<phishing-message-id@evil.com>")
earliest=-7d
| stats count by RecipientAddress, DeliveryStatus, MessageTraceId
| sort - count

Alternatively, use Microsoft Graph API:

import requests

headers = {"Authorization": f"Bearer {access_token}"}
params = {
    "$filter": f"subject eq 'Urgent: Password Reset Required' and "
               f"receivedDateTime ge 2024-03-14T00:00:00Z",
    "$select": "sender,toRecipients,subject,receivedDateTime",
    "$top": 100
}
response = requests.get(
    "https://graph.microsoft.com/v1.0/users/admin@company.com/messages",
    headers=headers, params=params
)
messages = response.json()["value"]
print(f"Found {len(messages)} matching messages")

Step 4: Identify Impacted Users (Who Clicked)

Check proxy/web logs for users who visited the phishing URL:


…
Preguntas frecuentes

¿Qué son las cabeceras del correo?

Son datos técnicos ocultos en un correo que muestran el recorrido que ha seguido y quién lo envió. Ayudan a identificar si es falso.

¿Qué significa 'detonar' un archivo adjunto o una URL?

Significa abrir o ejecutar el archivo o el enlace en un entorno aislado y seguro para ver si hace algo malicioso, sin dañar tu ordenador.

¿Qué son las acciones de contención?

Son los pasos que se dan para frenar el ataque, como borrar el correo de todas las bandejas de entrada, bloquear las webs maliciosas y obligar a cambiar la contraseña a los usuarios afectados.

Detalles

Descripción original del autor

Investigates phishing email incidents from initial user report through header analysis, URL/attachment detonation, impacted user identification, and containment actions using SOC tools like Splunk, Microsoft Defender, and sandbox analysis platforms. Use when a reported phishing email requires full incident investigation to determine scope and impact. '

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularidad

Estrellas en GitHub
35 mil
Posición en el ranking
#8153
Licencia
Apache-2.0
Actualizada
31/8/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas