Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 80 ยท Security Foundations

What Is Cybersecurity?

Learn what cybersecurity is, what defenders protect, how attackers think, which careers exist, and the legal and ethical rules this course follows.

Cybersecurity is the practice of protecting computers, networks, software and the data they hold from people who would misuse, damage or steal them. It sounds like a niche topic for specialists, but every developer, administrator and ordinary user makes security decisions all day: which password to pick, whether to click a link, whether to trust a library, whether a feature should ask for a login.

This course teaches security from the defender's side. You will learn how attacks work so you can recognize and stop them, but you will not get recipes for breaking into other people's systems. Every live example runs on fake data inside your browser: hashes, tokens, log files, small detectors and checkers. Nothing touches a real network.

What are we protecting?

Security always starts with a question: what is valuable here, and what would hurt if it went wrong? The things worth protecting are called assets. Typical assets include:

  • Data: customer records, passwords, source code, medical files, photos, payment details.
  • Systems: servers, laptops, phones, cloud accounts, industrial controllers.
  • Services: a website that must stay online, a payment API, an email system.
  • Reputation and trust: a leak or an outage can cost far more than the stolen files themselves.

Different assets need different protection. A public marketing page can be copied freely, but it must not be silently altered. A medical record must stay private. A hospital's scheduling system must stay available at three in the morning. The next lesson, The CIA Triad and Core Principles, turns these three needs into a vocabulary you will use for the rest of the course.

Defenders and attackers

Two groups face each other, and their jobs are very different.

An attacker needs to find one weakness that works. A defender has to cover all of them, every day, with limited time and budget. That imbalance is why security cannot rely on a single perfect wall. Good defenders assume that some protection will fail and design so that one failure does not become a disaster.

Attackers are not one type of person. Some are bored teenagers, some are criminal groups chasing money, some are employees with a grudge, some are governments, and some are activists. Their goals and skills differ, which changes what defenses make sense. You will study this properly in Threats, Vulnerabilities and Risk.

flowchart LR
    A["Attacker<br/>needs one working path"] --> W["Weak spot"]
    D["Defender<br/>must cover every path"] --> P1["Patching"]
    D --> P2["Access control"]
    D --> P3["Monitoring"]
    D --> P4["Backups"]
    W -.-> S["System under protection"]
    P1 --> S
    P2 --> S
    P3 --> S
    P4 --> S

The attacker aims for a single gap. The defender layers several controls so that no single failure is fatal.

Prevent, detect, respond, recover

Security work is not only about blocking. Almost every mature security program splits its effort into four activities:

Activity Question it answers Examples
Prevent How do we stop the attack? Strong authentication, patching, input validation, firewalls
Detect How do we notice one that got through? Logging, alerts, intrusion detection
Respond What do we do when it happens? Incident response plans, isolating machines
Recover How do we get back to normal? Backups, rebuild procedures, lessons learned

No team prevents everything, so detection, response and recovery matter just as much. In later chapters you will build small versions of each: a validator that prevents bad input, a log analyzer that detects brute-force attempts, and a hashing check that verifies a restored backup.

Python Which security goal does each scenario threaten?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Try adding your own scenario. Notice that some incidents touch more than one goal: ransomware, for example, also threatens confidentiality when the criminals threaten to publish stolen data. Real incidents rarely fit one label neatly, but the labels help you ask the right questions.

Careers in cybersecurity

The field is broad, and you do not have to be a "hacker" to work in it. A few common roles:

  • Security analyst (SOC analyst): watches alerts and logs, investigates suspicious activity, escalates real incidents.
  • Incident responder: takes over when something has gone wrong, contains the damage and leads recovery.
  • Penetration tester (ethical hacker): is hired to test systems with permission and report weaknesses.
  • Application security engineer: reviews code, builds secure frameworks and helps developers fix bugs.
  • Security engineer / architect: designs networks, identity systems and cloud setups that are safe by default.
  • Cryptographer: designs and analyzes the math behind encryption (a small, specialized group).
  • Governance, risk and compliance (GRC) specialist: maps rules and laws to controls, runs audits, writes policy.
  • Digital forensics examiner: collects and analyzes evidence after an incident.

The red-team and blue-team labels are common shorthand. Red teams simulate attackers to test an organization. Blue teams defend. A purple team is the two working together so that every attack the red team tries becomes a new detection for the blue team. This course is built around the blue-team mindset, and its knowledge is useful in every role above.

Ethics and the law

The same technical knowledge can protect a hospital or break into one. What separates the two is authorization. Security professionals work under a simple rule: never test, probe or access a system unless you have clear, written permission from the owner.

Laws such as the Computer Fraud and Abuse Act in the United States, the Computer Misuse Act in the United Kingdom and similar laws in most countries make unauthorized access a crime, even if you meant no harm, even if you only "looked around", and even if the door was left open. "I was only curious" is not a defense.

Professional testers therefore agree on a scope and rules of engagement in writing before they begin: which systems are in scope, which methods are allowed, when testing may occur, and whom to call if something breaks. Many companies also run bug bounty programs that publish exactly what researchers may test and how to report findings responsibly. Reporting a discovered flaw privately to the owner, and giving them time to fix it, is called responsible disclosure.

Python A scope check: is this target authorized?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The default answer is deny: if a target is not clearly in scope, you do not touch it. You will meet that same idea again in access control, firewalls and cloud permissions.

Never practice on systems you do not own or have explicit permission to test. Build your own lab (a virtual machine, or a deliberately vulnerable practice app you install yourself) when you want hands-on experience beyond this course.

How this course stays defensive

Each chapter follows the same pattern: understand the asset, understand how it can fail, then build or apply the defense. Where an attack is worth understanding, we show it on a simulated target, such as an in-memory database filled with fake rows or a made-up log file, and we immediately show the fix. We explain the idea of an exploit without publishing working weapons against real products.

The chapters, in order:

  1. Security Foundations: goals, principles, risk, threat modeling, the attack lifecycle.
  2. Cryptography Basics: hashing, message authentication, encryption, keys, TLS.
  3. Authentication and Access Control: passwords, MFA, sessions, tokens, OAuth, authorization.
  4. Web Application Security: injection, XSS, CSRF, validation, headers, APIs.
  5. Network Security: firewalls, common attacks, VPNs, monitoring.
  6. Secure Coding: pitfalls, memory safety, dependencies, secrets, testing.
  7. Malware and Endpoint Security: malware, phishing, hardening, detection.
  8. Security Operations and Incident Response: logs, response, forensics, vulnerability management.
  9. Privacy, Cloud and Secure Design: data protection, architecture, cloud, resilience, compliance.
  10. Projects and Practice and Review to apply everything.

You need basic Python for the live examples. If you are new to it, work through the Python tutorial first, or follow along and read the code slowly. It is short and heavily commented.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why is defending usually harder than attacking?

    The asymmetry is about coverage: one gap can be enough for an attacker, so defenders layer several controls and assume some will fail.
  2. 2. A tester finds an unlocked server on a company network that was not in the signed scope. What should they do?

    Authorization comes from the owner and the written scope, not from how easy the access is. Out-of-scope systems are not touched; they are reported.
  3. 3. Which activity belongs to the 'detect' part of a security program?

    Detection is about noticing that something suspicious happened, for example through logs and alerts. Patching is prevention and restoring is recovery.
  4. 4. What does a blue team do?

    Blue teams defend. Red teams simulate attackers, and purple teams combine both so that every simulated attack improves a detection or control.

Summary

  • Cybersecurity protects assets (data, systems, services, trust) from misuse, damage and theft.
  • Attackers need one gap; defenders layer prevention, detection, response and recovery.
  • Many careers exist: analyst, responder, tester, application security engineer, architect, GRC and forensics.
  • Authorization is what makes security work legal and ethical: written scope, rules of engagement, responsible disclosure.
  • This course is defensive: every example uses fake data in your browser and shows the fix next to the problem.

Next: The CIA Triad and Core Principles