T1586.002 IBM QRadar · QRadar

Detect Email Accounts in IBM QRadar

Adversaries may compromise existing email accounts to support operations. Unlike creating new accounts, compromising legitimate accounts leverages established trust relationships, bypasses reputation-based email filters, and enables thread hijacking. Compromise methods include credential phishing, password reuse from breach dumps, brute force, and insider access (buying credentials from employees). Threat actors including APT28, APT29, Kimsuky, OilRig, Star Blizzard, and LAPSUS$ have all used compromised email accounts to conduct spearphishing, harvest additional credentials, and acquire infrastructure. Because the compromise itself occurs externally, detection must focus on observable post-compromise behaviors within the organization: risky sign-in patterns, impossible travel, inbox rule manipulation, bulk sending anomalies, and thread hijacking indicators.

MITRE ATT&CK

Tactic
Resource Development
Technique
T1586 Compromise Accounts
Sub-technique
T1586.002 Email Accounts
Canonical reference
https://attack.mitre.org/techniques/T1586/002/

QRadar Detection Query

IBM QRadar (QRadar)
sql
/* Branch 1: Inbox rule manipulation with forwarding or deletion parameters */
SELECT
  DATEFORMAT(starttime/1000, 'yyyy-MM-dd HH:mm:ss') AS event_time,
  username AS user,
  sourceip AS src_ip,
  QIDNAME(qid) AS event_name,
  "UserAction" AS operation,
  "Parameters" AS rule_parameters,
  'InboxRuleManipulation' AS detection_branch
FROM events
WHERE LOGSOURCETYPENAME(devicetype) IN ('Microsoft Office 365', 'Microsoft Exchange')
  AND LOWER("UserAction") IN (
    'new-inboxrule', 'set-inboxrule', 'updateinboxrules',
    'set-mailbox', 'set-mailboxautoreplyconfiguration'
  )
  AND (
    LOWER("Parameters") LIKE '%forwardto%'
    OR LOWER("Parameters") LIKE '%forwardasattachmentto%'
    OR LOWER("Parameters") LIKE '%redirectto%'
    OR LOWER("Parameters") LIKE '%deletemessage%'
    OR LOWER("Parameters") LIKE '%markasread%'
  )
  AND LAST 24 HOURS

UNION

/* Branch 2: Impossible travel — same account, 2+ countries in 1-hour window */
SELECT
  DATEFORMAT(MIN(starttime)/1000, 'yyyy-MM-dd HH:mm:ss') AS event_time,
  username AS user,
  GROUP(DISTINCT sourceip) AS src_ips,
  COUNT(*) AS signin_count,
  COUNT(DISTINCT "CountryCode") AS distinct_countries,
  'ImpossibleTravel' AS detection_branch
FROM events
WHERE LOGSOURCETYPENAME(devicetype) IN ('Microsoft Office 365', 'Microsoft Azure Active Directory')
  AND (
    LOWER(QIDNAME(qid)) LIKE '%login%'
    OR LOWER(QIDNAME(qid)) LIKE '%logon%'
    OR LOWER("UserAction") IN ('userloggedin', 'mailboxlogin')
  )
  AND "ResultType" = '0'
  AND LAST 24 HOURS
GROUP BY
  username,
  DATEFORMAT(starttime/1000, 'yyyy-MM-dd HH')
HAVING COUNT(DISTINCT "CountryCode") >= 2
ORDER BY distinct_countries DESC
high severity medium confidence

Two-branch AQL UNION detection for T1586.002. Branch 1 queries Microsoft Office 365 log sources for inbox rule creation and mailbox modification events where the Parameters field contains forwarding, redirection, or deletion keywords — the primary post-compromise exfiltration-channel setup behavior. Branch 2 detects impossible travel by grouping successful email-service logon events by account and hourly window, flagging accounts with 2+ distinct country codes, matching the KQL ImpossibleTravel branch. Both branches use LOGSOURCETYPENAME for portability across QRadar deployments without hardcoded log source type IDs.

Data Sources

Microsoft Office 365Microsoft Azure Active Directory

Required Tables

events

False Positives & Tuning

  • Business travelers on multi-leg international flights who access corporate email during a layover and again after landing in a different country — the 1-hour window catches legitimate rapid-transit geography changes
  • IT administrators using a management jump server in a different country than their physical location, causing the source IP's geolocation to resolve to the admin country rather than the user's country
  • Automated compliance or eDiscovery workflows that programmatically create inbox rules with RedirectTo parameters to copy mail to legal hold mailboxes during litigation hold procedures
Download portable Sigma rule (.yml)

Other platforms for T1586.002


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Simulate Compromised Account Inbox Rule Creation

    Expected signal: Office 365 Unified Audit Log: Operation='New-InboxRule', UserId='[email protected]', Parameters containing 'ForwardTo' and '[email protected]'. Event appears in OfficeActivity table in Sentinel within ~15 minutes of creation. ClientIP will reflect the machine running the PowerShell session.

  2. Test 2Credential Spray Simulation Against Exchange Online

    Expected signal: Azure AD SigninLogs: multiple entries with ResultType='50126' (invalid credentials) or '50055' for target UserPrincipalName from the executing machine's IP address. AppDisplayName will show 'Exchange Web Services' or 'Outlook'. AuthenticationProtocol will show 'Legacy' indicating Basic Auth. Failed attempts trigger Azure AD Identity Protection spray detection after threshold.

  3. Test 3Simulate Bulk Email Send from Compromised Account

    Expected signal: OfficeActivity table: multiple Operation='Send' entries from [email protected] within a 1-hour window, UserId matching the test account, ClientIP matching the executing machine. Email count will exceed the BulkSendThreshold (50) for the hourly bucket, triggering the bulk sending branch.

  4. Test 4Verify Impossible Travel Detection Using VPN Geo-Shift

    Expected signal: Azure AD SigninLogs: two entries for the test account within ~20 minutes showing different Location.countryOrRegion values (e.g. 'United States' and 'Germany'). ResultType='0' for both (successful). Azure AD Identity Protection may independently raise a 'impossibleTravel' risk detection within minutes.

Unlock Pro Content

Get the full detection package for T1586.002 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections