
In Linux systems, UID (User Identifier) is a unique number that identifies users, with UID 0 typically representing the root user who has complete control over the system. By modifying an ordinary user’s UID to 0, privilege escalation and system persistence can be established. This technique grants a user superuser privileges and may be used to perform malicious operations. Attackers might change a user’s UID to 0 to establish persistence on the system.
Identify operations in the system that use the usermod command to modify any ordinary user’s UID to 0.
Data source: Sysmon, sample data:
{ "Name": "ParentUser", "Guid": "{ff032593-a8d3-4f13-b0d6-01fc615a0f97}", "EventID": "1", "Version": "5", "Level": "4", "Task": "1", "Opcode": "0", "Keywords": "0x8000000000000000", "SystemTime": "2025-03-24T03:50:41.507711000Z", "EventRecordID": "132302", "ProcessID": "53380", "ThreadID": "53380", "Channel": "Linux-Sysmon/Operational", "Computer": "ubuntu-soclabs", "UserId": "0", "RuleName": "-", "UtcTime": "2025-03-24 03:50:41.511", "ProcessGuid": "{09a89e73-d691-67e0-d11a-af7e91550000}", "ProcessId": "60088", "Image": "/usr/sbin/usermod", "FileVersion": "-", "Description": "-", "Product": "-", "Company": "-", "OriginalFileName": "-", "CommandLine": "usermod -u 0 -o user", "CurrentDirectory": "/root", "User": "root", "LogonGuid": "{09a89e73-d5ec-67e0-0000-000005000000}", "LogonId": "0", "TerminalSessionId": "1727", "IntegrityLevel": "no level", "Hashes": "SHA256=684f65540e0686ab4f38f1ece340b9d90e9f579ba391a4609b4196feaaaf4845", "ParentProcessGuid": "{09a89e73-d5ec-67e0-2da3-9cf3c65b0000}", "ParentProcessId": "60056", "ParentImage": "/usr/bin/bash", "ParentCommandLine": "-bash", "ParentUser": "root", "timestamp": "2025-03-24T06:34:12.249029"}
No fields found