Cybersecurity Career Study Plan
A Comprehensive 18-24 Month Learning Path for Amy
About This Plan
Student
Amy, 37
Background
Stay-at-home mum, no prior IT education
Study Time
15 hours/week (3 days x 5 hours)
Goal
Career transition into cybersecurity
The Five Phases
Understand how computers and networks work
- Week 1: How computers work + Command Line basics
- Week 2: More CLI, file permissions, text editors
- Week 3: Networking fundamentals (IP, DNS, ports)
- Week 4: Security mindset + environment setup
Write basic Python programs confidently
- Week 5: Getting started - variables, data types
- Week 6: Control flow - if/elif/else
- Week 7: Loops - while and for
- Week 8: Functions
- Week 9: Lists
- Week 10: Dictionaries
- Week 11: String manipulation
- Week 12: File I/O
- Week 13: Error handling
- Week 14: Modules and packages
- Week 15: Regular expressions
- Week 16: Capstone project - Password checker
Apply Python to security-relevant tasks
- Weeks 17-18: Working with APIs and JSON
- Weeks 19-20: Network programming with sockets
- Weeks 21-22: Web scraping and automation
- Weeks 23-24: Security automation project
Understand core security concepts and tools
- Weeks 25-28: Security principles, CIA triad, threat modelling
- Weeks 29-32: Linux security, OWASP Top 10
- Weeks 33-36: Hands-on practice (TryHackMe, HackTheBox)
Earn Security+ certification, build portfolio
- Weeks 37-44: CompTIA Security+ preparation
- Weeks 45-48: Portfolio projects
- Weeks 49+: Job preparation and applications
Realistic Milestones
- 6-9 months: Comfortable with Python, basic security concepts
- 12-18 months: Ready for entry-level certification (CompTIA Security+)
- 18-24 months: Portfolio projects complete, ready to apply for junior roles
Phase 1: Computer & Networking Fundamentals
Weeks 1-4 | Before learning to code, you need to understand how computers and networks work.
Week 1: How Computers Work + Command Line
Phase 1Learning Objectives
- Understand basic hardware components (CPU, RAM, storage)
- Know what an operating system does
- Navigate the file system using command line
- Set up a Linux virtual machine for practice
Day 1 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 1.5 hrs | Watch CS50 Week 0 lecture - Introduction to Computer Science | CS50 YouTube |
| 1.5 hrs | Watch "How Computers Work" playlist by Code.org | Code.org Playlist |
| 2 hrs |
Download and install VirtualBox + Ubuntu
What is Linux?Linux is a free operating system (like Windows or macOS). Most cybersecurity work happens on Linux because:
Ubuntu is a beginner-friendly version of Linux - perfect for learning. What is a Virtual Machine?A virtual machine (VM) is like a computer inside your computer. It lets you run Linux without replacing Windows/macOS.
VirtualBox is free software that creates these virtual machines. Watch First (before installing) |
VirtualBox | Ubuntu |
Day 2 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 1 hr | Complete Ubuntu installation in VirtualBox | Ubuntu VM Tutorial |
| 2 hrs | Read Ubuntu's "Command Line for Beginners" tutorial | Ubuntu CLI Tutorial |
| 2 hrs | Practice basic commands: ls, cd, pwd, mkdir, cp, mv, rm, cat | Practice in your Ubuntu VM |
Day 3 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Watch "Linux Commands for Beginners" (first 2 hours) | YouTube Tutorial |
| 3 hrs | Hands-on Practice: Navigate your Ubuntu system entirely via terminal | Create folders, move files, explore the file system |
Commands to Master This Week
ls # list files in current directory
cd # change directory
pwd # print working directory (where am I?)
mkdir # make a new directory
cp # copy files
mv # move or rename files
rm # remove/delete files
cat # display file contents
clear # clear the terminal screen
Practice Tasks
Complete these tasks in your Ubuntu terminal to practice the commands. Tick them off as you go!
Navigation (pwd, ls, cd)
- Open the terminal and type
pwd- write down what it shows - Type
lsto see what's in your current folder - Type
cd Desktopto go to your Desktop folder - Type
pwdagain - notice how it changed - Type
cd ..to go back up one folder - Type
cd ~to go to your home folder from anywhere
Creating Folders (mkdir)
- Create a folder called "cybersecurity-study" using
mkdir cybersecurity-study - Go into that folder with
cd cybersecurity-study - Create folders for each phase:
mkdir phase1 phase2 phase3 phase4 phase5 - Use
lsto verify all 5 folders were created - Go into phase1 and create week folders:
cd phase1thenmkdir week1 week2 week3 week4
Creating & Viewing Files (cat, echo)
- Go to week1 folder:
cd week1 - Create a notes file:
echo "My first Linux note" > notes.txt - View the file contents:
cat notes.txt - Add another line:
echo "I am learning terminal commands" >> notes.txt - View the file again with
cat notes.txt- you should see both lines
Copying & Moving (cp, mv)
- Make a copy of your notes:
cp notes.txt notes-backup.txt - Use
lsto see both files - Rename the backup:
mv notes-backup.txt my-backup.txt - Move the backup to parent folder:
mv my-backup.txt .. - Check it moved:
cd ..thenls- you should see my-backup.txt
Deleting (rm) - Be Careful!
- Delete the backup file:
rm my-backup.txt - Verify it's gone with
ls - Try to delete an empty folder:
rm week4- notice the error! - Delete empty folder correctly:
rmdir week4
Final Challenge
- Navigate to your home folder with one command
- From home, go to cybersecurity-study/phase1/week1 in one command using
cd cybersecurity-study/phase1/week1 - Show the full path of where you are
- List all files including your notes.txt
- Clear the terminal screen
Week 1 Milestone
- Can explain what RAM and storage are to someone else
- Have a working Ubuntu VM
- Can navigate the file system using only terminal commands
Week 2: More Command Line + Text Editors
Phase 1Learning Objectives
- Understand file permissions and why they matter
- Learn to use sudo (administrator privileges)
- Edit files from the command line
- Install software using package managers
Day 1 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Continue "Linux Commands for Beginners" video | YouTube Tutorial |
| 1.5 hrs | Read about Linux file permissions | Linux Journey - Permissions |
| 1.5 hrs | Practice: Check and change file permissions with chmod | Practice in your Ubuntu VM |
Day 2 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 1 hr | Learn about nano text editor | Nano Tutorial |
| 2 hrs | Practice creating and editing files with nano | Create text files, edit them, save and exit |
| 2 hrs | Learn about sudo and package management (apt) | Ubuntu Package Management |
Day 3 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Install software using apt (Python, git, curl) | Run: sudo apt update && sudo apt install python3 git curl |
| 1 hr | Learn about environment variables and PATH | Environment Variables Guide |
| 2 hrs | Mini-project: Create a folder structure for your studies using only terminal | Create folders for each phase, create README files |
Commands to Master This Week
sudo # run command as administrator
chmod # change file permissions
nano # simple text editor
apt update # update available software list
apt install # install new software
echo # print text to screen
which # find where a program is located
man # read manual pages for commands
Week 2 Milestone
- Can install software on Linux using apt
- Can create and edit text files without a graphical interface
- Understand why "permission denied" errors occur
Week 3: Networking Fundamentals
Phase 1Learning Objectives
- Understand how the internet works
- Know what IP addresses, DNS, and ports are
- Use basic networking commands
- Trace what happens when you visit a website
Day 1 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 3 hrs | Watch NetworkChuck's FREE CCNA playlist (first 5 videos) | NetworkChuck CCNA |
| 2 hrs | Take notes on: networks, switches, routers, IP addresses | Use nano to create a notes file |
Day 2 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Continue NetworkChuck videos (TCP/IP and OSI model) | Same playlist |
| 1 hr | Read: "How DNS Works" (interactive comic) | How DNS Works |
| 2 hrs | Hands-on: Use ping, ifconfig, nslookup in terminal | Practice finding IP addresses, checking connectivity |
Day 3 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Learn about HTTP and ports | MDN HTTP Overview |
| 1 hr | Use browser developer tools (F12) to watch network requests | Visit websites and observe the Network tab |
| 2 hrs | Mini-project: Write out what happens when you type "google.com" | Document DNS lookup, TCP connection, HTTP request/response |
Commands to Master This Week
ping # test if a host is reachable
ifconfig # show network interface info (or use 'ip a')
nslookup # look up DNS records
traceroute # show the path packets take to reach a host
netstat # show network connections
curl # make HTTP requests from command line
Week 3 Milestone
- Can explain what happens when you visit a website
- Know the difference between IP address and MAC address
- Understand what ports are and why they matter for security
Week 4: Security Mindset + Environment Setup
Phase 1Learning Objectives
- Understand why cybersecurity matters
- Learn about different security career paths
- Set up your complete study environment
- Get motivated by real security stories
Day 1 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Listen to Darknet Diaries episodes (pick 2 interesting ones) | Darknet Diaries (Recommended: Ep 29 "Stuxnet", Ep 33 "RockYou") |
| 1.5 hrs | Read about major security breaches | Search: "Equifax breach explained", "Colonial Pipeline hack" |
| 1.5 hrs | Learn about cybersecurity career paths | CyberSeek Career Pathway |
Day 2 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Install VS Code on your Ubuntu VM | VS Code Linux Setup |
| 1 hr | Configure VS Code with Python extension | Install "Python" extension from marketplace |
| 2 hrs | Create organised folder structure for your studies | Set up folders for each phase, each week |
Day 3 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 1 hr | Create a TryHackMe account | TryHackMe (free tier) |
| 2 hrs | Complete "Starting Out in Cyber Sec" room | Starting Out Room |
| 1 hr | Create a GitHub account | GitHub |
| 1 hr | Review Phase 1, create summary notes | Consolidate what you've learned |
Week 4 Milestone
- Have a fully configured study environment (Ubuntu VM + VS Code + Python)
- Completed your first TryHackMe room
- Can explain different cybersecurity roles to someone
- Feel motivated and excited to continue
Phase 1 Complete!
You now understand the basics of computers, command line, and networking. Time to learn Python!
Phase 2: Python Foundations
Weeks 5-16 | Python is the most important programming language for cybersecurity.
Week 5: Python Basics - Getting Started
Phase 2Learning Objectives
- Run Python programs
- Use variables and basic data types
- Get user input and display output
Day 1 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Read ATBS Chapter 0: Introduction | Chapter 0 |
| 1 hr | Watch: Python Installation and Setup | Corey Schafer |
| 2 hrs | Set up Python in VS Code, run your first program | Print "Hello, World!" |
Day 2 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Read ATBS Chapter 1: Python Basics | Chapter 1 |
| 3 hrs | Code Along: Type out ALL examples (don't copy-paste!) | Practice in VS Code |
Day 3 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Watch Corey Schafer: Strings, Integers, Floats | Data Types Video |
| 3 hrs | Practice: Write at least 5 small programs | See practice exercises below |
Practice Programs to Write
# 1. Greeting program
name = input("What is your name? ")
print("Hello, " + name + "!")
# 2. Basic calculator
num1 = int(input("First number: "))
num2 = int(input("Second number: "))
print("Sum:", num1 + num2)
# 3. Age in days calculator
age = int(input("Your age in years: "))
days = age * 365
print("You have lived approximately", days, "days")
# 4. Mad libs game
adjective = input("Enter an adjective: ")
noun = input("Enter a noun: ")
print(f"The {adjective} {noun} jumped over the fence.")
# 5. Temperature converter
celsius = float(input("Temperature in Celsius: "))
fahrenheit = (celsius * 9/5) + 32
print(f"{celsius}C = {fahrenheit}F")
Week 5 Milestone
- Can run Python programs in VS Code
- Understand variables, strings, and numbers
- Completed at least 5 practice programs
Week 6: Control Flow - Making Decisions (if/else)
Phase 2Learning Objectives
- Use comparison operators
- Write if/elif/else statements
- Combine conditions with and/or/not
Day 1 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Read ATBS Chapter 2 (first half - Flow Control) | Chapter 2 |
| 3 hrs | Code Along: Type out all if/else examples | Practice in VS Code |
Day 2 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 1.5 hrs | Watch Corey Schafer: Conditionals and Booleans | Conditionals Video |
| 3.5 hrs | Practice Programs: Write programs using if/else | See exercises below |
Day 3 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 5 hrs | Practice: More conditional programs + review | Complete all exercises below |
Practice Programs to Write
# 1. Password checker
password = input("Enter password: ")
if password == "secret123":
print("Access granted!")
else:
print("Access denied!")
# 2. Grade calculator
score = int(input("Enter your score (0-100): "))
if score >= 90:
print("Grade: A")
elif score >= 80:
print("Grade: B")
elif score >= 70:
print("Grade: C")
elif score >= 60:
print("Grade: D")
else:
print("Grade: F")
# 3. Age validator
age = int(input("Enter your age: "))
if age < 0 or age > 120:
print("Invalid age!")
elif age < 13:
print("You are a child")
elif age < 20:
print("You are a teenager")
elif age < 65:
print("You are an adult")
else:
print("You are a senior")
# 4. Login system (multiple conditions)
username = input("Username: ")
password = input("Password: ")
if username == "admin" and password == "admin123":
print("Welcome, administrator!")
elif username == "guest":
print("Welcome, guest! Limited access.")
else:
print("Invalid credentials")
Week 6 Milestone
- Can write programs that make decisions
- Understand ==, !=, <, >, <=, >=
- Can combine conditions with and, or, not
Week 7: Control Flow - Loops
Phase 2Learning Objectives
- Write while loops
- Write for loops
- Use range() function
- Know when to use break and continue
Day 1 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Read ATBS Chapter 2 (second half - Loops) | Chapter 2 |
| 3 hrs | Code Along: Type out all loop examples | Practice in VS Code |
Day 2 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 1.5 hrs | Watch Corey Schafer: Loops and Iterations | Loops Video |
| 3.5 hrs | Practice Programs: Write programs using loops | See exercises below |
Day 3 (5 hours)
| Time | Activity | Resource |
|---|---|---|
| 5 hrs | Practice: More loop programs + chapter exercises | Complete all exercises |
Practice Programs to Write
# 1. Countdown
for i in range(10, 0, -1):
print(i)
print("Blastoff!")
# 2. Password with limited attempts
attempts = 3
while attempts > 0:
password = input("Enter password: ")
if password == "secret":
print("Access granted!")
break
attempts -= 1
print(f"Wrong! {attempts} attempts remaining.")
else:
print("Account locked!")
# 3. Sum calculator
total = 0
while True:
num = input("Enter a number (or 'done' to finish): ")
if num == "done":
break
total += int(num)
print(f"Total: {total}")
# 4. Multiplication table
number = int(input("Enter a number: "))
for i in range(1, 11):
print(f"{number} x {i} = {number * i}")
# 5. Guessing game
import random
secret = random.randint(1, 100)
guesses = 0
while True:
guess = int(input("Guess the number (1-100): "))
guesses += 1
if guess < secret:
print("Too low!")
elif guess > secret:
print("Too high!")
else:
print(f"Correct! You got it in {guesses} guesses!")
break
Week 7 Milestone
- Can write while loops and for loops
- Know when to use break and continue
- Understand the range() function
Week 8: Functions
Phase 2Learning Objectives
- Define and call functions
- Use parameters and return values
- Understand variable scope
Day 1-2 (10 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Read ATBS Chapter 3: Functions | Chapter 3 |
| 3 hrs | Code Along: Type out all function examples | Practice in VS Code |
| 1.5 hrs | Watch Corey Schafer: Functions | Functions Video |
| 3.5 hrs | Practice: Rewrite previous programs using functions | Refactor your existing code |
Practice Programs to Write
# 1. Greeting function
def greet(name):
return f"Hello, {name}!"
print(greet("Amy"))
print(greet("World"))
# 2. Password validator
def is_valid_password(password):
if len(password) < 8:
return False
if password.isalpha(): # only letters, no numbers
return False
return True
pwd = input("Create a password: ")
if is_valid_password(pwd):
print("Password accepted!")
else:
print("Password must be at least 8 characters with numbers")
# 3. Calculator with functions
def add(a, b):
return a + b
def subtract(a, b):
return a - b
def multiply(a, b):
return a * b
def divide(a, b):
if b == 0:
return "Cannot divide by zero"
return a / b
print(add(5, 3)) # 8
print(multiply(4, 7)) # 28
print(divide(10, 2)) # 5.0
Week 8 Milestone
- Can define and use functions
- Understand parameters and return values
- Can refactor code to use functions
Week 9: Lists
Phase 2Learning Objectives
- Create and modify lists
- Access list items with indexing and slicing
- Use common list methods
- Loop through lists
Day 1-2 (10 hours)
| Time | Activity | Resource |
|---|---|---|
| 2.5 hrs | Read ATBS Chapter 4: Lists | Chapter 4 |
| 2.5 hrs | Code Along: Type out all list examples | Practice in VS Code |
| 1.5 hrs | Watch Corey Schafer: Lists, Tuples, Sets | Lists Video |
| 3.5 hrs | Practice Programs | See exercises below |
Practice Programs to Write
# 1. Shopping list manager
shopping_list = []
while True:
print("\n1. Add item")
print("2. Remove item")
print("3. Show list")
print("4. Quit")
choice = input("Choose: ")
if choice == "1":
item = input("Item to add: ")
shopping_list.append(item)
print(f"Added {item}")
elif choice == "2":
item = input("Item to remove: ")
if item in shopping_list:
shopping_list.remove(item)
print(f"Removed {item}")
else:
print("Item not found")
elif choice == "3":
print("\nYour shopping list:")
for i, item in enumerate(shopping_list, 1):
print(f"{i}. {item}")
elif choice == "4":
break
# 2. Find common items
list1 = [1, 2, 3, 4, 5]
list2 = [4, 5, 6, 7, 8]
common = []
for item in list1:
if item in list2:
common.append(item)
print(f"Common items: {common}")
Week 9 Milestone
- Can create and modify lists
- Understand indexing (including negative indices)
- Can loop through lists with for loops
Week 10: Dictionaries
Phase 2Learning Objectives
- Create and use dictionaries
- Access and modify dictionary values
- Loop through dictionaries
- Know when to use lists vs dictionaries
Day 1-2 (10 hours)
| Time | Activity | Resource |
|---|---|---|
| 2.5 hrs | Read ATBS Chapter 5: Dictionaries | Chapter 5 |
| 2.5 hrs | Code Along: Type out all dictionary examples | Practice in VS Code |
| 1.5 hrs | Watch Corey Schafer: Dictionaries | Dictionaries Video |
| 3.5 hrs | Practice Programs | See exercises below |
Practice Programs to Write
# 1. Contact book
contacts = {}
while True:
print("\n1. Add contact")
print("2. Look up contact")
print("3. List all contacts")
print("4. Quit")
choice = input("Choose: ")
if choice == "1":
name = input("Name: ")
phone = input("Phone: ")
email = input("Email: ")
contacts[name] = {"phone": phone, "email": email}
print(f"Added {name}")
elif choice == "2":
name = input("Name to look up: ")
if name in contacts:
print(f"Phone: {contacts[name]['phone']}")
print(f"Email: {contacts[name]['email']}")
else:
print("Contact not found")
elif choice == "3":
for name, info in contacts.items():
print(f"{name}: {info['phone']}")
elif choice == "4":
break
# 2. Word frequency counter
text = "the cat sat on the mat the cat was happy"
words = text.split()
frequency = {}
for word in words:
frequency[word] = frequency.get(word, 0) + 1
print("Word frequencies:")
for word, count in frequency.items():
print(f" {word}: {count}")
Week 10 Milestone
- Can create and use dictionaries
- Understand when to use lists vs dictionaries
- Can work with nested dictionaries
Week 11: Strings
Phase 2Learning Objectives
- Use string methods effectively
- Format strings (f-strings)
- Search and manipulate text
- Parse and extract information from strings
Day 1-2 (10 hours)
| Time | Activity | Resource |
|---|---|---|
| 2.5 hrs | Read ATBS Chapter 6: Strings | Chapter 6 |
| 2.5 hrs | Code Along: Type out all string examples | Practice in VS Code |
| 1.5 hrs | Watch Corey Schafer: Strings | Strings Video |
| 3.5 hrs | Practice: Security-relevant string parsing | See exercises below |
Practice Programs to Write
# 1. Password strength checker
def check_password_strength(password):
has_upper = any(c.isupper() for c in password)
has_lower = any(c.islower() for c in password)
has_digit = any(c.isdigit() for c in password)
has_special = any(c in "!@#$%^&*" for c in password)
long_enough = len(password) >= 8
score = sum([has_upper, has_lower, has_digit, has_special, long_enough])
if score == 5:
return "Very Strong"
elif score >= 4:
return "Strong"
elif score >= 3:
return "Medium"
else:
return "Weak"
password = input("Enter password to check: ")
print(f"Strength: {check_password_strength(password)}")
# 2. Simple log parser (security relevant!)
log = "2024-01-15 14:23:01 ERROR Connection failed from 192.168.1.100"
parts = log.split()
date = parts[0]
time = parts[1]
level = parts[2]
message = " ".join(parts[3:])
print(f"Date: {date}")
print(f"Time: {time}")
print(f"Level: {level}")
print(f"Message: {message}")
Week 11 Milestone
- Know common string methods (split, join, strip, etc.)
- Can format strings with f-strings
- Can parse and extract information from text
Week 12: File Input/Output
Phase 2Learning Objectives
- Read from files
- Write to files
- Use the 'with' statement
- Work with file paths
Day 1-2 (10 hours)
| Time | Activity | Resource |
|---|---|---|
| 2.5 hrs | Read ATBS Chapter 9: Reading and Writing Files | Chapter 9 |
| 2.5 hrs | Code Along: Type out all file examples | Create test files to work with |
| 1.5 hrs | Watch Corey Schafer: File Objects | File I/O Video |
| 3.5 hrs | Practice: Create a log file analyzer | This is security-relevant! |
Practice Programs to Write
# 1. Basic file reading and writing
with open("notes.txt", "w") as f:
f.write("My Python Learning Notes\n")
f.write("========================\n")
f.write("Week 12: File I/O\n")
with open("notes.txt", "r") as f:
content = f.read()
print(content)
# 2. Log file analyzer (VERY security relevant!)
def analyze_log(filename):
stats = {
"total_lines": 0,
"errors": 0,
"warnings": 0,
"info": 0,
"ips": set()
}
try:
with open(filename, "r") as f:
for line in f:
stats["total_lines"] += 1
if "ERROR" in line:
stats["errors"] += 1
elif "WARNING" in line:
stats["warnings"] += 1
elif "INFO" in line:
stats["info"] += 1
return stats
except FileNotFoundError:
return None
# 3. Save and load data with JSON
import json
contacts = {"Alice": "555-1234", "Bob": "555-5678"}
with open("contacts.json", "w") as f:
json.dump(contacts, f, indent=2)
with open("contacts.json", "r") as f:
loaded = json.load(f)
print(loaded)
Week 12 Milestone
- Can read from and write to files
- Understand the 'with' statement
- Created a working log analyzer
Week 13: Error Handling
Phase 2Learning Objectives
- Understand different types of errors
- Use try/except blocks
- Handle errors gracefully
- Make robust programs
Day 1-2 (10 hours)
| Time | Activity | Resource |
|---|---|---|
| 2.5 hrs | Read ATBS Chapter 11: Debugging (error handling section) | Chapter 11 |
| 2.5 hrs | Code Along: Practice try/except examples | Intentionally cause errors and catch them |
| 2 hrs | Watch: Python Try/Except for Error Handling | Corey Schafer |
| 3 hrs | Revisit old programs: Add error handling | Make them crash-proof |
Practice Programs to Write
# 1. Safe number input
def get_number(prompt):
while True:
try:
return int(input(prompt))
except ValueError:
print("Please enter a valid number!")
age = get_number("Enter your age: ")
print(f"You are {age} years old")
# 2. Safe file reader
def read_file_safely(filename):
try:
with open(filename, "r") as f:
return f.read()
except FileNotFoundError:
print(f"Error: File '{filename}' not found")
return None
except PermissionError:
print(f"Error: No permission to read '{filename}'")
return None
content = read_file_safely("test.txt")
if content:
print(content)
Week 13 Milestone
- Understand try/except/finally
- Can catch specific exceptions
- Old programs are now crash-proof
Week 14: Modules and Packages
Phase 2Learning Objectives
- Import and use modules
- Explore the standard library
- Install packages with pip
- Use virtual environments
Day 1-2 (10 hours)
| Time | Activity | Resource |
|---|---|---|
| 2 hrs | Read ATBS Chapter 7 (import/module part) | Chapter 7 |
| 1.5 hrs | Explore Python Standard Library documentation | Python Docs |
| 2 hrs | Learn pip and virtual environments | Real Python Guide |
| 2.5 hrs | Create a virtual environment, install requests library | python -m venv myenv then pip install requests |
| 2 hrs | Practice: Security-relevant modules | See exercises below |
Key Modules for Security
import os # Operating system interface
import sys # System-specific parameters
import datetime # Date and time
import hashlib # Hashing (important for security!)
import json # JSON parsing
import re # Regular expressions (next week)
import requests # HTTP requests (installed via pip)
# Example: Cryptographic hashing (SECURITY!)
import hashlib
password = "mysecretpassword"
hashed = hashlib.sha256(password.encode()).hexdigest()
print(f"SHA256: {hashed}")
# Example: Secure random tokens
import secrets
secure_token = secrets.token_hex(16)
print(f"Secure token: {secure_token}")
Week 14 Milestone
- Can import and use standard library modules
- Know how to use pip to install packages
- Understand virtual environments
- Used hashlib for hashing (security skill!)
Week 15: Regular Expressions
Phase 2Learning Objectives
- Understand regex patterns
- Use the re module
- Extract data from text using patterns
- This is CRITICAL for security log analysis
Day 1-2 (10 hours)
| Time | Activity | Resource |
|---|---|---|
| 2.5 hrs | Read ATBS Chapter 7: Pattern Matching with Regular Expressions | Chapter 7 |
| 2.5 hrs | Practice on regex101.com (select Python flavor) | regex101 |
| 2 hrs | Read Python's Regular Expression HOWTO | Python Regex HOWTO |
| 3 hrs | Practice: Write regex for security data | IPs, emails, timestamps |
Practice Programs to Write
import re
# 1. Find all IP addresses in text
text = """
Failed login attempt from 192.168.1.100
Successful connection from 10.0.0.55
Warning: Multiple attempts from 172.16.0.1
"""
ip_pattern = r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'
ips = re.findall(ip_pattern, text)
print(f"Found IPs: {ips}")
# 2. Validate email addresses
def is_valid_email(email):
pattern = r'^[\w\.-]+@[\w\.-]+\.\w+$'
return bool(re.match(pattern, email))
# 3. Parse log entries with regex
log_line = "2024-01-15 14:23:01 ERROR [auth] Failed login for user admin from 192.168.1.100"
pattern = r'(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2}) (\w+) \[(\w+)\] (.+)'
match = re.match(pattern, log_line)
if match:
date, time, level, component, message = match.groups()
print(f"Date: {date}")
print(f"Time: {time}")
print(f"Level: {level}")
print(f"Component: {component}")
print(f"Message: {message}")
Week 15 Milestone
- Can write basic regex patterns
- Know how to use regex101.com to test patterns
- Can extract IPs, emails, timestamps from text
Week 16: Consolidation Project - Security Log Analyzer
Phase 2 FinalProject Requirements
- Read a log file
- Parse each line using regex
- Count events by severity (ERROR, WARNING, INFO)
- Extract and list unique IP addresses
- Identify potential brute force attempts
- Save a security report to a file
Day 1 (5 hours)
| Time | Activity |
|---|---|
| 1 hr | Plan the project structure (write pseudocode first) |
| 4 hrs | Build the core log parsing functionality |
Day 2 (5 hours)
| Time | Activity |
|---|---|
| 5 hrs | Add analysis features: IP extraction, event counting, brute force detection |
Day 3 (5 hours)
| Time | Activity |
|---|---|
| 3 hrs | Add report generation and error handling |
| 2 hrs | Test thoroughly, fix bugs, clean up code |
Project Template
#!/usr/bin/env python3
"""
Security Log Analyzer
A tool to analyze security logs and identify potential threats.
"""
import re
from datetime import datetime
from collections import Counter
def parse_log_line(line):
"""Parse a single log line and return structured data."""
pattern = r'(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2}) (\w+) (.+)'
match = re.match(pattern, line)
if match:
return {
'date': match.group(1),
'time': match.group(2),
'level': match.group(3),
'message': match.group(4)
}
return None
def extract_ips(text):
"""Extract all IP addresses from text."""
pattern = r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'
return re.findall(pattern, text)
def analyze_log_file(filename):
"""Analyze entire log file and return statistics."""
stats = {
'total_lines': 0,
'levels': Counter(),
'ips': Counter(),
'failed_logins': Counter(),
'events': []
}
try:
with open(filename, 'r') as f:
for line in f:
line = line.strip()
if not line:
continue
stats['total_lines'] += 1
parsed = parse_log_line(line)
if parsed:
stats['levels'][parsed['level']] += 1
stats['events'].append(parsed)
ips = extract_ips(line)
for ip in ips:
stats['ips'][ip] += 1
if 'failed' in parsed['message'].lower() and 'login' in parsed['message'].lower():
for ip in ips:
stats['failed_logins'][ip] += 1
return stats
except FileNotFoundError:
print(f"Error: File '{filename}' not found")
return None
def detect_brute_force(stats, threshold=5):
"""Find IPs with multiple failed login attempts."""
suspicious = []
for ip, count in stats['failed_logins'].items():
if count >= threshold:
suspicious.append((ip, count))
return sorted(suspicious, key=lambda x: x[1], reverse=True)
def generate_report(stats, output_file):
"""Write analysis results to file."""
with open(output_file, 'w') as f:
f.write("=" * 50 + "\n")
f.write("SECURITY LOG ANALYSIS REPORT\n")
f.write(f"Generated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")
f.write("=" * 50 + "\n\n")
f.write(f"Total log entries analyzed: {stats['total_lines']}\n\n")
f.write("EVENT SUMMARY:\n")
for level, count in stats['levels'].most_common():
f.write(f" {level}: {count}\n")
f.write("\n")
f.write("TOP IP ADDRESSES:\n")
for ip, count in stats['ips'].most_common(10):
f.write(f" {ip}: {count} occurrences\n")
f.write("\n")
suspicious = detect_brute_force(stats)
if suspicious:
f.write("[!] POTENTIAL BRUTE FORCE ATTEMPTS:\n")
for ip, count in suspicious:
f.write(f" {ip}: {count} failed login attempts\n")
else:
f.write("No brute force attempts detected.\n")
print(f"Report saved to {output_file}")
def main():
"""Main function to run the analyzer."""
print("Security Log Analyzer")
print("-" * 30)
log_file = input("Enter log file path: ")
print(f"\nAnalyzing {log_file}...")
stats = analyze_log_file(log_file)
if stats:
print(f"Processed {stats['total_lines']} log entries")
print(f"\nErrors: {stats['levels'].get('ERROR', 0)}")
print(f"Warnings: {stats['levels'].get('WARNING', 0)}")
print(f"Unique IPs: {len(stats['ips'])}")
suspicious = detect_brute_force(stats)
if suspicious:
print(f"\n[!] {len(suspicious)} IPs with suspicious activity!")
report_file = log_file.rsplit('.', 1)[0] + '_report.txt'
generate_report(stats, report_file)
if __name__ == "__main__":
main()
Week 16 Milestone
- Completed a working security log analyzer
- Program handles errors gracefully
- Can analyze real log files and detect suspicious activity
Phase 2 Complete!
Congratulations! You now have solid Python foundations and have built your first security tool!
Future Phases Overview
Phase 3: Python for Security (Weeks 17-24)
Goal: Apply your Python skills to security-relevant tasks and automation
Weeks 17-18: Working with APIs and JSON
- Understanding REST APIs
- HTTP methods (GET, POST, PUT, DELETE)
- JSON format and parsing
- Using the
requestslibrary - API authentication (API keys, tokens)
- Query a public API (e.g., weather, IP geolocation)
- Build a VirusTotal file checker script
- Create an IP reputation checker using AbuseIPDB
Weeks 19-20: Network Programming with Sockets
- TCP vs UDP protocols
- Python
socketmodule basics - Creating client-server applications
- Port scanning concepts
- Banner grabbing techniques
- Build a simple port scanner
- Create a basic chat client/server
- Write a banner grabbing tool
Weeks 21-22: Web Scraping and Automation
- HTML structure and parsing
- Using BeautifulSoup library
- Handling pagination
- Ethical scraping practices
- Automating repetitive tasks
- Scrape security news headlines
- Extract CVE information from NIST
- Automate log file parsing
Weeks 23-24: Security Automation Project
- Combining all learned skills
- Project planning and design
- Error handling in security tools
- Logging and reporting
- Code documentation
- Network reconnaissance tool
- Automated vulnerability report generator
- Security log analyzer
- Threat intelligence aggregator
Phase 4: Security Fundamentals (Weeks 25-36)
Goal: Build a strong foundation in cybersecurity principles and hands-on skills
Weeks 25-28: Security Principles & Threat Modelling
- CIA Triad (Confidentiality, Integrity, Availability)
- Authentication vs Authorization
- Defence in Depth strategy
- Threat modelling frameworks (STRIDE)
- Risk assessment basics
- Security policies and procedures
- Create a threat model for a web application
- Analyse a real security breach case study
- Write a basic security policy document
Weeks 29-32: Linux Security & Common Attacks
- Linux hardening basics
- Firewall configuration (iptables/ufw)
- OWASP Top 10 vulnerabilities
- SQL Injection attacks
- Cross-Site Scripting (XSS)
- Authentication bypasses
- Password attacks and cracking
- Harden a Linux server (checklist-based)
- Practice OWASP vulnerabilities on DVWA
- Complete TryHackMe OWASP rooms
Weeks 33-36: Hands-On Practice
- Reconnaissance and enumeration
- Vulnerability scanning (Nmap, Nikto)
- Exploitation basics (Metasploit intro)
- Post-exploitation concepts
- Report writing for findings
- Complete TryHackMe learning paths
- Start Hack The Box (easy machines)
- OverTheWire Bandit wargames
- PicoCTF beginner challenges
Phase 5: Specialisation & Certification (Weeks 37+)
Goal: Earn your CompTIA Security+ certification and build a professional portfolio
Weeks 37-44: CompTIA Security+ Preparation
- Domain 1: General Security Concepts (12%)
- Domain 2: Threats, Vulnerabilities & Mitigations (22%)
- Domain 3: Security Architecture (18%)
- Domain 4: Security Operations (28%)
- Domain 5: Security Program Management (20%)
- Watch Professor Messer videos (free)
- Take notes using active recall method
- Complete practice exams weekly
- Review incorrect answers thoroughly
- Use flashcards for key terms
Weeks 45-48: Portfolio Projects
- GitHub profile with clean code
- 3-5 security-related projects
- Documentation and READMEs
- Write-ups of CTF challenges solved
- Home lab documentation
- Security monitoring home lab (ELK Stack)
- Vulnerability scanner with Python
- Packet analyser tool
- Security audit automation script
- Incident response playbook
Weeks 49+: Job Preparation
- Update LinkedIn with certifications
- Create cybersecurity-focused CV
- Practice interview questions
- Network on security forums/Discord
- Apply to entry-level positions
- Security Operations Centre (SOC) Analyst
- Junior Security Analyst
- IT Security Specialist
- Cybersecurity Technician
- Security Support Analyst
About CompTIA Security+ (SY0-701)
- Format: 90 questions, 90 minutes
- Question Types: Multiple choice + Performance-based
- Passing Score: 750 out of 900
- Cost: ~$400 AUD (vouchers often available for less)
- Validity: 3 years (then requires renewal)
Using AI Effectively
The Core Principle
AI is most powerful when you can evaluate its output. You cannot do that without foundational knowledge.
Someone who learned with heavy AI assistance often cannot debug problems when AI fails them.
Your Goal
- Solve problems without AI
- Use AI to work faster
- Recognize when AI is wrong
AI Usage by Phase
| Period | AI Policy | Rationale |
|---|---|---|
| Weeks 1-8 | Minimal | Building mental models; struggling builds understanding |
| Weeks 9-12 | Limited | Can ask for concept explanations after attempting |
| Weeks 13-16 | Moderate | Can ask for code review after writing yourself |
| Weeks 17+ | Strategic | Use AI to accelerate, not replace, learning |
Good Ways to Use AI
- "I'm getting this error when I run my code: [paste error]. I've tried [what you tried]. What might be causing this?"
- "Can you explain how Python dictionaries work differently from lists?"
- "I wrote this function to check password strength. Can you review it and suggest improvements?"
- "Give me 5 practice exercises for Python lists."
Bad Ways to Use AI
- "Write me a program that does X" (without attempting first)
- "Solve this exercise for me"
- "Write the code" for any assignment
- Copying AI code without understanding it
The Test
Before using any AI-generated code, ask yourself:
- Can I explain what every line does?
- Could I have written this myself (even if slower)?
- Could I modify this if requirements changed?
If the answer to any is "no," you're not ready to use that code.
Weekly Study Rhythm
Recommended daily schedule for your 5-hour study sessions:
| Time | Activity |
|---|---|
| 0:00 - 0:30 | Review previous session's notes |
| 0:30 - 1:30 | Read/watch new material |
| 1:30 - 2:00 | Break (important for retention!) |
| 2:00 - 4:00 | Hands-on coding practice |
| 4:00 - 4:30 | Break |
| 4:30 - 5:00 | Write summary notes, plan next session |
Support From Your Partner
How your IT-experienced partner can help:
1. Weekly Code Review
Sit together once a week to review your code. This helps catch bad habits early and reinforces good practices.
2. Rubber Duck Debugging
Be available for you to explain problems aloud. Often, just explaining the problem helps you find the solution.
3. Quick Context Questions
Answer "why" questions that would take ages to Google. Real-world context from experience is invaluable.
4. Don't Solve Problems For You
Guide with hints, don't give answers. The struggle is where learning happens.
5. Environment Troubleshooting
Help with VM issues, network configs, and tool setup. These technical hurdles shouldn't block your learning.
Final Notes
Remember:
- Progress isn't always linear. Some weeks will feel harder than others.
- It's okay to repeat a week if concepts aren't sticking.
- Hands-on practice is more valuable than passive watching/reading.
- Building real projects (even small ones) builds real confidence.
- The cybersecurity community is generally welcoming to newcomers.
You've got this!
All Resources
Phase 1 Resources
| Resource | URL | Cost |
|---|---|---|
| CS50 (Harvard) | cs50.harvard.edu/x/ | Free |
| CS50 YouTube | youtube.com/cs50 | Free |
| Code.org - How Computers Work | YouTube Playlist | Free |
| Ubuntu Download | ubuntu.com/download | Free |
| VirtualBox | virtualbox.org | Free |
| Ubuntu CLI Tutorial | ubuntu.com/tutorials | Free |
| Linux Journey | linuxjourney.com | Free |
| NetworkChuck YouTube | youtube.com/NetworkChuck | Free |
| NetworkChuck CCNA Playlist | YouTube Playlist | Free |
| How DNS Works | howdns.works | Free |
| Darknet Diaries Podcast | darknetdiaries.com | Free |
| TryHackMe | tryhackme.com | Free tier |
| VS Code | code.visualstudio.com | Free |
Phase 2 Resources
| Resource | URL | Cost |
|---|---|---|
| Automate the Boring Stuff (Book) | automatetheboringstuff.com | Free online |
| Automate the Boring Stuff (Udemy) | Udemy Course | Paid (often free codes) |
| Corey Schafer Python Playlist | YouTube Playlist | Free |
| Python Official Documentation | docs.python.org | Free |
| W3Schools Python | w3schools.com/python | Free |
| Real Python | realpython.com | Free articles |
| regex101 | regex101.com | Free |
| Python Regex HOWTO | Python Docs | Free |
| Google Python Crash Course | Coursera | Free to audit |
Future Phase Resources
| Resource | URL | Cost |
|---|---|---|
| TryHackMe Free Rooms List | GitHub Roadmap | Free |
| Professor Messer Security+ | professormesser.com | Free videos |
| CyberSeek Career Pathway | cyberseek.org | Free |
Weekly Study Rhythm
Recommended daily schedule (5-hour sessions):
| Time | Activity |
|---|---|
| 0:00 - 0:30 | Review previous session's notes |
| 0:30 - 1:30 | Read/watch new material |
| 1:30 - 2:00 | Break (important for retention!) |
| 2:00 - 4:00 | Hands-on coding practice |
| 4:00 - 4:30 | Break |
| 4:30 - 5:00 | Write summary notes, plan next session |
Support From Your Partner
How your IT-experienced partner can help:
- Weekly code review - Sit together once a week to review your code
- Rubber duck debugging - Be available for you to explain problems aloud
- Quick context questions - Answer "why" questions that would take you ages to Google
- Don't solve problems for you - Guide with hints, don't give answers
- Environment troubleshooting - Help with VM issues, network configs, tool setup