mirror of
https://github.com/vee1e/capa-rules.git
synced 2026-09-01 19:07:15 +00:00
add load-code/pe/rebuild-import-table.yml
Identify rebuilding of import table, used in reflective-dll-injection. References: - https://0x00sec.org/t/reflective-dll-injection/3080 - https://www.ired.team/offensive-security/code-injection-process-injection/reflective-dll-injection
This commit is contained in:
parent
02915b3ade
commit
684f817111
1 changed files with 27 additions and 0 deletions
27
load-code/pe/rebuild-import-table.yml
Normal file
27
load-code/pe/rebuild-import-table.yml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
rule:
|
||||
meta:
|
||||
name: rebuild import table
|
||||
namespace: load-code/pe
|
||||
author: "@Ana06"
|
||||
scope: function
|
||||
references:
|
||||
- https://0x00sec.org/t/reflective-dll-injection/3080
|
||||
- https://www.ired.team/offensive-security/code-injection-process-injection/reflective-dll-injection
|
||||
examples:
|
||||
- E4C33AC3638EEF68311F8AC0D72483C7:0x401510
|
||||
features:
|
||||
- and:
|
||||
- offset: 0x7C = IMAGE_NT_HEADERS.OptionalHeader.DataDirectory.Size
|
||||
- offset: 0x78 = IMAGE_NT_HEADERS.OptionalHeader.DataDirectory.VirtualAddress
|
||||
- basic block:
|
||||
- and:
|
||||
- offset: 0xC = IMAGE_IMPORT_DESCRIPTOR.Name
|
||||
- api: LoadLibraryA
|
||||
- offset: 0x10 = IMAGE_IMPORT_DESCRIPTOR.FirstThunk
|
||||
- api: GetProcAddress
|
||||
- optional: # Optional as may only support import by ordinal or import by name
|
||||
- or:
|
||||
- number/x32: 0x80000000 = IMAGE_SNAP_BY_ORDINAL32
|
||||
- number/x64: 0x8000000000000000 = IMAGE_SNAP_BY_ORDINAL64
|
||||
- number: 0xFFFF = IMAGE_ORDINAL
|
||||
- number: 0x2 = thunk->u1.AddressOfData
|
||||
Loading…
Add table
Add a link
Reference in a new issue