YARA · ditekSHen detection
DITEKSHEN_INDICATOR_Tool_Forensia
Detects Forensia anti-forensics tool used for erasing footprints
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-09-25
- Score / Quality
- 75 / 73
What this rule detects
Detects Forensia anti-forensics tool used for erasing footprints
Targets: Windows PE.
It defines 21 patterns (20 text, 1 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
indicator-tool-forensia.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_Tool_Forensia : FILE
{
meta:
= "Detects Forensia anti-forensics tool used for erasing footprints"
= "ditekSHen"
= "bcd05c2e-7ddd-5ce7-a6a7-0659bed38744"
= "2020-11-06"
= "2024-09-25"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L1490-L1523"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "7147eee62df10cd8a6c00ec80c4d1bdb8234a181dd6af81d0580d847f05bd0b6"
= 75
= 73
= "FILE"
strings:
$c1 = "for /F \"tokens=*\" %1 in ('wevtutil.exe el') DO wevtutil.exe cl \"%1\"" ascii
$c2 = "del /F /Q C:\\Windows\\Prefetch\\*" ascii
$c3 = "del C:\\Windows\\AppCompat\\Programs\\RecentFileCache.bcf" ascii
$c4 = "del /F /Q %APPDATA%\\Microsoft\\Windows\\Recent\\*" ascii
$c5 = "del /F /Q %APPDATA%\\Microsoft\\Windows\\Recent\\CustomDestinations\\*" ascii
$c6 = "del /F /Q %APPDATA%\\Microsoft\\Windows\\Recent\\AutomaticDestinations\\*" ascii
$c7 = "fsutil.exe usn deletejournal /D C:" ascii
$r1 = "\\Memory Management\\PrefetchParameters" wide
$r2 = "\\Explorer\\Advanced" wide
$r3 = "\\Services\\EventLog" wide
$r4 = "\\Shell\\BagMRU" wide
$r5 = "\\Control\\FileSystem" wide
$r6 = "\\Setup\\VC" wide
$s1 = "[LOG] - %s" wide
$s2 = "\\forensia\\regedit.hpp" wide
$s3 = "NtfsDisableLastAccessUpdate" wide
$s4 = "Melting The Executable" wide
$s5 = "Sysmon Unloader" wide
$s6 = "Rundll32.exe apphelp.dll,ShimFlushCache" ascii
$s7 = "\\Debug\\forensia.pdb" ascii
$s8 = { 55 00 00 00 aa 00 00 00 92 49 24 00 49 24 92 00
24 92 49 00 00 00 00 00 11 00 00 00 22 00 00 00
33 00 00 00 44 00 00 00 66 00 00 00 88 00 00 00
99 00 00 00 bb 00 00 00 cc 00 00 00 dd 00 00 00
ee 00 00 00 ff 00 00 00 6d b6 db 00 b6 db 6d 00
db 6d b6 }
condition:
uint16( 0 ) == 0x5a4d and ( ( 4 of ( $c* ) and 2 of ( $r* ) ) or ( 4 of ( $r* ) and 2 of ( $c* ) ) or 6 of ( $s* ) or ( 3 of ( $s* ) and 2 of ( $r* ) and 1 of ( $c* ) ) )
}
Strings (21 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $c1 | text | "for /F \"tokens=*\" %1 in ('wevtutil.exe el') DO wevtutil.exe cl \"%1\"" | ascii |
| $c2 | text | "del /F /Q C:\\Windows\\Prefetch\\*" | ascii |
| $c3 | text | "del C:\\Windows\\AppCompat\\Programs\\RecentFileCache.bcf" | ascii |
| $c4 | text | "del /F /Q %APPDATA%\\Microsoft\\Windows\\Recent\\*" | ascii |
| $c5 | text | "del /F /Q %APPDATA%\\Microsoft\\Windows\\Recent\\CustomDestinations\\*" | ascii |
| $c6 | text | "del /F /Q %APPDATA%\\Microsoft\\Windows\\Recent\\AutomaticDestinations\\*" | ascii |
| $c7 | text | "fsutil.exe usn deletejournal /D C:" | ascii |
| $r1 | text | "\\Memory Management\\PrefetchParameters" | wide |
| $r2 | text | "\\Explorer\\Advanced" | wide |
| $r3 | text | "\\Services\\EventLog" | wide |
| $r4 | text | "\\Shell\\BagMRU" | wide |
| $r5 | text | "\\Control\\FileSystem" | wide |
| $r6 | text | "\\Setup\\VC" | wide |
| $s1 | text | "[LOG] - %s" | wide |
| $s2 | text | "\\forensia\\regedit.hpp" | wide |
| $s3 | text | "NtfsDisableLastAccessUpdate" | wide |
| $s4 | text | "Melting The Executable" | wide |
| $s5 | text | "Sysmon Unloader" | wide |
| $s6 | text | "Rundll32.exe apphelp.dll,ShimFlushCache" | ascii |
| $s7 | text | "\\Debug\\forensia.pdb" | ascii |
| $s8 | hex | { 55 00 00 00 aa 00 00 00 92 49 24 00 49 24 92 00 24 92 49 00 00 00 00 00 11 00 00 00 22 00 00 00 33 00 00 00 44 00 00 00 66 00 … |
Condition
uint16( 0 ) == 0x5a4d and ( ( 4 of ( $c* ) and 2 of ( $r* ) ) or ( 4 of ( $r* ) and 2 of ( $c* ) ) or 6 of ( $s* ) or ( 3 of ( $s* ) and 2 of ( $r* ) and 1 of ( $c* ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 4 patterns in ( $c* ) must match.
- At least 2 patterns in ( $r* ) must match.
- At least 4 patterns in ( $r* ) must match.
- At least 2 patterns in ( $c* ) must match.
- At least 6 patterns in ( $s* ) must match.
- At least 3 patterns in ( $s* ) must match.
- At least 1 patterns in ( $c* ) must match.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.
References
Licence & attribution
Author: ditekSHen
Source repository: ditekSHen detection @ e76c93dcde
Licence: BSD 2-Clause License (repository licence)
Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: bcd05c2e-7ddd-5ce7-a6a7-0659bed38744
Tags:FILE
Related rules
- Suspicious / huntingditekSHen detection· ditekSHen· 2023-08-22
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21