Aller au contenu

YARA · SEKOIA.IO Community

SEKOIA_Tool_Gsocket_Strings

Detects Gsocket based on strings

Outil offensifSEKOIA.IO CommunityDetection Rule License 1.1Compile avec YARA-X
Auteur
Sekoia.io
Date
2024-06-10
Modifiée
2024-12-19
Score / Qualité
75 / 80

Ce que détecte cette règle

Detects Gsocket based on strings

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

Elle définit 6 motifs (6 texte, 0 hex, 0 regex).

Résumé généré à partir des métadonnées et de la condition de la règle.

Source de la règle

tool-gsocket-strings.yarDetection Rule License 1.1
rule SEKOIA_Tool_Gsocket_Strings : FILE
{
	meta:
		description = "Detects Gsocket based on strings"
		author = "Sekoia.io"
		id = "55fb2f2b-1074-4b6d-9113-48eaeb0e1e27"
		date = "2024-06-10"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/tool_gsocket_strings.yar#L1-L28"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "c54308293a9f64b571282eac9fba01e4671ba6b0cd45936fab92d4d9af904bbb"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "proxy. It allows multiple gs-netcat clients to (securely) relay"
		$ = "GS-NETCAT(1)            General Commands Manual          GS-NETCAT(1)"
		$ = "-T      Use TOR. The gs-netcat tool will connect via TOR to the GSRN."
		$ = "-D      Daemon & Watchdog mode. Start gs-netcat as a background process"
		$ = "gs-netcat [-rlgvqwCTSDiu] [-s secret] [-k keyfile] [-L logfile] [-d IP]"
		$ = "The gs-netcat utility is a re-implementation of netcat."

	condition:
		( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a or uint32be( 0 ) == 0xfeedface or uint32be( 0 ) == 0xcffaedfe or uint32be( 0 ) == 0xcafebabe ) and filesize > 2MB and filesize < 6MB and 2 of them
}

Chaînes (6 motifs)

IdentifiantTypeValeurModificateurs
$texte"proxy. It allows multiple gs-netcat clients to (securely) relay"
$texte"GS-NETCAT(1) General Commands Manual GS-NETCAT(1)"
$texte"-T Use TOR. The gs-netcat tool will connect via TOR to the GSRN."
$texte"-D Daemon & Watchdog mode. Start gs-netcat as a background process"
$texte"gs-netcat [-rlgvqwCTSDiu] [-s secret] [-k keyfile] [-L logfile] [-d IP]"
$texte"The gs-netcat utility is a re-implementation of netcat."

Condition

( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a or uint32be( 0 ) == 0xfeedface or uint32be( 0 ) == 0xcffaedfe or uint32be( 0 ) == 0xcafebabe ) and filesize > 2MB and filesize < 6MB and 2 of them

En clair (Heuristique)

  • Le fichier doit commencer par « MZ » — un exécutable Windows (PE).
  • Le fichier doit commencer par l’en-tête ELF — un exécutable Linux/Unix.
  • Le fichier doit commencer par une signature Mach-O / fat — un exécutable macOS.
  • Le fichier doit faire moins de 6MB (garde-fou peu coûteux qui écarte les gros fichiers).
  • Le fichier doit faire plus de 2MB.
  • Au moins 2 motifs de la règle doivent être trouvés.

Tester cette règle dans votre navigateur

Déposez un fichier pour le scanner avec cette règle grâce à YARA-X compilé en WebAssembly. Rien n’est envoyé.

Déposez un fichier ici ou cliquez pour choisirScanné localement avec YARA-X. Fichiers jusqu’à 200 Mo.

Ouvrir dans l’éditeur

Références

Licence et attribution

Auteur : Sekoia.io

Dépôt source : SEKOIA.IO Community @ a438a5901a

Licence : Detection Rule License 1.1 (licence du dépôt)

Règle d’origine

Reprise via YARA Forge 20260927, qui préfixe les noms de règles par la source et ajoute des champs meta normalisés.

Identifiant de règle: 55fb2f2b-1074-4b6d-9113-48eaeb0e1e27

Métadonnées

version1.0
classificationTLP:CLEAR

Tags:FILE