Sample Questions and Answers
Which of the following techniques can be used to prevent SQL Injection?
A. Input validation and prepared statements
B. Installing antivirus software
C. Using VPN
D. Encrypting passwords
Answer: A. Input validation and prepared statements
Explanation: Validating inputs and using parameterized queries prevent injection attacks.
What does the term ‘zero-day vulnerability’ mean?
A. A vulnerability discovered and patched immediately
B. A vulnerability unknown to the vendor and exploited before a patch is available
C. An old vulnerability no longer exploitable
D. A vulnerability in antivirus software
Answer: B. A vulnerability unknown to the vendor and exploited before a patch is available
Explanation: Zero-day exploits take advantage of unpatched, unknown flaws.
Which of the following best describes ‘pivoting’ in penetration testing?
A. Accessing a network via a compromised host to reach other systems
B. Restarting the system after attack
C. Scanning IP addresses
D. Performing a denial of service attack
Answer: A. Accessing a network via a compromised host to reach other systems
Explanation: Pivoting expands the attacker’s access inside a network through a compromised machine.
What is ‘port scanning’ used for?
A. To gather information about open ports and services on a target system
B. To crack passwords
C. To encrypt network traffic
D. To exfiltrate data
Answer: A. To gather information about open ports and services on a target system
Explanation: Port scans identify network services that may be vulnerable.
Which security model focuses on data confidentiality and controlled access?
A. Bell-LaPadula model
B. Clark-Wilson model
C. Biba model
D. Brewer and Nash model
Answer: A. Bell-LaPadula model
Explanation: Bell-LaPadula enforces confidentiality by restricting access based on clearance levels.
What is the purpose of a ‘firewall’?
A. To encrypt data
B. To filter incoming and outgoing network traffic based on security rules
C. To scan for malware
D. To detect unauthorized access
Answer: B. To filter incoming and outgoing network traffic based on security rules
Explanation: Firewalls enforce security policies by allowing or blocking traffic.
What does ‘DNS poisoning’ involve?
A. Altering DNS records to redirect users to malicious sites
B. Encrypting DNS queries
C. Blocking DNS requests
D. Capturing passwords
Answer: A. Altering DNS records to redirect users to malicious sites
Explanation: DNS poisoning redirects users to fraudulent IPs by corrupting DNS data.
What is the function of ‘Wireshark’ in penetration testing?
A. Network protocol analyzer used to capture and inspect packets
B. Password cracking tool
C. Exploit framework
D. Vulnerability scanner
Answer: A. Network protocol analyzer used to capture and inspect packets
Explanation: Wireshark captures live traffic to analyze network behavior.
Which attack exploits browser vulnerabilities to steal session cookies?
A. Cross-Site Scripting (XSS)
B. SQL Injection
C. Brute force attack
D. Man-in-the-Middle
Answer: A. Cross-Site Scripting (XSS)
Explanation: XSS injects malicious scripts that steal cookies and hijack sessions.
What is the best way to defend against Cross-Site Scripting attacks?
A. Use input validation and output encoding
B. Use strong passwords
C. Disable JavaScript
D. Encrypt data
Answer: A. Use input validation and output encoding
Explanation: Validating and sanitizing inputs prevent malicious scripts from running.
What is the main purpose of a ‘buffer overflow’ attack?
A. To inject malicious code by overflowing the memory buffer
B. To scan open ports
C. To perform DoS by exhausting bandwidth
D. To steal user credentials
Answer: A. To inject malicious code by overflowing the memory buffer
Explanation: Buffer overflow attacks overwrite memory, allowing execution of arbitrary code.
Which method is commonly used to detect buffer overflow vulnerabilities?
A. Static code analysis
B. Packet sniffing
C. Phishing
D. Social engineering
Answer: A. Static code analysis
Explanation: Static analysis scans source code for unsafe buffer handling practices.
What is a ‘race condition’ vulnerability?
A. When two processes access shared resources simultaneously leading to unexpected behavior
B. When passwords are guessed too fast
C. When a virus spreads rapidly
D. When network traffic is rerouted
Answer: A. When two processes access shared resources simultaneously leading to unexpected behavior
Explanation: Race conditions arise from timing issues causing security flaws.
What is the primary purpose of the OWASP Top Ten?
A. To list the top ten most critical web application security risks
B. To rank the best antivirus software
C. To identify network devices
D. To list firewall vendors
Answer: A. To list the top ten most critical web application security risks
Explanation: OWASP Top Ten is a widely used guide for web app security threats.
Which protocol is used for secure remote shell access?
A. Telnet
B. SSH
C. FTP
D. HTTP
Answer: B. SSH
Explanation: SSH encrypts data for secure remote command line access.
What is the function of a ‘demilitarized zone’ (DMZ) in network architecture?
A. To isolate an external-facing network segment from the internal network
B. To store backups
C. To encrypt data traffic
D. To run antivirus scans
Answer: A. To isolate an external-facing network segment from the internal network
Explanation: DMZ provides a buffer zone for public-facing services, protecting the internal network.
Which of the following is a vulnerability scanner?
A. Nessus
B. Metasploit
C. Wireshark
D. John the Ripper
Answer: A. Nessus
Explanation: Nessus scans systems to identify security weaknesses.
What is the best definition of ‘phishing’?
A. Sending fraudulent emails to trick users into revealing sensitive information
B. Scanning for open ports
C. Capturing network packets
D. Exploiting SQL Injection
Answer: A. Sending fraudulent emails to trick users into revealing sensitive information
Explanation: Phishing uses social engineering via fake emails or websites.
Which type of attack involves overwhelming a server with traffic to make it unavailable?
A. Man-in-the-Middle
B. Denial of Service (DoS)
C. SQL Injection
D. Cross-Site Scripting
Answer: B. Denial of Service (DoS)
Explanation: DoS floods a system with excessive requests to disrupt service.
What is the difference between IDS and IPS?
A. IDS detects and alerts; IPS detects and prevents attacks
B. IDS prevents attacks; IPS detects only
C. IDS is a firewall; IPS is antivirus
D. IDS is hardware; IPS is software
Answer: A. IDS detects and alerts; IPS detects and prevents attacks
Explanation: IDS monitors and alerts, IPS actively blocks threats.
What is the purpose of ‘salting’ in password security?
A. To add random data to passwords before hashing to prevent rainbow table attacks
B. To encrypt passwords with a key
C. To store passwords in plain text
D. To speed up authentication
Answer: A. To add random data to passwords before hashing to prevent rainbow table attacks
Explanation: Salting makes hashes unique, even if passwords are the same.
What is the primary function of a Public Key Infrastructure (PKI)?
A. To manage digital certificates and public-key encryption
B. To encrypt hard drives
C. To detect malware
D. To manage firewall rules
Answer: A. To manage digital certificates and public-key encryption
Explanation: PKI issues, manages, and revokes digital certificates for secure communication.
Which tool can be used for password cracking by performing dictionary attacks?
A. John the Ripper
B. Nmap
C. Nessus
D. Wireshark
Answer: A. John the Ripper
Explanation: John the Ripper tries passwords from a dictionary list to crack hashes.
What does ‘two-factor authentication’ (2FA) require?
A. Two different methods of verifying identity, e.g., password + token
B. Two passwords
C. Password and username
D. Encryption of data
Answer: A. Two different methods of verifying identity, e.g., password + token
Explanation: 2FA combines something you know and something you have or are.
Which attack targets the confidentiality of communication by eavesdropping?
A. Replay attack
B. Sniffing attack
C. Brute force attack
D. Buffer overflow
Answer: B. Sniffing attack
Explanation: Sniffing captures network traffic to gather sensitive data.
What is the main benefit of network segmentation?
A. Limits lateral movement of attackers and confines breaches
B. Speeds up the network
C. Reduces hardware costs
D. Simplifies password management
Answer: A. Limits lateral movement of attackers and confines breaches
Explanation: Segmentation isolates network parts to prevent widespread compromise.
Which term describes software that records user activity without consent?
A. Spyware
B. Virus
C. Worm
D. Trojan
Answer: A. Spyware
Explanation: Spyware secretly monitors and reports user activity.
What type of attack exploits weaknesses in the trust relationship between users and systems?
A. Social engineering
B. SQL Injection
C. Phishing
D. Cross-Site Request Forgery (CSRF)
Answer: D. Cross-Site Request Forgery (CSRF)
Explanation: CSRF tricks a user’s browser to execute unauthorized commands.
What is ‘credential stuffing’?
A. Using stolen username/password pairs on multiple websites to gain unauthorized access
B. Brute forcing passwords
C. Encrypting credentials
D. Phishing credentials
Answer: A. Using stolen username/password pairs on multiple websites to gain unauthorized access
Explanation: Credential stuffing automates login attempts using leaked credentials.
Which of the following is an example of multi-factor authentication?
A. Password + fingerprint
B. Password + username
C. Password only
D. PIN only
Answer: A. Password + fingerprint
Explanation: MFA requires at least two different categories of credentials.
What is the primary objective of network reconnaissance?
A. To gather detailed information about network topology and hosts
B. To exploit vulnerabilities
C. To launch DoS attacks
D. To encrypt traffic
Answer: A. To gather detailed information about network topology and hosts
Explanation: Reconnaissance identifies targets and potential weaknesses.
What technique can prevent unauthorized physical access to a data center?
A. Biometric access controls
B. Firewall
C. Encryption
D. VPN
Answer: A. Biometric access controls
Explanation: Biometrics restrict access based on physical characteristics.
What does ‘steganography’ refer to in cybersecurity?
A. Hiding data within another file or message
B. Encrypting data with a key
C. Scrambling network packets
D. Capturing credentials
Answer: A. Hiding data within another file or message
Explanation: Steganography conceals the presence of data rather than encrypting it.
Which type of wireless attack involves intercepting and decrypting wireless communications?
A. Evil Twin attack
B. Man-in-the-Middle attack
C. War driving
D. Phishing
Answer: B. Man-in-the-Middle attack
Explanation: The attacker sits between two wireless parties to capture or alter communication.
What is the purpose of a ‘digital signature’?
A. To verify the authenticity and integrity of a message or document
B. To encrypt data
C. To store passwords
D. To block spam emails
Answer: A. To verify the authenticity and integrity of a message or document
Explanation: Digital signatures prove who sent a message and confirm it wasn’t altered.
What kind of attack attempts to overload a system’s resources by sending malformed or excessive traffic?
A. Denial of Service (DoS)
B. SQL Injection
C. Cross-Site Scripting
D. Man-in-the-Middle
Answer: A. Denial of Service (DoS)
Explanation: DoS floods resources causing systems to crash or become unavailable.
What is the main goal of ‘penetration testing’?
A. To identify and exploit vulnerabilities to assess security posture
B. To encrypt data
C. To backup system data
D. To install antivirus
Answer: A. To identify and exploit vulnerabilities to assess security posture
Explanation: Pen testing simulates attacks to find weaknesses before real attackers do.
Which of the following best describes ‘exploit development’?
A. Creating code that takes advantage of vulnerabilities in software or systems
B. Creating firewalls
C. Setting up antivirus
D. Encrypting data
Answer: A. Creating code that takes advantage of vulnerabilities in software or systems
Explanation: Exploit development is the process of writing software to exploit security flaws.
What is ‘ethical hacking’?
A. Authorized simulated attacks to improve security
B. Illegal hacking
C. Stealing data
D. Cracking passwords without permission
Answer: A. Authorized simulated attacks to improve security
Explanation: Ethical hackers test systems legally to find and fix vulnerabilities.
What is a ‘sandbox’ in cybersecurity?
A. An isolated environment to safely execute untrusted code or files
B. A firewall rule set
C. An encryption algorithm
D. A backup system
Answer: A. An isolated environment to safely execute untrusted code or files
Explanation: Sandboxes contain threats and prevent them from affecting production systems.
Reviews
There are no reviews yet.