Week 1
CSS484 — Week 1 Cheat Sheet: Introduction to Ethical Hacking
1. What Is Ethical Hacking? (The Core Definition)
Ethical hacking = the authorized practice of probing systems for weaknesses using the same tools/techniques as an attacker — with permission, within agreed limits, to help the owner fix issues before a real adversary finds them.
🔑 Exam trigger phrase: if a question describes someone hacking with permission and for the owner's benefit → it's ethical hacking, no matter how aggressive the technique.
Ethical Hacker vs. Malicious Attacker
| Ethical Hacker ✅ | Malicious Attacker ❌ |
|---|---|
| Written authorization | No permission at all |
| Stays inside agreed scope | Ignores all limits |
| Goal: reduce risk for owner | Goal: personal gain/harm |
| Documents & reports findings | Hides tracks, avoids detection |
| Avoids unnecessary damage | Damages where convenient |
| Accountable to law & profession | Commits a criminal offence |
Analogy: A locksmith you hired vs. a burglar. Same skill (picking locks) — the only difference is who asked them to be there and what they do once inside. This is the single idea the whole lecture builds from: the action is identical, the authorization is what changes everything.
2. Why Organisations Hire Ethical Hackers (Business Case)
"Defenders have to be right every time. An attacker has to be right once."
| Reason | What it means |
|---|---|
| Find weaknesses first | Beat criminals to the vulnerability |
| Meet compliance | Many regulations require regular pen tests |
| Reduce breach cost | A test is cheaper than an actual breach (fines, downtime, reputation loss) |
| Validate defences | Prove controls work under real attack, not just on paper |
| Protect customers | Safeguard user/patient/client data |
| Inform decisions | Give leadership evidence to prioritize security spend |
Real-world usage: Banks, hospitals, and e-commerce companies run scheduled "pentest" contracts partly _because_regulators (PCI-DSS, HIPAA, etc.) mandate it — compliance is often the trigger, risk reduction is the real payoff.
3. What Makes It Legitimate: Scope + Intent
Two things separate a sanctioned engagement from an actual attack:
| Definition | Analogy | |
|---|---|---|
| SCOPE | What you're allowed to touch (targets, tools, time window, access level) | The fence around a construction site — tells you exactly where you may dig |
| INTENT | Why you're doing it (find vulnerabilities → improve posture → support risk decisions) | The building permit — tells you why digging there is legal |
Exam tip: you need both. Good intent without scope = still unauthorized. In-scope but malicious intent isn't really tested here, but remember scope alone doesn't make something ethical — a bounded but malicious act (e.g., sabotage under the guise of testing) still fails.
SCOPE breakdown
- Defined targets & systems — which hosts/apps/IPs/accounts are in-bounds vs. explicitly off-limits
- Approved tools & techniques — e.g., DoS or social engineering may be forbidden
- Time & access limits — when you can test, what access level you start from
INTENT breakdown
- Identify vulnerabilities (expose risk, not cause harm)
- Improve security posture (turn findings into fixes)
- Support risk management (give stakeholders evidence)
4. Authorization = The Line Between Security Work and a Crime
Key Principle: Written authorization is what separates security testing from a crime. The identical action(scanning, exploiting) is lawful with permission and criminal without it.
| WITH written authorization | WITHOUT authorization | |
|---|---|---|
| Status | Legitimate security work | Criminal offence |
| Nature | Protected/billable engagement, service to client | Computer-misuse & cybercrime law → prosecution, academic expulsion |
"Same action. Opposite outcome. The only variable is permission." — expect this exact logic tested as a scenario question.
Proper (explicit, written) authorization names:
- Signed permission — from someone who actually has the authority to grant it
- Defined scope — exact systems/boundaries
- Rules of engagement — what's allowed/prohibited
- Liability terms — legal protection for both sides
Analogy: A doctor performing surgery. Cutting someone open is technically assault — unless there's informed consent, a licensed practitioner, and a defined procedure. "The scalpel doesn't change; the paperwork does."
5. Professional Conduct — The Duty of Trust
Authorization makes the work legal. Professional conduct makes you trustworthy.
| Duty | What it looks like |
|---|---|
| Act ethically & responsibly | Judgement beyond the contract's letter — "can" ≠ "should." When unsure, ask first. |
| Maintain confidentiality | Findings/client data are secrets held in trust; never disclose outside agreed channel |
| Protect sensitive info | Minimize what you touch, secure what you collect, destroy it when engagement ends |
| Follow laws & standards | Comply with law + institutional policy + professional codes — ignorance is not a defence |
6. The Unit's Framing: "Offensive Security in Service of Defence"
You're trained as an ethical offensive operator — think like an attacker to produce intelligence a defender can use.
| Principle | Meaning |
|---|---|
| Adversarial mindset | See systems as an attacker does — question assumptions, find the unlocked door |
| Responsible exploitation | Prove impact through controlled exploitation, then stop |
| Real-world pen-test mindset | Methodical, scoped, evidence-driven |
| Actionable intelligence | Translate technical findings into prioritized guidance for stakeholders |
The Golden Rule of Exploitation
Exploit only to prove impact — then stop.
- Prove, don't plunder — demonstrate it's real, then withdraw
- No persistence — never plant backdoors or keep access beyond what's authorized
- Avoid unnecessary damage — do the minimum needed to prove the point
Analogy: Exploiting a vuln is like a fire drill, not an actual fire — you demonstrate the building would burn, you don't actually torch it.
Reporting (the actual "product" of the engagement)
| Quality | Why it matters |
|---|---|
| Clear | A finding nobody understands gets ignored |
| Accurate | Overstating/understating risk costs credibility or leaves people exposed |
| Evidence-based | Screenshots, logs, reproducible steps |
| Audience-aware | Executives need business risk; engineers need technical detail |
7. Rules of Engagement (RoE) — The "How"
Authorization says "yes, you may test." RoE says "here is exactly how."
- Approved targets & techniques — specific systems + exact allowed methods
- Time, access & data limits — when you test, starting access level, what you can do with data found
- Protects both parties — shields client from harm, shields you from liability
⚠️ High-yield fact: If a system fails while you acted strictly inside the RoE, you're covered. Step outside it — even briefly — and that protection vanishes instantly.
8. Lab Isolation — Why We Never Test in Production
We practice in isolated lab environments — never on production, never on anything you don't own.
Setup pattern:
Host Computer (safe, untouched)
└── Isolated Virtual Lab (walled off from host)
├── Kali Linux (attacker) ──attacks──▶
└── Target Windows VM
(attacks stay inside the isolated lab)
| Reason for isolation | Why |
|---|---|
| No testing on production | Real damage risk is unacceptable |
| Prevent accidental spread | Isolation stops malware/exploits escaping to real network |
| Safe failure, easy reset | Snapshots let you break everything then roll back in seconds |
Analogy: Practicing surgery on a cadaver/simulator, not a live patient. Mistakes are free lessons, not tragedies — as long as you stay in the sandbox.
9. When Boundaries Break — Scenario Practice
Three canonical "what went wrong" scenarios (know these — likely exam material):
| # | Scenario | What broke |
|---|---|---|
| 1 | Unauthorized network scanning | Scanned systems that were never in approved scope |
| 2 | Payload delivery to real users | Live malicious payloads sent to actual people, not controlled test accounts |
| 3 | Accessing data beyond scope | Reached real, confidential data the engagement never authorized touching |
🧭 The 4-Question Framework for Grey Areas
Use this to reason through any ambiguous scenario question on the exam:
- What rules were violated? — Name it specifically: scope, authorization, or a specific RoE clause
- Who/what is affected? — Trace the blast radius: systems touched, data exposed, real people impacted
- What are the consequences? — Legal (prosecution), technical (breakage/leaks), professional (reputation, job, place on course)
- How should it be handled? — Usually: stay in scope → get authorization first → stop & ask when unclear → escalate rather than improvise
🔑 The 4 Moral-Spine Lessons
- Authorization defines legitimacy — not skill, not intentions
- Intent does not override impact — meaning well doesn't erase harm caused
- Scope limits protect everyone — boundaries protect the client and you
- Offensive operators are accountable — power = responsibility (to client, law, profession, affected people)
One habit above all: "If you're ever unsure whether something is in bounds — ask first."
10. Adversary Threat Models: Kill Chain vs. MITRE ATT&CK
Two ways to model how an attack unfolds — know the difference and be able to compare them.
Cyber Kill Chain (Lockheed Martin) — linear, high-level, 7 stages
| # | Stage | What happens |
|---|---|---|
| 1 | Reconnaissance | Harvesting emails, conference info, etc. |
| 2 | Weaponization | Coupling exploit + backdoor into a deliverable payload |
| 3 | Delivery | Sending the weaponized bundle (email, web, USB) |
| 4 | Exploitation | Exploiting a vulnerability to execute code |
| 5 | Installation | Installing malware on the asset |
| 6 | Command & Control (C2) | Remote channel to manipulate the victim |
| 7 | Actions on Objectives | "Hands on keyboard" — achieving the original goal |
Analogy — burglary in sequence: scope the house (recon) → make tools (weaponize) → get through the door (deliver) → pick the lock (exploit) → set up camp inside (install) → keep a walkie-talkie to the getaway driver (C2) → steal the goods (actions on objectives).
Core defensive insight: Break any single link in the chain and the whole attack fails. This is why the Kill Chain matters for defenders — it gives multiple points to interrupt.
MITRE ATT&CK — granular matrix (tactics × techniques)
Unlike the Kill Chain's 7 linear steps, ATT&CK breaks behavior into many more tactics (columns), each with numerous specific techniques (cells):
- Reconnaissance (11), Resource Development (8), Initial Access (11), Execution (17), Persistence (23), Privilege Escalation (14), Defense Evasion (47), Credential Access (17), Discovery (34), Lateral Movement (9), Collection (17), Command & Control (18), Exfiltration (9), Impact (15)
Analogy: Kill Chain = movie plot summary (beginning/middle/end). ATT&CK = the detailed script with every line of dialogue — used by defenders to check "have we covered this exact technique?"
Quick comparison table
| Cyber Kill Chain | MITRE ATT&CK | |
|---|---|---|
| Structure | Linear, 7 stages | Matrix: tactics × techniques |
| Detail level | High-level overview | Very granular, real-world techniques |
| Best for | Understanding attack flow, "break one link" defense | Checking specific technique coverage |
11. 🖥️ LAB SECTION — Week 1 Workshop: Lab Setup, Networking & Windows Security
Goal of the workshop: get the lab environment (Kali + Windows VMs) working reliably, understand VM networking modes, and take a guided tour of the Windows security controls you'll toggle in later labs (AV, firewall, DEP, ASLR). None of this is an attack — it's groundwork.
⚠️ Rule: Turning off security protections is a lab-only technique, done exclusively on the isolated VM. Never disable protections on a real/production machine.
Exercise 1 — Start Kali & Windows VMs
| Step | Action |
|---|---|
| 1 | Start the Kali Linux VM, log in with kali:kali |
| 2 | Confirm you reach the desktop and can open a terminal |
| 3 | Start the Windows VM, confirm desktop + terminal (Command Prompt) access |
Exercise 2 — Networking Modes & Finding IPs
Two networking modes — know the difference cold, this is a classic exam question:
| Mode | Behavior | Reachability |
|---|---|---|
| NAT | VM sits behind the host, shares host's connection via a private internal address | Can usually reach internet; hidden from outside network — other machines can't reach it directly |
| Bridged | VM placed directly on the _same physical network_as the host, gets its own address | Acts like an independent machine — can be reached by, and reach, other machines on that network |
Practical rule of thumb: if Kali needs to attack a target directly, you need bridged mode — NAT would hide one or both machines from each other.
Commands to check IP addresses:
# On Kali (Linux) — open a terminal
ifconfig
# Look at the IPv4 addr of the main interface (e.g. eth0):: On Windows — open Command Prompt
ipconfig
:: Look at the IPv4 Address of the active adapterWorked example (from an actual student run):
| Machine | NAT Mode IP | Bridged Mode IP |
|---|---|---|
| Kali Linux | 10.0.2.15 | 10.10.102.94 |
| Windows | 10.0.2.15 | 10.10.103.8 |
Gotcha to remember: both VMs can show the same address (
10.0.2.15) under NAT — that's expected, because VirtualBox gives each VM its own isolated, private NAT network, so they happen to get the same default address while still being unable to see each other.
Step-by-step for the exercise:
-
Find the network adapter mode setting in VirtualBox settings for each VM
-
Set both VMs to NAT → record IPv4 on each (
ifconfig/ipconfig) -
Switch both to bridged → record IPv4 again (may need a reboot/adapter renew to take effect)
-
Test connectivity in bridged mode — from Kali, ping the Windows IP:
ping 10.10.103.8 -
Confirm the ping succeeds (0% packet loss) — proves the two machines can see each other directly
Exercise 3 — Tour the Windows Security Features
Four features to locate, understand, and confirm you can toggle:
| Feature | Where to find it | What it does |
|---|---|---|
| Microsoft Defender Antivirus (real-time protection) | Windows Security app → Virus & threat protection | Scans files/processes as they run |
| Windows Firewall | Windows Security app → per network profile (Domain/Private/Public) | Controls inbound/outbound connections |
| Data Execution Prevention (DEP) | System Properties → Advanced tab → Performance → Data Execution Prevention, also in Exploit Protection settings | Marks memory regions holding data as non-executable — stops injected code in a data region from running |
| Exploit Protection(DEP, Control Flow Guard, ASLR) | Windows Security app → App & browser control → Exploit protection → System settings | Bundles memory-mitigation settings; ASLRrandomizes where code/data load in memory so addresses can't be predicted |
Why this matters later: DEP/ASLR are the direct targets of the buffer-overflow and ROP labs; AV/firewall get toggled off in exploitation labs so they don't interfere with payloads/traffic.
⚠️ Tamper Protection — important nuance: Windows can silently re-enable Defender's real-time protection after a while or after reboot, even if you manually turned it off — this is Tamper Protection doing its job (stopping malware, or an unauthorized user, from disabling Windows' own defenses). For labs: you may need to disable Tamper Protection _first_before real-time protection will reliably stay off for the duration of an exercise.
Worked example — observed default states (from an actual lab run):
| Feature | Default State |
|---|---|
| Windows Firewall (all profiles) | On |
| DEP | Off by default (opt-in, per-app) |
| Mandatory ASLR | Off by default |
| Bottom-up ASLR | Off by default |
| Control Flow Guard (CFG) | Off by default |
Key insight to remember: On a fresh Windows install, the firewall and AV are on by default, but the memory-mitigation features (DEP/ASLR/CFG) are off by default at the system level — they're opt-in, per-application protections, not globally enforced out of the box.
Toggle confirmation checklist (what "confirm you can toggle it" means in practice):
- Turn feature off
- Observe the setting visibly changed (e.g., dropdown value, "Firewall is off" message)
- Turn it back on
Why toggling looks undramatic: DEP, ASLR, and CFG are policies applied at process launch — DEP marks stack/heap non-executable via the CPU's NX/XD bit, ASLR randomizes where DLLs/stack/heap load, CFG validates indirect call targets against a compiled bitmap. Because these are baked in when a process starts, flipping the system default doesn't retroactively affect already-running processes — you'd only see the real effect by launching a new process afterward, or attempting an exploit that depends on predictable addresses / code execution from a data page. Similarly, Defender's real-time protection uses a kernel-mode filter driver intercepting file/process activity — disabling it is silent; the difference only shows up when something that should get flagged (e.g., the EICAR test string) doesn't.
Report checklist (what to actually submit)
- Screenshot:
ifconfig(Kali) +ipconfig(Windows) showing IPv4 addresses - Table of IPv4 addresses in NAT mode vs. bridged mode
- 2–3 sentences (your own words) explaining NAT vs. bridged + which mode for direct attack communication, with reasoning
- Screenshots of all 4 security feature areas (AV, firewall, DEP, Exploit Protection/ASLR screen)
- Table noting default on/off state of each feature
- Single PDF, name + student ID at top, submitted to Google Classroom (no VM exports, no logs)
12. Rapid-Fire Recall Table (Last-Minute Review)
| Concept | One-liner to remember |
|---|---|
| Ethical hacking | Authorized hacking, permission-based, benefits the owner |
| Scope | What you can touch — the fence |
| Intent | Why you're doing it — the permit |
| Authorization | Written permission = the only variable between "service" and "crime" |
| RoE | The how — protects both client and tester, but only while you stay inside it |
| Golden rule of exploitation | Prove impact, then stop — no persistence, no plunder |
| Lab isolation | Never test on production; snapshots = safe failure |
| Kill Chain | 7 linear stages; break one link, attack fails |
| MITRE ATT&CK | Granular tactics × techniques matrix; "the detailed script" |
| NAT | Hidden behind host, can't be reached directly |
| Bridged | Own address on the real network, directly reachable — needed for direct attacks |
| DEP | Marks memory non-executable (NX/XD bit) |
| ASLR | Randomizes memory addresses (mandatory/bottom-up variants) |
| CFG | Validates indirect call targets against a bitmap |
| Tamper Protection | Stops Defender from being silently/permanently disabled — may re-enable AV automatically |