Detecting business email compromise

From oyi77/1ai-skills · View interactive version

Detecting business email compromise is an AI agent skill from the GitHub repository oyi77/1ai-skills. Use when business Email Compromise (BEC) is a sophisticated fraud scheme where attackers impersonate executives, vendors, or trusted partners to trick employees into transferring funds, sharing sensitive data,. Use when working with detecting business email compromise.

How to use this skill

Skill file

Detecting Business Email Compromise

Overview

Business Email Compromise (BEC) is a sophisticated fraud scheme where attackers impersonate executives, vendors, or trusted partners to trick employees into transferring funds, sharing sensitive data, or changing payment details. Unlike traditional phishing, BEC often contains no malicious links or attachments, relying purely on social engineering. This skill covers detection techniques using email gateway rules, behavioral analytics, and financial process controls.

When to Use

Trigger phrases:

Prerequisites

Key Concepts

This section covers key concepts for detecting business email compromise.

BEC Attack Types (FBI IC3 Classification)

  1. CEO Fraud: Attacker impersonates CEO, requests urgent wire transfer
  2. Account Compromise: Employee email compromised, used to request payments from vendors
  3. False Invoice Scheme: Fake invoices from "vendor" with changed bank details
  4. Attorney Impersonation: Impersonates legal counsel for urgent confidential transfers
  5. Data Theft: Requests W-2, tax forms, or PII from HR

Detection Indicators

Workflow

# Example: IOC detection
import re

IOC_PATTERNS = {
    "ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
    "domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
    "hash_md5": r"\b[a-f0-9]{32}\b",
    "hash_sha256": r"\b[a-f0-9]{64}\b",
}

def extract_iocs(text: str) -> dict:
    return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}
  1. Scope and authorize — confirm written authorization and define target boundaries
  2. Reconnaissance — enumerate targets, services, and potential attack surfaces
  3. Exploitation — attempt exploitation of identified vulnerabilities within scope
  4. Post-exploitation — document access level, lateral movement, and data exposure
  5. Report and remediate — compile findings with reproduction steps and fix recommendations

Step 1: Configure BEC-Specific Email Rules

Step 2: Deploy Behavioral Analytics

Step 3: Implement Financial Controls

Step 4: Monitor for Account Compromise

Step 5: Deploy AI/ML Detection

AI-powered BEC detection uses transformer models (BERT, GPT) and NLP to identify sophisticated impersonation attacks that contain no malicious links or attachments. BERT-based models achieve 98.65% accuracy in BEC detection, with a 25%+ improvement over keyword-based rules.

When NOT to Use

Red Flags

Verification

Tools & Resources

Validation

Process

  1. Analyze the task requirements
  2. Apply domain expertise
  3. Verify output quality

Anti-Rationalization Table

| Rationalization | Reality |

|---|---|

| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |

| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |

| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.