Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_APT_SH_Codecov_Hack_Apr21_1

Detects manipulated Codecov bash uploader tool that has been manipulated by an unknown actor during March / April 2021

APT / threat actorSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Florian Roth (Nextron Systems)
Date
2021-04-16
Modified
2023-12-05
Score / Quality
75 / 85

What this rule detects

Detects manipulated Codecov bash uploader tool that has been manipulated by an unknown actor during March / April 2021

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

Summary generated from the rule's metadata and condition.

Rule source

apt-sh-codecov-hack-apr21-1.yarDetection Rule License 1.1
rule SIGNATURE_BASE_APT_SH_Codecov_Hack_Apr21_1 : FILE
{
	meta:
		description = "Detects manipulated Codecov bash uploader tool that has been manipulated by an unknown actor during March / April 2021"
		author = "Florian Roth (Nextron Systems)"
		id = "b5fb74c4-073e-53af-a207-1672e63c9a64"
		date = "2021-04-16"
		modified = "2023-12-05"
		reference = "https://about.codecov.io/security-update/"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/mal_codecov_hack.yar#L2-L17"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "1aa7723982a1b675ba6694f1af0eb28e5926b974874580bd727cf33a3f8d893a"
		score = 75
		quality = 85
		tags = "FILE"

	strings:
		$a1 = "Global report uploading tool for Codecov"
		$s1 = "curl -sm 0.5 -d"

	condition:
		uint16( 0 ) == 0x2123 and filesize < 70KB and all of them
}

Strings (2 patterns)

IdentifierTypeValueModifiers
$a1text"Global report uploading tool for Codecov"
$s1text"curl -sm 0.5 -d"

Condition

uint16( 0 ) == 0x2123 and filesize < 70KB and all of them

In plain words (Heuristic)

  • The file must start with “#!” — a script with a shebang.
  • The file must be smaller than 70KB (a cheap guard that skips large files).
  • All 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: Florian Roth (Nextron Systems)

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

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: b5fb74c4-073e-53af-a207-1672e63c9a64

Tags:FILE