Attack Methods & Defenses | Test-2
This section focuses on identifying potential attack vectors and evaluating the system’s resilience against various types of cyberattacks. Tests include simulating common attacks like SQL injection, cross-site scripting (XSS), denial-of-service (DoS), brute-force attacks, and man-in-the-middle (MITM) attacks. The goal is to assess the effectiveness of implemented security controls and defenses, such as input validation, encryption, intrusion detection systems (IDS), firewalls, and rate limiting. This section also evaluates the system’s ability to detect, prevent, and respond to active attacks, ensuring comprehensive protection against potential threats.
1 / 29
1. A _______ is a type of malicious software or code that is designed to execute a harmful action when specific conditions are met, such as a particular date or event. It is typically intended to damage or disrupt a computer system or network.
A logic bomb is a sequence of instructions in a program that can attack an operating system, a program, or a network by delivering a malicious payload. It doesn’t start unless a certain conditions are met. These restrictions can be as straightforward as a particular day or hour. An even more complicated illustration is when a company fires an employee and records the termination in its database.
2 / 29
2. Among the below types of attacks, identify the web application attack in which attackers exploit vulnerabilities in dynamically generated web pages to inject client-side script into web pages that other users view.
An attacker can deliver malicious code to a separate end user without having it validated or encoded whenever an application accepts user input inside the output it produces. These are chances for Cross-Site Scripting (XSS) attacks to introduce malicious scripts into reliable websites. During a Cross-Site Scripting attack, text with malicious code (mostly in JavaScript) is added to a web page. The code is run when an oblivious user accesses that website.
3 / 29
3. What type of Cross Site Scripting (XSS) vulnerability allows malicious scripts to be executed in the context of another user’s browser?
Reflected XSS , Stored XSS and DOM-based XSS are different variants of Cross Site Scripting XSS
4 / 29
4. A _____________ attack is a type of cyber attack where an attacker tricks a user’s browser into unknowingly submitting a request on a website on which the user is authenticated. This can lead to unauthorized actions being performed on behalf of the user without their consent.
Cross-Site Request Forgery (CSRF) is an attack that compels a user who is currently logged in to a web application to perform undesirable actions.
An attacker can employ a little social engineering to persuade users of an online application to carry out their desired activities (for example, by delivering a link via email or chat). If the victim is a regular user, a successful CSRF attack can compel them to carry out state-changing operations like money transfers, email address changes, and other such tasks. The entire web application may be compromised by CSRF if the victim is an administrative account.
5 / 29
5. A well-known and common attack type against web servers and web applications is __________.
A buffer overflow in web applications occurs when excessive data is input into a program’s memory buffer, causing it to overflow and potentially allowing attackers to overwrite adjacent memory. This can be exploited in web applications to execute malicious code, compromise security, or crash the application, leading to potential vulnerabilities. Proper input validation and secure coding practices help mitigate the risk of buffer overflow attacks in web applications.
6 / 29
6. A buffer overflow attack aims to inject malicious code by exceeding the allocated memory buffer. Which programming language is particularly vulnerable to such attacks?
Buffer overflows are closely related to C++ because they often occur when a program written in C++ (or C) fails to properly check or control the size of input data being placed into a memory buffer. If the input exceeds the allocated buffer size, it can overwrite adjacent memory, leading to unpredictable behavior, crashes, or security vulnerabilities. This vulnerability is a common issue in languages like C++ where manual memory management is prevalent, making it essential for developers to carefully manage and validate input data to prevent buffer overflows.
7 / 29
7. Using which security flaw an attacker to access any files on the server hosting an application. This could comprise critical operating system files, back-end system login information, and application code and data.
Directory browsing or directory indexing is a web server feature that allows users to view the contents of a directory (folder) through a web browser. When enabled, it displays a list of files and subdirectories within that directory. If directory indexing is disabled, the server may show a default page or return an error when someone tries to access the directory directly. This feature can pose a security risk if sensitive information or files are inadvertently exposed to the public.
8 / 29
8. According to OWASP, The __________ attack compromises the session token by stealing or predicting a valid session token to gain unauthorized access to the Web Server.
A session hijacking attack occurs when an unauthorized user takes over an active session between a client and a web application. This can happen through various means, such as stealing session cookies, session IDs, or exploiting vulnerabilities. Once hijacked, the attacker gains access to the victim’s session and can potentially impersonate them, accessing sensitive information or performing actions on their behalf without permission
9 / 29
9. Using which of the methods session hijacking cannot be performed?
All are techniques to know the session identifier, except CSRF which is an attack that compels a user who is currently logged in to a web application to perform undesirable actions
10 / 29
10. How to By-pass client-side controls for HTML form validation?
Hereโs how each method can bypass client-side controls for HTML form validation:
Disable JavaScript in Browser: HTML form validation often relies on JavaScript for enforcing rules (e.g., required fields, correct formats). Disabling JavaScript can bypass this validation, allowing you to submit the form without client-side restrictions.
Using Manual Tools like Burp Suite: Burp Suite allows you to intercept and modify HTTP requests. You can capture the request that the form generates and manually edit the values, bypassing any client-side validation enforced by the browser.
Using Automated Tools like Nikto: Nikto is a web server scanner that can test for various security vulnerabilities, including issues that arise when client-side validation can be bypassed. It automates the detection of these potential vulnerabilities.
11 / 29
11. In a Zero-Day Attack, what does “Zero-Day” refer to?
In the context of a zero-day attack, “zero-day” refers to the fact that the exploit or vulnerability being targeted is unknown to the software vendor or the public. Essentially, it’s a security flaw in software that the developers have had zero days to address or fix. Attackers take advantage of these undisclosed vulnerabilities to launch attacks before the software developers can release a patch or fix.
12 / 29
12. A _______ attack circumvents the system’s usual security measures to gain access to a computer system or encrypted information. An application, operating system, or data may have it created by a developer that allows access for debugging or other purposes. Attackers might detect it and use if for nefarious purposes. Choose the correct term from below?
Backdoor attacks involve the unauthorized creation or exploitation of hidden entry points (backdoors) in a system, allowing attackers to bypass regular security mechanisms and gain access or control. These backdoors can be used for various malicious purposes, such as unauthorized access, data theft, or facilitating future attacks.
13 / 29
13. Is it a good practice to reply to users during authentication by sending them detailed error messages?
Verbose failure messages provide excessive information about the system’s security mechanisms, potentially aiding attackers by revealing insights into the system’s configuration or vulnerabilities. Attackers can use this information to tailor their strategies and exploit weaknesses more effectively. It’s a security best practice to limit the details provided in error or failure messages to thwart potential attackers.
14 / 29
14. What is website defacement?
Website defacement is the unauthorized alteration of the visual appearance or content of a website by attackers. This can involve replacing the original content with their own messages, images, or other elements, often to convey a political, social, or malicious message.
15 / 29
15. Which attack involves modifying the Hosts file or DNS server to redirect a legitimate website’s traffic to a malicious website?
Domain hijacking is the unauthorized acquisition of control over a domain name, usually by exploiting security vulnerabilities or unauthorized access to domain registration accounts. Attackers gain control over the domain, potentially disrupting services, redirecting traffic, or engaging in malicious activities using the hijacked domain.
16 / 29
16. What web application vulnerability allows attackers to steal session cookies for unauthorized access?
Clickjacking is a type of cyber attack where a malicious website overlays an invisible layer on top of a legitimate website, tricking users into clicking on hidden elements without their knowledge. This can lead to unintended actions, such as initiating downloads, enabling permissions, or making unwanted transactions, all while the user believes they are interacting with the visible content of the legitimate site.
17 / 29
17. A unique characteristic of a polymorphic virus is it.
A polymorphic virus is a type of computer virus that can change its code or appearance while maintaining its original functionality. This ability to morph makes it more challenging for antivirus programs to detect and mitigate, as the virus can constantly modify its signature to evade detection.
18 / 29
18. _______ is a security vulnerability that allows an attacker to make requests to internal resources, potentially leading to unauthorized access, data exposure, or remote code execution on a server. This occurs when an application processes user-supplied URLs and allows attackers to forge requests to internal or external resources. Choose the correct term from below?
SSRF flaws occur whenever a web application is fetching a remote resource without validating the user-supplied URL. It allows an attacker to coerce the application to send a crafted request to an unexpected destination, even when protected by a firewall, VPN, or another type of network access control list (ACL).
19 / 29
19. Which option works the best to prevent social engineering attacks?
Training and awareness are effective in preventing social engineering attacks because they educate individuals about potential threats, teach them to recognize manipulation techniques, and promote a security-conscious culture. When people are informed and vigilant, they are less likely to fall victim to deceptive tactics employed by social engineers, enhancing overall organizational security.
20 / 29
20. Which of the following technique is used to identify the type of web server during reconnaissance phase.
Banner grabbing is a technique used by hackers to collect information about a target system, such as server software and version details, by analyzing the banners or responses received during the connection process. This information can be exploited to identify potential vulnerabilities and tailor attacks.
21 / 29
21. Which of the following is a type of offline attack?
A rainbow attack is called an offline attack because it involves pre-computing and storing a table of hashed password values (rainbow table) before attempting to crack passwords. The actual password cracking process occurs offline, using the pre-computed data, rather than in real-time against the target system.
22 / 29
22. What is the most typical DoS attack warning sign?
Slow system performance can be a warning sign of a Denial of Service (DoS) attack because the attacker overwhelms the system with excessive traffic or requests, consuming resources and causing legitimate users to experience delays or service disruptions. The intentional degradation of performance is a common goal in DoS attacks, signaling a potential security threat.
23 / 29
23. _________ implements policy, preventing users from acting outside of their designated permissions. Failures generally result in illegal information disclosure, modification, or destruction of all data, or the performance of a business function beyond the user’s capabilities.
Access controls are security measures implemented to regulate and manage user interactions with systems, applications, or data. They define and enforce permissions, ensuring that users only have appropriate access to resources based on their roles or responsibilities. Access controls help protect sensitive information and prevent unauthorized actions.
24 / 29
24. Which of the following is a common Access control violation:
All the mentioned mechanisms cause access control violations
25 / 29
25. Which of the following describes the application of a blind SQL injection attack?
In a blind SQL injection, result messages may not be visible because the database system does not provide direct feedback to the attacker. Unlike classic SQL injections where error messages or visible results assist the attacker in crafting malicious queries, blind SQL injections involve exploiting vulnerabilities without getting explicit feedback.
Blind SQL injections often rely on Boolean-based or time-based techniques, where the attacker infers information about the database by analyzing the application’s responses. This lack of direct feedback makes it more challenging for the attacker, but successful exploitation can still allow unauthorized access or manipulation of the database.
26 / 29
26. The use of “questions and answers” in a password recovery workflow is forbidden by the OWASP Top 10, the OWASP ASVS, and NIST 800-63b. Since other people could know the answers, questions and answers cannot be considered reliable identification proof. For this reason, they are forbidden. Such code ought to be taken out and swapped out for a safer layout. What kind of flaw is this?
The flaw described is an Insecure Design, as outlined by the OWASP Top 10, OWASP ASVS, and NIST 800-63b. The use of security questions in password recovery workflows is inherently insecure because answers can be guessed or known by others, making them unreliable for authentication. This design weakness should be addressed by replacing security questions with stronger authentication methods, as they do not provide adequate protection against unauthorized access. The vulnerability stems from poor system design rather than issues like input validation or authentication bypass.
27 / 29
27. _________ is a highly complex and focused cyberattack in which an unauthorized user gains access to a network and stays hidden for a long time.
An Advanced Persistent Threat (APT) is a prolonged and sophisticated cyber attack in which an unauthorized user gains access to a network or system, often with the intention of stealthily extracting sensitive information or maintaining long-term control. APTs typically involve advanced techniques, persistent efforts, and are often associated with nation-states or well-funded adversaries.
28 / 29
28. Which of the following mechanism is vulnerable to Broken authentication
The correct answer is “All of the above.”
Here’s why each is vulnerable to broken authentication:
Permitting well-known passwords: Allows attackers to easily guess or use common passwords to compromise accounts, leading to broken authentication.
Using weak or ineffective credential recovery and forgot-password processes such as knowledge-based answers: Security questions or knowledge-based authentication can be easily guessed or known by attackers, making it an insecure recovery method.
Re-use the same session identifier after successful login: If the session ID is not regenerated after login, attackers can hijack a session, leading to unauthorized access.
29 / 29
29. What attack leverages unknown vulnerabilities in software for immediate exploitation, often requiring no user interaction?
A zero-day attack exploits undisclosed vulnerabilities in software, taking advantage of flaws unknown to the software vendor. It requires no user interaction and aims for immediate exploitation before a patch or fix is developed, maximizing the effectiveness of the attack.
Your score is
The average score is 0%
Restart Test
Related challenges :