technology
beginner
10 sample questions
Hacking Techniques MCQ Practice Test
Penetration testing, social engineering, and vulnerabilities
Q1. Which technique is commonly used to defeat Address Space Layout Randomization (ASLR)?
-
A. An information-leak vulnerability that reveals actual memory addresses ✓
-
B. Brute-forcing a 4096-bit key
-
C. Disabling the local firewall
-
D. A dictionary attack on passwords
Explanation: ASLR randomizes where code and data live, so attackers first need an info leak (e.g., a format-string or out-of-bounds read) to learn real addresses before redirecting execution. The keyed 'zero-day against a patched vulnerability' was self-contradictory.
Q2. An attacker uses a technique to inject malicious code into a web application by manipulating a web page's URL, exploiting a vulnerability in the way the application handles user-supplied input. This technique is commonly used in conjunction with a specific type of web vulnerability. What is the name of this technique?
-
A. Path Traversal
-
B. Cross-Site Scripting (XSS) ✓
-
C. SQL Injection
-
D. Cross-Site Request Forgery (CSRF)
Explanation: Cross-Site Scripting (XSS) is a type of web vulnerability that allows an attacker to inject malicious code into a web page, which is then executed by the user's browser. This can be achieved by manipulating a web page's URL, exploiting a vulnerability in the way the application handles user-supplied input. XSS is often used in conjunction with other techniques, such as SQL Injection, to achieve a specific goal.
Q3. An attacker uses a technique to manipulate the browser's URL bar to display a fake login page. This technique involves exploiting the "protocol-relative" URL feature in web browsers, which allows a URL to be specified without a protocol prefix. What is the name of this technique?
-
A. Domain Fronting
-
B. Virtual Host Switching
-
C. Protocol Relative URL Hijacking ✓
-
D. Frame Injection
Explanation: Protocol Relative URL Hijacking is a technique used by attackers to manipulate the browser's URL bar and display a fake login page. This is done by exploiting the "protocol-relative" URL feature in web browsers, which allows a URL to be specified without a protocol prefix. The attacker can then use this feature to load a malicious page that appears to be a legitimate login page, tricking the user into entering their credentials.
Q4. An attacker uses a technique to manipulate the DNS resolver cache to redirect users to a malicious website. This technique is known as \\u201C\\u2026\\u201D
-
A. DNS Rebinding
-
B. DNS Spoofing
-
C. DNS Tunneling
-
D. DNS Cache Poisoning ✓
Explanation: DNS Cache Poisoning is a type of attack where an attacker manipulates the DNS resolver cache to redirect users to a malicious website. This can be done by inserting false DNS records into the cache, allowing the attacker to intercept and modify traffic intended for a legitimate website.
Q5. An attacker uses a technique to inject malicious JavaScript code into a web page by manipulating the document object model (DOM) of a vulnerable web application. This technique is known as:
-
A. SQL Injection
-
B. Cross-Site Scripting (XSS) ✓
-
C. Cross-Site Request Forgery (CSRF)
-
D. Buffer Overflow
Explanation: Cross-Site Scripting (XSS) is a type of web application security vulnerability that allows an attacker to inject malicious JavaScript code into a web page. This code is then executed by the user's browser, potentially leading to unauthorized access or actions. The attacker manipulates the DOM of the vulnerable web application to inject the malicious code, making it difficult for the application to distinguish between legitimate and malicious input.
Q6. What is HTTP Request Smuggling?
-
A. Desynchronizing a front-end proxy and back-end server with ambiguous requests (CL.TE, TE.CL) so smuggled requests execute in another user's connection ✓
-
B. Flooding a server with oversized file uploads
-
C. Injecting JavaScript into error pages
-
D. DNS cache poisoning
Explanation: Smuggling exploits differing interpretations of Content-Length versus Transfer-Encoding between chained servers, letting an attacker prepend hidden requests to other users' traffic. The original's 'too many parameters' description was wrong.
Q7. An attacker uses a technique to exploit a vulnerability in a web application by manipulating the user-controlled input to inject malicious SQL code. The technique involves using a combination of single quotes and whitespace characters to bypass the web application's input validation. What is the name of this technique?
-
A. SQL Injection ✓
-
B. Cross-Site Scripting (XSS)
-
C. Cross-Site Request Forgery (CSRF)
-
D. Server-Side Request Forgery (SSRF)
Explanation: This technique is a type of injection attack where an attacker injects malicious SQL code into a web application's database to extract or modify sensitive data. The use of single quotes and whitespace characters is a common method to bypass input validation and execute malicious SQL code.
Q8. An attacker manipulates client-side validation in a web application to inject malicious code. This technique is primarily used to:
-
A. Bypass security checks and execute malicious scripts ✓
-
B. Exploit Insecure Direct Object References (IDOR)
-
C. Perform Server-Side Request Forgery (SSRF)
-
D. Inject code into server-side templates
Explanation: By manipulating client-side validation, an attacker can bypass security checks and inject malicious code, such as JavaScript, which can then be executed by the user's browser. This can lead to various attacks, including cross-site scripting (XSS).
Q9. An attacker uses a technique to manipulate the DNS protocol to redirect users to a malicious website by poisoning the DNS cache. This technique is known as what?
-
A. DNS Tunneling
-
B. DNS Spoofing ✓
-
C. DNS Rebinding
-
D. DNS Amplification
Explanation: DNS Spoofing, also known as DNS cache poisoning, involves injecting false DNS records into a DNS resolver's cache, causing users to be redirected to a malicious website when they attempt to access a legitimate domain.
Q10. An attacker uses a technique to manipulate a legitimate user into performing a specific action, which ultimately leads to the compromise of a system. This technique is known as
-
A. Baiting
-
B. Phishing
-
C. Pretexting ✓
-
D. Quid Pro Quo
Explanation: Pretexting is a social engineering technique where an attacker creates a false scenario or story to trick a user into divulging sensitive information or performing a specific action, which can compromise the system's security.
That was just a sample. Sign up to unlock the full question bank with timed tests and certificates.
Sign Up Free