Cyber Security
Cyber Security
Passwords are a fundamental component of cybersecurity. They act as the first line of
defense against unauthorized access to systems, accounts, and data.
🔐 What is a Password?
Concept Description
Verifying user identity with credentials (username +
Authentication
password).
Converting passwords into a secure, unreadable format
Password Hashing
using algorithms (e.g., bcrypt, SHA-256).
Adding random data to passwords before hashing to
Salting
prevent attacks like rainbow tables.
Two-Factor Adding a second layer of verification, such as a code sent
Authentication (2FA) to your phone.
A tool that stores and generates strong passwords for
Password Manager
different accounts.
Do Don't
Use at least 12 characters Use names, birthdays, or simple words
Include uppercase, lowercase, numbers, and
Reuse passwords across accounts
symbols
Use a password manager Share passwords via text or email
Change passwords regularly Leave devices unlocked
Save passwords in browser without
Enable 2FA when possible
protection
🛡️ Extra Tips
Wi-Fi (Wireless Fidelity) networks are commonly used for internet access in homes,
offices, and public places. However, their wireless nature makes them vulnerable to
various cyber attacks. Here's a simple breakdown of common Wi-Fi attacks in cyber
security:
• What it is: An attacker intercepts data between the user and the Wi-Fi router.
• Goal: Read, modify, or inject malicious data.
• Example: While using public Wi-Fi, someone captures your login credentials.
3. Wi-Fi Eavesdropping
4. Wi-Fi Phishing
• What it is: When users are directed to fake login pages after connecting to a
rogue Wi-Fi.
• Goal: Steal credentials (like email, banking, or social logins).
5. WEP/WPA Cracking
• What it is: Breaking the Wi-Fi encryption (WEP or WPA/WPA2).
• Goal: Gain unauthorized access to a Wi-Fi network.
• Tools used: Aircrack-ng, Reaver.
6. Deauthentication Attack
• What it is: Forcing a device to disconnect from Wi-Fi using forged deauth
packets.
• Goal: Interruption or to perform further attacks (like forcing reconnection to an
evil twin).
• Tool used: Aireplay-ng.
Web application attacks target the interfaces of web apps—usually through browsers—
to exploit vulnerabilities. These attacks can lead to data breaches, unauthorized access,
or even complete system compromise.
Definition: Injecting malicious SQL queries via input fields to manipulate the database.
Example:
sql
Input: ' OR '1'='1
Query becomes: SELECT * FROM users WHERE username = '' OR '1'='1';
Prevention:
Definition: Injecting malicious scripts into web pages viewed by other users.
Example:
html
<script>alert('Hacked!');</script>
Prevention:
Example:
User clicks a malicious link that submits a form to delete their account.
Prevention:
4. Command Injection
Example:
python
os.system("ping " + user_input)
Impact: System compromise, data loss, or malware deployment.
Prevention:
Types:
Example (LFI):
php
include($_GET['page']); // page=../../etc/passwd
Prevention:
6. Session Hijacking
• Use HTTPS
• Rotate tokens after login
• Secure and HttpOnly cookie flags
7. Directory Traversal
Example:
bash
/app?file=../../etc/passwd
Prevention:
8. Broken Authentication
Prevention:
• https : The Scheme (like http or https ) tells your browser how to connect. https is secure.
o Cookie : Small bits of data the site saved on your browser from previous visits.
• Response Headers (from the server):
• 200 OK : Success!
• Cookies: To keep track of you (like keeping you logged in), websites use cookies. These
are small pieces of data stored in your browser (e.g., PHPSESSID ). Your browser sends
the cookie back with each request.
• Security: Session cookies must be hard to guess, otherwise, attackers could pretend to be
you.
o (The cookies in the screenshot were masked so you can't copy them and try to
impersonate the user.)
• Sometimes, all info about your "state" (like login details) is sent to your browser, encrypted
(like with JWTs), and then sent back to the server.
• (The encoded message %48 %65 ... decodes to: "Hello dear w3schools student. Hope you
are learning something today!")
• HTTPS (HTTP Secure) uses TLS (Transport Layer Security) to encrypt the data between
your browser and the server. This keeps your information private and safe. (TLS is the
modern version of SSL).
Cyber Security
Firewalls
Cyber Security Firewalls are security systems designed to prevent unauthorized access
to or from a private network. They act as a barrier between a trusted internal network
and untrusted external networks (like the internet), monitoring and controlling incoming
and outgoing network traffic based on predetermined security rules.
🔒 What Is a Firewall?
1. Packet-Filtering Firewalls
o Analyzes packets individually.
o Checks source/destination IP, port, protocol.
o Simple and fast, but limited context.
2. Stateful Inspection Firewalls
o Tracks the state of active connections.
o Makes more informed decisions.
o More secure than packet-filtering.
3. Proxy Firewalls (Application-Level Gateways)
o Acts as an intermediary between users and the services they access.
o Filters traffic at the application layer (e.g., HTTP, FTP).
o Slower but offers deeper inspection.
4. Next-Generation Firewalls (NGFWs)
o Combines traditional firewall with advanced features like:
▪ Intrusion Prevention System (IPS)
▪ Deep packet inspection
▪ Application awareness
▪ Malware protection
o Highly effective for modern threats.
5. Network Address Translation (NAT) Firewalls
o Masks internal IP addresses.
o Adds a layer of anonymity and protection.
6. Cloud-Based Firewalls
o Also known as Firewall-as-a-Service (FWaaS).
o Scalable and ideal for distributed networks and cloud environments.
✅ Benefits of Firewalls
🔐 Best Practices
✅ Advantages:
⚠️ Challenges: