|
| 1 | +rule: |
| 2 | + meta: |
| 3 | + name: linked against PLTHook |
| 4 | + namespace: linking/static/plthook |
| 5 | + authors: |
| 6 | + |
| 7 | + description: Match on files linked with the PLTHook hooking library. |
| 8 | + scopes: |
| 9 | + static: file |
| 10 | + dynamic: file |
| 11 | + att&ck: |
| 12 | + - Defense Evasion::Hijack Execution Flow [T1574] |
| 13 | + references: |
| 14 | + - https://github.com/kubo/plthook |
| 15 | + examples: |
| 16 | + - c2c3b3eea177b9411bc92a8800b40529fcd2d5c3696e71cbb2f4025429b314ee |
| 17 | + features: |
| 18 | + - or: |
| 19 | + - string: "plthook_open" |
| 20 | + - string: "plthook_open_by_handle" |
| 21 | + - string: "plthook_open_by_address" |
| 22 | + - string: "plthook_enum" |
| 23 | + - string: "plthook_replace" |
| 24 | + - string: "plthook_close" |
| 25 | + - string: "plthook_error" |
| 26 | + - export: "plthook_open" |
| 27 | + - export: "plthook_open_by_handle" |
| 28 | + - export: "plthook_open_by_address" |
| 29 | + - export: "plthook_enum" |
| 30 | + - export: "plthook_replace" |
| 31 | + - export: "plthook_close" |
| 32 | + - export: "plthook_error" |
| 33 | + - 3 or more: |
| 34 | + - string: "Cannot get module %s: " |
| 35 | + - string: "Cannot get module at address %p: " |
| 36 | + - string: "ImageDirectoryEntryToData error: " |
| 37 | + - string: "invalid argument: The first argument is null." |
| 38 | + - string: "no such function: %s" |
| 39 | + - string: "Could not find an address in the specified handle." |
| 40 | + - string: "Could not find memory region containing address %p" |
| 41 | + - string: "Could not open %s: %s" |
| 42 | + - string: "Could not find r_debug" |
| 43 | + - string: "Opening the main program is not supported on this platform." |
| 44 | + - string: "failed to open /proc/self/maps" |
| 45 | + - string: "Could not find memory region containing %p" |
| 46 | + - string: "Unexcepted memory permission %s at %p" |
| 47 | + - string: "failed to call kinfo_getvmmap()" |
| 48 | + - string: "Unknown kve_protection 0x%x at %p" |
| 49 | + - string: "Unknown pr_mflags 0x%x at %p" |
| 50 | + - string: "failed to find DT_SYMTAB" |
| 51 | + - string: "failed to find DT_STRTAB" |
| 52 | + - string: "failed to find DT_STRSZ" |
| 53 | + - string: "failed to find DT_PLTRELSZ" |
| 54 | + - string: "failed to find PLT_DT_RELENT" |
| 55 | + - string: "failed to allocate memory: %" |
0 commit comments