Overview
This lecture covers the foundations of practical ethical hacking, including the structure of penetration tests, essential networking and Linux concepts, Python scripting, and strategies for effective note-taking and passive reconnaissance.
Introduction to Ethical Hacking & Penetration Testing
- Ethical hacking involves simulating cyberattacks to identify vulnerabilities in organizations before malicious actors do.
- Penetration testing types include external, internal, web application, wireless, physical, and red/purple team engagements.
- External pen tests mimic attacks from outside the organization and focus on OSINT; internal tests simulate inside attacks with emphasis on Active Directory.
- Each assessment includes report writing and debriefing, requiring both technical and communication skills.
- Effective note-taking is essential for both learning and performing assessments.
Note-Keeping for Cybersecurity
- Use structured, modular notes including screenshots and commands for future reference.
- Suggested apps: KeepNote, CherryTree, OneNote, Joplin; screenshot tools: Greenshot or Flameshot.
- Mark off findings as they are added to reports for organization.
Networking Refresher
- IP addresses: IPv4 (32-bit decimal, common), IPv6 (128-bit hex, rare), NAT enables multiple devices on one public IP.
- Private IP address ranges: Class A (10.x.x.x), Class B (172.16.x.xβ172.31.x.x), Class C (192.168.x.x).
- MAC addresses identify network interface hardware at Layer 2 (Switching).
- TCP (reliable, connection-oriented, uses three-way handshake) vs UDP (fast, connectionless).
- OSI Model: Physical, Data Link, Network, Transport, Session, Presentation, Application.
- Subnetting defines network size; slash notation (e.g., /24) indicates hostsβcommon networks use 255.255.255.0.
Virtual Machines & Kali Linux Setup
- Use VMware (Windows/Linux) or VirtualBox (Mac/Linux) to run virtual labs.
- Install Kali Linux (Debian-based) as the main penetration testing environment.
Basic Linux Skills for Hackers
- Familiarity with command line: navigation (cd, ls, pwd), making/removing files and folders (mkdir, rm), hidden files with ls -la.
- Sudo grants temporary root (admin) privileges.
- File permissions: rwx (read, write, execute), chmod and numeric codes (e.g., 777 = full access).
- Basic networking commands: ifconfig/ipa, iwconfig, ping, arp, route, netstat.
- Installing/updating tools: apt update & upgrade, git clone, running scripts.
- Starting/stopping services: systemctl, use python to serve files quickly.
Python Fundamentals for Hacking
- Focus on code reading and basic scripting: strings, math, variables, functions, lists, tuples, dictionaries, loops, and classes.
- Input/output handling, file read/write, working with modules, socket programming.
- Projects: build a basic port scanner and a budget calculator app.
- Emphasize understanding script flow, logic, and error handling.
Five Stages of Ethical Hacking
- Reconnaissance (passive/active), Scanning/Enumeration, Gaining Access (Exploitation), Maintaining Access, Covering Tracks/Reporting.
- Course structure follows this hacker workflow for hands-on learning.
Passive Information Gathering (Recon)
- Target validation is crucial; always confirm engagement scope.
- Use OSINT for employee emails, job info, badge photos, and physical layouts.
- Tools/websites: Hunter.io, phonebook.cz, Clearbit, forgot password recovery, email checkers.
- Data breach analysis: search for exposed credentials using breach compilation datasets or services like Dhash, hashes.org.
- Methodology: correlate user emails, usernames, passwords, hashes, and associated accounts for pivoting and attacks.
Key Terms & Definitions
- Penetration Test β Simulated cyberattack to assess security.
- OSINT (Open Source Intelligence) β Collecting public data for reconnaissance.
- NAT (Network Address Translation) β Allows multiple devices to share a public IP.
- TCP/UDP β Network protocols for data transmission; TCP is reliable, UDP is fast.
- OSI Model β Framework dividing network functions into seven layers.
- Subnetting β Dividing networks for organization and access control.
- Sudo β Command to run Linux operations with elevated privileges.
- rwX β File permissions: Read, Write, Execute.
- Reconnaissance β The first phase in ethical hacking to gather information.
Action Items / Next Steps
- Install Kali Linux on your VM environment of choice.
- Set up your preferred note-taking and screenshot tools.
- Complete networking and Linux command practice as covered.
- Review your notes, especially on subnetting and the OSI model.
- Begin passive reconnaissance on a chosen legal target (e.g., a bug bounty program).
- Proceed to Part 2 via the provided link when ready.