Cybersecurity Nutshells

Short, visual explainers to connect concepts fast.

Fundamentals

Antimalware Scan Interface (AMSI)

swipe icon

Antimalware Scan Interface (AMSI) is a Windows feature that allows applications to send scripts and dynamic content to the system's antimalware engine for real-time scanning. Its goal is to detect malicious code, especially fileless malware and obfuscated scripts, before they execute.

How it works:
When an application (e.g., PowerShell, WSH, Office) runs a script, the content is passed to AMSI. AMSI forwards it to the registered antivirus engine, which returns a verdict:
• If clean → execution continues.
• If malicious → the content is blocked or mitigated.

Key features:
• Scans runtime content from multiple scripting engines.
• Uses the installed AV/antimalware engine (vendor-neutral).
• Enhances detection of advanced threats and fileless attacks.

Security note:
Attackers often attempt AMSI bypass techniques, such as disabling AMSI or obfuscating payloads, so layered security remains important.

Network Attacks

ARP Protocol and ARP Poisoning Attack

swipe icon

In an ARP poisoning attack, an attacker sends forged ARP reply packets to devices on the network, typically targeting both the victim and the default gateway. These malicious ARP replies associate the attacker’s MAC address with the IP address of another device, such as the gateway or the victim.

For example, the attacker may tell the victim: “The gateway’s IP address is at my MAC address” and simultaneously tell the gateway: “The victim’s IP is at my MAC address.”

As a result, both the victim and the gateway update their ARP tables incorrectly, routing traffic through the attacker’s machine.

Once the attacker becomes the intermediary for the communication, they can intercept sensitive data, modify packets in transit, or even block communication entirely (leading to a denial of service).

Mitigation Measures

Defending against ARP poisoning involves techniques such as configuring static ARP entries where possible, using Dynamic ARP Inspection (DAI) on managed switches, and employing secure communication protocols like HTTPS and SSH, which prevent attackers from reading or altering encrypted traffic.

Advanced Techniques

Bring Your Own Vulnerable Driver Attack

swipe icon

Bring Your Own Vulnerable Driver (BYOVD) attacks are a technique in which threat actors exploit legitimate but vulnerable drivers to gain low-level access to a system, often bypassing security mechanisms such as antivirus, EDR, or kernel protection. These attacks leverage the fact that many signed drivers—especially older or poorly maintained ones—contain flaws that can be abused to execute arbitrary code with kernel-level privileges.

In a typical BYOVD scenario, the attacker brings a known-vulnerable driver into the target environment and loads it into the Windows kernel. Because the driver is signed and appears legitimate, it can often bypass driver signing enforcement and execute privileged operations without being flagged by security tools. Once loaded, the attacker may exploit vulnerabilities in the driver to disable security software, manipulate system memory, or escalate privileges to SYSTEM level.

This method is particularly dangerous because it abuses trusted components of the operating system’s driver infrastructure, making detection and mitigation more difficult. It is commonly used in advanced persistent threats (APTs), ransomware campaigns, and red team operations.

To defend against BYOVD attacks, cybersecurity strategies should include:
• Blocking known vulnerable drivers using tools like Microsoft’s Driver Blocklist or third-party kernel protection solutions.
• Enabling features such as Hypervisor-Protected Code Integrity (HVCI) and Secure Boot.
• Monitoring for unsigned or suspicious driver installations and enforcing strict driver control policies.

Fundamentals

Buffer Overflow Attacks

swipe icon

Buffer overflow attacks exploit a fundamental flaw in memory management, where a program writes more data to a buffer—an allocated block of memory—than it can hold. When this happens, the excess data can overwrite adjacent memory regions, potentially altering program behavior, corrupting data, or injecting malicious code.

In cybersecurity, buffer overflows are significant because they can be used to hijack program execution. An attacker may deliberately craft input that overflows a buffer and overwrites critical parts of memory, such as the return address on the call stack. This can redirect the execution flow to attacker-controlled code, leading to remote code execution, privilege escalation, or system compromise.

There are two main types of buffer overflows: stack-based, which target function call structures, and heap-based, which exploit dynamically allocated memory. These attacks often succeed due to unsafe programming practices, especially in low-level languages like C or C++, where bounds checking is not enforced by default.

Modern defenses against buffer overflow attacks include:

• Stack canaries and address space layout randomization (ASLR) to make memory manipulation harder.
• Non-executable stack segments (DEP/NX) to prevent code execution in data regions.
• Compiler-level protections like bounds checking and memory-safe alternatives.

Despite these mitigations, buffer overflows remain a high-risk vulnerability in legacy systems and low-level software where memory safety is not strictly enforced.

Web Attacks

Cross-Site-Scripting (XSS) Attacks

swipe icon

Cross-Site Scripting (XSS) is a type of web security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. These scripts are typically written in JavaScript and execute in the victim’s browser in the context of a trusted website, enabling the attacker to steal session cookies, capture keystrokes, redirect users, or perform unauthorized actions on their behalf.

XSS attacks occur when a web application accepts untrusted input and includes it in the output without proper validation or encoding. Depending on how the payload is delivered and executed, XSS is generally categorized into three types:

Stored XSS: The malicious script is permanently stored on the target server (e.g., in a database) and served to users when they load the page.
Reflected XSS: The script is embedded in a URL or input field and reflected back in the server's response, executing when the victim clicks or interacts with the malicious link.
DOM-based XSS: The vulnerability exists in client-side JavaScript that dynamically updates the page based on user input, without server involvement.

XSS poses serious cybersecurity risks because it bypasses the browser’s same-origin policy and exploits the trust users place in legitimate websites. Effective countermeasures include input validation, output encoding, use of Content Security Policy (CSP), and frameworks that automatically sanitize data before rendering it in the browser.

Network Attacks

DDoS TCP SYN Flood Attack

swipe icon

A DDoS SYN Flood attack is a type of Denial of Service (DoS) attack that targets a server by overwhelming it with a large number of SYN (synchronize) requests, which are used to initiate a TCP connection.

How It Works:
1- The attacker sends a flood of SYN packets to the target server.
2- The server responds with SYN-ACK packets, expecting an ACK response to complete the handshake.
3- The attacker never sends the final ACK, leaving the connection half-open.

Because the server allocates resources for each half-open connection, a massive number of these requests exhaust the server’s resources (memory, connection table), causing legitimate users to be unable to connect.

Impact:
• Service disruption
• Degraded performance
• Potential downtime

Mitigation Techniques:
• SYN cookies
• Rate limiting
• Firewalls and intrusion prevention systems

Network Attacks

DNS Cache Poisoning Attack

swipe icon

DNS Cache Poisoning, also known as DNS spoofing, is an attack that manipulates the cached entries of a DNS resolver to redirect users to malicious or unintended destinations. By injecting false DNS records into the resolver’s cache, an attacker can cause legitimate domain queries (e.g., example.com) to resolve to an IP address controlled by the attacker, enabling phishing, malware distribution, or traffic interception.

This type of attack exploits the trust placed in DNS responses and takes advantage of the stateless and unauthenticated nature of the DNS protocol. A successful poisoning attempt typically involves tricking a resolver into accepting a forged response to a DNS query before the legitimate response arrives. Once cached, the malicious record can persist for the duration of its Time-To-Live (TTL), affecting all users relying on that resolver.

From a cybersecurity standpoint, DNS cache poisoning is dangerous because it can silently reroute users without compromising their devices directly. It’s particularly effective against unsecured DNS configurations and open resolvers.

Mitigation strategies include:
• Enforcing DNSSEC (Domain Name System Security Extensions) to validate the authenticity of DNS records.
• Using randomization techniques (e.g., source port and query ID randomization) to make spoofing more difficult.
• Limiting the exposure of DNS resolvers to external queries and regularly flushing or validating cached entries.

Network Attacks

DNS Tunneling Attack

swipe icon

DNS tunneling is a technique used in cybersecurity attacks that exploits the Domain Name System (DNS) protocol to exfiltrate data or establish covert communication channels between a compromised system and an external server.

Instead of using DNS solely for resolving domain names, attackers encode arbitrary data within DNS query and response packets, allowing them to bypass traditional security controls such as firewalls and intrusion detection systems. This method leverages the fact that DNS traffic is often allowed by default in most network environments, making it a stealthy and effective vector for command-and-control operations or data leakage. The most common use casee is establishing a persistent communication channel with malware on an infected device, often for data exfiltration or remote control.

Detection typically involves identifying anomalies in DNS traffic patterns, such as unusually long domain names, high query frequencies, or irregular DNS server usage.

Malware Ransomware

Focus on the Lynx Ransomware

swipe icon

Lynx is a strain of ransomware that follows the typical double extortion model, where attackers not only encrypt a victim’s data but also exfiltrate sensitive information to pressure the victim into paying a ransom. If the ransom is not paid, the attackers threaten to leak the stolen data publicly. Lynx is often attributed to operations that use targeted intrusion tactics rather than widespread, automated infections, focusing on enterprise environments with valuable data assets.

The ransomware typically spreads through phishing emails, compromised remote access services, or the exploitation of known vulnerabilities. Once inside a network, Lynx operators perform reconnaissance, escalate privileges, and move laterally to identify high-value systems before deploying the ransomware payload. The encryption process renders files inaccessible by appending specific extensions and dropping ransom notes that provide instructions for contacting the attackers and negotiating payment.

Lynx represents a sophisticated threat due to its human-operated approach and focus on data exfiltration. This increases both the operational impact of the attack and the reputational and regulatory risks associated with data exposure.

Fundamentals

How does a Web Application Firewall (WAF) works?

swipe icon

A Web Application Firewall (WAF) is a security solution designed to protect web applications by filtering and monitoring HTTP and HTTPS traffic between a client and a server. It works by inspecting incoming requests and outgoing responses, applying a set of rules or policies to detect and block malicious activity such as cross-site scripting (XSS), SQL injection, file inclusion, or request forgery attempts.

Unlike traditional firewalls that operate at the network or transport layer, a WAF functions at the application layer (Layer 7 of the OSI model), giving it visibility into the structure and intent of web requests. This allows it to analyze the actual content of inputs and outputs—such as form submissions, query strings, headers, and cookies—and make real-time decisions based on predefined signatures, anomaly detection, or behavioral analysis.

There are three primary modes in which a WAF can operate:

  • Whitelist (positive security): Only explicitly allowed requests are accepted.
  • Blacklist (negative security): Known malicious patterns are blocked.
  • Hybrid: A combination of both, often enhanced with machine learning.

WAFs can be deployed in various forms, including cloud-based services, software plugins, or dedicated hardware appliances. In modern security architectures, they are a critical component for protecting APIs, login portals, e-commerce platforms, and any public-facing web application from exploitation and abuse.

Web Attacks

How Web Skimmers Work

swipe icon

Web skimmers represent one of the most discreet yet damaging forms of cyberattacks targeting e-commerce platforms. These malicious scripts are secretly injected into vulnerable websites, designed to capture sensitive user information, such as credit card details, names, and addresses, entered into payment or registration forms.

Once active, the skimmer operates silently in the background, intercepting data and transmitting it to servers controlled by cybercriminals, often without disrupting the website’s normal functionality. This makes detection particularly challenging for both users and site administrators.

Skimming attacks typically exploit weaknesses in website plugins or extensions, with platforms like Magento being frequent targets.

Malware Ransomware

InfoStealer based on Fake Captchas

swipe icon

Infostealers are among the most effective and dangerous cyber threats in circulation.

These malware variants, designed to steal sensitive information such as login credentials, banking data, credit card details, and cryptocurrency wallets, operate in the shadows, extracting valuable data without you even noticing.

Recently, Lumma Stealer introduced an innovative infection technique that increases its effectiveness in compromising systems and stealing sensitive information.

A technique recently observed is the use of fake CAPTCHA pages that appear legitimate.

When the user clicks the “I’m not a robot” button and completes the verification steps, they are actually executing a PowerShell command that initiates the malware download and starts the infection chain.

Auth And Identity

Kerberos Authentication Protocol

swipe icon

Kerberos is a network authentication protocol designed to securely authenticate users and services over insecure networks. It uses symmetric key cryptography and a trusted third party called the Key Distribution Center (KDC) to provide mutual authentication and protect credentials from eavesdropping.

How It Works:
1‑ Authentication Request: The client sends a request to the KDC to prove its identity.
2‑ Ticket Granting Ticket (TGT): The KDC verifies the client and issues a TGT encrypted with the client's secret key.
3‑ Service Ticket: When accessing a service, the client uses the TGT to request a service ticket from the KDC.
4‑ Access Service: The client presents the service ticket to the target server for authentication.
5‑ Mutual Authentication: Both client and server verify each other using the exchanged tickets.

This process ensures secure, single sign-on (SSO) and prevents password transmission in plain text.

Network Attacks

Man-In-The-Middle Attack

swipe icon

Man-in-the-Middle (MitM) phishing is a sophisticated attack technique where a threat actor positions themselves between the user and the legitimate website, capturing credentials and multi-factor authentication (MFA) codes in real time.

What makes this attack particularly dangerous is its ability to bypass MFA protections. Unlike traditional phishing that steals only usernames and passwords, MitM phishing intercepts time-based one-time passcodes (TOTP) and verification prompts as they are entered, allowing the attacker to log in as the user even with MFA enabled.

This typically occurs when a user clicks on a malicious link and is redirected to a fake website that visually mimics the legitimate one. Behind the scenes, this fake portal acts as a live proxy, relaying information back and forth while harvesting sensitive data.

Fundamentals

Network Address Translation (NAT)

swipe icon

Network Address Translation (NAT) is a network function that modifies IP address information in packet headers as they pass through a router or firewall, enabling multiple devices on a private network to share a single public IP address. In the context of cybersecurity, NAT plays a dual role: it provides a basic layer of obfuscation by hiding internal IP addresses from external entities, and it helps control inbound and outbound traffic by managing how connections are established between internal hosts and the internet.

While NAT is not a security mechanism by design, it contributes to network security by limiting unsolicited inbound connections. External hosts cannot directly initiate communication with internal devices unless explicit port forwarding rules are configured. This containment helps reduce the attack surface exposed to the internet.

Key cybersecurity implications of NAT include:

• Obscured internal network structure, reducing exposure to reconnaissance.
• Challenges for traffic inspection and logging, as NAT can mask the identity of internal devices.
• Compatibility issues with security tools that rely on consistent IP addressing for threat correlation.

Auth And Identity

NTLM Relay Attack

swipe icon

NTLM Relay is a type of man-in-the-middle (MitM) attack that targets the NTLM (NT LAN Manager) authentication protocol, commonly used in Windows-based environments. The attack involves intercepting and forwarding legitimate authentication attempts between a client and a server, without needing to crack the user’s credentials. By capturing the NTLM authentication traffic, an attacker can “relay” it to another service or host that accepts the same credentials, effectively impersonating the user.

This exploit is possible due to the challenge-response mechanism of NTLM, which lacks binding between the authentication process and the specific context or channel over which it occurs. As a result, an attacker positioned on the network can trick a client into authenticating to a malicious service, capture the response, and forward it to a legitimate server that trusts the same domain credentials.

The NTLM Relay attack can lead to unauthorized access, privilege escalation, and lateral movement within a network, especially when combined with weak configurations or exposed services. Mitigation strategies typically involve:

• Disabling NTLM in favor of more secure protocols like Kerberos.
• Enforcing SMB signing and LDAP channel binding to prevent tampering and unauthorized relay.
• Segmenting networks and monitoring authentication traffic for anomalies.

Advanced Techniques

Penetrating Air-Gapped Systems

swipe icon

Violating air-gapped systems—computers or networks that are physically isolated from unsecured or public networks—is a high-complexity attack scenario aimed at breaching environments presumed to be secure by design. These systems are commonly used in critical infrastructure, military, industrial control systems (ICS), and highly sensitive enterprise environments to prevent data leaks or remote compromise.

Despite their isolation, air-gapped systems are not invulnerable. Attackers may breach them using unconventional channels or by exploiting human and physical vectors. Common techniques include:

Removable media: Malware introduced via infected USB drives or external hard disks.
Supply chain attacks: Compromised hardware or software delivered before deployment.
Electromagnetic, acoustic, or thermal side channels: Advanced attacks that extract data through physical signals (e.g., modulated fan noise, power fluctuations, LED activity).
Compromised insiders: Individuals with physical access intentionally or unknowingly introducing malware.

One of the most well-known examples is Stuxnet, which targeted air-gapped industrial systems via USB propagation.

From a cybersecurity perspective, defending air-gapped systems requires a layered approach: strict access controls, hardware and media whitelisting, rigorous auditing of any external inputs, and physical security controls. Monitoring for behavioral anomalies and implementing hardware-level defenses are also critical in minimizing the risk of such highly targeted and sophisticated attacks.

Advanced Techniques

Process Injection using LD_PRELOAD

swipe icon

Hijacking the execution flow using LD_PRELOAD is a technique in Unix-like systems that allows attackers to inject malicious shared libraries into a process before it loads its legitimate ones. This is achieved by manipulating the LD_PRELOAD environment variable, which instructs the dynamic linker to load specified libraries before others during runtime. As a result, an attacker can override standard library functions—such as open, read, or execve—and execute arbitrary code within a target process.

In a typical attack scenario, a malicious actor gains access to a system (often through privilege escalation or misconfigured permissions) and sets LD_PRELOAD to point to a crafted .so file. When a privileged or sensitive application runs, the injected library hooks into function calls and alters their behavior—such as capturing credentials, bypassing security checks, or spawning backdoors—without modifying the original binary.

From a cybersecurity perspective, this technique is dangerous because it leaves no obvious trace in the application’s codebase and can be easily leveraged for stealthy persistence or privilege escalation. It primarily affects dynamically linked binaries and relies on environments that allow user control over the runtime.

Defensive strategies include:
• Restricting the use of LD_PRELOAD for setuid/setgid binaries.
• Employing runtime security frameworks (e.g., SELinux, AppArmor) to limit library loading behavior.
• Monitoring environment variables and library injection activity, especially in privileged contexts.

Social Engineering

QR code Phishing (Quishing)

swipe icon

Quishing (QR code phishing) is a social engineering attack that leverages QR codes to deceive users into visiting malicious websites or performing unintended actions. Instead of clicking a suspicious link, victims are encouraged to scan a QR code—often disguised as legitimate content such as login prompts, payment requests, or security verifications—which then redirects them to a fraudulent site controlled by the attacker.

Quishing poses a unique threat because QR codes abstract the underlying URL, making it difficult for users to assess the destination before scanning. This concealment is often exploited in physical environments (e.g., printed posters, public spaces, fake invoices) or embedded in emails and PDFs, where traditional phishing detection mechanisms may be less effective.

Once scanned, the QR code may lead to credential harvesting pages, trigger malware downloads, or exploit browser vulnerabilities. Because mobile devices are the primary target, attackers often tailor the payloads to exploit mobile-specific weaknesses or trick users into granting permissions.

To mitigate quishing attacks, organizations and users should:

• Avoid scanning untrusted or unsolicited QR codes.
• Use mobile security solutions that preview or analyze QR destinations.
• Educate users about verifying QR code sources and being cautious with requests for credentials or personal information.

Web Attacks

SQL Injection Attack

swipe icon

SQL Injection is a code injection technique that exploits vulnerabilities in the way an application constructs SQL queries. It occurs when user-supplied input is improperly sanitized or directly embedded into a query, allowing an attacker to manipulate the SQL logic executed by the database. This can lead to unauthorized access, data leakage, data modification, or even full compromise of the underlying system.

In a typical attack, the attacker crafts malicious input—such as SQL keywords or operators—that alters the structure of the query. If the application does not validate or escape this input properly, the database interprets it as part of the query logic rather than as plain data. Depending on the database permissions and configuration, the attacker may be able to read sensitive information, delete or modify records, execute administrative commands, or escalate privileges.

From a cybersecurity standpoint, SQL injection represents a critical risk due to its potential impact and the simplicity of exploitation. Common attack vectors include web forms, URL parameters, cookies, and HTTP headers. Effective countermeasures include:

• Using parameterized queries or prepared statements to separate code from data.
• Implementing strict input validation and sanitization routines.
• Limiting database permissions to the minimum required for application functionality.
• Employing web application firewalls (WAFs) and intrusion detection systems to monitor for suspicious query patterns.

Uncategorized

Subdomain Takeover Attack

swipe icon

Did you know that a misconfigured subdomain can become an easy target?
Subdomain Takeover attacks are one of the most effective techniques used by hackers to compromise corporate domains. A forgotten DNS record is all it takes to turn a simple mistake into a security breach for your company.
For the record: it’s also a very simple attack to execute.

Subdomain Takeover is a critical vulnerability that allows hackers to take control of improperly configured subdomains. This technique is based on incorrect DNS configurations or discontinued external services that still have active records. With consequences ranging from data theft to damage to corporate image, subdomain takeover represents a real threat to companies and organizations of all sizes.
It occurs when a DNS record points to an external service (such as Azure, GitHub Pages, AWS S3, or other platforms) that is no longer active. Even though the service has been removed, the DNS record remains active, leaving an open door for a potential attacker. A hacker can then register an account on the targeted service and claim the “orphaned” subdomain, obtaining full control over it.