Skip to content

Commit 90dce67

Browse files
committed
Linux ProcessGUID
1 parent ad10e1d commit 90dce67

5 files changed

Lines changed: 15 additions & 4 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
chapters/.DS_Store

chapters/media/image66.png

71.9 KB
Loading

chapters/media/image67.png

70.5 KB
Loading

chapters/process-events.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Process Events
33
==============
44

5-
Sysmon can log process creation, process termination and process access events. The process events are captured via ObjRegisterCallbacks at the kernel level using its driver, and contain a unique, deterministically generated ProcessGuid and LogonGuid that are unique to their process instance and LSA logon session respectively.
5+
Sysmon can log process creation, process termination and process access events. For Windows the process events are captured via ObjRegisterCallbacks at the kernel level using its driver, and contain a unique, deterministically generated ProcessGuid and LogonGuid that are unique to their process instance and LSA logon session respectively.
66

77
The ProcessGuid and LoginGuid make tracking individual process and users much easier. The ProcessGuid attribute is used in all events associated with its process, and, unlike a ProcessID, will not be reused by the host system later. The LogonGuid attribute similarly is assigned to a login session of a particular user, and will not be reused later as a LoginID would.
88

@@ -26,6 +26,12 @@ ProcessGUID is generated by Sysmon when Sysmon logs the event. ProcessGUID
2626
specifically is not an attribute of the internal Windows process data structs
2727
(EPROCESS). Sysmon keeps track of the GUID until the process exits.
2828

29+
In Linux the process for generating the ProcessGuid is similar to Windows with the exception that the hexadecimal value in **/etc/machine-id**, this hexadecimal value is unique per host, it is usually generated from a random source during system installation or first boot and stays constant for all subsequent boots. Optionally, for stateless systems, it is generated during runtime during early boot if necessary.
30+
31+
![Linux ProcessGUID Source](./media/image66.png)
32+
33+
The ProcessGUIs is referenced in several events under different names.
34+
2935
![ProcessGUID Relation](./media/image32.png)
3036

3137
The only Event Types that will not reference a ProcessGuid or one of its

chapters/raw-access-read.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
Raw Access Read
22
===============
33

4-
Sysmon will log **EventID 9** for any process trying to read straight from a storage device by bypassing any filesystem restrictions that may be imposed by it. This information is logged by Sysmon leveraging its minifilter. This type of action is only done by drive imaging software or backup software in a normal operating environment.
4+
Sysmon will log **EventID 9** for any process trying to read straight from a storage device by bypassing any filesystem restrictions that may be imposed by it. This information is logged by Sysmon on Windows by leveraging its minifilter. This type of action is only done by drive imaging software or backup software in a normal operating environment.
55

6-
Attackers have been known to use this technique to copy NTDS.dit and SAM Registry Hives off host for the purpose of credential harvesting.
6+
On Linux this event is logged when a block device is directly accessed and eBPF is used to detect this type of action.
7+
8+
Attackers have been known to use this technique on Windows to copy NTDS.dit and SAM Registry Hives off host for the purpose of credential harvesting. In the case of Linux it is the raw access to the device for similar purposes too access credentials, key material and binaries of the system.
79

810
The fields for the event are:
911

@@ -19,7 +21,8 @@ The fields for the event are:
1921

2022
* **Device**: Target device
2123

22-
Given that no process should be performing this action normally, it is best to log all instances of it or, even better, to target the NTDS.dit file on domain controllers and SAM hive file on all systems. On systems with many file modifications, slightly higher resource usage may result if monitoring is enabled for all files.
24+
In the case of Windows given that no process should be performing this action normally, it is best to log all instances of it or, even better, to target the NTDS.dit file on domain controllers and SAM hive file on all systems. On systems with many file modifications, slightly higher resource usage may result if monitoring is enabled for all files.
25+
2326

2427
Example that captures all instances of this event
2528

0 commit comments

Comments
 (0)