Detect Data Manipulation in Sumo Logic CSE
Adversaries may insert, delete, or manipulate data in order to influence external outcomes or hide activity, threatening the integrity of the data. This technique encompasses three sub-techniques: Stored Data Manipulation (T1565.001), where adversaries directly alter files, databases, configuration data, or audit logs at rest; Transmitted Data Manipulation (T1565.002), where data is modified during transit via network interception or proxy manipulation; and Runtime Data Manipulation (T1565.003), where in-memory data structures or process state are altered during execution. Real-world examples include FIN13 (Elephant Beetle) injecting fraudulent financial transactions into compromised payment networks to incrementally siphon funds while mimicking legitimate processing behavior. Successful data manipulation campaigns often require prolonged access, domain-specific knowledge of the target system, and specialized tooling. The impact ranges from corrupted financial records and falsified audit trails to undermined operational decision-making and destroyed forensic evidence.
MITRE ATT&CK
- Tactic
- Impact
- Technique
- T1565 Data Manipulation
- Canonical reference
- https://attack.mitre.org/techniques/T1565/
Sumo Detection Query
// Branch 1: Audit Log Cleared
(_sourceCategory=windows/security OR _sourceCategory=windows/system)
| parse "EventCode=*" as EventCode nodrop
| where EventCode in ("1102", "104")
| eval AlertType = "AuditLogCleared", AlertSeverity = "Critical"
| eval TargetFile = if(EventCode == "1102", "Windows Security Event Log", "Windows System Event Log")
| fields _messageTime, _sourceHost, EventCode, AlertType, AlertSeverity, TargetFile
// Branch 2: Database File Tampering by Scripting Engine
// Run separately in Sumo Logic
_sourceCategory=windows/sysmon
| parse "EventCode=*" as EventCode nodrop
| where EventCode == "11"
| parse "TargetFilename=*\n" as TargetFilename nodrop
| parse "Image=*\n" as Image nodrop
| eval FileExt = toLower(replace(TargetFilename, /^.*\.([^.]+)$/, "$1"))
| where FileExt in ("mdf", "ldf", "db", "sqlite", "accdb", "mdb", "sql", "bak", "dbf", "frm")
| where matches(toLower(Image), "(powershell\.exe|cmd\.exe|wscript\.exe|cscript\.exe|mshta\.exe|python[23]?\.exe|perl\.exe|php\.exe|node\.exe|ruby\.exe|bash|sh)")
| eval AlertType = "DatabaseFileTampering", AlertSeverity = "High"
| fields _messageTime, _sourceHost, Image, TargetFilename, AlertType, AlertSeverity
// Branch 3: Bulk File Modification Burst
// Run separately in Sumo Logic
_sourceCategory=windows/sysmon EventCode=11
| parse "Image=*\n" as Image nodrop
| parse "TargetFilename=*\n" as TargetFilename nodrop
| parse "User=*\n" as User nodrop
| timeslice 5m
| count as FileCount, pct_distinct(TargetFilename, 100) as FolderApprox by _timeslice, _sourceHost, Image, User
| where FileCount > 80
| eval AlertType = "BulkFileModification", AlertSeverity = "Medium"
| fields _timeslice, _sourceHost, User, Image, FileCount, AlertType, AlertSeverity
// Branch 4: Critical Path Tampering
// Run separately in Sumo Logic
_sourceCategory=windows/sysmon EventCode=11
| parse "TargetFilename=*\n" as TargetFilename nodrop
| parse "Image=*\n" as Image nodrop
| parse "User=*\n" as User nodrop
| where matches(toLower(TargetFilename), "(\\\\windows\\\\system32\\\\winevt\\\\logs|\\\\inetpub\\\\logs|\\\\program files\\\\microsoft sql server|\\\\windows\\\\system32\\\\config)")
| where !matches(toLower(Image), "(svchost\.exe|wininit\.exe|lsass\.exe|services\.exe|sqlservr\.exe|sqlagent\.exe|msmpeng\.exe|csrss\.exe|trustedinstaller\.exe|tiworker\.exe)")
| eval AlertType = "CriticalPathTampering", AlertSeverity = "High"
| fields _messageTime, _sourceHost, User, Image, TargetFilename, AlertType, AlertSeverity
| sort by _messageTime desc Sumo Logic detection for T1565 Data Manipulation using four search branches: Windows audit log clearing (Event IDs 1102/104), database file modification by scripting engines (Sysmon Event 11), bulk file modification bursts within 5-minute windows, and critical system path tampering by non-whitelisted processes.
Data Sources
Required Tables
False Positives & Tuning
- Automated backup scripts using Python or PowerShell that regularly write to database file paths (.bak, .sql) as part of scheduled maintenance windows
- Log management solutions that regularly clear or archive Windows event logs per organizational retention policies
- Application deployment pipelines that modify large numbers of files across multiple directories during software rollouts or updates
- Endpoint security tools that write scan results or quarantine files to protected system directories
Other platforms for T1565
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.
- Test 1Clear Windows Security Event Log
Expected signal: Security Event ID 1102 logged in the Security log immediately before clearing, capturing SubjectUserName and SubjectDomainName of the clearing account. Sysmon Event ID 1 (Process Create) showing wevtutil.exe execution with CommandLine 'cl Security'. Note: the Security log itself will be empty after execution — collect artifacts from SIEM/forwarded logs.
- Test 2Inject Fraudulent Record into SQLite Database via Python
Expected signal: Sysmon Event ID 1: Process Create with Image=python.exe, CommandLine containing sqlite3 and INSERT. Sysmon Event ID 11: FileCreate event for test_ledger.db in %TEMP% with python.exe as the initiating process. DeviceFileEvents: ActionType=FileCreated or FileModified, FileName=test_ledger.db, InitiatingProcessFileName=python.exe.
- Test 3Bulk File Content Modification Simulating Data Falsification
Expected signal: Multiple Sysmon Event ID 11 (FileCreate) events in rapid succession with powershell.exe as the initiating process, spanning 4 different subdirectories. DeviceFileEvents will show 100+ FileModified/FileCreated events from powershell.exe across 4+ distinct FolderPath values within a 5-minute window.
- Test 4Tamper with IIS/Web Application Log File via PowerShell
Expected signal: Sysmon Event ID 11: FileCreate with TargetFilename matching u_ex260318.log, Image=powershell.exe. DeviceFileEvents: ActionType=FileCreated or FileModified, FileName containing IIS log naming convention, InitiatingProcessFileName=powershell.exe. The file path does not match the real IIS log directory but demonstrates the process-level signal.
References (12)
- https://attack.mitre.org/techniques/T1565/
- https://attack.mitre.org/techniques/T1565/001/
- https://attack.mitre.org/techniques/T1565/002/
- https://attack.mitre.org/techniques/T1565/003/
- https://f.hubspotusercontent30.net/hubfs/8776530/Sygnia-%20Elephant%20Beetle_Jan2022.pdf
- https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/advanced-hunting-devicefileevents-table
- https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-1102
- https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1565/T1565.md
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/file
- https://www.cisa.gov/sites/default/files/2024-01/CISA_Techniques_for_Detecting_Data_Tampering.pdf
- https://www.mandiant.com/resources/blog/fin13-elephant-beetle-targeted-financial-frauds
Unlock Pro Content
Get the full detection package for T1565 including response playbook, investigation guide, and atomic red team tests.