Commit graph

201 commits

Author SHA1 Message Date
8e9985c72e restructured yaml 2026-03-09 21:33:49 +05:30
2654d5c1bd fix rc4 false negative in #1043 2026-03-09 19:56:07 +05:30
Aditya Pandey
bd29ed4563 fix: escape + and / in Base64 string regex, add URL-safe variant 2026-03-05 00:09:35 +05:30
Devarjya
2a55a30478
Refine Speck detection using variant-specific rotation constants (#1115) 2026-02-17 14:18:46 -07:00
Willi Ballenthin
6a0d506713
add encrypt-data-using-hc-256 (#1097) 2026-01-06 10:01:44 -07:00
Mike Hunhoff
7a52b6f9c0
dotnet: adding new rules based on recent samples (#1082)
* dotnet: adding new rules based on recent samples
2025-11-07 08:39:46 +01:00
Still / Azaka
7269873b0c
Add rules for detecting donut-related features (#997)
* Initial additions for detecting donut features

Signed-off-by: Still Hsu <dev@stillu.cc>

* Lint rules

Signed-off-by: Still Hsu <dev@stillu.cc>

* Update ATT&CK for donut rule

Signed-off-by: Still Hsu <dev@stillu.cc>

* Fix comment for dynamic scope on donut loader

Signed-off-by: Still Hsu <dev@stillu.cc>

* Require at least one donut function match for donut rule

Signed-off-by: Still Hsu <dev@stillu.cc>

* Add offset for examples

Signed-off-by: Still Hsu <dev@stillu.cc>

* Add indirect call for IAssembly matching

Signed-off-by: Still Hsu <dev@stillu.cc>

* Match known vtable offsets for assembly loading

* Remove loop matching

---------

Signed-off-by: Still Hsu <dev@stillu.cc>
2025-03-21 10:15:28 -06:00
Mike Hunhoff
75c16e4b14
remove redundant matches for dynamic scope (#987)
* remove redundant matches for dynamic scope

* fix lints

* fix lints

* tighten scopes
2025-02-04 09:32:24 +01:00
Willi Ballenthin
c1d20764ad
use "span of calls" scope (#973)
* 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>
2025-01-29 10:27:13 +01:00
Ana María Martínez Gómez
70851020c5
New rules: RSA & bigint (#982)
* Add use-bigint-function

Add new `data-manipulation/encryption/use-bigint-function.yml` rule to
identify bigint functions as these functions may help reverse engineers
identifying crypto. Example of bigint functions identified by this rule:
- `bi_copi`
- `bi_permanent`
- `bi_depermant`
- `bi_free`

Reference:
- 147d69429b/src/bigint.c
- 3e9b57d82a/src/crypto/bigint.c

* Add rsa-encrypt

Add new rule `data-manipulation/encryption/rsa/rsa-encrypt.yml` that
identifies the RSA encryption implementation from:
- 147d69429b/src/rsa.c (L232)
- 3e9b57d82a/src/crypto/rsa.c (L233)

Rename current RSA encryption/decryption rules in the nursery to add
`via WinAPI` to prevent name conflict.
2025-01-21 11:36:04 -07:00
mr-tz
7acd83194e tighten scopes 2024-10-25 08:28:16 +00:00
Takahiro Haruyama
4170f3c8d3 Update HC-128 (variation used in Winnti malware) 2024-07-25 12:26:53 +09:00
JJ
7f8216f2f2
Update encrypt-data-using-dpapi.yml rule (#900)
* Update encrypt-data-using-dpapi.yml rule
2024-05-21 09:58:07 +02:00
Daniel Stepanic
c454ffb661
Create encrypt-data-using-rc4-via-systemfunction033.yml (#890)
* Create encrypt-data-using-rc4-via-systemfunction033.yml

Similar to SystemFunction032, this undocumented API allows encryption/decryption using RC4 algo
2024-04-22 10:32:38 +02:00
Moritz
c61d7a7b95
Revert "Update Mappings for MBC (Q4 2023)" 2024-01-17 09:16:30 +01:00
ryan
4e81296369 Update Mappings for MBC (Q4 2023) 2023-12-15 13:53:34 -05:00
mr-tz
bebddeae1e update scopes 2023-11-29 14:38:14 +01:00
mr-tz
e6f11c2913 Merge branch 'master' into dynamic-rules-mr-2 2023-11-29 14:34:07 +01:00
JJ
fa61e110ad
Update and add Cabinet archive related rules (#808)
* Update and add Cabinet archive related rules
2023-11-29 14:27:45 +01:00
mr-tz
305adfd16b graduate rule from nursery 2023-11-24 11:53:19 +01:00
mr-tz
5430889902 update scopes 2023-11-24 11:51:37 +01:00
mr-tz
2d3be8ec38 fix some dynamic unsupported rules 2023-11-24 11:35:05 +01:00
mr-tz
8a36231025 fix scopes for rules with subscopes 2 2023-11-24 11:35:03 +01:00
mr-tz
e18704545a fix call/thread scopes manually 2023-11-24 11:35:00 +01:00
mr-tz
784c9dca53 upgrade rules using updated script 2023-11-24 11:34:28 +01:00
JJ
6ad4499b49
Add encode-data-using-add-xor-sub-operations.yml (#800)
* Add encode-data-using-add-xor-sub-operations.yml

---------

Co-authored-by: Moritz <mr-tz@users.noreply.github.com>
2023-11-22 14:10:11 +01:00
Moritz
74121881ec
Update encode-data-using-base64-via-winapi.yml (#845)
* Update encode-data-using-base64-via-winapi.yml

* Update decode-data-using-base64-via-winapi.yml
2023-11-17 16:27:28 -07:00
Moritz
6d7191fac6
Update generate-random-numbers-via-rtlgenrandom.yml 2023-10-10 11:53:01 +02:00
Moritz
e454699082
Update generate-random-numbers-via-rtlgenrandom.yml (#828) 2023-10-09 12:07:38 -06:00
sara-rn
7cc3bb46aa
Update decode-data-using-base64-via-dword-translation-table.yml 2023-07-30 15:22:48 +02:00
sara-rn
04c77aedce
Update decode-data-using-base64-via-dword-translation-table.yml 2023-07-30 15:09:13 +02:00
sara-rn
d57a618076
Update decode-data-using-base64-via-dword-translation-table.yml
fixed hash
2023-07-30 14:59:38 +02:00
sara-rn
aa2da89c34
Update decode-data-using-base64-via-dword-translation-table.yml
additional translation tables
2023-07-28 19:51:54 +02:00
sara-rn
cda22165c6
Update hash-data-using-fnv.yml
didn't match the old example, it's fixed
2023-07-11 17:18:35 +02:00
sara-rn
358b666459
Update hash-data-using-fnv.yml 2023-07-10 21:04:13 +02:00
ryan
153d4c0d2c Update Mappings for MBC 2023-06-21 10:45:01 -04:00
Moritz
e44f57c035
AES MixColumns detection (#749)
* add rule
2023-04-25 21:18:51 +02:00
Moritz
54d357a201
Update reference-public-rsa-key.yml (#745) 2023-04-17 09:59:19 -06:00
raymondlleong
32dc1ea9e8
Adding rules for TEA, XTEA, XXTEA and RIPEMD hashing (#700)
* Adding rules for TEA, XTEA, XXTEA and RIPEMD hashing

Adding to current rules for TEA encrypt & decrypt
Adding rules for XTEA, XXTEA, RIPEMD-128, 160, 256, 320

* Description edited for clarity

* byte pattern correction

* updates

- rules with examples moved out of nursery
- unneeded examples removed from rules and their example files removed from the PR for capa-testfiles
- DS_store files deleted
- Descriptions edited to reflect shared magic constants with SHA1

* ripemd128 update

updated to include magic array not present in MD5

* MD5 & SHA1 documentation update + RIPEMD160 removal

Updating MD5 & SHA1 rules to document magic constants shared with other hashing routines.

Removing RIPEMD160 rule using magic constants due to likelihood of false positives with SHA1 routines

* ripemd320 description update
2023-03-14 08:33:42 +01:00
Mike Hunhoff
e5ae505682
update .NET detections (#703) 2023-02-21 14:38:03 -07:00
Blas
b7a95a37f7
Rule for zlib inflate/deflate (#695)
* Create compress-data-via-zlib-inflate-or-deflate.yml
2023-02-15 11:56:28 +01:00
Willi Ballenthin
aec19f3a95
add generate random numbers via rtlgenrandom (#698)
closes #318
2023-02-13 10:46:33 +01:00
Moritz
613536dd1d
LZO compression / decompression rules continued (#677)
* Add rule for lzo compression

* Add matching decompression rule

---------

Co-authored-by: David Cannings <david.cannings@pwc.com>
2023-02-01 15:12:45 +01:00
Ryan Xu
74596020b8
Update Mappings for MBC (part 10) (#674)
* Update capa mappings 01/2023

---------

Co-authored-by: Desiree Beck <dbeck@mitre.org>
2023-02-01 10:09:34 +01:00
Moritz
761ccbab47
update ATT&CK/MBC meta data (#675)
* update ATT&CK/MBC meta data
2023-02-01 10:08:58 +01:00
Moritz
106123eb61
Rules for the week (#671)
* add rules

* avoid FPs via mnemonics to ignore

* correct number logic

* add --onefile option strings
2023-01-27 09:56:12 +01:00
Willi Ballenthin
07c10dd26b des: add more constants from libtomcrypt 2023-01-24 12:13:46 +01:00
Moritz
2a997f5d0c
add upper limit for basic block count (#661)
* add upper limit for basic block count

Co-authored-by: Willi Ballenthin <willi.ballenthin@gmail.com>
2023-01-19 13:11:45 +01:00
Willi Ballenthin
f59538a9e2 rc5/6: more constants 2023-01-19 11:37:32 +01:00
Willi Ballenthin
3b06639fc9
sha* rules and updates (#658)
* sha256: try to avoid matching sha512 constants

* add sha512

* sha: fix constant indices

* sha224: add constant names

* add sha384

* sha384: add global constant byte array

* SHA: more examples and global static array feature
2023-01-12 14:14:52 +01:00