Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Tool_Gost_Tunnel_Strings

Detects GOST Go Tunnel, based on strings

Hack toolSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2023-02-28
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects GOST Go Tunnel, based on strings

Targets: Windows PE, Linux ELF, macOS Mach-O.

It defines 16 patterns (16 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

tool-gost-tunnel-strings.yarDetection Rule License 1.1
rule SEKOIA_Tool_Gost_Tunnel_Strings : FILE
{
	meta:
		description = "Detects GOST Go Tunnel, based on strings"
		author = "Sekoia.io"
		id = "2de7aae9-9cf8-4007-aa27-5caea4123713"
		date = "2023-02-28"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/tool_gost_tunnel_strings.yar#L1-L35"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "eba1557acc1d9f16817a4bcd24631334a12357e45ad23f1c333de686f20f9291"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = ".(*shadowUDPHandler).transportUDP" ascii
		$ = ".(*quicCipherConn).decrypt" ascii
		$ = ".(*socks4aConnector).ConnectContext.func1" ascii
		$ = ".(*mtlsTransporter).Handshake" ascii
		$ = ".(*FIFOStrategy).Apply" ascii
		$ = ".dnsTCPExchanger" ascii
		$ = ".dohResponseWriter" ascii
		$ = ".tcpRemoteForwardListener" ascii
		$ = ".shadowUDPPacketConn" ascii
		$ = ".sshTunnelListener" ascii
		$ = "/listener/rtcp/listener.go" ascii
		$ = "/handler/unix/handler.go" ascii
		$ = "/handler/tunnel/tunnel.go" ascii
		$ = "/internal/net/proxyproto/listener.go" ascii
		$ = "/internal/util/serial/conn.go" ascii
		$ = "github.com/go-gost/x" ascii

	condition:
		( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a or uint32be( 0 ) == 0xcefaedfe or uint32be( 0 ) == 0xcffaedfe or uint32be( 0 ) == 0xbebafeca ) and 5 of them
}

Strings (16 patterns)

IdentifierTypeValueModifiers
$text".(*shadowUDPHandler).transportUDP"ascii
$text".(*quicCipherConn).decrypt"ascii
$text".(*socks4aConnector).ConnectContext.func1"ascii
$text".(*mtlsTransporter).Handshake"ascii
$text".(*FIFOStrategy).Apply"ascii
$text".dnsTCPExchanger"ascii
$text".dohResponseWriter"ascii
$text".tcpRemoteForwardListener"ascii
$text".shadowUDPPacketConn"ascii
$text".sshTunnelListener"ascii
$text"/listener/rtcp/listener.go"ascii
$text"/handler/unix/handler.go"ascii
$text"/handler/tunnel/tunnel.go"ascii
$text"/internal/net/proxyproto/listener.go"ascii
$text"/internal/util/serial/conn.go"ascii
$text"github.com/go-gost/x"ascii

Condition

( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a or uint32be( 0 ) == 0xcefaedfe or uint32be( 0 ) == 0xcffaedfe or uint32be( 0 ) == 0xbebafeca ) and 5 of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must start with the ELF header — a Linux/Unix executable.
  • The file must start with a Mach-O / fat binary magic — a macOS executable.
  • At least 5 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.

Open in editor

References

Licence & attribution

Author: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 2de7aae9-9cf8-4007-aa27-5caea4123713

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE