intro-cybersecurity
Cybersecurity basics
Cybersecurity encompasses total networked system security, extending to critical infrastructure and national defense. It unifies three related disciplines:
- Information Security: Protecting data assets.
- Computer Security: Securing individual endpoint machines and operating systems.
- Network Security: Securing communication channels and traffic across nodes.
Crash course terminology
- authenticity: modified by the correct owner, the authorized owner
- secrecy: Access control when based with local data like files
- non-repudiation: Prevent a party from denying that some action took place. Done with code signing and digital signatures
- privacy: control over ones information and confidentiality. Confidentiality with a touch of ownership
- confidential info: information that can be used to authenticate you, to unique identify who you are.
- private info: information that is personal to you, like your home address.
The difference between confidentiality and privacy is that privacy is information personal to you (home address) while confidentiality is information used to authenticate you (SSN).
Risk
Risk is the potential for an asset to be misused. An asset is any valuable resource to a company, like money or data.
A good equation is Risk = likelihood * impact. Your google account being compromised has a low likelihood, but would have a great impact.
Threat
A threat is a specific means by which an attacker can put a system at risk. We take into account the attacker’s goals and their skills.
Threat model
A threat model is a structured approach to identifying and evaluating potential threats to a system, organization, or product.
Here are the steps in creating a threat model:
- Identifying Assets: Identify what needs to be protected.
- Identifying Threats: Identify potential threats to those assets.
- Assessing Vulnerabilities: Brainstorm possible vulnerabilities
- Analyzing Risks: Score vulnerabilities to focus on most critical ones first
- Mitigation Strategies: Finally, you develop strategies to mitigate or reduce the risks.
adversary
These are the levels of adversaries, from least threatening to most threatening
- Script-kiddies
- Malicious hackers
- Industrial espionage hackers
- Governments
attacks
Attacks are attempts to exploit vulnerabilities. A compromise is when an attack is successful.
There are three different kinds of attacks:
- passive: eavesdropping, basically an attack where there’s no way to trace it back to you
- active: guessing passwords. Basically an attack where you leave evidence
- Denial of Service: DOS attacks hinder availability
trust
Trust refers to the degree to which an entity is expected to behave.
For example, we expect the organization to not expose our password and email. We expect the organization to ask permission to get our data.
There are two ways we describe systems in terms of trust
- trusted: We choose to trust this system, but there is no guarantee that it won’t be broken into
- trustworthy: This system will not fail at all. They are mathematically guaranteed from being compromised.
security model
A security model is the combination of three things: trust model, threat model, and risk.
It is always important to create your security model before you build your application, because it is extremely difficult to refactor
Principles of cybersecurity
These are the four main components of cybersecurity:
- authentication: ensuring a user is who they say the are
- authorization: ensuring a user can perform actions based on their role and preventing unauthorized actions
- integrity: the process of input validation and sanitization to prevent data from being tampered
- data protection (secrecy): the process of safeguarding sensitive data from unauthorized access, modification, or disclosure.
CIA
Cybersecurity aims to have these three aspects in the practice, abbreviated CIA:
-
Confidentiality: Preventing unauthorized access or disclosure.
-
Integrity: Preventing unauthorized alteration, tampering, or corruption of data.
-
Availability: Ensuring timely, reliable access to systems and services without disruption.

Confidentiality
-
Confidentiality as Information Protection: In the CIA triad context, confidentiality means safeguarding data from unexpected access or disclosure. It makes sure only users with the correct permissions can access information.
-
Confidentiality as a Security Strategy: Confidentiality works as a security strategy featuring multiple protective layers to prevent unauthorized information disclosure. It employs varied tools and techniques, including encryption, access control, and multi-factor authentication.
-
Confidentiality as an Ethical Obligation: In IT security, confidentiality signifies an ethical duty to protect user privacy by securing their data from unauthorized access or disclosure. This matter is central to maintaining a company's trust and credibility.
Integrity
-
Integrity as Preservation of Data Invariance: Within the CIA triad, integrity means preserving data invariance and authenticity. It assures that unauthorized individuals do not modify or erase information.
-
Integrity as a Protection Mechanism: Integrity serves as a protection method that guards data from unauthorized changes using techniques and tools like checksum controls, system audits, and Security Information and Event Management (SIEM) systems.
-
Integrity as Organizational Responsibility: Integrity also denotes an organization's obligation to continuously monitor and protect data to maintain its accuracy and consistency. This obligation is crucial for preserving customer trust and complying with legal norms.
Availability
-
**Availability as Uninterrupted Operation:**Availability, the third aspect of the CIA triad, involves ensuring that information systems and data are readily available to authorized users to facilitate the organization's ongoing operations.
-
Availability as a Resilience Strategy: Availability serves as a resilience strategy that protects information systems against failures and disruptions. It contains different measures like redundancy, business continuity planning, and regular backups.
-
Availability as the Key to Customer Satisfaction: Availability is crucial for customer satisfaction as it assures that customers can always access the organization's services and resources, which is key to securing their trust and loyalty.
CIA defense mechanisms
Confidentiality:
-
Access Restriction (various access control models)
-
Cryptographic methods
-
Authentication
-
Organizational measures (non-disclosure agreement, etc)
Integrity
-
Version control
-
Checksums
-
Digital signatures
-
Backups
Availability
-
Data recovery
-
Fail-over clusters
-
Redundant Array of Independent Disks(RAID)
-
Failover
Defense in depth
Defense in depth is the concept that we should have multiple layers of security/defense to prevent a single point of failure and promote stronger defense.
Principle of least privilege
The concept that you should only give a user or system the least permissions possible
Core principles of privileged access
Principle of Least Privilege
Principle of Least Privilege (PoLP) means giving users, applications, or systems the minimum access needed for their tasks, nothing extra. For example, a database administrator should have admin rights only to their assigned databases, not to the entire network.
This approach starts with “default deny,” where all access is forbidden unless specifically allowed. Additional permissions are granted only when justified. This prevents accounts from gathering too many permissions over time, limiting damage if one of them is compromised.
Separation of duties
Separation of Duties (SoD) divides critical tasks between multiple people to prevent fraud and errors. For example, when creating a new admin account, one person requests it, another approves it, and a third person creates it. It also means using separate accounts for admin tasks versus daily activities like email.
This provides oversight at every step, reducing the risk of errors and making it harder for insiders to abuse their position.
just in time access
Just-in-Time (JIT) access provides temporary privileges instead of permanent elevated access. For example, someone gets one hour of access to patch a server. Once the hour is done, their access reverts to standard privileges.
This eliminates permanent elevated permissions, which reduces the window attackers can exploit compromised accounts.
accountability and audit trails
This approach aims to ensure that all privileged activities are logged and traceable. For example, when someone modifies firewall rules, the system logs who made the change, when it was changed, and what was changed. Each admin should have their own individual account, not shared accounts.
This enables the detection of suspicious activity and keeps your actions transparent and accountable at all times.
Essential Security Practices for Daily Operations
MFA
- Always use Multi-Factor Authentication (MFA), a security method that requires a password plus a second verification step, when available.
- Use the MFA method provided by your organization. Choose phishing-resistant MFA if offered, such as hardware security keys or certificate-based authentication.
- Never share MFA codes or approve requests you didn't initiate.
- If you receive an unexpected MFA notification, report it immediately.
session management
- Always lock your screen when leaving your desk, even if you step away briefly.
- Log out completely from privileged systems when finished; don't just close the window.
- Never leave privileged sessions open and unattended.
- Set screen savers with password protection when available.
login information storage
- Never write down your passwords, store them in documents, or share them with others.
- Use your organization's approved password management tools when available.
- Create strong, unique passwords for each account, and never reuse your privileged account passwords for personal accounts.
- Change passwords if you suspect they have been compromised or follow your organization's schedule if they have one.
activity monitoring
- Understand what actions are being tracked in the systems you use.
- Review your own activity logs when possible to ensure all actions are legitimate and authorized.
- Report any suspicious activity you notice in logs or systems.
- Make sure your actions are always justifiable and aligned with your assigned responsibilities.
Cloud services
There are three main types of cloud services:
- infrastructure as a service: cloud provider manages hardware and networking for you and provisions instances for you, but you control the environment and software
- example: AWS ec2 instance or Digital Ocean, where you get a linux VM and then you can do whatever tf you want with it.
- platform as a service: cloud provider manages the infrastructure and the platform, setting up the operating system for you and the middleware
- example: Vercel, where all the developer is responsible for is the code and that's it.
- software as a service: a product that one uses.
Security testing tools
- SAST (Static Application Security Testing): identifies vulnerabilities in the code early in development just by looking at the source code.
- Advantages: Can detect vulnerabilities early, saving you time and money
- Disadvantages: Might miss runtime issues that only appear when the application is running
- DAST (Dynamic Application Security Testing): identifies vulnerabilities in the code during runtime, using runtime testing
- Advantages: Can catch vulnerabilities that SAST might miss
- Disadvantages: Can be more time-consuming and resource-intensive, and it does not necessarily detect flaws in business logic and role-based access control
- SAC (Software Composition Analysis): identifies vulnerabilities in the chain of third party software your application uses
- Advantages: Quickly finds vulnerabilities in open-source components
- Disadvantages: Might miss custom vulnerabilities or issues in your own code, and it does not understand the context of how the component is being used
Cyber threats
Terminology
We describe cybersecurity attacks with these 4 concepts
- Method: how did the attack work?
- Vector: how did the attack launch and move over time?
- Motive: why was the attack carried
- Target: who or what did the attack target
There are three types of attackers/hackers
- hacktivists: those who hack systems for political gain
- script kiddies: those who break into systems for fun
These are the types of attacks:
-
Malware — Any type of harmful software designed to damage a computer system.
-
Phishing — A cyberattack that attempts to fool users into providing sensitive information.
-
DDoS Attack — A distributed denial of service attack involves the use of multiple devices to flood a website or server with traffic.
-
Ransomware — A type of cyber attack that locks users out of their computer systems until they pay a ransom. By encrypting important files on a network, victims are placed in a position to either pay the ransom to decrypt the files or risk losing business-critical data.
-
Botnet — A network of compromised computers used to carry out cyberattacks on other systems. The originator of the attack is known as the "bot master" and zombies are computers that have been infected with malware. All three are necessary to launch a botnet attack.
-
Spyware — A type of malware that can collect and transmit private user information without the user's consent.
Common Attack Patterns
-
70% of attacks are financially motivated.
-
30% target secondary targets first (e.g., HVAC vendors, third-party contractors, software libraries) to pivot into primary targets.
-
Legacy vulnerabilities dominate: Most exploits leverage older, well-documented vulnerabilities rather than pure zero-days.
-
Crime-as-a-Service: High-performing tools quickly become commodified (Exploit kits like RIG/Fallout, Ransomware-as-a-Service, DDoS-for-hire).
-
Social Engineering: Phishing drives roughly 80% of social engineering breaches. About 30% of phishing emails are opened, and 12% result in attachment clicks.
Cyber kill chain
The cyber kill chain refers to a general process of stages attackers follow to compromise a target and achieve their goal:

- Reconnaissance: The attacker gathers information about the target, like scanning IP addresses and open ports on a company's internet domain to find vulnerabilities.
- internet domain: all public IP addresses a company owns/uses
- IP address scan: scanning all IP addresses living within an internet domain
- port scan: for a single IP address, scanning all open ports running on that IP
- Weaponization: The attacker customizes malware to exploit specific vulnerabilities in the target's systems.
- Delivery: The malware is delivered to the target, often via phishing emails, infected websites, or compromised credentials. There are 5 types of malware delivery
- phishing: attackers send an infected file or crafts a fake website that a victim visits or opens, which then automatically installs the malware onto the system.
- compromised website: An attacker compromises a website beforehand which installs malware on any user that visits the website.
- stolen credentials: attacker steals credentials via social engineering or keylogging to steal user password credentials and install malware on the system.
- exposed vulnerability: use vulnerabilities in third-party packages to deliver the malware
- infected flash drive: victim plugs in flash drive into their machine, installs the malware automatically.
- Exploitation: The malware takes advantage of a vulnerability to execute on the target system.
- Installation: The malware installs itself on the system, often setting up persistence to survive reboots.
- Command and Control: The malware connects back to the attacker’s server to receive instructions and maintain access.
- Action: The attacker carries out their goal, such as stealing data, defacing websites, or extorting money.

The problem with the cyber kill chain
The traditional Kill Chain heavily focuses on preventing the initial perimeter breach. However, with Advanced Persistent Threats (APTs) and supply chain compromises, attackers frequently masquerade as legitimate insiders or bypass the perimeter entirely.
Modern defense must prioritize internal lateral movement prevention, zero-trust architecture, and detecting malicious behavioral anomalies from valid authenticated accounts.
History of cyber attacks
-
1980s (Early Intrusions & Worms):
-
Kevin Poulsen (Dark Dante, 1983): Breached DoD classified research systems; later served as a military cybersecurity consultant before being indicted for telecom/computer fraud.
-
Morris Worm (Robert Tappan Morris, 1988): The first denial-of-service worm of its kind.
-
-
2005 (Web Applications & XSS):
- Samy Worm (Samy Kamkar): First major cross-site scripting (XSS) worm; infected over 1 million MySpace users in just 20 hours.
-
2007–2010 (Nation-State & Kinetic Warfare):
-
Syrian Air Defense Hack (2007): Electronic spoofing used to mask an airstrike on a suspected nuclear site.
-
Estonia DoS (2007): Large-scale Russian denial-of-service attacks triggered by a dispute over a war memorial.
-
Stuxnet (2010): Malware engineered to cause physical destruction of Iranian nuclear centrifuges.
-
-
2014 (Retail & Financial POS Breaches):
-
Sony Pictures (Shamoon/Disstrack): Payment cards exposed, internal communications exfiltrated, and workstations wiped.
-
Target & Home Depot: Massive point-of-sale (POS) malware infiltrations via third-party vendor credentials, exposing 90M and 100M records respectively.
-
JPMorgan Chase: Compromised systems exposing 76M records.
-
-
2015–2016 (Ransomware, IoT, & Election Interference):
-
Healthcare Breaches: Anthem (80M records), Premera, and Excellus targeted.
-
Critical Infrastructure: BlackEnergy malware causing regional power outages in Ukraine.
-
Mirai Botnet (2016): Massive DDoS attacks leveraging default credentials on IoT devices to disrupt DynDNS and Krebs on Security.
-
2016 US DNC Hacks: Spearphishing campaigns targeting Google accounts (e.g., John Podesta), exfiltrating emails via encrypted tunnels.
-
-
2019–2021+ (Software Supply Chain & Protestware):
-
SolarWinds (2019–2020): Nation-state actors inserted backdoors directly into the Orion build/CI pipeline, distributing malicious updates to 18,000 entities, including US federal agencies.
-
Package Ecosystem Threats: Typosquatting and dependency confusion targeting PyPI, npm, and RubyGems.
-
Protestware (2022): Maintainers injecting destructive payloads (e.g., the
node-ipcincident wiping machines in Russia/Belarus) into popular open-source dependencies.
-