-
Notifications
You must be signed in to change notification settings - Fork 1
/
LW_Custom_Host_Activity_PotentialReverse.json
38 lines (37 loc) · 1.2 KB
/
LW_Custom_Host_Activity_PotentialReverse.json
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
LW_Custom_Host_Activity_PotentialReverseShell {
source {
LW_HE_PROCESSES
}
filter {
((RIGHT(EXE_PATH, 3) = '/sh'
or RIGHT(EXE_PATH, 4) = '/ash'
or RIGHT(EXE_PATH, 5) = '/bash'
or RIGHT(EXE_PATH, 5) = '/dash')
and not CONTAINS(CMDLINE, '.vscode-server')
and not CONTAINS(CMDLINE, 'ssh -i')
and (CMDLINE = 'sh -i'
or LEFT(CMDLINE, 6) = 'sh -i '
or CONTAINS(CMDLINE, '/sh -i ')
or RIGHT(CMDLINE, 6) = '/sh -i'
or CMDLINE = 'bash -i'
or LEFT(CMDLINE, 8) = 'bash -i '
or CONTAINS(CMDLINE, '/bash -i ')
or RIGHT(CMDLINE, 8) = '/bash -i')
)
or (RIGHT(EXE_PATH, 3) = '/nc' and CONTAINS(CMDLINE, ' -e'))
or (CONTAINS(CMDLINE, 'xterm -display'))
or (CONTAINS(CMDLINE, '.exec(["/bin/bash"'))
or (CONTAINS(CMDLINE, '.spawn("/bin/sh")'))
or (CONTAINS(CMDLINE, 'subprocess.call(["/bin/sh"'))
}
return distinct {
MID,
CMDLINE,
EXE_PATH,
PID,
PID_HASH,
PROCESS_START_TIME,
USERNAME
}
}
ADD_MINUTES (-1, timestamp )