Skip to content

Commit 28d994d

Browse files
rafiyrandrewkroh
andauthored
aucoalesce: add link / linkat syscalls to normalizations (#177)
Add ECS enrichment to normalizations.yaml for the 'link' and 'linkat' syscalls. Co-authored-by: Andrew Kroh <[email protected]>
1 parent 4d25ffb commit 28d994d

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
77

88
### Added
99

10+
- aucoalesce: Add ECS enrichments for `link` and `linkat` syscalls. [#177](https://github.com/elastic/go-libaudit/pull/177)
11+
1012
### Changed
1113

1214
### Removed

aucoalesce/normalizations.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,18 @@ normalizations:
269269
# fstatfs - get filesystem statistics
270270
- fstatfs
271271
ecs: *ecs-file
272+
- action: linked
273+
object_what: file
274+
syscalls:
275+
# link - make a new name for a file
276+
- link
277+
# linkat - make a new name for a file
278+
- linkat
279+
ecs:
280+
<<: *ecs-file
281+
# "creation" since we're creating a new file system
282+
# entry for the link
283+
type: creation
272284
- action: symlinked
273285
object_what: file
274286
syscalls:
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[
2+
{
3+
"test_name": "linkat_syscall",
4+
"event": {
5+
"@timestamp": "2025-03-14T20:13:15.885Z",
6+
"sequence": 240,
7+
"category": "audit-rule",
8+
"record_type": "syscall",
9+
"result": "fail",
10+
"session": "3",
11+
"tags": [
12+
"syscalls_link_operations"
13+
],
14+
"summary": {
15+
"actor": {
16+
"primary": "1000",
17+
"secondary": "0"
18+
},
19+
"action": "linked",
20+
"object": {
21+
"type": "file"
22+
},
23+
"how": "/home/ubuntu/link"
24+
},
25+
"user": {
26+
"ids": {
27+
"auid": "1000",
28+
"egid": "0",
29+
"euid": "0",
30+
"fsgid": "0",
31+
"fsuid": "0",
32+
"gid": "0",
33+
"sgid": "0",
34+
"suid": "0",
35+
"uid": "0"
36+
},
37+
"selinux": {
38+
"user": "unconfined"
39+
}
40+
},
41+
"process": {
42+
"pid": "15200",
43+
"ppid": "6099",
44+
"name": "link",
45+
"exe": "/home/ubuntu/link"
46+
},
47+
"data": {
48+
"a0": "ffffffffffffff9c",
49+
"a1": "0",
50+
"a2": "ffffffffffffff9c",
51+
"a3": "fffffa0ba75f",
52+
"arch": "aarch64",
53+
"exit": "EFAULT",
54+
"items": "1",
55+
"syscall": "linkat",
56+
"tty": "pts1"
57+
},
58+
"ecs": {
59+
"event": {
60+
"category": [
61+
"file"
62+
],
63+
"type": [
64+
"creation"
65+
]
66+
},
67+
"user": {
68+
"effective": {},
69+
"target": {},
70+
"changes": {}
71+
},
72+
"group": {}
73+
}
74+
}
75+
}
76+
]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
tests:
3+
# -a always,exit -F arch=b64 -S linkat -k syscalls_link_operations
4+
linkat_syscall: >
5+
type=SYSCALL msg=audit(1741983195.885:240): arch=c00000b7 syscall=37 success=no exit=-14 a0=ffffffffffffff9c a1=0 a2=ffffffffffffff9c a3=fffffa0ba75f items=1 ppid=6099 pid=15200 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=3 comm="link" exe="/home/ubuntu/link" subj=unconfined key="syscalls_link_operations"

0 commit comments

Comments
 (0)