YARA · ditekSHen detection
DITEKSHEN_INDICATOR_TOOL_Ligolo
Detects Ligolo tool for establishing SOCKS5 or TCP tunnels from a reverse connection
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-09-25
- Score / Quality
- 75 / 73
What this rule detects
Detects Ligolo tool for establishing SOCKS5 or TCP tunnels from a reverse connection
Targets: Windows PE.
It defines 7 patterns (7 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_INDICATOR_TOOL_Ligolo : FILE
{
meta:
= "Detects Ligolo tool for establishing SOCKS5 or TCP tunnels from a reverse connection"
= "ditekSHen"
= "cc461fd1-9a2f-59ce-af74-a0f55b8850b1"
= "2020-11-06"
= "2024-09-25"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L1371-L1385"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "b515dc184013c2f67d37e42d7172e2471b3a93c94024be12c7f587296287282d"
= 75
= 73
= "FILE"
strings:
$p1 = "/ligolo/main.go" ascii
$p2 = "/armon/go-socks5" ascii
$s1 = "main.StartLigolo" fullword ascii
$s2 = "main.handleRelay" fullword ascii
$s3 = "main.startSocksProxy" fullword ascii
$s4 = "_main.tlsFingerprint" fullword ascii
$s5 = "main.verifyTlsCertificate" fullword ascii
condition:
( uint16( 0 ) == 0x5a4d or uint16( 0 ) == 0x457f or uint16( 0 ) == 0xfacf ) and ( ( all of ( $p* ) and 1 of ( $s* ) ) or all of ( $s* ) or ( 1 of ( $p* ) and 4 of ( $s* ) ) )
}
Strings (7 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $p1 | text | "/ligolo/main.go" | ascii |
| $p2 | text | "/armon/go-socks5" | ascii |
| $s1 | text | "main.StartLigolo" | fullword ascii |
| $s2 | text | "main.handleRelay" | fullword ascii |
| $s3 | text | "main.startSocksProxy" | fullword ascii |
| $s4 | text | "_main.tlsFingerprint" | fullword ascii |
| $s5 | text | "main.verifyTlsCertificate" | fullword ascii |
Condition
( uint16( 0 ) == 0x5a4d or uint16( 0 ) == 0x457f or uint16( 0 ) == 0xfacf ) and ( ( all of ( $p* ) and 1 of ( $s* ) ) or all of ( $s* ) or ( 1 of ( $p* ) and 4 of ( $s* ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $p* ) must match.
- All patterns in ( $s* ) must match.
- At least 1 patterns in ( $s* ) must match.
- At least 1 patterns in ( $p* ) must match.
- At least 4 patterns in ( $s* ) 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.
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: cc461fd1-9a2f-59ce-af74-a0f55b8850b1
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