Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README to showcase dynamic rules #859

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 29 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,43 @@ Here's an example of a capa rule:
```yaml
rule:
meta:
name: hash data with CRC32
namespace: data-manipulation/checksum/crc32
name: create reverse shell
namespace: communication/c2/shell
authors:
- [email protected]
scope: function
scopes:
static: function
dynamic: thread
att&ck:
- Execution::Command and Scripting Interpreter::Windows Command Shell [T1059.003]
mbc:
- Data::Checksum::CRC32 [C0032.001]
- Impact::Remote Access::Reverse Shell [B0022.001]
examples:
- 2D3EDC218A90F03089CC01715A9F047F:0x403CBD
- 7D28CB106CB54876B2A5C111724A07CD:0x402350 # RtlComputeCrc32
- 7EFF498DE13CC734262F87E6B3EF38AB:0x100084A6
- C91887D861D9BD4A5872249B641BC9F9:0x401A77
features:
- or:
- and:
- mnemonic: shr
- or:
- number: 0xEDB88320
- bytes: 00 00 00 00 96 30 07 77 2C 61 0E EE BA 51 09 99 19 C4 6D 07 8F F4 6A 70 35 A5 63 E9 A3 95 64 9E = crc32_tab
- number: 8
- characteristic: nzxor
- 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:
- number: 0x8320
- number: 0xEDB8
- characteristic: nzxor
- api: RtlComputeCrc32
- 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
```

capa interpets the content of these rules as it inspects executable files.
Expand Down
Loading