alexgreensh/repo-forensics / skills/repo-forensics
repo-forensics
FlaggedSecurity forensics for git repos, AI skills, and MCP servers. Audits dependencies, detects prompt injection, credential theft, runtime dynamism, manifest drift, known CVEs, CISA KEV (actively exploited) vulns, and 2026 attack patterns. Not for fixing vulnerabilities or pentesting.
data/yara/malware.yar
View on GitHub// malware.yar - curated malware/stager signatures for repo-forensics.
// Multi-string conjunctive conditions + filesize bounds. A match is a
// confirmed family indicator. YR-* ids mirrored in data/yara/manifest.json.
// Author: Alex Greenshpun. License: PolyForm-Noncommercial-1.0.0.
rule Malware_Reverse_Shell_Stager
{
meta:
id = "YR-MAL-001"
severity = "high"
category = "malware"
confidence = "0.85"
title = "Reverse shell stager (socket + dup2 + shell spawn)"
strings:
$socket = "socket.socket(" nocase
$dup2 = "dup2(" nocase
$sh = "/bin/sh" nocase
$cmd = "cmd.exe" nocase
condition:
filesize < 500KB and $socket and $dup2 and (1 of ($sh, $cmd))
}
rule Malware_Powershell_Encoded_Stager
{
meta:
id = "YR-MAL-002"
severity = "high"
category = "malware"
confidence = "0.85"
title = "PowerShell encoded-command stager"
strings:
$ps = "powershell" nocase
$enc = "-EncodedCommand" nocase
$enc_short = "-enc" nocase fullword
$ec = "-ec" nocase fullword
$e = "-e" nocase fullword
$hidden = "-WindowStyle Hidden" nocase
$noprof = "-NoProfile" nocase
$w_hidden = "-w hidden" nocase
$nop = "-nop" nocase fullword
condition:
// v2.13.1: accept the short-flag encodings (-enc/-ec/-e) and the
// shorthand stealth flags (-w hidden/-nop) real droppers use. PS
// droppers documented in prose/tutorials are demoted by the context
// gate (prose-doc / test-fixture -> inferred) (design §4 add #1).
filesize < 200KB and $ps and (1 of ($enc, $enc_short, $ec, $e)) and (1 of ($hidden, $noprof, $w_hidden, $nop))
}
rule Malware_HTA_Dropper
{
meta:
id = "YR-MAL-003"
severity = "high"
category = "malware"
confidence = "0.80"
title = "HTA dropper (mshta + WScript.Shell.Run)"
strings:
$mshta = "mshta" nocase
$wsh = "WScript.Shell" nocase
$run = ".Run(" nocase
$shellapp = "Shell.Application" nocase
condition:
filesize < 200KB and $mshta and $wsh and (1 of ($run, $shellapp))
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |