Cyberlium
Cyberlium
Cyberlium on Android·Google Play Store

Learn cybersecurity with hands-on labs and AI mentor support on your phone.

Mod 9 · Les 2/5
In progress
Module 9•Lesson 2 of 5•⏱️ 15 min read•Beginner+39 XP

Legal Samples

Legal sample sourcing chain — intentional lab malware, repositories, instructor manifests; refuse mystery USB and breach dumps.

Legal Samples
00:00/03:13

Visual · t22_legal_samples

Legal samples = documented source chain. $MAL_LAB. Original Cyberlium.

Where the sample came from matters as much as what it does — mystery binaries are someone else's incident waiting to happen.

Legal malware analysis uses samples with documented provenance: instructor-provided manifests, authorized malware repositories (MalwareBazaar research use, lab curriculum packages), your own intentionally crafted benign EICAR-class or custom lab binaries per brief — each with hash, source URL or mentor ID, and license/use terms. Refused sources: random email attachments, unknown USB, scraped stranger breach archives, 'friend sent me this exe,' torrent pirated software as malware stand-in without chain. Chain of custody note: UTC received, hash verified, stored chmod 600 in $HOME/cyberlium-lab/samples vault — never execute without manifest match. Legal clarity protects you if behavior crosses lines — mystery sample means stop, do not detonate.

1. Allowed source classes

Curriculum manifest, authorized research repo with ToS read, instructor signed package, self-built lab binary per assignment.

Hash must match manifest before $MAL_LAB detonation — mismatch means stop.

Command guide

Try these commands — Allowed source classes

═══ LINUX / macOS (Malware Static & Dynamic Triage) ═══

Inspect PE / ELF binary headers and sections

Command — copy this

readelf -h sample.bin 2>/dev/null || xxd -g 1 -l 32 sample.bin

Check binary entropy (high entropy often signals packed or encrypted payloads)

Command — copy this

python3 -c "
import math, sys
data = open('sample.bin', 'rb').read() if len(sys.argv) > 1 else b'MZX\x00\x90'
ent = -sum((data.count(bytes([b]))/len(data))*math.log2(data.count(bytes([b]))/len(data)) for b in set(data))
print(f'Calculated File Entropy: {ent:.4f} (Entropy > 7.0 suggests packed/encrypted)')
" sample.bin 2>/dev/null

Primary tools to practice this lesson: curl, grep. Reference sites: MalwareBazaar about (https://bazaar.abuse.ch/about/); VirusTotal acceptable use (https://www.virustotal.com/). Run every command in the box — install first, then the usage lines — only on YOUR lab / program scope.

2. Refused sources

Unknown USB, phishing attachments, dark web markets, employer prod quarantine without IR authorization in writing.

Breach dump executables without legal review — often illegal to possess or analyze outside IR scope.

3. Chain of custody

Log: source ID, SHA256, UTC stored, analyst name, $MAL_LAB VM used, revert Y/N after run.

chmod 600 vault — no cloud sync of live samples folder to personal Drive.

4. What you ship: sample sourcing chain card

Allowed sources list + refused sources + custody log fields + hash-verify rule.

5. What you record before the next lesson

Sample sourcing chain path.

6. Wrong vs right: live malware on daily driver vs sandbox

Worked failure — same MSF word, opposite target. Right never needs a café Wi-Fi or classmate laptop.

  • Wrong: Detonate unknown exe from Discord because 'good practice sample.'
  • Right: Sample sourcing chain documented. Next: No Weaponize.
Hands-on Exercise

Mission: sample sourcing chain

1) List four allowed source classes. 2) List five refused sources. 3) Custody log field list. 4) Hash-verify before detonate rule.

Pro Tip

Stuck? Ask Cyberlium AI Mentor

Ask Mentor: “MalwareBazaar download — lab policy?”

Practice QuizQuestion 1
Multiple choice
Q1

APPLY: Legal sample requires:

Practice QuizQuestion 2
True or False
Q2

APPLY: True or False: Mystery email attachment is valid lab sample.

Practice QuizQuestion 3
Multiple choice
Q3

APPLY: Before detonation verify:

←Previous: Never Daily Driver
Answer 3 practice quiz questions to unlock XP reward. (0/3 answered)
Skip quiz & read next →