Skip to main content
analyzing-malware-family-relationships-with-malpedia Query the Malpedia API to look up malware family aliases and naming (platform.family_name), pull community/vendor YARA rules, link families to threat actors, and map family relationships such as loader-payload chains and shared authorship. Use when researching a malware family's aliases, lineage, or actor attribution, or when sourcing YARA rules for detection.
설치로 이동 Skills Marketplace 커뮤니티가 만든 AI 스킬을 발견하고 탐색하세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-malware-family-relationships-with-malpedia명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Zip 다운로드 다운로드 중... 이 저장소의 다른 Skills abusing-dpapi-for-credential-access Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket's dpapi.py, including domain-wide decryption via the DPAPI backup key. Use during authorized red-team credential-access engagements after gaining a foothold or when triaging DPAPI blobs pulled from a host.
abusing-shadow-credentials-for-privesc Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target's NT hash without a password reset. Use when BloodHound shows GenericWrite/GenericAll/AddKeyCredentialLink over a target, as a stealthier alternative to ForceChangePassword, during authorized red-team engagements.
acquiring-disk-image-with-dd-and-dcfldd Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.
name analyzing-malware-family-relationships-with-malpedia description Query the Malpedia API to look up malware family aliases and naming (platform.family_name), pull community/vendor YARA rules, link families to threat actors, and map family relationships such as loader-payload chains and shared authorship. Use when researching a malware family's aliases, lineage, or actor attribution, or when sourcing YARA rules for detection. domain cybersecurity subdomain threat-intelligence tags ["malpedia","malware-family","yara","threat-actor","malware-tracking","threat-intelligence","variant-analysis","malware-intelligence"] version 1.0 author mahipal license Apache-2.0 nist_csf ["ID.RA-01","ID.RA-05","DE.CM-01","DE.AE-02"] mitre_attack ["T1587.001","T1027","T1071"]
Analyzing Malware Family Relationships with Malpedia
Overview
Malpedia is a collaborative platform maintained by Fraunhofer FKIE that catalogs malware families with their aliases, YARA rules, threat actor associations, and reference reports. With over 2,600 malware families documented, it serves as the definitive resource for understanding malware lineages, tracking variant evolution, and linking malware to specific threat groups. This skill covers querying the Malpedia API, mapping malware family relationships, extracting YARA rules for detection, and building intelligence on malware ecosystems used by adversaries.
When to Use
When investigating security incidents that require analyzing malware family relationships with malpedia
When building detection rules or threat hunting queries for this domain
When SOC analysts need structured procedures for this analysis type
When validating security monitoring coverage for related attack techniques
Prerequisites
Python 3.9+ with requests, yara-python, stix2 libraries
Malpedia API key (register at https://malpedia.caad.fkie.fraunhofer.de/ )
Understanding of malware classification and naming conventions
Familiarity with YARA rule syntax for detection
Access to malware samples for validation (optional)
Key Concepts
Malpedia Data Model
Malpedia organizes malware into Families (e.g., "win.cobalt_strike"), each containing: aliases (vendor-specific names like "Beacon", "CobaltStrike"), YARA rules (community and vendor-contributed), actor associations (threat groups using the family), reference reports (CTI reports documenting the family), and sample hashes (representative samples for each variant).
Malware Family Naming
Malpedia uses the format platform.family_name (e.g., win.emotet, elf.mirai, apk.flubot). Platforms include win (Windows), elf (Linux), apk (Android), osx (macOS), and py (Python). This standardized naming resolves the "many names" problem where different vendors assign different names to the same malware.
Family Relationships
Malware families have relationships including: parent-child (code reuse, forks), loader-payload (Emotet loads TrickBot loads Ryuk), shared authorship (same threat actor develops multiple tools), and infrastructure sharing (common C2 frameworks).
Workflow
Step 1: Query Malpedia API for Malware Families
requests
json
collections defaultdict
:
BASE_URL =
( ):
.headers = { : }
( ):
resp = requests.get( ,
headers= .headers, timeout= )
resp.status_code == :
families = resp.json()
( )
families
{}
( ):
resp = requests.get( ,
headers= .headers, timeout= )
resp.status_code == :
info = resp.json()
( )
( )
( )
( )
info
( )
( ):
resp = requests.get( ,
headers= .headers, timeout= )
resp.status_code == :
rules = resp.json()
rule_count = ( (v) v rules.values()) (rules, )
( )
rules
{}
( ):
resp = requests.get( ,
headers= .headers, timeout= )
resp.status_code == :
data = resp.json()
families = data.get( , {})
( )
data
{}
( ):
all_families = .get_family_list()
matches = {
name: info name, info all_families.items()
keyword.lower() name.lower()
keyword.lower() (info.get( , [])).lower()
}
( )
matches
client = MalpediaClient( )
families = client.get_family_list()
emotet_info = client.get_family_info( )
import
import
from
import
class
MalpediaClient
"https://malpedia.caad.fkie.fraunhofer.de/api"
def
__init__
self, api_key
self
"Authorization"
f"apitoken {api_key} "
def
get_family_list
self
"""Get list of all malware families."""
f"{self.BASE_URL} /list/families"
self
30
if
200
print
f"[+] Malpedia: {len (families)} malware families"
return
return
def
get_family_info
self, family_name
"""Get detailed information about a malware family."""
f"{self.BASE_URL} /get/family/{family_name} "
self
30
if
200
print
f"[+] Family: {family_name} "
print
f" Aliases: {info.get('alt_names' , [])} "
print
f" Actors: {[a.get('value' , '' ) for a in info.get('attribution' , [])]} "
print
f" URLs: {len (info.get('urls' , []))} references"
return
print
f"[-] Family not found: {family_name} "
return
None
def
get_family_yara
self, family_name
"""Get YARA rules for a malware family."""
f"{self.BASE_URL} /get/yara/{family_name} "
self
30
if
200
sum
len
for
in
if
isinstance
dict
else
0
print
f"[+] YARA rules for {family_name} : {rule_count} rules"
return
return
def
get_actor_families
self, actor_name
"""Get malware families associated with a threat actor."""
f"{self.BASE_URL} /get/actor/{actor_name} "
self
30
if
200
"families"
print
f"[+] {actor_name} : {len (families)} malware families"
return
return
def
search_families
self, keyword
"""Search families by keyword."""
self
for
in
if
in
or
in
str
"alt_names"
print
f"[+] Search '{keyword} ': {len (matches)} matches"
return
"YOUR_MALPEDIA_API_KEY"
"win.emotet"
Step 2: Map Malware Family Relationships class MalwareFamilyMapper :
def __init__ (self, malpedia_client ):
self .client = malpedia_client
self .relationship_graph = defaultdict(list )
def map_actor_ecosystem (self, actor_name ):
"""Map the malware ecosystem used by a threat actor."""
actor_data = self .client.get_actor_families(actor_name)
families = actor_data.get("families" , {})
ecosystem = {
"actor" : actor_name,
"families" : [],
"family_count" : len (families),
}
for family_name in families:
info = self .client.get_family_info(family_name)
if info:
ecosystem["families" ].append({
"name" : family_name,
"aliases" : info.get("alt_names" , []),
"description" : info.get("description" , "" )[:200 ],
"shared_actors" : [
a.get("value" , "" )
for a in info.get("attribution" , [])
],
"reference_count" : len (info.get("urls" , [])),
})
print (f"\n=== {actor_name} Malware Ecosystem ===" )
for fam in ecosystem["families" ]:
shared = [a for a in fam["shared_actors" ] if a != actor_name]
print (f" {fam['name' ]} " )
print (f" Aliases: {fam['aliases' ][:5 ]} " )
if shared:
print (f" Also used by: {shared} " )
return ecosystem
def find_shared_tooling (self, actor_names ):
"""Find malware families shared between threat actors."""
actor_families = {}
for actor in actor_names:
data = self .client.get_actor_families(actor)
actor_families[actor] = set (data.get("families" , {}).keys())
shared = {}
for i, actor1 in enumerate (actor_names):
for actor2 in actor_names[i+1 :]:
common = actor_families[actor1] & actor_families[actor2]
if common:
shared[f"{actor1} <-> {actor2} " ] = sorted (common)
print (f"\n=== Shared Tooling Analysis ===" )
for pair, families in shared.items():
print (f" {pair} : {len (families)} shared families" )
for f in families[:5 ]:
print (f" - {f} " )
return shared
def build_loader_payload_chain (self, family_name ):
"""Build the loader-payload delivery chain for a family."""
info = self .client.get_family_info(family_name)
if not info:
return {}
chain = {
"family" : family_name,
"description" : info.get("description" , "" ),
"known_loaders" : [],
"known_payloads" : [],
}
known_chains = {
"win.emotet" : {"loaders" : ["email/macro" ], "payloads" : ["win.trickbot" , "win.qakbot" , "win.cobalt_strike" ]},
"win.trickbot" : {"loaders" : ["win.emotet" ], "payloads" : ["win.ryuk" , "win.conti" , "win.cobalt_strike" ]},
"win.qakbot" : {"loaders" : ["email/macro" , "win.emotet" ], "payloads" : ["win.cobalt_strike" , "win.blackbasta" ]},
"win.cobalt_strike" : {"loaders" : ["win.emotet" , "win.trickbot" , "win.qakbot" ], "payloads" : ["ransomware" ]},
}
if family_name in known_chains:
chain["known_loaders" ] = known_chains[family_name]["loaders" ]
chain["known_payloads" ] = known_chains[family_name]["payloads" ]
return chain
mapper = MalwareFamilyMapper(client)
ecosystem = mapper.map_actor_ecosystem("Wizard Spider" )
shared = mapper.find_shared_tooling(["Wizard Spider" , "FIN7" , "Lazarus Group" ])
chain = mapper.build_loader_payload_chain("win.emotet" )
Step 3: Extract and Compile YARA Rules def compile_yara_ruleset (client, family_names, output_file="malware_yara_rules.yar" ):
"""Compile YARA rules for multiple malware families."""
all_rules = []
for family in family_names:
yara_data = client.get_family_yara(family)
if isinstance (yara_data, dict ):
for source, rules in yara_data.items():
if isinstance (rules, list ):
for rule in rules:
all_rules.append(f"// Source: {source} - Family: {family} \n{rule} " )
elif isinstance (rules, str ):
all_rules.append(f"// Source: {source} - Family: {family} \n{rules} " )
with open (output_file, "w" ) as f:
f.write(f"// Malpedia YARA Rules - {len (all_rules)} rules\n" )
f.write(f"// Families: {', ' .join(family_names)} \n\n" )
for rule in all_rules:
f.write(rule + "\n\n" )
print (f"[+] Compiled {len (all_rules)} YARA rules to {output_file} " )
return all_rules
compile_yara_ruleset(client, ["win.emotet" , "win.trickbot" , "win.cobalt_strike" ])
Validation Criteria
Malpedia API queried successfully for malware families
Family information retrieved with aliases, actors, and references
Actor-family relationships mapped correctly
Shared tooling between actors identified
YARA rules extracted and compiled for detection
Loader-payload chains documented for threat intelligence
References