capa-rules/load-code/pe/inspect-section-memory-permissions.yml
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

48 lines
1.7 KiB
YAML

rule:
meta:
name: inspect section memory permissions
namespace: load-code/pe
authors:
- "@Ana06"
description: "translate section memory permissions (specified in the 'Characteristics' field of the image section header) into page protection constants"
scopes:
static: function
dynamic: span of calls
mbc:
- Discovery::Code Discovery::Inspect Section Memory Permissions [B0046.002]
examples:
- E4C33AC3638EEF68311F8AC0D72483C7:0x401480
features:
- and:
- os: windows
- 3 or more:
- and:
- number: 0x40000000 = IMAGE_SCN_MEM_READ
- number: 0x2 = PAGE_READONLY
- and:
- number: 0x20000000 = IMAGE_SCN_MEM_EXECUTE
- number: 0x10 = PAGE_EXECUTE
- and:
- or:
- number: 0x60000000 = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_EXECUTE
- and:
- number: 0x40000000 = IMAGE_SCN_MEM_READ
- number: 0x20000000 = IMAGE_SCN_MEM_EXECUTE
- number: 0x20 = PAGE_EXECUTE_READ
- and:
- or:
- number: 0xC0000000 = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE
- and:
- number: 0x40000000 = IMAGE_SCN_MEM_READ
- number: 0x80000000 = IMAGE_SCN_MEM_WRITE
- number: 0x4 = PAGE_READWRITE
- and:
- or:
- number: 0xE0000000 = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_EXECUTE
- and:
- number: 0x40000000 = IMAGE_SCN_MEM_READ
- number: 0x80000000 = IMAGE_SCN_MEM_WRITE
- number: 0x20000000 = IMAGE_SCN_MEM_EXECUTE
- number: 0x40 = PAGE_EXECUTE_READWRITE
- optional:
- number: 0x1 = PAGE_NOACCESS