/
cve-2024-3094-xz-ssh.yaml
71 lines (69 loc) · 2.15 KB
/
cve-2024-3094-xz-ssh.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Reference: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-3094
#
# Malicious code was discovered in the upstream tarballs of xz,
# starting with version 5.6.0. Through a series of complex
# obfuscations, the liblzma build process extracts a prebuilt
# object file from a disguised test file existing in the source
# code, which is then used to modify specific functions in the
# liblzma code. This results in a modified liblzma library that
# can be used by any software linked against this library,
# intercepting and modifying the data interaction with this
# library.
#
# There are lot of tools loading vulnerable xz liblzma.so. or
# other libraries that just pull in liblzma, hence it is linked in
# tons of programs.
#
# This tracing policy detects only OpenSSH, against versions 5.6.0
# and 5.6.1 .
#
# Produced event will include:
# "path": "/usr/lib/x86_64-linux-gnu/liblzma.so.5.6.0"
#
# An alternative is to monitor loading of libraries:
# https://tetragon.io/docs/policy-library/observability/#library
#
# Then search for the exact match of the library version in the produced
# events. Reference event is 'ProcessLoader' field 'path':
# https://tetragon.io/docs/reference/grpc-api/#processloader
#
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: "cve-2024-3094-xz-ssh"
annotations:
url: "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-3094"
description: "Detects if OpenSSH is using vulnerable XZ libraries"
author: "Tetragon.io Team"
spec:
kprobes:
- call: "security_mmap_file"
syscall: false
return: true
# message: "OpenSSH daemon using vulnerable XZ libraries CVE-2024-3094"
# tags: [ "cve", "cve.2024.3094" ]
args:
- index: 0
type: "file"
- index: 1
type: "uint32"
- index: 2
type: "nop"
returnArg:
index: 0
type: "int"
returnArgAction: "Post"
selectors:
- matchBinaries:
- operator: "In"
values:
- "/usr/sbin/sshd"
matchArgs:
- index: 0
operator: "Postfix"
values:
- "liblzma.so.5.6.0"
- "liblzma.so.5.6.1"
matchActions:
- action: Post
rateLimit: "1m"