IncidentResponsev2

4.11 Monitoring Account Creation (SO + Local + Cloud)

Task

Monitor for the creation of new user or service accounts across enterprise environments including Security Onion (SO), local systems, and cloud platforms to identify potentially unauthorized access and persistence mechanisms.


Conditions

Given:


Standards


End State

All new user or service account creation events are discovered, logged, validated, and confirmed to be legitimate or escalated as suspicious.


Notes

Security Onion is able to detect local and domain account creations.


Manual Steps

Security Onion (Primary Method)

Use the following Security Onion search query:

winlog.event_id:"4720" | groupby event.module event.dataset

This query will identify new user account creation events on Windows systems.

Export to CSV:

  1. Select query results.
  2. Use export feature to save as CSV.
  3. Compare against known user list.

Validate


Windows Event Viewer (Alternative / Local)

Using Windows Event Viewer:

Event ID to search:

Event ID: 4720 (A user account was created)

Steps:

  1. Open Event Viewer → Windows Logs → Security
  2. Use filter or search for 4720
  3. Validate account creation events manually

Operator Note: Use PowerShell for automation where needed.

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4720}

Linux and macOS (Local Account Monitoring)

Audit new users from /etc/passwd (Linux/macOS)

awk -F':' '{ print $1}' /etc/passwd

Monitor user addition with auditd (Linux)

ausearch -m ADD_USER

macOS Unified Log (New Accounts)

log show --predicate 'eventMessage CONTAINS "Added user account"' --info

Operator Note: Configure OSSEC or Auditbeat where applicable for automated account monitoring.


Cloud Monitoring

AWS (CloudTrail)

aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=CreateUser

Look for:

AWS GuardDuty

Azure (Azure AD Audit Logs)

Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-1) -Operations "Add user"

or Azure Portal → Azure AD → Audit Logs

Look for:


GCP (Cloud Audit Logs)

gcloud logging read "protoPayload.methodName=\"google.iam.admin.v1.CreateServiceAccount\""

or

gcloud logging read "protoPayload.methodName=\"google.admin.directory.user.insert\""

Look for:

Operator Note: API-based or externally sourced account additions should be reviewed closely.


Validate and Investigate

For all platforms:


Running Script

TBD → Automated script examples may be generated for PowerShell, Bash, and Cloud CLIs to consolidate across platforms.


Dependencies


Other Available Tools

Tool Platform Installation Usage
Security Onion Network Native Windows Account Creation Events
OSSEC / Wazuh Cross-platform Package Manager / VM Local User Account Monitoring
Auditbeat Linux/macOS Package Manager Real-time user event monitoring
AWS CloudTrail + GuardDuty AWS Native IAM user creation detection
Azure AD Audit Logs + Sentinel Azure Native Account creation monitoring
GCP Cloud Logging + SCC GCP Native Account creation and IAM service account monitoring

Operator Recommendations and Additional Tools

Operator Checklist

Best Practices


References


Revision History

Date Version Description Author
2025-05-02 1.1 Enhanced with operator checklist, recommendations, and multi-platform account monitoring workflow Leo