Exploit Public-Facing App

Injection Attacks:

SQL Injection

SQL Injection is a prevalent attack vector that occurs when an attacker inserts or injects malicious SQL statements into a query within a web application. This manipulation aims to exploit vulnerabilities in the application's interaction with its database. If successful, an attacker could potentially manipulate or retrieve unauthorized data from the database, modify database information, execute administration operations on the database, or recover the content of a given file present on the DBMS file system. SQL Injection attacks take advantage of insufficient input validation and improper construction of SQL queries.

XML External Entity (XXE) Injection

XML External Entity Injection attacks exploit vulnerabilities in an application's XML parser by injecting malicious entities into an XML document. This can lead to a variety of harmful outcomes, including the disclosure of internal files, execution of remote code, denial-of-service attacks, and server-side request forgery. XXE attacks leverage the XML feature that allows a document to define entities that reference external resources, turning this capability into a vulnerability when an application processes untrusted XML input without proper security measures in place.

Server-Side Template Injection (SSTI)

Server-Side Template Injection occurs when an attacker injects malicious code into server-side templates, which are then executed by the server. This type of attack targets web applications that use templating engines and can result in remote code execution, leading to complete server compromise or information disclosure. SSTI attacks exploit the dynamic rendering capabilities of template engines, manipulating them to execute unintended commands or code. This could potentially allow attackers to access sensitive data, manipulate the application, or gain unauthorized access to the server's resources.

Access and Authentication Attacks:

Cross-Site Request Forgery (CSRF)

Cross-Site Request Forgery (CSRF) attacks exploit the trust that a web application has in a user's browser. In this type of attack, an attacker tricks the victim into making an unintended request to a web application where the victim is authenticated, leading to unauthorized actions being performed on behalf of the user without their knowledge or consent. This could potentially result in changes to user settings, unauthorized funds transfers, or other unintended actions that benefit the attacker. CSRF attacks typically leverage social engineering (like sending a link via email or chat) to exploit the user's existing authentication session.

Session Hijacking

Session Hijacking Attacks involve an attacker stealing or taking over a user’s valid session with a web application to impersonate the victim. This can be achieved through different means such as sidejacking, where an attacker intercepts the session token by eavesdropping on the network traffic, or by exploiting vulnerabilities in the web application that allow the attacker to guess or predict session IDs. Once the attacker has access to the session token, they can perform any action that the legitimate user is authorized to do, including accessing sensitive data and making transactions.

Insecure Direct Object References (IDOR)

Insecure Direct Object References (IDOR) occur when an application provides direct access to objects based on user-supplied input. This vulnerability arises from the application’s failure to properly authenticate or authorize access to these objects, which could include files, database records, or other key resources. Attackers can exploit IDOR vulnerabilities by manipulating references to gain unauthorized access to sensitive information or perform unauthorized actions. For example, by changing a parameter value in a URL, an attacker might access data belonging to another user without proper authorization.

Scripting and Content Attacks:

Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS) attacks involve the injection of malicious scripts into web pages viewed by users. These attacks exploit vulnerabilities in websites that fail to properly validate or encode user input. Attackers leverage these vulnerabilities to execute malicious scripts in the context of the victim’s browser, which can lead to a range of harmful outcomes, including the theft of cookies, session tokens, or other sensitive information, impersonation of the victim, or defacement of the web page. XSS attacks are particularly dangerous because they directly affect the end-users and can bypass traditional security measures by exploiting the trust relationship between the user and the website.

Remote File Inclusion (RFI)

Remote File Inclusion (RFI) attacks allow attackers to include and execute arbitrary code from a remote file on a vulnerable website. This is achieved by exploiting vulnerabilities in web applications that dynamically include external files or scripts. Attackers manipulate these include functions to point to external URLs under their control, leading to the execution of malicious code on the web server. RFI attacks can result in unauthorized access to the server, data leakage, and potentially compromising the server’s security or functionality.

Local File Inclusion (LFI)

Local File Inclusion (LFI) attacks exploit vulnerabilities in web applications that improperly handle file inclusion operations, allowing attackers to include files located on the web server into the output of a given application. Unlike RFI, LFI attacks focus on accessing and executing files that already exist on the server. This can lead to disclosure of sensitive information, execution of server-side scripts, or even remote code execution if combined with other vulnerabilities. LFI attacks underscore the importance of rigorous input validation and sanitization in web applications.

Clickjacking

Clickjacking, also known as UI redressing, involves tricking users into clicking on something different from what the user perceives, often through the use of transparent or opaque layers. This deceitful technique can result in users performing unintended actions on a website, such as liking a page, sharing links, or even changing account settings. Clickjacking exploits the visual aspect of user interactions with a website and can be mitigated through the use of frame-busting scripts or setting appropriate Content Security Policy (CSP) headers to prevent framing of sensitive content.

Cross-Site Script Inclusion (XSSI)

Cross-Site Script Inclusion (XSSI) vulnerabilities occur when an application includes untrusted or arbitrary scripts from external sources without proper validation, sanitization, or restriction. This can lead to the execution of malicious scripts within the context of the application, similar to XSS. However, XSSI specifically involves the inclusion of scripts across different domains or sources. Attackers exploit these vulnerabilities to execute cross-domain scripting attacks, potentially leading to data leakage, session hijacking, and bypassing of same-origin policies.

Server and Application Vulnerability Exploitation:

Directory Traversal

Directory Traversal Attacks, also known as path traversal attacks, exploit vulnerabilities in web applications that do not securely sanitize user input regarding file paths. Attackers manipulate these vulnerabilities to access files and directories that are stored outside the web application's root directory. In a typical directory traversal attack, an attacker crafts input containing sequences like ../ (dot-dot-slash), which navigates up the directory hierarchy. This could lead to unauthorized access to sensitive files, execution of malicious scripts, or even disclosure of confidential information.

Server-Side Request Forgery (SSRF)

Server-Side Request Forgery (SSRF) Attacks are a type of vulnerability where an attacker induces the server to make requests to other internal or external resources on the attacker's behalf. This vulnerability can be exploited to bypass firewall protections, facilitating unauthorized access to internal systems, potentially leading to sensitive information disclosure, remote code execution, or further attacks on other systems. It is important to validate and restrict outbound requests from the server to mitigate SSRF risks.

Remote Code Execution (RCE)

Remote Code Execution (RCE) Attacks allow attackers to execute arbitrary code on a target server or application remotely. This critical vulnerability can lead to complete system compromise, unauthorized data access, modification, or destruction, and potentially grant attackers a foothold to launch additional attacks within the network. RCE vulnerabilities are among the most severe, as they directly threaten the security and operational integrity of affected systems. Ensuring timely patch management, input validation, and secure coding practices are essential defenses against RCE attacks.

Security Configuration Issues:

Security Misconfigurations

Security Misconfigurations arise from improper setup or neglect in configuring security settings within software applications, servers, or network devices. This broad category can include issues like default account settings remaining unchanged, unnecessary services running on a system, inadequate file or directory permissions, and exposed error handling information. These misconfigurations can lead to vulnerabilities, creating potential entry points for attackers. Proper security configuration requires ongoing attention to detail and an understanding of the security implications of each setting within the environment.

Insufficient Transport Layer Protection

Insufficient Transport Layer Protection refers to the lack of secure communication protocols and encryption when data is transmitted over a network. This vulnerability can lead to data being intercepted, modified, or stolen by attackers during transit. Common issues include not using HTTPS, weak encryption algorithms, improper SSL/TLS configurations, or neglecting to enforce secure headers. It is important to use up-to-date encryption standards like TLS for all data in transit, implementing strong cipher suites, and regularly reviewing and updating transport layer security configurations to protect against emerging threats.

Service Disruption Attacks:

Brute Force

Brute Force Attacks are a methodical approach to gain unauthorized access to a system or account by systematically trying all possible combinations of passwords or encryption keys until the correct one is found. This type of attack can be time-consuming but remains effective against systems with weak or easily guessable passwords. It represents a trial-and-error method used to obtain sensitive information like passwords or encryption keys. Brute force attacks are a significant threat due to their simplicity and effectiveness in exploiting weak authentication mechanisms.

Denial of Service (DoS)

Denial of Service (DoS) Attacks aim to disrupt the availability of a service, network, or system by overwhelming it with a flood of illegitimate requests or by exploiting vulnerabilities to exhaust system resources. The objective is to make the target unavailable to legitimate users, thereby causing service disruption. This type of attack can exploit specific vulnerabilities in the system or simply saturate the target with excessive requests, making it impossible for the system to respond to legitimate traffic. Distributed Denial of Service (DDoS) Attacks are an amplified version of DoS attacks that involve multiple compromised systems, often forming a botnet, to launch a coordinated assault on a target.

Manipulation and Redirection Attacks:

HTTP Response Splitting

HTTP Response Splitting Attacks involve an attacker manipulating the HTTP response headers to inject additional content or control the content of the response. This type of attack occurs by exploiting vulnerable web applications that do not properly sanitize input that is reflected in HTTP response headers. Attackers can insert malicious characters or encoded data into the response headers, leading to various security vulnerabilities such as cross-site scripting (XSS) attacks, session hijacking, cache poisoning, and misleading users by altering the appearance of the website. This underscores the need for stringent input validation and secure coding practices to prevent this form of manipulation.

Open Redirect Vulnerabilities

Open Redirect Vulnerabilities occur when a web application or website allows users to be redirected to external URLs without proper validation or authorization. This vulnerability can be exploited by attackers to craft URLs that look legitimate but redirect users to malicious websites, phishing pages, or other harmful content. The primary risk associated with open redirects is tricking users into believing they are visiting a trusted site while actually being directed to a malicious site, potentially leading to data theft, malware infection, or further attacks. Preventing open redirect vulnerabilities involves implementing strict validation checks on all redirect and forward mechanisms within the application.

Windows Event Log Detection

Windows Event IDs

Event ID 4624 (Logon Event): This event logs successful logon attempts. For instance, if an attacker successfully logs into a web server using stolen credentials, this event will be triggered. Security analysts can detect suspicious logins by looking for logons from unusual locations, during odd hours, or by users with elevated privileges. An example scenario is a successful logon from an IP address in a foreign country where the organization has no operations, which could indicate a potential exploitation attempt.

Event ID 4625 (Logon Failure): This event logs failed logon attempts. For example, an attacker might attempt a brute-force attack on a public-facing application, resulting in multiple failed login attempts. Security analysts can identify such attacks by monitoring for multiple failed login attempts from the same IP address or user account. Additionally, failed logons with unusual error codes may indicate the use of exploitation tools. A specific scenario could involve an attacker repeatedly attempting to log in with common usernames and passwords, triggering numerous failed logon events.

Event ID 4634 (Logoff Event): This event logs logoff activities. For instance, if an attacker logs off after a successful exploitation attempt, this event will be triggered. Tracking logoff events can help in understanding user activity patterns. Unusual session durations or logoffs that do not match expected behavior may indicate malicious activity. An example scenario is an attacker logging off immediately after performing unauthorized actions on a compromised account.

Event ID 4688 (Process Creation): This event logs the creation of new processes. For example, if an attacker exploits a vulnerability in a web application and spawns a command shell, this event will be triggered. Monitoring process creation events can help detect the execution of malicious code by looking for processes spawned by unexpected parent processes, with uncommon names, or performing suspicious actions like network connections or file modifications. A specific scenario could involve a web server process unexpectedly spawning a PowerShell process, indicating potential exploitation.

Event ID 4698 (Scheduled Task Created): This event logs the creation of scheduled tasks. An attacker might create a scheduled task to maintain persistence on a compromised system. For instance, if a scheduled task is created with a suspicious command line to execute a malicious script, this event will be triggered. Security analysts can identify such attempts by monitoring for tasks with unusual names, descriptions, or commands. An example scenario is the creation of a scheduled task named "SystemUpdate" that runs a script from a non-standard directory.

Event ID 4699 (Scheduled Task Deleted): This event logs the deletion of scheduled tasks. An example scenario is an attacker deleting a scheduled task to cover their tracks after using it for malicious purposes. Unexpected deletions of scheduled tasks, especially those related to critical system tasks, can indicate ongoing exploitation attempts. For instance, the deletion of a scheduled task that was previously used to run security scans might be suspicious.

Event ID 4700 (Scheduled Task Enabled): This event logs the enabling of scheduled tasks. For example, an attacker might enable a previously disabled task to execute their payload. Monitoring for the enabling of tasks that were not expected to be activated can help identify such activities. A specific scenario could involve enabling a task that launches a script for data exfiltration during off-hours.

Event ID 4701 (Scheduled Task Disabled): This event logs the disabling of scheduled tasks. An example scenario is an attacker disabling a scheduled task to disrupt normal system operations or disable security mechanisms. Monitoring for such events can help detect these attempts. For instance, disabling a task that runs routine security updates might indicate malicious intent.

Event ID 4702 (Scheduled Task Updated): This event logs updates to scheduled tasks. For example, if an attacker modifies an existing task to execute a malicious command, this event will be triggered. Monitoring for changes in scheduled tasks, especially those that alter the task's command line or execution schedule, can help identify such modifications. An example scenario is updating a legitimate scheduled task to include additional commands that download and execute malware.

Event ID 5156 (Filtering Platform Connection): This event logs connections allowed or blocked by the Windows Filtering Platform. For instance, if a web server makes an outbound connection to a known malicious IP address, this event will be triggered. Monitoring network traffic related to public-facing applications can help identify anomalies that may indicate exploitation attempts. A specific scenario could involve a web server process making unexpected outbound connections to IP addresses associated with command-and-control servers.

Event ID 5140 (Network Share Access): This event logs access to network share objects. An example scenario is an attacker accessing a network share to exfiltrate data. Unauthorized access to network shares can indicate an attacker attempting to move laterally within the network. Monitoring for unusual access patterns can help detect such activities. For instance, repeated access attempts to a sensitive file share by an account that typically does not access it might be suspicious.

Sysmon Event IDs

Sysmon Event ID 1 (Process Creation): This event logs the creation of new processes. For example, if an attacker exploits a vulnerability in a public-facing application and spawns a malicious process, this event will be triggered. Monitoring for processes with uncommon names, unexpected parent-child relationships, or suspicious command-line arguments can help detect the execution of malicious code. An example scenario could involve a web server process spawning a process with a suspicious command line that includes downloading and executing a remote script.

Sysmon Event ID 2 (File Creation Time Change): This event logs changes to the creation time of files. An example scenario is an attacker tampering with file creation times to evade detection. Security analysts can detect file tampering or the installation of persistence mechanisms by looking for files with creation times that do not match the expected timeline of user activity. For instance, if a critical system file's creation time is altered to appear as if it was created during the system's initial setup, it might indicate tampering.

Sysmon Event ID 3 (Network Connection): This event logs network connections established by processes. For instance, if a compromised public-facing application makes an outbound connection to a command-and-control server, this event will be triggered. Monitoring for unusual network connections, such as connections to known malicious IP addresses or on non-standard ports, can help identify potential exploitation attempts. A specific scenario could involve a web server process making outbound connections to an IP address associated with a known threat actor.

Sysmon Event ID 4 (Sysmon Service State Changed): This event logs changes to the Sysmon service state. An example scenario is an attacker attempting to disable Sysmon to evade detection. Monitoring for changes in the Sysmon service state, such as unexpected stops or restarts, can help identify tampering attempts. For instance, if the Sysmon service is stopped and restarted without any scheduled maintenance, it might indicate an attacker's attempt to disable logging.

Sysmon Event ID 5 (Process Terminated): This event logs the termination of processes. For example, if a malicious process terminates unexpectedly, this event will be triggered. Monitoring for unexpected process terminations can help detect malicious activities. An example scenario could involve a critical security process being terminated by an attacker to disable security monitoring.

Sysmon Event ID 6 (Driver Load): This event logs the loading of drivers. An example scenario is an attacker loading a malicious driver to gain kernel-level access. Monitoring for drivers with unusual names, loaded by unexpected processes, or loaded during unusual times can help detect the installation of malware or rootkits. For instance, the loading of a driver from a non-standard directory by a non-administrative process might be suspicious.

Sysmon Event ID 7 (Image Load): This event logs the loading of DLLs and other executable images. For instance, if a legitimate process loads a malicious DLL, this event will be triggered. Monitoring for DLLs with unusual names, loaded by unexpected processes, or loaded from unusual locations can help detect the execution of malicious code. An example scenario could involve a web server process loading a DLL from a temporary directory, indicating potential exploitation.

Sysmon Event ID 8 (CreateRemoteThread): This event logs the creation of remote threads. An example scenario is an attacker injecting malicious code into a running process. Monitoring for remote thread creation by unexpected or suspicious processes can help detect code injection attempts. For instance, a non-standard process creating a remote thread in a critical system process might indicate an attack.

Sysmon Event ID 11 (File Create): This event logs the creation of new files. For example, if an attacker drops a malicious payload on a compromised system, this event will be triggered. Monitoring for files created in unusual locations, with unusual names or extensions, or created by unexpected processes can help detect the installation of malware or persistence mechanisms. An example scenario could involve the creation of an executable file in a web server directory, indicating an attempt to exploit a file upload vulnerability.

Sysmon Event ID 12 (Registry Object Created or Deleted): This event logs changes to the registry, such as the creation or deletion of registry keys. An example scenario is an attacker modifying the registry to establish persistence. Monitoring for registry changes by unexpected processes or those associated with known persistence mechanisms can help detect malicious modifications. For instance, the creation of a registry key to execute a script at startup might indicate an attack.

Sysmon Event ID 13 (Registry Value Set): This event logs changes to registry values. For instance, if an attacker modifies a registry value to disable security features, this event will be triggered. Monitoring for registry value changes associated with known persistence mechanisms or made by unexpected processes can help detect malicious modifications. An example scenario could involve changing a registry value to disable Windows Defender, indicating an attempt to weaken security.

Last updated