Member-only story

Malware Classification

The Family Reunion

Mi'kail Eli'yah
8 min readFeb 2, 2025
import matplotlib.pyplot as plt
from matplotlib_venn import venn3, venn3_circles

# Define the categories with their malware types
categories = {
"Self-Replicating": {"Virus", "Worm"},
"Social Engineering": {"Virus", "Worm", "Trojan Horse", "Ransomware", "Spyware", "Backdoor"},
"Exploit Vulnerabilities": {"Virus", "Worm", "Trojan Horse", "Rootkit", "Ransomware", "Spyware", "Backdoor"},
"Inject Malicious Code": {"Virus", "Worm", "Rootkit", "Spyware", "Backdoor"}
}

# Create figure with a larger size
plt.figure(figsize=(14, 10))

# Calculate set intersections
a = categories["Self-Replicating"]
b = categories["Social Engineering"]
c = categories["Exploit Vulnerabilities"]

# Create the Venn diagram
venn = venn3([a, b, c],
set_labels=("Self-Replicating", "Social Engineering", "Exploit Vulnerabilities"),
set_colors=("lightblue", "lightgreen", "lightsalmon"))

# Add circles for better visibility
venn3_circles([a, b, c], linewidth=2)

# Define annotations with their characteristics
annotations = {
"Virus\n(yes/possible/possible/yes)": (0.4, 0.65),
"Worm\n(yes/possible/possible/yes)": (0.3, 0.55),
"Trojan Horse\n(no/possible/possible/not likely)": (0.7, 0.4)…

--

--

Mi'kail Eli'yah
Mi'kail Eli'yah

No responses yet