capa-rules/host-interaction/console/manipulate-console-buffer.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

30 lines
908 B
YAML

rule:
meta:
name: manipulate console buffer
namespace: host-interaction/console
authors:
- william.ballenthin@mandiant.com
- michael.hunhoff@mandiant.com
scopes:
static: function
dynamic: span of calls
mbc:
- Operating System::Console [C0033]
references:
- https://stackoverflow.com/a/15770935/87207
examples:
- 3aa7ee4d67f562933bc998f352b1f319:0x705413A0
features:
- or:
- and:
- or:
- api: kernel32.SetConsoleCursorPosition
- api: kernel32.ReadConsoleOutputCharacter
- api: kernel32.WriteConsoleOutputCharacter
- api: kernel32.WriteConsoleOutput
- api: kernel32.WriteConsoleInput
- optional:
- api: kernel32.GetStdHandle
- number: 0xfffffff5 = STD_OUTPUT_HANDLE
- api: System.Console::Write
- api: System.Console::WriteLine