# Sec+ 003: Application Attack Indicators


<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Threat actors can enter the network or move about it by using attacks&nbsp;to execute arbitrary code on trusted hosts. An attacker can easily progress to breaching data assets or triggering a denial of service against critical servers with adequate privileges and access. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Most application attacks aim to achieve arbitrary code execution, which involves exploiting vulnerabilities to allow an attacker (or threat actor) to execute their own code. When the code is transmitted from one machine to another, it is known as remote code execution, enabling the attacker to send and execute code from a remote host on a target host that is vulnerable to such exploits.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><br>In today's post, we will look at potential application attack indicators to help in recognize&nbsp;the presence of a current or future attack on software applications. Examining odd network traffic, anomalous system activity, unusual user actions, security alerts, and known attack patterns are all part of this. Individuals can more effectively notice and respond to application threats if these indications are successfully examined.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">#1: Privilege escalation</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Privilege escalation is the process by which an attacker elevates their privileges from a lower level (such as a regular user) to a higher level (such as an administrator or root) in order to gain increased/higher access and control within a system, network, or application.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Privilege escalation can occur in an operating system or other application </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"electric-grass"} -->
<p class="has-electric-grass-gradient-background has-background">Types of privilege escalation:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Vertical Privilege Escalation: An attacker attempts to elevate their privileges inside the same user hierarchy. A user with limited privileges, for example, attempts to get administrative access to the same system.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Horizontal Privilege Escalation: In this case, the attacker attempts to achieve the same level of privileges as another system user. This often occurs when a flaw permits impersonation or session hijacking, allowing the attacker to obtain access to another user's account or session.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Lateral Privilege Escalation: Obtaining privileges in another system or environment within a network. Once an attacker has gained access to one system, they will exploit weaknesses to gain access to other interconnected&nbsp;systems.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Mitigation</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Implement security measures such as strong access controls, least privilege principles(giving users just the privileges they need)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Updated anti-virus/anti-malware software to Block known vulnerabilities</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Employ defense-in-depth strategies to limit the impact of successful attacks.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Data Execution Prevention<br>– Only data in executable areas can run</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Perform regular software patching, monitoring and auditing of user activities</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Implement Data Execution Prevention (DEP) prevents the execution of malicious code by designating specific memory regions as non-executable(i.e. Only data in executable areas can run)</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Implement Address space layout randomization(ASLR) to Prevent a buffer overrun at a known memory address</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">Cross-site scripting</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Cross-site scripting (XSS) is one of the most common web attack<br>methodologies. The cause of the vulnerability is weak user input validation.<br>If input is not validated properly, an attacker can include a script in their<br>input and have it rendered as part of the web process. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>cross-site because of browser security flaws<br>– Information from one site could be shared with another</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Takes advantage of the trust a user has for a site</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>TYPES OF XSS</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Non-persistent XSS attack The injected script is not persisted or<br>stored but rather is immediately executed and passed back via the web<br>server.</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Persistent XSS attack The script is permanently stored on the web<br>server or some back-end storage. This allows the script to be used<br>against others who log in to the system. No specific target</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>DOM-based XSS attack The script is executed in the browser via the<br>Document Object Model (DOM) process as opposed to the web<br>server.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>CONTROL</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Controls to defend against XSS attacks include the use of anti-XSS<br>libraries to strip scripts from the input sequences. Various other ways to<br>mitigate XSS attacks include limiting the types of uploads, screening the size<br>of uploads, and whitelisting inputs. However, attempting to remove scripts<br>from inputs can be a tricky task. Well-designed anti-XSS input library<br>functions have proven to be the best defense. Cross-site scripting<br>vulnerabilities are easily tested for and should be a part of the test plan for<br>every application. Testing a variety of encoded and unencoded inputs for<br>scripting vulnerability is an essential test element</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Input validation is helpful at preventing XSS attacks.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Input validation, also commonly known as data validation, is the<br>structured and proper testing of any input that is supplied by an application or<br>user. Input validation prevents improperly formed (malformed) data from<br>entering a system.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Protecting against XSS</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Be careful when clicking untrusted links<br>– Never blindly click in your email inbox. Never.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Consider disabling JavaScript<br>– Or control with an extension<br>– This offers limited protection</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Keep your browser and applications updated<br>– Avoid the nasty browser vulnerabilities</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Validate input<br>– Don’t allow users to add their own scripts to an<br>input field</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">Injections</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>User input without input validation results in an opportunity for an attacker to<br>craft input to create specific events that occur when the input is parsed and<br>used by an application</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Types of injection attacks</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Structured query language (SQL)</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Structured Query Language (SQL) injection attacks<br>involve the manipulation of input, resulting in a SQL statement that is<br>different from the statement the designer intended</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A SQL injection attack is a form of code injection aimed at any SQL-based<br>database, regardless of vendor. An example of this type of attack is where the<br>function takes the user-provided inputs for username and password and<br>substitutes them in a <strong>where</strong> clause of a SQL statement with the express<br>purpose of changing the <strong>where</strong> clause into one that gives a false answer to<br>the query</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The addition of the or clause, with an always true statement and the<br>beginning of a comment line to block the trailing single quote, alters the SQL<br>statement to one in which the where clause is rendered inoperable. If the<br>where clause is altered to return all records, this can result in a data breach.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>control</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Stored procedures are precompiled methods implemented within a<br>database engine. Stored procedures act as a secure coding mechanism<br>because they isolate user input from the actual SQL statements being<br>executed. This is the primary defense mechanism against SQL injection<br>attacks—in other words, separation of user input from the SQL statements.<br>User-supplied input data is essential in interactive applications that use<br>databases; these types of applications allow the user to define the specificity<br>of search, match, and so on</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"electric-grass"} -->
<p class="has-electric-grass-gradient-background has-background">Dynamic-link library (DLL)</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>DLL injection is a vulnerability&nbsp;that allows the&nbsp;malware to take advantage of the operating system's ability to attach one process to another. Attackers inject&nbsp;a malicious DLL into a legitimate process, potentially causing program instability and sensitive data spillage. This method makes use of dynamic-link library (DLL) technology, which provides functionality to a program via library routines that are linked at runtime. DLLs, for example, are loaded at runtime in Microsoft Office, and putting a malicious DLL in the relevant directory or via a registry entry can bring new destructive functionality.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A Dynamic-Link Library is a Windows library that contains both code and data. Inject a DLL into an application and have it run a program that runs as part of the target process.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"electric-grass"} -->
<p class="has-electric-grass-gradient-background has-background">Lightweight Directory Access Protocol (LDAP)</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>LDAP-based systems are also subject to injection attacks. When an<br>application constructs an LDAP request based on user input, a failure to<br>validate the input can lead to a bad LDAP request. Just as SQL injection can<br>be used to execute arbitrary commands in a database, LDAP injection can do<br>the same in a directory system. Something as simple as a wildcard character<br>(*) in a search box can return results that would normally be beyond the<br>scope of a query. Proper input validation is important before a request is<br>passed to an LDAP engine.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Extensible Markup Language (XML)</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>XML can be tampered with via injection as well. XML injections can be<br>used to manipulate an XML-based system. Because XML is nearly<br>ubiquitous in the web application world, this form of attack has a wide range<br>of targets. XML that is maliciously altered can affect changes in<br>configurations, changes in data streams, changes in outputs—all from the<br>injection</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">#: Pointer/object dereference</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Pointer dereference is a software vulnerability that occurs when code tries to access memory through a pointer but the pointer itself is null. Pointers in C/C++ programming store memory addresses. Dereferencing a pointer entails reading or writing data to the memory address to which it points. If the pointer is null or invalid (which can happen as a result of malicious intervention), a null pointer dereference exception occurs, resulting in a process crash. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Mitigation</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>programmers should include logic statements that ensure that a pointer is not null before using it.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">Directory traversal</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A directory traversal attack is when an attacker uses special inputs to<br>circumvent the directory tree structure of the filesystem. Adding encoded<br>symbols for “../..” in an unvalidated input box can result in the parser<br>resolving the encoding to the traversal code, bypassing many detection<br>elements, and passing the input to the filesystem. The program then executes<br>the commands in a different location than designed. When combined with a<br>command injection, the input can result in the execution of code in an<br>unauthorized manner. Classified as input validation errors, these can be<br>difficult to detect without doing code walkthroughs and specifically looking<br>for them.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Directory traversals can be masked by using the encoding of input<br>streams. If the security check is done before the string is decoded by the<br>system parser, then recognition of the attack form may be impaired.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background"># Buffer overflows</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A buffer is a section of memory reserved by the application to store expected data. Buffer overflows occur when data exceeds a target buffer's capacity, damaging adjacent memory. This can cause system crashes or allow attackers to run unauthorized code. Consider a program that expects a username of maximum of 15 characters but receives a string of 100 characters.. If not handled properly, this can result in a buffer overflow.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In a buffer overflow attack, the attacker deliberately sends data that exceeds the buffer's intended capacity.<br><br><strong>Mitigation</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Perform bounds checking by Implementing correct input length validation, for example, by using safe library functions for inputs.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li> Adhere to secure programming practices.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">#: Race conditions</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A race condition&nbsp;is a software vulnerability that happens when certain events do not take place in the sequence and at the right times as intended by the developer and the expected result of execution processes depends on them. The idea of several inputs trying to impact the output first is referred to as a "race condition." This flaw can appear in distributed or multithreaded programs where appropriate program operation depends on the order or timing of processes or threads.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"electric-grass"} -->
<p class="has-electric-grass-gradient-background has-background"><strong>Time of check/time of use</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When there is a delay between when an application examines a resource and when it actually uses it. This inconsistency creates the possibility for modifications to happen between the check and use stages, which could compromise the application's integrity or security.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For instance, an attacker might modify or delete a temporary file generated by an application to store a value for later use if they have access to the system between the time the file is created and the time it is utilized.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Mitigation</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Design data structures or objects to be immutable, which means they cannot be updated after being created.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Implement Synchronization mechanisms like locks, semaphores, or mutexes control access to shared resources, ensuring atomic execution of critical code sections and preventing concurrent conflicts.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Incorporate time stamp verification techniques to validate the consistency and integrity of resources</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Implement thorough input validation</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Access Control and Permissions</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">#: Error handling</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Application security depends on secure handling of errors and exceptions, as they are inevitable in every application. Attackers can exploit error management procedures to gain access to sensitive data by intentionally triggering errors.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Mitigation</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Record error details in a secure log file that is protected by access control</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Avoid echoing error information to users</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Error messages shouldn't divulge configuration or platform information that could help attackers, like disclosing database server information on an error page for a web application.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background"># Improper input handling</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To avoid application attacks, proper input handling is crucial in software development. Attackers frequently take advantage of inadequate input validation by sending erroneous or malicious data to vulnerable processes. This can lead to SQL injections, buffer overflows, denial of service, etc</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><br><br><strong>Mitigation</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Implement strong input validation procedures that verify the desired input data's format, type, and length. Techniques like input sanitization, whitelisting, and blacklisting can be used in this regard.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>When interacting with databases, use parameterized queries or prepared statements to fend off SQL injection threats. By doing this, it is made sure that user input is handled more like data than like executable code.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Perform Regular software updates and patching</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Regular security testing, including code reviews and penetration testing, should be carried out in order to identify and fix any possible vulnerabilities in the input handling logic.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">Replay attack</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Replay attacks work against applications by attempting to re-create the<br>conditions that existed the first time the sequence of events occurred. If an<br>attacker can record a series of packets and then replay them, what was valid<br>before may well be valid again. An example of this would be repeating the<br>previous set of transactions, like getting paid twice or successfully passing a<br>security check at a login event.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Session replays</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When a user connects to a system via the web, the connection forms a<br>“session” in the respect that the various elements that are transmitted back<br>and forth form a conversation between the client and the server. A session<br>replay event is the re-creation of this interaction after it has occurred.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">#: Integer overflow</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Integers (whole integers) are&nbsp;data types&nbsp;defined with fixed lower and upper bounds. An integer overflow attack occurs when a computed result is too large to fit in the allocated storage space, resulting in&nbsp;a crash or data corruption, as well as a buffer overflow.&nbsp;This can cause a positive number to become negative (for example, transforming a bank debit to a credit).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Mitigation</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Implement proper input validation and perform appropriate checks to prevent integer overflow vulnerabilities.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">Request forgeries</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Request forgery is a class of attack where a user performs a state-changing<br>action on behalf of another user, typically without their knowledge. It is like<br>having someone else add information to your web responses. These attacks<br>utilize the behavioral characteristics of web-based protocols and browsers,<br>and they occur because of client-side issues but they can be seen on both the<br>server side and the client side.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Server-side: </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Server-side request forgery is when an attacker sends requests to the serverside application to make HTTP requests to an arbitrary domain of the<br>attacker’s choosing. These attacks exploit the trust relationship between the<br>server and the target, forcing the vulnerable application to perform<br>unauthorized actions. The typical trust relationships exploited are those that<br>exist in relation to the server itself, or in relation to other back-end systems<br>within the same organization. Common attacks include having the server<br>attack itself or attack another server in the organization.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Cross-site: </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Cross-site request forgery (XSRF) attacks utilize unintended behaviors that<br>are proper in defined use but are performed under circumstances outside the<br>authorized use. This is an example of a “confused deputy” problem, a class<br>of problems where one entity mistakenly performs an action on behalf of<br>another. An XSRF attack relies upon several conditions to be effective. It is<br>performed against sites that have an authenticated user and exploits the site’s<br>trust in a previous authentication event. Then, by tricking a user’s browser<br>into sending an HTTP request to the target site, the trust is exploited. Assume<br>your bank allows you to log in and perform financial transactions but does<br>not validate the authentication for each subsequent transaction. If a user is<br>logged in and has not closed their browser, then an action in another browser<br>tab could send a hidden request to the bank, resulting in a transaction that<br>appears to be authorized but in fact was not done by the user.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Many different mitigation techniques can be employed, from limiting<br>authentication times, to cookie expiration, to managing specific elements of a<br>web page (for example, header checking). The strongest method is the use of<br>random XSRF tokens in form submissions. Subsequent requests cannot work<br>because a token was not set in advance. Testing for XSRF takes a bit more<br>planning than for other injection-type attacks, but this, too, can be<br>accomplished as part of the design process</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">#: Application programming interface (API) attacks</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>APIs are used to feed data to an application. It is used in web apps and cloud services to enable consumers to automate services. if the API is not secure, threat actors can simply exploit it to compromise the web application's services and data. It is critical to utilize an API exclusively via an encrypted channel (HTTPS).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Mitigation</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Always use encrypted communication protocols, such as HTTPS and employ TLS/SSL certificates to establish secure connections.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Implement Input Validation and Sanitization to validate and filter user input so that only expected and safe data is allowed.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Ensure that strong authentication mechanisms, such as secure tokens or OAuth, are in place to authenticate API users' identities and approve their access to specified resources.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>For API keys and other sensitive information, use safe storage and management techniques. Use secure key storage options instead of hardcoding secrets into the code.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Implement proper Error Handling techniques and Message Obfuscation to avoid exposing sensitive information</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Implement rate-limiting and throttling mechanisms to prevent excessive API requests from a single source, protecting against Denial of Service (DoS) attacks. Set appropriate limits based on expected usage patterns.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">#: Resource exhaustion</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Resource exhaustion occurs when a system lacks the necessary resources to function properly, including capacity and memory. Attacks exploiting this vulnerability aim to deplete these resources, similar to race conditions, leading to system crashes and disruption of services. Examples include overwhelming a system with TCP SYN requests or exhausting program memory. These attacks can impact customer-facing systems and disrupt essential services. Resource exhaustion attacks target CPU time, memory, disk capacity, and network utilization, causing systems to become unresponsive or fill up state tables.<br><br><strong>Mitigation</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Implement measures such as resource monitoring, limitation, load balancing, rate limiting, intelligent resource allocation, secure coding practices, and attack detection and response</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">#: Memory leak</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Memory management is the process of controlling and coordinating computer memory, allocating it to variables, and reclaiming it when it is no longer required. Memory leaks, a software vulnerability in which allocated memory is not released once it is no longer in use.&nbsp;This can lead to increased resource use over time, potentially causing system instability. A memory leak happens when a process fails to relinquish memory, resulting in ongoing memory depletion and possible system crashes.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Mitigation</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Implement proper resource deallocation, utilize automated memory management mechanisms, conduct code reviews and testing, employ memory leak detection tools, follow best practices and coding standards, and continuously monitor and optimize memory usage.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">Secure Sockets Layer (SSL) stripping</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Secure sockets layer (SSL) stripping is a man in the middle attack against all<br>SSL and early versions of TLS connections. The attack is performed<br>anywhere a man in the middle attack can happen, which makes wireless<br>hotspots a prime location. The attack works by intercepting the initial<br>connection request for HTTPS, redirecting it to an HTTP site, and then<br>mediating in the middle. The reason the attack works is because the<br>beginning of an SSL or TLS (v1.0 or v1.1) handshake is vulnerable to attack.<br>The main defense is technical: only use TLS 1.2 or 1.3, as these versions<br>have protections against the specific attack method.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">Driver manipulation</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Drivers are pieces of software that sit between the operating system and a<br>peripheral device. In one respect, drivers are a part of the OS, as an<br>extension. In another respect, drivers are code that is not part of the OS and<br>are developed by firms other than the OS developer. Driver manipulation is<br>an attack on a system by changing drivers, thus changing the behavior of the<br>system. Drivers may not be as protected as other parts of the core system, yet<br>they join it when invoked. This has led to drivers being signed and<br>significantly tightening up the environment of drivers and ancillary programs.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"electric-grass"} -->
<p class="has-electric-grass-gradient-background has-background">Shimming</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A shim is an&nbsp;additional code that is placed between an application driver and the operating system to enable functionality that would otherwise be unavailable. It allows modifications between different OS versions without altering the original driver code, giving it flexibility and portability. Shimming&nbsp;can&nbsp;be exploited by malicious code to change the functionality of a driver without altering the driver itself.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"electric-grass"} -->
<p class="has-electric-grass-gradient-background has-background">Refactoring</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Refactoring is the practice of restructuring application code in order to improve its design and performance while retaining its original functionality. It can be used to improve code or to deal with certain scenarios. However, attackers can use refactoring to introduce illegal functionality to a driver while still allowing it to work normally. it is a Metamorphic malware that can appear different each time</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"gradient":"cool-to-warm-spectrum"} -->
<p class="has-cool-to-warm-spectrum-gradient-background has-background">#: Pass the hash</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The pass-the-hash&nbsp;attack is an attack&nbsp;in which the attacker takes hashed user credentials and uses them to authenticate on the same network or other systems without knowing the original password. This technique makes use of hashed passwords rather than plaintext passwords for authentication.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Mitigation</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Enforce strong password policies</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Implement the principle of least privilege to limit user permissions.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Implement network segmentation to isolate critical systems.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Minimize credential exposure and use centralized authentication.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Use multi-factor authentication (MFA) for an additional layer of security.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Implement privileged access management (PAM) solutions for secure management of privileged accounts.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Provide regular security awareness training to educate users and administrators.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Keep systems and software up to date with the latest patches.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Monitor for suspicious activities and use security tools for detection.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

