Skip to content

YARA · ditekSHen detection

DITEKSHEN_INDICATOR_TOOL_PET_Peirates

Detects Kubernetes penetration tool Peirates

Suspicious / huntingditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-09-25
Score / Quality
75 / 75

What this rule detects

Detects Kubernetes penetration tool Peirates

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

Summary generated from the rule's metadata and condition.

Rule source

indicator-tool-pet-peirates.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_TOOL_PET_Peirates : FILE
{
	meta:
		description = "Detects Kubernetes penetration tool Peirates"
		author = "ditekSHen"
		id = "74ce83ed-0d93-5cb0-97e8-6885ae83b336"
		date = "2020-11-06"
		modified = "2024-09-25"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L677-L694"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "321f06af098283638f99d027dc3c95a25a72192a25c7afa5081a7dbff8c3acb7"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "DeprecatedServiceAccount" fullword ascii
		$s2 = "LivenessProbe" fullword ascii
		$s3 = "\\t\\tkubectl expose rs nginx --port=80 --target-port=8000" ascii
		$s4 = "\\t\\tkubectl run hazelcast --image=hazelcast --port=5701" ascii
		$s5 = "COMPREPLY[$i]=${COMPREPLY[$i]#\"$colon_word\"}" ascii
		$s6 = "%*polymorphichelpers.HistoryViewerFunc" ascii
		$s7 = "ListenAndServeTLS" ascii
		$s8 = "DownwardAPI" ascii
		$s9 = "; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);proto:" ascii
		$s10 = "name: attack-" ascii

	condition:
		uint16( 0 ) == 0x457f and 9 of them
}

Strings (10 patterns)

IdentifierTypeValueModifiers
$s1text"DeprecatedServiceAccount"fullword ascii
$s2text"LivenessProbe"fullword ascii
$s3text"\\t\\tkubectl expose rs nginx --port=80 --target-port=8000"ascii
$s4text"\\t\\tkubectl run hazelcast --image=hazelcast --port=5701"ascii
$s5text"COMPREPLY[$i]=${COMPREPLY[$i]#\"$colon_word\"}"ascii
$s6text"%*polymorphichelpers.HistoryViewerFunc"ascii
$s7text"ListenAndServeTLS"ascii
$s8text"DownwardAPI"ascii
$s9text"; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);proto:"ascii
$s10text"name: attack-"ascii

Condition

uint16( 0 ) == 0x457f and 9 of them

In plain words (Heuristic)

  • At least 9 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: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

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

Rule id: 74ce83ed-0d93-5cb0-97e8-6885ae83b336

Tags:FILE