mirror of
https://github.com/mandiant/capa-rules
synced 2026-06-08 15:41:20 +00:00
c1d20764ad
* use sequence scope instead of thread scope for "static: function" rules * use sequence scope instead of thread scope for "static: basic block" rules * make runtime linking rules more concise * doc: describe sequence scope * rename "sequence" scope to "span of calls" scope * Update anti-analysis/anti-av/check-for-sandbox-and-av-modules.yml Co-authored-by: Mike Hunhoff <mike.hunhoff@gmail.com> * Update anti-analysis/anti-vm/vm-detection/check-for-windows-sandbox-via-device.yml Co-authored-by: Mike Hunhoff <mike.hunhoff@gmail.com> * Update collection/get-geographical-location.yml Co-authored-by: Mike Hunhoff <mike.hunhoff@gmail.com> * Update collection/file-managers/gather-classicftp-information.yml Co-authored-by: Mike Hunhoff <mike.hunhoff@gmail.com> * Update collection/database/wmi/reference-wmi-statements.yml Co-authored-by: Mike Hunhoff <mike.hunhoff@gmail.com> * Update collection/database/sql/reference-sql-statements.yml Co-authored-by: Mike Hunhoff <mike.hunhoff@gmail.com> --------- Co-authored-by: Mike Hunhoff <mike.hunhoff@gmail.com>
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
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
|