-
Notifications
You must be signed in to change notification settings - Fork 167
/
Copy pathcreate-reverse-shell.yml
39 lines (39 loc) · 1.12 KB
/
create-reverse-shell.yml
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
rule:
meta:
name: create reverse shell
namespace: communication/c2/shell
authors:
- moritz.raabe@mandiant.com
scopes:
static: function
dynamic: span of calls
att&ck:
- Execution::Command and Scripting Interpreter::Windows Command Shell [T1059.003]
mbc:
- Impact::Remote Access::Reverse Shell [B0022.001]
examples:
- C91887D861D9BD4A5872249B641BC9F9:0x401A77
features:
- or:
- and:
- match: create pipe
- api: kernel32.PeekNamedPipe
- api: kernel32.CreateProcess
- api: kernel32.ReadFile
- api: kernel32.WriteFile
- and:
- match: host-interaction/process/create
- match: read pipe
- match: write pipe
- and:
- match: create pipe
- match: host-interaction/process/create
- or:
- basic block:
- and:
- count(api(SetHandleInformation)): 2 or more
- number: 1 = HANDLE_FLAG_INHERIT
- call:
- and:
- count(api(SetHandleInformation)): 2 or more
- number: 1 = HANDLE_FLAG_INHERIT