A:
● IDS (Intrusion Detection System): Detects malicious activity and alerts administrators
but does not take any action.
● IPS (Intrusion Prevention System): Detects and actively blocks malicious traffic.
A:
A Web Application Firewall (WAF) protects web applications from attacks like SQL Injection,
Cross-Site Scripting (XSS), and CSRF by filtering and monitoring HTTP traffic.
A:
A Virtual Private Cloud (VPC) is an isolated cloud network that provides security,
segmentation, and control over networking configurations. It enables private subnets, security
groups, and network ACLs for secure resource deployment.
2. Linux Commands
A:
A:
traceroute identifies the path packets take to reach a destination by sending packets with
incrementing TTL values and listening for ICMP "Time Exceeded" responses.
A:
python
CopyEdit
numbers = [3, 8, 2, 10, 5]
max_value = max(numbers)
print("Maximum number:", max_value)
A:
bash
CopyEdit
git init
Q9: What is the difference between git pull and git fetch?
A:
5. SQL Query
Q10: Write an SQL query to find the second highest salary.
A:
sql
CopyEdit
SELECT MAX(salary) AS second_highest_salary
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);
A:
A:
A:
A:
A:
Sniffing captures network traffic to steal sensitive data. Prevention methods include:
A:
A:
A:
A digital certificate verifies the identity of an entity and is issued by a Certificate Authority
(CA).
A:
A digital signature uses asymmetric encryption (private key for signing, public key for
verification) to ensure integrity and non-repudiation.
A:
A:
● Rate limiting
● Traffic filtering (WAF, IDS/IPS)
● CDN and load balancers
● Anycast routing
13. Protecting Web Applications from Attacks
Q22: How do you protect a web application?
A:
A:
A:
Single Sign-On (SSO) allows users to log in once and access multiple applications without
re-entering credentials. It works using OAuth, SAML, or OpenID Connect.
A:
VLAN Trunking Protocol (VTP) propagates VLAN configurations across switches in a network.
17. IP Classes
Q27: What are the five IP classes?
A:
A: The OSI (Open Systems Interconnection) model has the following layers:
A:
A:
A:
A:
A:
A:
A:
A:
NAT translates private IP addresses into a public IP to enable devices in a private network to
access the internet. It helps conserve IPv4 addresses.
A:
● Hard Link: Direct reference to the same inode as the original file (remains even if the
original file is deleted).
● Soft Link (Symbolic Link): A pointer to another file’s location (breaks if the original file
is deleted).
A:
A:
● Cron: Traditional task scheduler that runs jobs based on a specific schedule.
● Systemd Timers: Modern alternative, integrated with systemd, offering better logging
and flexibility.
A:
● Private Key: Kept secret, used for decryption (asymmetric) or both encryption and
decryption (symmetric).
● Public Key: Shared publicly, used for encryption in asymmetric cryptography (e.g.,
RSA).
A:
A hash collision occurs when two different inputs produce the same hash value. This can be a
security risk in hashing algorithms like MD5 and SHA-1.
A:
IaC is the practice of managing infrastructure using code instead of manual processes (e.g.,
Terraform, Ansible, CloudFormation).
A:
Q13: What is a container, and how does it differ from a virtual machine
(VM)?
A:
● Container: Lightweight, shares the host OS kernel (e.g., Docker).
● VM: Runs a full OS on a hypervisor, with separate system resources.
A:
Social engineering is manipulating people to gain unauthorized access (e.g., phishing,
pretexting). Prevention methods include:
A:
7. Web Security
Q16: What are HTTP security headers, and why are they important?
A:
HTTP security headers protect web applications from attacks. Examples:
A:
PoLP ensures users and systems have the minimum required permissions to perform their
tasks, reducing the risk of security breaches.
A:
9. Cloud Security
Q20: What are shared responsibility models in cloud security?
A:
Cloud security is a shared responsibility between the cloud provider and the customer:
A:
● IaaS (Infrastructure as a Service): Provides virtual machines, storage (AWS EC2,
Azure VM).
● PaaS (Platform as a Service): Provides managed runtime environments (AWS Elastic
Beanstalk).
● SaaS (Software as a Service): Provides complete applications (Google Workspace,
Office 365).
A:
A:
SIEM (Security Information and Event Management) collects and analyzes logs from
different sources to detect security threats in real-time.
A:
Chain of custody refers to documenting how digital evidence is collected, handled, and stored
to ensure its integrity in legal proceedings.
A: Zero Trust Security is a model where no one is trusted by default, whether inside or outside
the network. It requires:
Q2: What is the difference between an attack vector and an attack surface?
A:
● Attack Vector: The method used by attackers to exploit a vulnerability (e.g., phishing,
SQL injection).
● Attack Surface: The total number of points where an attacker can try to enter a system
(e.g., open ports, weak passwords).
A:
A:
The ARP (Address Resolution Protocol) table maps IP addresses to MAC addresses within
a local network. It helps devices communicate by translating network-layer addresses to
physical addresses.
Q5: What is BGP, and why is it important?
A:
BGP (Border Gateway Protocol) is a routing protocol used to exchange routing information
between different autonomous systems (AS) on the internet. It ensures efficient and scalable
internet routing.
A:
A:
Using netstat:
bash
CopyEdit
netstat -tulnp
●
Using ss:
bash
CopyEdit
ss -tulnp
●
Using nmap:
bash
CopyEdit
nmap -p- <IP_address>
●
A:
● /etc/passwd: Stores user account information (username, UID, GID, home directory).
● /etc/shadow: Stores encrypted passwords and password policies.
A:
A salt is a random string added to a password before hashing to prevent rainbow table
attacks.
A:
A:
A reverse proxy sits between clients and backend servers, providing:
● Load balancing.
● SSL termination.
● Caching for better performance.
A:
Blue-Green Deployment is a strategy where two identical environments are maintained:
A:
A Pod is the smallest deployable unit in Kubernetes, containing one or more containers that
share storage and network resources.
A:
A:
Session hijacking occurs when an attacker steals a valid user session to gain unauthorized
access. Prevention:
7. Web Security
Q16: What is a Clickjacking attack?
A:
Clickjacking tricks users into clicking hidden UI elements.
Mitigation:
A:
A race condition occurs when two processes access shared resources simultaneously, leading
to unexpected behavior or security vulnerabilities.
A:
Kerberos is a network authentication protocol that uses tickets to allow secure communication
over an untrusted network.
A:
OAuth tokens grant access to a user's data without exposing their password. Used in SSO
(Single Sign-On) and API authentication.
Example: OAuth is used in Google and Facebook login systems.
9. Cloud Security
Q20: What is the difference between public, private, and hybrid clouds?
A:
A:
A:
● Volatile Data: Exists in RAM, lost on power-off (e.g., running processes, open network
connections).
● Non-Volatile Data: Stored on disks, survives reboots (e.g., log files, emails).
A:
Steganography is hiding information inside other files (e.g., images, audio) to evade detection.
Example: Hiding text in an image using LSB (Least Significant Bit) encoding.
11. Security Logging & Monitoring
Q24: What is an IDS false positive and false negative?
A:
Tuning IDS rules reduces false positives while maintaining detection accuracy.
A: