Vulns and Attacks

Vulnerabilities: Weaknesses or flaws in hardware, software, configurations, or processes in a computer system, network, or application.

Attacks: Deliberate actions or activities carried out by threat actors with intent to exploit vulnerabilities.

Hardware Vulnerabilities

Security flaws or weaknesses inherent in a devices physical components or design that can be exploited to compromise the Confidentiality, Integrity, or Availability of a system and its data.

Mitigating Hardware Vulnerabilities

Bluetooth Vulnerabilities and Attacks

Wireless technology standard used for exchanging data between fixed and mobile devices over short distances without an Internet connection.

Vulnerabilities

Attacks

Mitigations

Mobile Vulnerabilities and Attacks

Vulnerabilities

Mobile Device Management (MDM)

Conduct patching of devices by pushing necessary updates and ensure latest security patches.

Zero-Day Vulnerabilities

Zero-Day Vulnerability: Vulnerability that is discovered or exploited before vendor can issue a patch.[^zero-day-mitigations]

Zero-Day Exploit: Unknown exploit in the wild that exposes a previously unknown vulnerability in software or hardware.

Operating System Vulnerabilities

SQL and XML Injection

Code Injection: Insertion of additional information or code through a data input form from a client to an application.

SQL Injection

Type of code injection that injects a SQL query. Can be done by entering data, modifying cookies, changing POST data, or using HTTP headers.

XML Injection

Extensible Markup Language (XML): Used by web applications for authentication, authorization, and other types of data exchange.

SQL Injection: Type of code injection that injects malicious XML to exploit an XML-driven application or service.

XML Bomb (Billion Laughs Attack): Encoded entities that expand to exponential sizes, consuming RAM on host and potentially crashing it.

Example: Canonical Billion Laughs
<?xml version="1.0"?>
<!DOCTYPE lolz [
 <!ENTITY lol "lol">
 <!ELEMENT lolz (#PCDATA)>
 <!ENTITY lol1 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;">
 <!ENTITY lol2 "&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;">
 <!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;">
 <!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;">
 <!ENTITY lol5 "&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;">
 <!ENTITY lol6 "&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;">
 <!ENTITY lol7 "&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;">
 <!ENTITY lol8 "&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;">
 <!ENTITY lol9 "&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;">
]>
<lolz>&lol9;</lolz>

XML External Entity (XXE): Attack that embeds a request for a local resource

Example: Canonical XXE payload
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE foo [
 <!ELEMENT foo ANY >
 <!ENTITY xxe SYSTEM "file:///etc/shadow" >]>
<foo>&xxe;</foo>

Cross-Site Scripting and Cross-Site Request Forgery

Cross-Site Scripting

Cross-Site Scripting (XSS): Injects a malicious script into a trusted site to compromise site’s visitors.

Cross-Site Request Forgery

Session Management: Enables web applications to uniquely identify a user across several different actions and requests.

Cookie: Text files used to store information about a user.

Session Hijacking

Spoofing attack where attacker disconnects a host and replaces it with their own machine by spoofing the original host IP.

Session Prediction: Attacker attempts to predict the session token to hijack the session.

Cross-Site Request Forgery (CSRF): Malicious script is used to exploit a session started on another site within the same web browser.

Buffer Overflow

When data exceeds allocated memory, potentially enabling unauthorized access or code execution.

“Smashing the Stack”: When attacker can execute malicious code by overwriting a return address.

Mitigation

Address Space Layout Randomization (ASLR): Security measure that randomizes memory addresses.

Race Conditions

Software vulnerability where outcome depends on the timing of events not matching the developer’s intended order.

Mitigations

Mutex: Mutually exclusive flag that gatekeeps section of code so that only one thread can be processed at time.

Deadlock: When two or more processes are unable to proceed because each it waiting for the other to release a resource.