Skip to content

817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF & MITRE F3 (Fight Fraud) · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platforms · 29 security domains · Apache 2.0

2.2 KB
Raw Blame

API Reference: Spearphishing Detection via Email Gateway

Python email Module

Parse EML file

import email
from email import policy

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

Security Headers

Header Purpose
Received-SPF SPF check result
Authentication-Results SPF, DKIM, DMARC combined
DKIM-Signature DKIM signing info
ARC-Authentication-Results ARC chain results
X-Mailer Client used to send
Return-Path Envelope sender

Authentication-Results Values

Authentication-Results: mx.google.com;
    dkim=pass header.d=example.com;
    spf=pass smtp.mailfrom=example.com;
    dmarc=pass

SPF Record Lookup

dig TXT example.com | grep "v=spf1"
# v=spf1 include:_spf.google.com ~all

SPF Results

Result Meaning
pass Authorized sender
fail Unauthorized (reject)
softfail Unauthorized (accept with mark)
neutral No assertion
none No SPF record

DKIM Verification

opendkim-testkey -d example.com -s selector -vvv

DMARC Record

dig TXT _dmarc.example.com
# v=DMARC1; p=reject; rua=mailto:[email protected]

Microsoft Defender for Office 365 API

Get email threat assessment

POST https://graph.microsoft.com/v1.0/informationProtection/threatAssessmentRequests
Authorization: Bearer {token}

{
  "contentType": "mail",
  "expectedAssessment": "block",
  "category": "phishing",
  "mailInfo": {
    "internetMessageId": "<message-id>"
  }
}

Proofpoint TAP API

Get blocked messages

GET https://tap-api-v2.proofpoint.com/v2/siem/messages/blocked
    ?sinceSeconds=3600
Authorization: Basic {base64_credentials}

Response Fields

Field Description
spamScore Spam confidence (0-100)
phishScore Phishing confidence (0-100)
threatsInfoMap Threat details array
fromAddress Envelope sender

Mimecast API — URL Protection

Decode Mimecast URL

POST https://api.mimecast.com/api/ttp/url/decode-url
Authorization: MC {access-key}:{secret-key}

{
  "data": [{"url": "https://protect.mimecast.com/..."}]
}