Commit graph

413 commits

Author SHA1 Message Date
Maijin
f0292fc977
feat(targeting): add cloud and container collection/interaction rules (#1098)
This adds rules for:

- enumerating AWS resources (CloudFormation, CloudTrail, DirectConnect, EC2, IAM, S3, Support)

- stealing credentials for AWS, GCP, Cloudflare

- stealing credentials for Docker and Kubernetes

Rules are categorized into host-interaction and collection namespaces.
2026-02-23 09:32:32 -07:00
Saniya Fatima
94e855bebc
Fix: False positive in UDP socket (#1111) 2026-01-30 10:04:39 -07:00
Still / Azaka
6120dfb6e0
Add Thread Pool injection techniques (#1087)
* Add Thread Pool injection techniques

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

* Fix format

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

* Replace filename to be lint-compliant

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

* Add description for each of the rules

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

* Remove PoolParty PoC reference

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

---------

Signed-off-by: Still Hsu <dev@stillu.cc>
2025-12-04 10:17:27 -07:00
Mike Hunhoff
3b42582539
adding/updating rules based on recent samples (#1085) 2025-11-25 13:38:55 -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
Zeze
9e4cc28265
feat: log keystrokes via rawinput (#1078)
* feat: log keystrokes via directx

* fix: williballenthin review

* move register-raw-input-devices from nursery

* use original rule name
2025-10-28 09:20:39 -06:00
JJ
1a065e6dea
Move get-routing-table.yml out of nursery. Add enumerate-tcp-connecti… (#1074)
* Move get-routing-table.yml out of nursery. Add enumerate-tcp-connections-via-wmi-com-api.yml and create-routing-table-entry.yml

* Update scopes in enumerate-tcp-connections-via-wmi-com-api.yml, create-routing-table-entry.yml, get-routing-table.yml
2025-09-09 13:21:48 -06:00
Elad Levi
5d990adef2
Move impersonate user from nursery (#1072)
* Move and update impersonate-user rule

Renamed impersonate-user.yml from nursery to host-interaction/user and added an examples section with a sample hash.

* Simplify API checks in impersonate-user rule

Removed optional and or conditions for GetUserName and DuplicateToken APIs

* Bring the Ex back
2025-09-03 10:27:04 -06:00
JJ
35b17b676e
Merge linking/static/hp-socket/linked-against-hp-socket.yml and nursery/linked-against-hp-socket.yml (#1070) 2025-08-22 08:57:57 -06:00
Mike Hunhoff
7a719809d1
new/updated rules from recent malware samples (#1063) 2025-08-12 10:21:05 -06:00
Moritz
2f09b4d471
add create executable heap rule (#1058) 2025-08-04 12:40:42 -06:00
Mike Hunhoff
d64c2c91ea
add new rules to detect disabling system features via registry on Windows (#1034)
* add new rules to detect disabling features via registry on Windows

* refactor

* refactor

* refactor

* update control registry regex to better handle multiple control sets
2025-03-24 10:38:19 -06:00
Mike Hunhoff
2800fd34de
add disable-system-features-via-registry-on-windows (#1033)
* add disable-system-tools-via-registry-on-windows

* rename to "disable system features via registry on windows"
2025-03-21 08:39:42 -06:00
Tanmay R K
af09ec07d0
detect usage of TripleDesCryptoServiceProvider (#1021)
* detect usage of TripleDESCryptoServiceProvider

* detect usage of TripleDes via dotnet api

* detect usage of TripleDesCryptoServiceProvider

* removed duplicate file

* seperate encrypt and decrypt methods

* changed file names to match desc

* lint fix

* lint fix

* small fixes
2025-03-20 09:06:27 -06:00
Mike Hunhoff
e85887a875
fix: escape "." that are not expected to be dot operators (#1028) 2025-03-18 15:01:39 -06:00
Dhruva Kumar Kaushal
6697513245
improve TCP/UDP socket creation matching #964 (#993)
* improve TCP/UDP socket creation matching #964

* Adding references

* adding IPPROTO_UDP

* relax rule

* function -> basic block

* adding bytes for indirect(0)

* adding bytes for indirect(0)

* back to default changes

* moved to nursery

* final change

* resolving comment

* indentation error
2025-03-14 11:45:36 -06:00
vibhatsu
740d47393e
Enter debug mode rule (#1022)
* add rule for enterdebugmode in nursery

Signed-off-by: vibhatsu <maulikbarot2915@gmail.com>

* better description for enterdebugmode

Signed-off-by: vibhatsu <maulikbarot2915@gmail.com>

* enter-debug-mode-in-dotnet: rename, reduce static scope to basic block, format dotnet only

Signed-off-by: vibhatsu <maulikbarot2915@gmail.com>

* enter-debug-mode-in-dotnet: fix linting error

Signed-off-by: vibhatsu <maulikbarot2915@gmail.com>

* enter-debug-mode-in-dotnet: more specific namespace

Signed-off-by: vibhatsu <maulikbarot2915@gmail.com>

---------

Signed-off-by: vibhatsu <maulikbarot2915@gmail.com>
2025-03-14 11:41:19 -06:00
Elad Levi
3bd8cf7646
Improve Accuracy of Various Detections (#1010)
* Update impersonate-user.yml

* Update enumerate-processes-on-remote-desktop-session-host.yml

* Update enumerate-processes-on-remote-desktop-session-host.yml

* Update enumerate-processes-on-remote-desktop-session-host.yml

* Update nursery/impersonate-user.yml

Co-authored-by: Mike Hunhoff <mike.hunhoff@gmail.com>

* Update host-interaction/process/list/enumerate-processes-on-remote-desktop-session-host.yml

Co-authored-by: Mike Hunhoff <mike.hunhoff@gmail.com>

---------

Co-authored-by: Mike Hunhoff <mike.hunhoff@gmail.com>
2025-03-10 14:19:23 -06:00
Mike Hunhoff
71dd21d88e
tighten Windows mutex related rules (#1004) 2025-02-21 12:37:01 -07:00
Mike Hunhoff
8c62595952
use "span of calls" scope for registry operations that span multiple calls, e.g. open registry key and set value (#999)
* use span of calls scope for registry operations

* fix lints
2025-02-20 14:02:16 -07:00
Willi Ballenthin
79afc557f1
remove testing rule (#989) 2025-02-04 10:23:23 +01:00
Willi Ballenthin
0ea3394942 graduate onedrive rule
closes #943
2025-01-29 18:54:25 +01:00
Willi Ballenthin
36bf945aee fix scopes from lint errors
ref https://github.com/mandiant/capa/pull/2579
2025-01-29 18:54:25 +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
vibhatsu
b4e0c8cdf8
remove duplicate features from some rules (#984)
* remove duplicate features from some rules

* keep commented hex values to show AfdOpenPacketX structure

Signed-off-by: vibhatsu <maulikbarot2915@gmail.com>

---------

Signed-off-by: vibhatsu <maulikbarot2915@gmail.com>
2025-01-28 12:54:17 +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
Jorik
e033410c89
Add 38 new registry-based persistence techniques (#954)
* Add 38 new registry-based persistence techniques

* fix hhctrl com hijack match statement

* fix core_profiler_path rule

* remove optional from disk cleanup handler rule

* update dotnet_startup_hooks

* improve filter handler rule

* update persist via PATH

* merge task schedule persistence with existing rule

* update UserInitMprLogonScript rule

* merge universal app uri with default file association; add better reference
2024-12-09 11:29:56 +01:00
Jorik
ce5e041006
Improve existing persistence rules (#953)
* Improve existing persistence rules by limiting their scope, and adding some more details.

* Update persistence/startup-folder/write-file-to-startup-folder.yml

Co-authored-by: Moritz <mr-tz@users.noreply.github.com>

* change scope to call for shell command via WRM

* Update persistence/startup-folder/write-file-to-startup-folder.yml

Co-authored-by: Moritz <mr-tz@users.noreply.github.com>

* fix startup folder persistence rule

* change name screensaver persistence technique

* change name screensaver persistence technique pt 2

* fix write to startup folder persistence rule

---------

Co-authored-by: Moritz <mr-tz@users.noreply.github.com>
2024-12-09 10:51:47 +01:00
Jorik
ed816a8e53
Add 10 file system-based persistence techniques (#955)
* Add file system based persistence techniques

---------

Co-authored-by: Moritz <mr-tz@users.noreply.github.com>
2024-12-03 17:26:03 +01:00
Moritz
f3bb093ab0
Merge pull request #956 from jorik-utwente/add-miscellaneous-persistence-techniques
Add 4 miscellaneous persistence techniques
2024-11-25 09:21:49 +01:00
jorik
5873d7ff75 Remove COM usage detection from BITS jobs persistence 2024-11-22 16:16:19 +01:00
jorik
82a9d4030e move WMI persistence rule to WMI usage detection rule 2024-11-22 16:12:11 +01:00
Moritz
cd12dbfa39
enable namespace 2024-11-18 18:45:50 +01:00
jorik
2627820f8b add comment about overwriting .sdb files 2024-11-15 15:05:30 +01:00
jorik
d95d7b6027 add sdbinst.exe to shimming rule 2024-11-13 11:56:26 +01:00
jorik
f23aaa7353 change namespaces 2024-11-13 11:32:46 +01:00
jorik
1d7ef457fe change to COM tag 2024-11-13 11:30:21 +01:00
jorik
48621e0210 Add 4 miscellaneous persistence techniques. 2024-11-05 14:00:03 +01:00
jlmndt
f880b13f08
added detections for reading/writing shadow file, password database (#949)
* added detections for reading/writing shadow file, password database
2024-10-30 16:19:22 +01:00
Still / Azaka
1fd0d8e141
Add SysWhispers2 detection & add 0x2e syscall detection (#888)
* Add SysWhisper2 detection & add int 2e to syscall detection

---------

Signed-off-by: Still Hsu <dev@stillu.cc>
Co-authored-by: Moritz <mr-tz@users.noreply.github.com>
2024-09-24 13:24:52 +02:00
Mike Hunhoff
e67af53930 rules: dotnet: adding new .NET rules 2024-09-20 16:13:55 -06:00
Ervin Ocampo
534ee22fcc
Add capa rules create-thread-bypass-freeze.yml and check-thread-suspend-count-exceeded.yml to nursery. (#912)
* Add rules

---------

Co-authored-by: Willi Ballenthin <wballenthin@google.com>
2024-09-16 14:45:21 +02:00
jtothej
fc708957ed Move from nursery and update get-system-firmware-table.yml 2024-09-05 18:35:46 +02:00
Mike Hunhoff
5b8c8a63a2
update linux/android rules and reduce fps for intel-specific rules (#927)
* android: add / update rules

* intel: match intel archs to avoid fps on others
2024-08-16 12:57:08 -06:00
Moritz
d4e89f9194
remove example and move to nursery 2024-08-16 13:47:03 +02:00
Jared Wilson
936d5b24f4
Create upload-file-to-onedrive.yml (#913) 2024-08-05 11:36:49 +02:00
Mike Hunhoff
6342716b4e dotnet: improve dotnet invoke-dotnet-assembly-method.yml 2024-08-01 16:21:13 -06:00
Mike Hunhoff
ea14b38fbf
adding / updating linux / android rules (#907)
* adding / updating linux / android rules

* update statement

* apply review feedback

* add additional android rules

* fix feedback
2024-06-11 12:10:57 -06:00
Mike Hunhoff
ded2744733
adding new and updating linux / android rules (#903)
* adding new and updating linux / android rules

* fix lints
2024-05-31 13:24:19 -04:00
Moritz
a83ad9d367
Merge pull request #892 from mandiant/android-mr
add android OS where applicable
2024-04-23 17:04:22 +02:00