1/91
Lecture 1
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Security-focused Dev Thought
Adversarial thinking required
Your code has an intelligent opponent
They have time,motivation,and creativity
They only need to win once
Thinking like an attacker
Physical manipulation of the mechanism(can I pick the lock)
Social engineering or theft(Can I copy someone else’s key)
Exploiting trust relationships(Can I trick staff into giving me a key)
Alternative attack vectors(Can I just climb through the window)
Roadmap
Linux Foundations
Finding Information
CIA Triad
Risk and Controls
Threat Modelling
Kill Chain
Linux Foundations
essential tools for security practitioners
Finding Information
Staying current in a rapidly evolving field
CIA Triad
The fundamental goals of cybersecurity
Risk and controls
Strategic approaches to managing threats
Threat Modeling
Systematic framework for security analysis
Kill Chain
Understanding the attackers playbook
The operating system of security
Linux
Kali Linux
The industry-standard penetration testing distribution, pre-loaded with hundreds of security tools
Security Onion
Network security monitoring platform for intrusion detection, log management, and enterprise security monitoring
Cloud Infrastructure
Most cloud containers and servers run Linux variants, making command-line proficiency essential for cloud security
Analysis Sandboxes
Malware analysis environments rely on Linux for safe investigation and reverse engineering of threats
You need to find all failed login attempts in a 2GB log file to investigate a potential breach
GUI Approach
Command Line Approach
GUI Approach
Open file manager
Wait for file to load
Application crashes
Give up
Time wasted: 10+ minutes
Command line Approach
grep "Failed password" /var/log/auth.log >
failed_logins.txt
Advantages of Command Line Approach
Automation at scale
Speed for larger datasets
Scriptable and repeatable
Low memory overhead
Works remotely over SSH
Essential Linux Commands: Navigation
pwd: print working directory
ls: list files and folders
cd/path/to/directory: change directory
ls*.log: show only log files
Essential Linux Commands: Reading Files
cat file.txt: dump entire file to screen
less file.txt:Paginate with search
head -n 20: First 20 lines
tail -f: last lines, live updates
grep “error” file.txt: find specific lines
Every linux file has permissions that control read,write, and execute access. Which command reveals these permissions?
ls -la
Three Linux permission types
Read: r
Write: w
Execute: x
Permission groups apply to?
Owner
Group
Others
Example output: -rwxr-xr-x
rwx: owner
r-x: Group
r-x: Others
Key commands
chmod: Change permissions
chown: Change ownership
sudo: Execute as superuser
Why are permissions security-critical?
Privilege escalation attacks frequently exploit incorrect file permissions
Common real-world failure?
Sensitive configuration file has world-readable permissions
Attacker reads database credentials
Lateral movement to database server
Game over
Network Commands
ip addr
ss -tulpn
curl
ping
ip addr
Network interfaces and IP addresses
ss -tulpn
Listening ports and associated processes
curl
Making web requests safely from CLI
ping
Testing network reachability
Linus’s Law
Given enough eyeballs, all bugs are shallow
-Open source is safer because anyone can audit the code
Why can open source still be insecure?
Public code gives adversaries a roadmap. Malicious actors can study the source systematically to discover vulnerabilities before defenders
What is a patch gap?
Time between vulnerability disclosure and patch application
Advantages of open source
Fixes are published transparently, and the community can verify patches meet security standards
Disadvantages with open source
Everyone sees the vulnerability when it’s announced, creating a race between defenders patching and attackers exploiting
Average time to exploit
5.5 days after disclosure
Average time to patch
38 days
What does CVE stand for?
Common Vulnerabilities and Exposures
Purpose of CVE
A standard identifier for publicly known security flaws, used globally by vendors, researchers, and security tools.
CVE format
CVE-YEAR-NUMBER
Why does CVE matter operationally
Allows constant communication across organisations
Automated vulnerability scanning
Patch management tracking
Threat intelligence sharing
Compliance reporting
National Vulnerability Database
enriches CVE records with critical context and scoring
CVSS Scoring measure what?
Severity ratings from 0-10 using common Vulnerability Scoring System
Affected Software
Common Platform Enumeration strings identifying vulnerable products and versions
References
Links to vendor patches, advisories, and technical analysis
CVSS Severity Ranges
0.0-3.9:Low
4.0-6.9: Medium
7.0-8.9: High
9.0-10.0: Critical
Three Pillars of CIA Triad
Confidentiality
Integrity
Availability
Confidentiality
Only authorised parties can access information
Integrity
Data cannot be altered undetectably
Availability
System are accessible when needed
Confidentiality Controls
Encryption
Access Control list
Multi-Factor Authentication
Integrity Controls
Cryptographic Hashing
Digital Signatures
Write-Once Storage
Version Control
Availability Control
Redundancy
Load Balancing
DDoS Mitigation
Rate Limiting
Offline Backups
CIA Triad Trade offs
Confidentiality vs. Availability
Integrity vs.Availability
Confidentiality vs. Availability
max confidentiality=air-gapped system
result: Not remotely available to legitimate users
Integrity vs. Availability
Blockchain
result: Slow write operations, reduced availability for high-throughput applications
Return to CVSS
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Impact: C/I/A
Attack Vector
Network scores highest:remotely exploitable
-Adjacent,Local,Physical score progressively lower
Attack Complexity
-low: easy exploitation
-high: requires special conditions beyond attacker control
Privileges Required
None: no authentication needed
Low/High: privileges required score lower
User Interaction
None: automatic exploitation
Required:victim must be tricked
Scope
Changed: affects resources beyond security scope
Unchanged: stays within boundaries
Impact:C/I/A
Confidentiality,Integrity,Availability rated None/Low/High based on data affected
Threat Modelling
Asset and Policy(what)
Adversary(who)
Mechanism(how)
Threat Model 1: Confidentiality
Threat: Network eavesdropper
Threat Model 2: Integrity
Malicious relay/server
Threat Model 3: Availability
DDoS attacker
Confidentiality: end-to-end encryption defense
Only sender and receiver can read messages
Integrity: Cryptographic signatures defense
Tampering detection
Availability: Scale and rate limiting defense
Automatic provision of additional server capacity during traffic spikes to maintain service levels
When security fails
when mechanism can’t enforce policy against adversary
Failure Modes
Weak mechanism vs. advanced adversary
Overwhelmed Mechanism
Bypassed Mechanism
Risk Formula
Likelihood*impact
Likelihood definition
Probability the threat occurs(0-100%)
Impact definition
Damage if it happens
What are the ways to handle risk?
Accept: risk is low enough to tolerate
Avoid:Don’t do the risky activity
Mitigate: Reduce likelihood or impact
Transfer: Insurance or outsource to third-party vendor
Types of Security Controls
Administrative control: Policies, procedures, training
Technical control: Software/hardware enforcement
Physical control: Locks, badges, cameras
Administrative Controls advantages
Low cost to implement
Administrative Controls Disadvantages
Relies on human compliance
Technical Controls Advantages
Consistent enforcement
Physical Controls Advantage
Effective against local threats
Physical Controls Disadvantage
No protection against remote attacks
Modern security Architectures
Defence in Depth
Zero Trust
Defence in depth principles
Don’t rely on a single defence
Zero Trust principles
No implicit trust based on location
Every request authenticated and authorised
Assume breach at all times
Least privilege access
Cyber kill chain
Models attacks as a sequence of stages, not isolated events
Breaking any stage will stop the attack
Helps prioritise defensive investments
Reveals dependencies in attacker workflows
Kill Chain Stages
Reconnaissance:Information gathering
Weaponisation: Crafting exploit
Delivery:Getting exploit to victim
Exploitation: Triggering vulnerability
Installation: Persistence
Command and control: Remote Control
Actions on Objectives: Data theft/damage
Key legal rule in security testing
Authorisation matters more than intent
Cybercrime penalties include
Fines and imprisonment
Responsible disclosure requires
Private reporting and time to patch
Professional Pentesting Rules
Required before testing: Written authorisation
During testing: Stay in scope, document everything
After testing: report responsibly and delete data