Notes
Notes
2. Prevent Cyber Threats: Defend against malware, phishing, ransomware, and other cyberattacks.
4. Maintain Business Continuity: Protect systems from outages caused by attacks or failures.
5. Comply with Regulations: Meet legal & industry standards, such as GDPR, HIPAA for data protection.
6. Build Trust: Secure systems help build user trust in online platforms and services.
Basics of Security :
1. Confidentiality : Ensures that sensitive information is only accessible to authorized individuals or
systems. , Techniques: Encryption, access control, and secure authentication.
2. Integrity: Ensures that data is accurate, complete, and unaltered during storage, processing, or
transmission , Techniques: Hashing, checksums, and digital signatures.
3. Availability : Ensures that systems, applications, and data are available to authorized users
whenever needed. , Techniques: Redundancy, load balancing, and disaster recovery plans.
4. Accountability : Ensures that actions within a system can be traced to specific users or systems ,
Techniques: Logging, auditing, and secure user authentication.
5. Non-Repudiation : Ensures that a party cannot deny the authenticity of their action or
communication , Techniques: Digital signatures and timestamps.
6. Reliability : Ensures that systems and processes function consistently and without failure ,
Techniques: System redundancy, fault-tolerant systems, and regular maintenance.
pg. 1 By Ghanshyam
Risk and Threat Analysis :
1. Assets : Definition: Anything valuable to an organization or individual that needs protection.
Examples: Hardware (computers, servers), software, data (customer information, intellectual
property), and reputation.
3. Threats : Definition: Potential events or actors that could exploit vulnerabilities to cause harm.
4. Risks : Definition: The potential for loss or damage when a threat exploits a vulnerability.
5. Countermeasures : Definition: Actions, tools, or techniques used to mitigate risks and protect
assets.
2. Using encryption.
3. Conducting regular security training.
4. Performing vulnerability assessments.
1. Network-Based Threats
Definition : Threats that target network infrastructure to disrupt, intercept, or manipulate data
communication.
Characteristics:
pg. 2 By Ghanshyam
2. Malware Threats
Definition : Malicious software designed to infiltrate, damage, or steal data from a system.
Characteristics :
3. Web-Based Threats
Definition : Attacks that exploit web applications, servers, or websites to compromise users or data.
Characteristics:
Includes SQL Injection (SQLi), Cross-Site Scripting (XSS), and Cross-Site Request Forgery (CSRF).
Characteristics:
Uses methods like Brute Force Attacks, Phishing, and Credential Stuffing.
5. Insider Threats
Definition : Threats that originate from within an organization, either intentionally or accidentally.
Characteristics:
Can be malicious (intentional data leaks or sabotage) or negligent (accidental data exposure).
pg. 3 By Ghanshyam
6. Wireless Network Threats
Characteristics:
Includes Evil Twin Attacks, Rogue Access Points, and Replay Attacks.
Threats to Security
1.Viruses
Definition : A virus is a type of malicious software (malware) that attaches itself to a host program or file and
spreads when executed. It often damages data, disrupts systems, or performs unwanted actions.
Phases of a Virus
1. Dormant Phase : The virus is inactive and does not perform any action.
It waits for a specific condition, such as a date or user action, to activate.
2. Propagation Phase : The virus replicates itself by attaching to other programs, files, or systems.
Spreads through emails, USB drives, or network connections.
3. Triggering Phase : The virus activates and begins its intended action when the predefined condition
is met. Examples: Opening a file, reaching a certain date, or restarting a system.
4. Execution Phase : The virus executes its payload, causing harm such as data corruption, deletion, or
system disruption.
Types of Viruses
1. File Infector Viruses : Infects executable files (.exe, .com) , Activates when the infected program is
run , Example: Cascade Virus.
2. Macro Viruses : Targets documents and spreadsheets containing macros (e.g., Microsoft Word,
Excel) , Example: Melissa Virus.
3. Boot Sector Viruses : Infects the boot sector of storage devices, executed during system startup.
Example: Michelangelo Virus.
5. Stealth Viruses : Conceals itself by modifying file size or hiding in the system.
Example: Frodo Virus.
pg. 4 By Ghanshyam
6. Resident Viruses: Resides in system memory and infects files when they are accessed.
Example: Randex Virus.
2. Worms : A worm is a self-replicating malware that spreads across networks without needing a host file.
Characteristics:
3. Trojan Horse : A Trojan is malicious software disguised as legitimate software. It does not replicate like a
virus but can cause significant damage once installed.
Characteristics:
4. Intruders : Unauthorized individuals who gain access to systems to steal, manipulate, or destroy data.
Types:
3. Clandestine User : A user who bypasses security mechanisms to access systems undetected.
5. Insiders : Trusted individuals within an organization who misuse their access to compromise security.
Characteristics:
o Often pose a greater threat as they have legitimate access to sensitive data and systems.
Examples:
pg. 5 By Ghanshyam
Types of Attacks :
1. Active and Passive Attacks
1. Active Attacks : An attack where the attacker actively alters or manipulates the data or the system
to disrupt its operation.
o Examples:
o Characteristics:
2. Passive Attacks : An attack where the attacker monitors or eavesdrops on communications without
altering them.
o Examples:
o Characteristics:
Difficult to detect.
2. Denial of Service (DoS) Attack : An attack designed to overwhelm a system, network, or service, making
it unavailable to legitimate users.
Methods:
o Flooding the target with excessive traffic (e.g., ICMP, SYN flood attacks).
Distributed Denial of Service (DDoS): Involves multiple systems attacking the target simultaneously.
Prevention : Use load balancers, rate limiting, and DDoS protection services.
pg. 6 By Ghanshyam
3. Backdoors and Trapdoors
Backdoor:
o Example: A developer leaving access credentials for troubleshooting but not removing them.
Trapdoor:
Purpose:
Prevention:
5. Spoofing : Impersonating a legitimate user or system to gain unauthorized access or deceive others.
Types:
Prevention:
Example : Capturing login credentials during an HTTPS session using fake certificates.
pg. 7 By Ghanshyam
Prevention:
7. Replay Attacks : Capturing and re-sending valid data transmissions to trick the recipient into performing
unauthorized actions.
Prevention:
8. TCP/IP Hijacking : Taking over an active TCP/IP session between two systems by impersonating one of
the parties.
Types:
o TCP Sequence Number Attack: Guessing sequence numbers in TCP packets to inject
malicious data.
Types:
o Side-Channel Attack: Exploiting physical data (e.g., power consumption) to extract keys.
Prevention:
pg. 8 By Ghanshyam
Unit 02 : User Authentication & Access control
Identification: The process where a user provides their identity to a system, typically through a
username.
Authentication: Verifying that the claimed identity is valid, often done through a password, PIN,
biometrics, or other methods.
3. Password Attacks : Password attacks involve attempts to gain unauthorized access by compromising a
password. Key types include:
1. Guessing Passwords
Automated trial of all possible combinations until the correct password is found.
Mitigation: Lock accounts after a specific number of failed attempts or enforce strong password
policies.
3. Dictionary Attack
Mitigation: Use passwords that are complex and include random characters, not just dictionary
words.
4. Phishing
Tricking a user into providing their password via fake websites, emails, or messages.
pg. 9 By Ghanshyam
4. Piggybacking : Piggybacking occurs when an unauthorized person gains access by following an
authorized user into a secure area.
Example: Tailgating someone into a building without using their own access credentials.
Mitigation:
5. Shoulder Surfing : Observing someone while they enter their password, PIN, or sensitive information.
Mitigation:
o Shield your input (e.g., covering PIN entry with your hand).
6. Dumpster Diving : Searching through discarded items like paper, receipts, or old devices to find sensitive
information such as passwords or account details.
Mitigation:
Biometrics : refers to the use of unique physical or behavioral characteristics of individuals for
identification and authentication. It is a key area in security systems as it provides a reliable way to ensure
identity verification based on something intrinsic to the user.
Types of Biometrics : Biometrics can be broadly divided into physical and behavioral characteristics:
pg. 10 By Ghanshyam
Physical Biometrics : These are based on measurable and unique physical attributes of an individual.
1. Fingerprint Recognition
What it is: Scanning and analyzing the unique patterns of ridges and valleys on a person's fingertips.
2. Handprint Recognition
What it is: Analyzing the unique shape, size, and geometry of the hand.
What it is: Scanning the unique pattern of blood vessels at the back of the eye (retina).
What it is: Identifying individuals based on the unique characteristics of their voice, such as tone,
pitch, and frequency.
pg. 11 By Ghanshyam
Behavioral Biometrics : These are based on patterns of behavior and habits unique to an individual.
What it is: Recognizing the way a person writes their signature or other text, including pressure,
speed, and stroke patterns.
2. Keystroke Dynamics
What it is: Analyzing the way a person types on a keyboard, such as typing speed, rhythm, and
dwell time (time spent on a key).
Advantages of Biometrics
2. Convenient for users (no need to remember passwords or carry extra devices).
Limitations of Biometrics
pg. 12 By Ghanshyam
Access Control is a fundamental concept in cybersecurity that defines and enforces rules to determine who
can access a system or resource, what they can do, and how their activities are monitored. Here’s an
overview of the key components and mechanisms of access control:
Enforcing policies that define what actions authorized users can perform.
2. Authentication Mechanisms
Authentication is the process of verifying an entity's identity before granting access. Common mechanisms
include:
Password-Based Authentication
Biometric Authentication
Uses unique physical traits like fingerprints, retina patterns, or voice recognition.
Token-Based Authentication
Certificate-Based Authentication
Principal Authentication
pg. 13 By Ghanshyam
3. Authorization : Once authenticated, authorization determines what actions the authenticated entity is
allowed to perform. Examples:
Policies define the rules governing access to resources. Common models include:
Example: File permissions in operating systems, where the file owner decides who can read,
write, or execute.
Definition: Access is enforced based on fixed security policies and labels (e.g., classification
levels like Confidential, Secret, Top Secret).
Definition: Access is based on roles assigned to users (e.g., Administrator, Editor, Viewer).
Example: A manager might have access to employee data, while a staff member does not.
pg. 14 By Ghanshyam
Authentication, Authorization, and Audit Policies
Authentication Policies: Define how identities are verified (e.g., password complexity, MFA).
Authorization Policies:
Audit Policies:
pg. 15 By Ghanshyam
Unit 03 : Crytography
o Plaintext refers to the original, readable message or data that needs to be protected from
unauthorized access.
o Example: A text message like "Hello, how are you?" is plaintext before encryption.
2. Ciphertext:
3. Cryptography:
o Cryptography is the science and art of converting plaintext into ciphertext (encryption) and
back into plaintext (decryption) to ensure secure communication.
o Example Techniques: Symmetric encryption (AES, DES) and Asymmetric encryption (RSA,
ECC).
4. Cryptoanalysis:
5. Cryptology:
6. Encryption:
o Encryption is the process of converting plaintext into ciphertext using an algorithm and an
encryption key.
pg. 16 By Ghanshyam
o Example: Using AES to encrypt a file for secure storage.
7. Decryption:
o Decryption is the reverse process of encryption, where ciphertext is converted back into
readable plaintext using a decryption key.
o Example: Receiving an encrypted email and decrypting it using the appropriate private key to
read its content.
Substitution techniques involve replacing elements of plaintext with corresponding elements to generate
ciphertext. Each character or group of characters is substituted with another, based on a predefined rule.
Caesar Cipher
Description:
The Caesar cipher is a simple substitution cipher where each letter in the plaintext is shifted by a
fixed number of positions in the alphabet.
Encryption Formula:
C=(P+k)mod 26C = (P + k) \mod 26C=(P+k)mod26
PPP is the position of the plaintext letter, kkk is the shift (key), CCC is the position of the ciphertext
letter.
Decryption Formula:
P=(C−k)mod 26P = (C - k) \mod 26P=(C−k)mod26
Example:
Plaintext: "HELLO"
Key: 3
Encryption:
H → K, E → H, L → O, L → O, O → R
Ciphertext: "KHOOR"
Decryption:
Reverse the shift: "KHOOR" → "HELLO"
Description:
A variation of the Caesar cipher that uses a different shift for each character, often derived from a
keyphrase or a more complex algorithm.
pg. 17 By Ghanshyam
Example:
Use the numeric position of letters in the key to determine the shift dynamically.
Plaintext: "HELLO"
o H → Shift by 10 → "R"
o E → Shift by 4 → "I"
o L → Shift by 24 → "J"
o L → Shift by 10 → "V"
o O → Shift by 4 → "S"
Ciphertext: "RIJVS"
Description:
Each letter in the plaintext is replaced with another letter according to a substitution table.
Types:
2. Transportation Techniques
Transportation techniques involve rearranging the order of characters in the plaintext to produce ciphertext
without altering the actual letters.
Description:
The plaintext is written in rows of fixed length (columns), and the ciphertext is generated by reading
the columns in a specific order.
Encryption Steps:
Example:
pg. 18 By Ghanshyam
mathematica
CopyEdit
HELL
OWOR
LDXX
Read columns:
Column Order: 1, 3, 2, 4
Ciphertext: "HOLWLEDXORLX"
Steganography: Procedure
Steganography is the practice of hiding a secret message within another medium (such as an image, audio,
video, or text) in such a way that it remains undetectable to unauthorized viewers. Unlike encryption,
which makes the message unintelligible, steganography hides the existence of the message.
o Select a digital medium (e.g., image, audio, video, or text) to act as the cover object in which
the secret message will be hidden.
o Ensure the secret message (e.g., text, image, or file) is formatted correctly.
o If the message is too large, it might need compression or encryption before embedding.
o Use a steganographic algorithm or software to embed the secret message into the carrier
file. -Common techniques include:
Text-Based Methods:
Alter formatting, spacing, or characters in text files.
pg. 19 By Ghanshyam
4. Generate the Stego File
o The carrier file with the embedded message is called the stego file.
o The stego file should appear identical to the original carrier file to avoid detection.
o Share the stego file via secure or insecure channels, depending on the level of secrecy
required.
o The recipient uses a de-steganography tool or algorithm to retrieve the secret message from
the stego file.
o This process typically requires a key or password if the embedding was secured.
Procedure:
2. Replace the least significant bit of selected pixels in the image with these bits.
R: 10110010 → 10110010
Applications of Steganography
pg. 20 By Ghanshyam
Introduction to Symmetric and Asymmetric Cryptography
Symmetric Cryptography (Symmetric Encryption)
Definition:
In symmetric cryptography, the same key is used for both encryption and decryption.
Key Features:
o Key Management: Requires secure sharing of the key between sender and receiver.
Example:
o Plaintext: "HELLO"
o Key: "1234"
Description:
DES is a widely used symmetric key encryption algorithm designed for secure data transmission. It
encrypts data in fixed-size blocks of 64 bits using a 56-bit key.
1. Key Preparation: A 56-bit key is generated and expanded to 64 bits by adding parity bits.
2. Initial Permutation: Rearranges the bits of the plaintext according to a fixed table.
Each round involves substitution, permutation, and XOR operations using a sub-key
derived from the main key.
Limitations:
pg. 21 By Ghanshyam
Asymmetric Cryptography (Asymmetric Key Encryption)
Definition:
In asymmetric cryptography, a pair of keys (public and private) is used:
Key Features:
Example:
o Public Key: Encrypts the message. Private Key: Decrypts the ciphertext.
A Digital Signature is a cryptographic technique used to ensure the authenticity and integrity of digital
data. It relies on asymmetric encryption.
How it Works:
o The original message is passed through a hashing algorithm (e.g., SHA-256) to generate a
fixed-size hash value.
o The sender encrypts the hash using their private key. This encrypted hash is the digital
signature.
o The sender transmits both the original message and the digital signature.
4. Verification by Receiver:
o The receiver decrypts the digital signature using the sender’s public key to get the hash.
Applications:
Verifying the identity of the sender. Used in SSL certificates, blockchain, and
software distribution.
Ensuring data integrity.
pg. 22 By Ghanshyam