45. Practice Exercises with Hints
45.6 Kali Recon, Scan and Enum – Host-Only Only
whois/dig ideas, Nmap timing, service enum – only .20 / .30 lab targets. Slow timing -T2 in shared labs; never DoS.
| Exercise | Task | Hint |
|---|---|---|
| E1 | nmap -sS -T2 -p- against Metasploitable .20 only – top 5 open ports note |
Lab only; compare with your earlier chapter notes |
| E2 | Service version scan on those ports – what would Blue patch first? | -sV lab only; prioritise ancient FTP/SMB/HTTP |
| E3 | dig / whois on a domain you own or example.com documentation habit |
Recon on third parties without authorisation = out of scope |
| E4 | Gobuster/dirb against OWN DVWA – one interesting path | Wordlist + rate polite; fix by removing leftovers |
| E5 | Write Blue detection: what log shows port scan? | Firewall / IDS spikes; cloud SG reject metrics; Suricata/Snort awareness |
| Red team (attacker) does | Blue team (defender) detects / stops |
|---|---|
Full port sweep + version probe on lab .20 |
IDS/IPS; rate alerts; shrink attack surface; patch |
| Directory brute on lab web | Remove backup files; WAF; monitor 404 storms |
Ravindra Bagale's Tip
Students run -T5 -A against a production IP. The book's rule: host-only + slow. Interview: "I scan only authorised scopes." Say it clearly.
Ravindra Bagale's Tip – मराठी
Students -T5 -A production IP वर चालवतात. Book rule: host-only + slow. Interview: "I scan only authorised scopes." Clear बोला.
Ravindra Bagale's Tip – हिंदी
Students -T5 -A production IP पर चलाते हैं. Book rule: host-only + slow. Interview: "I scan only authorised scopes." Clear बोलो.
Lab
Kali 192.168.56.10 → Metasploitable 192.168.56.20: SYN scan selected ports, save nmap -oN lab-scan.txt. Highlight three findings + one Blue fix each. No internet targets.
Real incident: WannaCry ransomware (2017)
Public reporting (national CERTs, Microsoft, major press) described global ransomware using an EternalBlue-class SMBv1 exploit path against unpatched Windows systems, with worm-like spread inside networks. Weakness themes: missing patches + legacy SMB exposure. Defence for enum chapter: know what SMB means on a scan, patch, disable SMBv1 where possible, segment. Source: Microsoft security guidance and CERT advisories (verify).
Extended teaching notes
Why this lesson matters
Kali tools are dual-use. In this course every run ends with a defensive note: what config would have blocked or detected the activity on a system you own.
Rule
Host-only lab, written scope, no bridging onto real LANs.
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.