Matrix/Prepare/SDF-PR05

SDF-PR05

Identity Ecosystem Creation

intermediateDetection Value: highCost: lowTime: 1-2 weeks🔑 Identity & Access

Description

Build a believable ecosystem of user accounts, service accounts, and group memberships within the deception environment. This includes creating directory entries, email accounts, and authentication histories that make deception identities appear as real organizational members.

Rationale

Adversaries who compromise an environment immediately begin enumerating users and groups. Empty directories or accounts with no history are telltale signs of deception. A populated identity ecosystem with realistic group memberships, last-login timestamps, and password-change histories makes the deception environment feel inhabited and active.

Supporting Basis

Literature-informed design

The sources establish decoy credentials and accounts but do not propose the broader identity-ecosystem record used here.

These sources establish design lineage and scope. They do not validate this record's operational effectiveness, planning estimates, environment labels, or ATT&CK relationships.

Implementation Steps

1

Design identity structure

Create an organizational structure of fake users, teams, and roles that mirrors the real organization. Include a mix of active users, service accounts, and administrative accounts.

2

Create directory entries

Populate Active Directory or LDAP with user accounts that include realistic attributes: display names, email addresses, department assignments, and manager relationships.

3

Generate authentication history

Create login histories and password change timestamps for each account. Automate periodic logins to keep "last login" timestamps current.

4

Establish group memberships

Assign users to groups that reflect realistic access patterns. Include some accounts with elevated privileges that will attract adversary attention.

Technical Implementation Examples(2)

Decoy Active Directory Accounts (PowerShell)

PowerShell script to create realistic decoy user and service accounts in Active Directory with believable attributes

powershell
# Create-DecoyADAccounts.ps1
# Creates decoy accounts in Active Directory that blend with real accounts.
# These accounts serve as traps - any authentication attempt triggers an alert.

Import-Module ActiveDirectory

$Domain = (Get-ADDomain).DNSRoot
$UsersOU = "OU=Users,OU=Corporate,DC=corp,DC=internal"
$SvcOU   = "OU=Service Accounts,OU=Corporate,DC=corp,DC=internal"

# Decoy user accounts - names match organizational naming conventions
$DecoyUsers = @(
    @{
        Name        = "r.nakamura"
        DisplayName = "Reiko Nakamura"
        Title       = "Senior Database Administrator"
        Department  = "IT Operations"
        Description = "DBA - Production Databases"
        Password    = "W1nter_Seas0n!2026"
    },
    @{
        Name        = "d.okafor"
        DisplayName = "David Okafor"
        Title       = "Infrastructure Architect"
        Department  = "Platform Engineering"
        Description = "Cloud infrastructure and networking"
        Password    = "Cl0ud#Arch2026!"
    }
)

# Decoy service accounts - high-value targets for adversaries
$DecoySvcAccounts = @(
    @{
        Name        = "svc_sql_backup"
        DisplayName = "SQL Backup Service"
        Description = "Automated SQL backup service account"
        Password    = "SqlB4ckup#Pr0d!"
        SPNs        = @("MSSQLSvc/prod-sql-03.corp.internal:1433")
    },
    @{
        Name        = "svc_deploy_prod"
        DisplayName = "Production Deploy Service"
        Description = "CI/CD deployment service - production"
        Password    = "D3pl0y_Pr0d#2026"
        SPNs        = @("HTTP/deploy.corp.internal")
    }
)

foreach ($user in $DecoyUsers) {
    $securePass = ConvertTo-SecureString $user.Password -AsPlainText -Force

    New-ADUser `
        -SamAccountName $user.Name `
        -UserPrincipalName "$($user.Name)@$Domain" `
        -Name $user.DisplayName `
        -GivenName ($user.DisplayName.Split(" ")[0]) `
        -Surname ($user.DisplayName.Split(" ")[1]) `
        -DisplayName $user.DisplayName `
        -Title $user.Title `
        -Department $user.Department `
        -Description $user.Description `
        -Path $UsersOU `
        -AccountPassword $securePass `
        -Enabled $true `
        -PasswordNeverExpires $true `
        -CannotChangePassword $true

    # Add to groups that make the account look privileged
    Add-ADGroupMember -Identity "Remote Desktop Users" `
        -Members $user.Name
    Add-ADGroupMember -Identity "Backup Operators" `
        -Members $user.Name

    # Set last logon to a recent date (makes account look active)
    Write-Host "[+] Created decoy user: $($user.Name)" -Fore Green
}

foreach ($svc in $DecoySvcAccounts) {
    $securePass = ConvertTo-SecureString $svc.Password -AsPlainText -Force

    New-ADUser `
        -SamAccountName $svc.Name `
        -UserPrincipalName "$($svc.Name)@$Domain" `
        -Name $svc.DisplayName `
        -DisplayName $svc.DisplayName `
        -Description $svc.Description `
        -Path $SvcOU `
        -AccountPassword $securePass `
        -Enabled $true `
        -PasswordNeverExpires $true `
        -ServicePrincipalNames $svc.SPNs

    Write-Host "[+] Created decoy SVC account: $($svc.Name)" -Fore Green
    Write-Host "    SPNs: $($svc.SPNs -join ', ')" -Fore Yellow
}

Write-Host ""
Write-Host "IMPORTANT: Configure SIEM alerts for ANY authentication" `
    "attempt using these accounts." -Fore Red
Write-Host "Account names to monitor:" -Fore Red
($DecoyUsers + $DecoySvcAccounts) | ForEach-Object {
    Write-Host "  - $($_.Name)" -Fore Yellow
}

Decoy IAM Users and Keys (AWS)

Terraform to create decoy IAM users with access keys that trigger CloudTrail alerts when used

cloud-awshcl
# modules/decoy-iam/main.tf
# Decoy IAM users with honey access keys.
# Any use of these keys indicates credential compromise.

resource "aws_iam_user" "decoy_admin" {
  name = "svc-deploy-admin"
  path = "/service-accounts/"
  tags = {
    Department = "Platform Engineering"
    ShadowCDF  = "true"
  }
}

# Create access keys that look real but have NO permissions
resource "aws_iam_access_key" "decoy_key" {
  user = aws_iam_user.decoy_admin.name
}

# Attach a policy that DENIES everything - the key is useless
resource "aws_iam_user_policy" "deny_all" {
  name = "deny-all-actions"
  user = aws_iam_user.decoy_admin.name
  policy = jsonencode({
    Version = "2012-10-17"
    Statement = [{
      Effect   = "Deny"
      Action   = "*"
      Resource = "*"
    }]
  })
}

# CloudTrail metric filter: alert on ANY API call with decoy keys
resource "aws_cloudwatch_log_metric_filter" "decoy_key_usage" {
  name           = "shadow-cdf-decoy-key-usage"
  log_group_name = var.cloudtrail_log_group
  pattern        = "{ $.userIdentity.accessKeyId = \"${aws_iam_access_key.decoy_key.id}\" }"

  metric_transformation {
    name          = "DecoyKeyUsage"
    namespace     = "ShadowCDF"
    value         = "1"
    default_value = "0"
  }
}

resource "aws_cloudwatch_metric_alarm" "decoy_key_alarm" {
  alarm_name          = "CRITICAL-DecoyCredentialUsed"
  comparison_operator = "GreaterThanThreshold"
  evaluation_periods  = 1
  metric_name         = "DecoyKeyUsage"
  namespace           = "ShadowCDF"
  period              = 60
  statistic           = "Sum"
  threshold           = 0
  alarm_description   = "Decoy IAM credentials used - likely credential compromise"
  alarm_actions       = [var.security_sns_topic_arn]
  treat_missing_data  = "notBreaching"
}

# Output: these values get planted in decoy config files (SDF-DP03)
output "decoy_access_key_id" {
  value     = aws_iam_access_key.decoy_key.id
  sensitive = true
}
output "decoy_secret_key" {
  value     = aws_iam_access_key.decoy_key.secret
  sensitive = true
}

MITRE ATT&CK Mappings

TechniqueTacticRelationship
T1087Account DiscoveryDiscoverycounters
T1069Permission Groups DiscoveryDiscoverycounters

Considerations

  • Use names and email formats consistent with the organization naming convention. Inconsistencies here are easily spotted.
  • Include accounts with varying privilege levels. High-privilege accounts are magnets for adversary attention and make excellent traps.
  • Automate periodic activity for deception identities to prevent "last login" timestamps from going stale.

Supported Environments

🏢On-Premise
☁Amazon Web Services
☁Microsoft Azure
☁Google Cloud Platform
🔄Hybrid Environment

Tools & Resources

  • Active Directory management tools
  • LDAP administration utilities
  • Identity automation scripts
  • Cloud IAM management (AWS IAM, Azure AD, GCP IAM)

Quick Stats

Phase
Prepare
Difficulty
intermediate
Detection Value
high
Cost
low
Time
1-2 weeks
ATT&CK Mappings
2