39.4 Static vs Dynamic Analysis Mindset
Tumhi malware analyst nahi zhala tari mindset pahije:
Static (file shivay run):
- Hash:
SHA256– share IOC, search reputation - Strings / file type / signature – high level
- VirusTotal (and similar): upload only files you own / lab EICAR / samples your org legally allows – never upload confidential company docs (they become visible to VT community / vendors)
Dynamic (run to observe):
- Isolated sandbox VM / commercial sandbox
- Watch process tree, network (DNS/HTTP C2), file writes, registry Run keys
- Snapshot → run → observe → revert
Golden rule: NEVER run unknown malware on your host OS, never on office laptop, never with shared folders that map to real Documents. Samjla ka?
# Amazon Linux / lab helper – hash a file YOU created (EICAR text or marker script)
sha256sum eicar.com
# Ubuntu/Kali often: sha256sum; Windows: Get-FileHash .\eicar.com -Algorithm SHA256
| Red team (attacker) does | Blue team (defender) detects / stops |
|---|---|
| Packs / obfuscates to change hash daily | Behaviour EDR + sandbox detonation, not hash-only AV |
| Checks sandbox artifacts (short uptime, known VM MAC) | Multiple analysis layers; don't rely on one public sandbox alone |
| Hopes analyst uploads secret docs to public VT | Policy: no confidential uploads; private instance / internal sandbox |
Ravindra Bagale's Tip
Students upload a random .exe to VT – if it contains customer data or keys, that's a leak. Search by hash first (local sha256sum); upload the full file only when policy allows. Interview: one line each on static vs dynamic + "I never run samples on my host."
Ravindra Bagale's Tip – मराठी
Students random .exe VT वर upload करतात – त्यात customer data / keys असतील तर leak. आधी hash ने (local sha256sum) search करा; full file upload फक्त policy परवानगी देत असेल तेव्हा. Interview: static vs dynamic एक-एक line + "I never run samples on my host."
Ravindra Bagale's Tip – हिंदी
Students random .exe VT पर upload कर देते हैं – उसमें customer data / keys हों तो leak. पहले hash से (local sha256sum) search करो; full file upload सिर्फ़ तब जब policy इजाज़त दे. Interview: static vs dynamic एक-एक line + "I never run samples on my host."
Lab
Official EICAR test string (from eicar.org documentation – text file you create yourself) lab VM madhe save kara as eicar.com. sha256sum note kara. Windows Defender / ClamAV scan – detect zala pahije. Screenshot. Host OS var skip. VirusTotal: only if your trainer/lab policy allows EICAR; never real docs.
Extended teaching notes
Why this lesson matters
Malware analysis in this course is defensive: recognise indicators, isolate hosts, preserve evidence. Never run unknown malware on your main OS or on someone else's network.
- Isolate the host from the network.
- Capture volatile data if trained to do so.
- Hash samples; search only in licensed/safe tools.
- Rebuild from a known-good image when unsure.
- Share IOCs with your SOC, not on random chats.
Mini case study
Suppose we are on a purple-team exercise for an Indian mid-size company (sample data). Red notes a technique from this lesson against a lab clone. Blue must show the control that stops it, the log that would have fired, and the ticket that hardens production. That is the standard this course trains you for.
Defender's worksheet (do this today)
- Write the lesson title, date and the exact lab target you are allowed to use.
- List three owned systems (VMs, apps, or cloud accounts) where this lesson applies.
- Run one safe check from the lesson on a lab system only. Paste the command and output.
- Write a two-sentence fix you would give a teammate.
- Name one related public advisory (CERT-In, CISA, NVD, or a vendor bulletin) with its date.
Indian workplace (sample data)
Suppose we are a junior analyst at Infosys, TCS, Wipro or a fintech SOC in Bengaluru/Pune. Turn this lesson into one checklist item with an owner, a due date and a place to store evidence (ticket + screenshot).
Global practice
Compare your notes with OWASP, CIS Benchmarks, NIST CSF/IR guidance or a cloud Well-Architected security question. Write five lines on what overlaps.
Everyday analogy
Explain the risk and the fix to a family member without jargon. If they can repeat the warning, you understand it well enough to teach juniors.
Key terms
- Control: a safeguard (patch, config, process, detection).
- Finding: a weakness backed by evidence.
- Remediation: the fix plus how you verified it.
- Scope: systems you have written permission to touch.
- Least privilege: only the access the task needs.
- Defence in depth: several layers so one failure does not end the story.
Common mistakes
- Skipping written permission "just for a quick scan".
- Practising on hostel, office or public targets without authorisation.
- Collecting tool output without writing the fix.
- Copying attack steps onto production to "verify". Defenders verify with versions, configs and patches.
- Publishing screenshots that contain secrets, cookies or internal hostnames.
Recap
- Evidence, fix, owner, date.
- Own lab only.
- Fix > spectacle.