YARA · SEKOIA.IO Community
SEKOIA_Loader_Win_Konni_Bat
Detect the BAT files (named trap.bat or yup.bat) used by KONNI
- Author
- Sekoia.io
- Date
- 2023-09-26
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detect the BAT files (named trap.bat or yup.bat) used by KONNI
Associated malware family: Konni.
It defines 8 patterns (8 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
loader-win-konni-bat.yarDetection Rule License 1.1
rule SEKOIA_Loader_Win_Konni_Bat : FILE
{
meta:
= "Detect the BAT files (named trap.bat or yup.bat) used by KONNI"
= "Sekoia.io"
= "e8921336-6c91-4b46-bd3f-3cf4a9b31082"
= "2023-09-26"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/loader_win_konni_bat.yar#L1-L22"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "3476e41461692c3ccfc0ef47a4d5b8822c4940987755763d2a5913e27d9350d4"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$ = "del /f /q \"%~dp0\\*.zip\" > nul"
$ = "del /f /q \"%~dp0\\*.xml\" > nul"
$ = "del /f /q \"%~dp0\\wpnprv*.dll\" > nul"
$ = "del /f /q \"%~dp0\\*.bat\" > nul"
$ = "del /f /q \"%~dpnx0\" > nul"
$ = "echo %~dp0 | findstr /i \"system32\" > nul"
$ = "if %ERRORLEVEL% equ 0 (goto INSTALL) else (goto COPYFILE)"
$ = "if exist \"%ProgramFiles(x86)%\" ("
condition:
3 of them and filesize < 3KB
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ | text | "del /f /q \"%~dp0\\*.zip\" > nul" | |
| $ | text | "del /f /q \"%~dp0\\*.xml\" > nul" | |
| $ | text | "del /f /q \"%~dp0\\wpnprv*.dll\" > nul" | |
| $ | text | "del /f /q \"%~dp0\\*.bat\" > nul" | |
| $ | text | "del /f /q \"%~dpnx0\" > nul" | |
| $ | text | "echo %~dp0 | findstr /i \"system32\" > nul" | |
| $ | text | "if %ERRORLEVEL% equ 0 (goto INSTALL) else (goto COPYFILE)" | |
| $ | text | "if exist \"%ProgramFiles(x86)%\" (" |
Condition
3 of them and filesize < 3KBIn plain words (Heuristic)
- The file must be smaller than 3KB (a cheap guard that skips large files).
- At least 3 patterns in the rule 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: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: e8921336-6c91-4b46-bd3f-3cf4a9b31082
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- MalwareSEKOIA.IO Community· Sekoia.io· 2023-09-26
- MalwareSEKOIA.IO Community· Sekoia.io· 2023-09-26
- MalwareSEKOIA.IO Community· Sekoia.io· 2022-09-12
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2023-11-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2023-11-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2022-09-12
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-16