File tree Expand file tree Collapse file tree 7 files changed +62
-2
lines changed
Expand file tree Collapse file tree 7 files changed +62
-2
lines changed Original file line number Diff line number Diff line change 1+ rule env_LD_DEBUG : suspicious {
2+ meta :
3+ description = " Checks if dynamic linker debugging is enabled "
4+ strings :
5+ $ val = " LD_DEBUG " fullword
6+ condition :
7+ all of them
8+ }
Original file line number Diff line number Diff line change 1+ rule env_LD_PROFILE : suspicious {
2+ meta :
3+ description = " Checks if dynamic linker profiling is enabled "
4+ strings :
5+ $ val = " LD_PROFILE " fullword
6+ condition :
7+ all of them
8+ }
Original file line number Diff line number Diff line change 1- rule TERM : harmless {
1+ rule TERM {
22 meta :
33 description = " Look up or override terminal settings "
44 strings :
Original file line number Diff line number Diff line change @@ -8,6 +8,14 @@ rule sshd : notable {
88 $ ref
99 }
1010
11+ rule sshd_path_value : suspicious {
12+ meta :
13+ description = " Mentions the SSH daemon by path "
14+ strings :
15+ $ ref = " /usr/bin/sshd " fullword
16+ condition :
17+ $ ref
18+ }
1119
1220rule sshd_net : suspicious {
1321 meta :
Original file line number Diff line number Diff line change 1+ rule tail_byte_offsets : notable {
2+ meta :
3+ description = " uses the tail command with exotic offset values "
4+ strings :
5+ $ val = /tail -c \+ \d {3,8 } /
6+ condition :
7+ any of them
8+ }
9+
10+ rule head_byte_offsets : notable {
11+ meta :
12+ description = " uses the head command with exotic offset values "
13+ strings :
14+ $ val = /head -c \+ \d {3,8 } /
15+ condition :
16+ any of them
17+ }
Original file line number Diff line number Diff line change 1+ rule pipe_to_shell : notable {
2+ meta :
3+ description = " pipes to shell "
4+ strings :
5+ $ val_sh = " | sh "
6+ $ val_bin_sh = " | /bin/sh "
7+ $ val_bash = " | bash "
8+ $ val_bin_bash = " | /bin/bash "
9+ condition :
10+ any of them
11+ }
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ rule eval : suspicious {
88 $ ref and not $ empty
99 }
1010
11-
1211rule python_exec : suspicious {
1312 meta :
1413 description = " evaluate code dynamically using exec() "
@@ -18,3 +17,12 @@ rule python_exec : suspicious {
1817 condition :
1918 $ ref and not $ empty
2019 }
20+
21+ rule shell_eval : suspicious {
22+ meta :
23+ description = " evaluate code dynamically using eval "
24+ strings :
25+ $ val = /eval \$ \w {0,64 } / fullword
26+ condition :
27+ $ val
28+ }
You can’t perform that action at this time.
0 commit comments