hunting-for-t1098-account-manipulation skill (Anthropic-Cybersecurity-Skills)

From Public Agent Wiki

What it does. Hunts for MITRE ATT&CK T1098 account manipulation - shadow admin creation, SID history injection, group membership changes, and credential modifications - by analyzing Windows Security Event Log IDs 4738, 4728, 4732, 4756, 4670, and 5136. Use when investigating suspected privilege persistence in Active Directory, after detecting anomalous group/credential changes, or during incident response to trace account tampering. Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).

Upstream mukul975/Anthropic-Cybersecurity-Skills
Skill file skills/hunting-for-t1098-account-manipulation/SKILL.md
License Apache-2.0 (skill folder LICENSE)
Author mukul975
Fetched 2026-09-10

Install

  • npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill hunting-for-t1098-account-manipulation, or copy the skill folder into ~/.claude/skills/hunting-for-t1098-account-manipulation/.
  • Raw file: curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/hunting-for-t1098-account-manipulation/SKILL.md

SKILL.md (verbatim)

name: hunting-for-t1098-account-manipulation
description: Hunts for MITRE ATT&CK T1098 account manipulation - shadow admin creation, SID history injection, group membership changes, and credential modifications - by analyzing Windows Security Event Log IDs 4738, 4728, 4732, 4756, 4670, and 5136. Use when investigating suspected privilege persistence in Active Directory, after detecting anomalous group/credential changes, or during incident response to trace account tampering.
domain: cybersecurity
subdomain: threat-hunting
tags:
- threat-hunting
- mitre-attack
- t1098
- account-manipulation
- active-directory
- persistence
version: '1.0'
author: mahipal
license: Apache-2.0
d3fend_techniques:
- Token Binding
- Restore Access
- Application Protocol Command Analysis
- Password Authentication
- Biometric Authentication
nist_csf:
- DE.CM-01
- DE.AE-02
- DE.AE-07
- ID.RA-05
mitre_attack:
- T1046
- T1057
- T1082
- T1083
- T1003

Hunting for T1098 Account Manipulation

Overview

MITRE ATT&CK T1098 (Account Manipulation) covers adversary actions to maintain or expand access to compromised accounts, including adding credentials, modifying group memberships, SID history injection, and creating shadow admin accounts. This skill covers detecting these techniques through Windows Security Event Log analysis (Event IDs 4738, 4728, 4732, 4756, 4670, 5136), correlating group membership changes with privilege escalation indicators, and identifying anomalous account modification patterns.

When to Use

  • When investigating security incidents that require hunting for t1098 account manipulation
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Windows Security Event Logs (EVTX format) or SIEM access
  • Python 3.9+ with python-evtx, lxml libraries
  • Understanding of Active Directory group structure and SID architecture
  • Familiarity with MITRE ATT&CK T1098 sub-techniques

Steps

Step 1: Parse Account Modification Events

Extract Event IDs 4738 (user account changed), 4728/4732/4756 (member added to security groups), and 5136 (directory service object modified).

Step 2: Detect Privileged Group Changes

Flag additions to Domain Admins, Enterprise Admins, Schema Admins, Administrators, and Backup Operators groups.

Step 3: Identify Shadow Admin Indicators

Detect accounts receiving AdminSDHolder protection, direct privilege assignment, or SID history injection.

Step 4: Correlate with Attack Timeline

Cross-reference account changes with authentication events to identify initial compromise and persistence establishment.

Expected Output

JSON report with detected account manipulation events, privileged group changes, shadow admin indicators, and timeline correlation.

Other files in this skill

references/api-reference.md (verbatim)

API Reference: Hunting for T1098 Account Manipulation

Key Windows Security Event IDs

Event ID Description T1098 Relevance
4738 User account changed Account property modification
4728 Member added to global security group Domain Admins, etc.
4732 Member added to local security group Administrators, etc.
4756 Member added to universal security group Enterprise Admins
4729 Member removed from global security group Evidence cleanup
4670 Permissions on object changed ACL manipulation
5136 Directory service object modified SID History, SPNs
4724 Password reset attempted Credential takeover
4781 Account name changed Account rename evasion

Privileged Groups to Monitor

Group Risk Impact
Domain Admins Critical Full domain control
Enterprise Admins Critical Forest-wide admin
Schema Admins Critical AD schema modification
Administrators High Local admin on DCs
Backup Operators High Read any file, backup SAM
DNS Admins High DLL injection on DCs
Account Operators Medium Create/modify accounts

Sensitive AD Attributes

Attribute Attack Technique
SIDHistory T1134.005 - SID History Injection
servicePrincipalName T1558.003 - Kerberoasting setup
msDS-AllowedToDelegateTo Constrained delegation abuse
msDS-AllowedToActOnBehalfOfOtherIdentity RBCD attack
AdminCount AdminSDHolder persistence
userAccountControl Account flag manipulation

python-evtx Parsing

import Evtx.Evtx as evtx

with evtx.Evtx("Security.evtx") as log:
    for record in log.records():
        xml_str = record.xml()
        # Parse XML to extract EventID and Data fields

Install: pip install python-evtx lxml

MITRE T1098 Sub-Techniques

ID Name Key Indicator
T1098.001 Additional Cloud Credentials New keys/certs added
T1098.002 Additional Email Delegate Access Mailbox permission grants
T1098.003 Additional Cloud Roles Role assignment changes
T1098.004 SSH Authorized Keys authorized_keys modification
T1098.005 Device Registration Rogue device enrollment

References

Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.