CH3: Threat Vectors and Attack Surfaces
Introduction
An attack vector is a path or method that an attacker uses to gain initial access to a system or network. Understanding attack vectors is essential because defensive strategy must address how threats actually enter the organization, not just what happens once they're inside.
The modern threat landscape encompasses diverse vectors spanning communication channels, visual media, remote access mechanisms, endpoints, supply chains, and human psychology. Organizations often excel at defending against one vector while neglecting another equally dangerous path. This chapter examines the most prevalent attack vectors, their underlying mechanisms, and how they interact with organizational vulnerabilities.
By the end of this chapter, you will understand how attackers exploit communication channels, media, network access, and human behavior. You will recognize attack surfaces in your environment and develop strategies to reduce exposure across multiple vectors simultaneously.
Learning Objectives
After completing this chapter, you will be able to:
- Identify message-based attack vectors including phishing, Business Email Compromise (BEC), smishing, and attacks leveraging collaboration tools.
- Analyze image, attachment, and browser-based vectors, including malicious QR codes, macro exploits, and JavaScript injection.
- Explain network-based and remote access vectors including compromised infrastructure, RDP attacks, and credential-based threats.
- Assess endpoint, supply chain, and physical vectors that expand attack surfaces beyond traditional network boundaries.
- Categorize vulnerabilities that enable attack vectors and prioritize mitigation based on organizational risk profile.
3.1 Message-Based Vectors
Email as an Attack Vector
Email remains the dominant attack vector because it combines scale, trust, and technical accessibility. Organizations receive millions of emails daily, making manual inspection infeasible. Additionally, email has deep historical integration into business processes, making users reluctant to question its trustworthiness.
Phishing
Phishing is a broad category of social engineering attacks delivered via email. Phishing attempts to trick users into clicking malicious links, opening infected attachments, or divulging credentials.
Spear-phishing targets specific individuals or organizations rather than using mass distribution. Spear-phishing emails often reference legitimate business processes, use the target's real name, or reference recent company events. This personalization increases click-through rates because the email appears legitimate.
Whaling is spear-phishing that targets high-value individuals such as executives, board members, or senior managers. Whaling emails often impersonate authority figures or external business partners and request urgent action (wire transfers, credential changes, confidential information access).
Vishing and smishing extend phishing beyond email:
- Vishing (voice phishing): Attackers call targets, impersonate IT support or other authority figures, and request credentials or system access.
- Smishing (SMS phishing): Attacks delivered via text message, often directing users to malicious links or fake login pages.
Business Email Compromise (BEC)
Business Email Compromise attacks exploit the organizational communication patterns and trust relationships. BEC attacks typically unfold as follows:
- The attacker researches the target organization, identifying key business relationships, financial processes, and personnel.
- The attacker registers a domain name similar to a known business partner (e.g.,
acmecorp-us.cominstead ofacmecorp.com) or compromises a legitimate email account. - The attacker sends an email that appears to come from the business partner or internal executive, requesting an urgent financial transaction or credential change.
- Lacking mechanisms to verify the request independently, the recipient complies.
- Funds are transferred to attacker-controlled accounts, or credentials are changed, locking out the legitimate owner.
BEC attacks often bypass email filtering because they do not contain malware or malicious links. The attack relies entirely on social engineering and exploits the trust and urgency embedded in business email.
Message-Based Attacks in Collaboration Tools
Modern organizations use collaboration platforms such as Slack, Microsoft Teams, Discord, and Zoom. These platforms present attack vectors similar to email:
- Direct message phishing: Attackers create accounts impersonating colleagues or external partners and send direct messages with malicious links.
- Channel hijacking: Attackers compromise user accounts and post malicious links in high-visibility channels.
- Meeting injection: Attackers join legitimate meetings uninvited or register with names similar to actual participants, creating confusion and opportunities for social engineering.
Warning
Collaboration tools often have weaker authentication than email systems. Multi-factor authentication (MFA) adoption lags, and users may be less vigilant about messages received through chat platforms than email.
3.2 Image, Attachment, and Browser-Based Vectors
Malicious Attachments
Email attachments present multiple vectors:
Office Macros
Macros are scripts embedded in Microsoft Office documents (Word, Excel, PowerPoint). Macros can perform arbitrary actions: downloading malware, executing PowerShell commands, or modifying system files.
When a user opens a document containing macros, Office prompts the user to enable macros. Attackers craft emails with pretexts such as "You must enable macros to view this document" or "This file requires macros for proper rendering." Users frequently enable macros because the request appears routine or legitimate.
PDF and RTF Exploitation
Portable Document Format (PDF) readers contain complex code to render documents. Vulnerabilities in PDF readers (especially older versions) allow attackers to embed exploits that execute when the document opens, bypassing user interaction requirements.
Rich Text Format (RTF) documents similarly contain vulnerabilities that allow code execution. RTF exploits are often more reliable than PDF exploits because RTF parsing is simpler and vulnerabilities are less frequently patched.
Compressed Archives
Attackers distribute malware inside compressed archive files (ZIP, RAR, 7Z) to evade email scanning. Archives may be password-protected, requiring the user to enter a password provided in the accompanying email. This requirement bypasses automated extraction by email filters.
Malicious QR Codes
QR codes (Quick Response codes) encode URLs or other data in visual format. A QR code on a phishing email or website may direct users to a fake login page, malware download, or credential harvesting site.
QR codes are difficult for users to validate because the encoded content is not visible without scanning. Unlike URLs, which display the destination domain, QR codes appear as generic matrices. Users cannot easily predict where a QR code will direct them.
Browser-Based Vectors
Malicious Browser Extensions
Browser extensions are small programs installed in web browsers to add functionality. Attackers distribute malicious extensions through official extension stores (Chrome Web Store, Firefox Add-ons) using deceptive names or by compromising legitimate extensions.
Malicious extensions intercept traffic, modify web pages, steal credentials, inject advertisements, or exfiltrate browsing history. Extensions operate with broad permissions to web content, making them powerful attack vectors.
Drive-By Downloads and Malvertising
A drive-by download occurs when a user visits a website and malware is downloaded and executed without the user's knowledge or consent. Modern browsers have reduced the severity of drive-by downloads through automatic updates and sandboxing, but vulnerabilities still exist.
Malvertising is a variant where attackers place malicious advertisements in legitimate advertising networks. These advertisements direct users to malware distribution sites or redirect to exploit kits that target browser vulnerabilities.
Cookie and Session Theft
Cookies store session tokens and authentication credentials. If an attacker can steal cookies, they can hijack authenticated sessions without knowing the victim's password.
Session theft occurs through:
- Man-in-the-middle attacks: Intercepting unencrypted traffic and reading cookies sent to servers.
- Cross-site scripting: Malicious JavaScript exfiltrating cookies from the browser.
- Local file access: Malware accessing the browser's local storage where cookies are cached.
JavaScript Injection and Cross-Site Scripting (XSS)
Cross-Site Scripting vulnerabilities in web applications allow attackers to inject malicious JavaScript that executes in the victim's browser in the context of the vulnerable website.
For example, if a website's search function does not properly sanitize input, an attacker could craft a search URL containing JavaScript code: https://site.com/search?q=<script>stealCookies()</script>. When another user visits this URL, the JavaScript executes in their browser, potentially stealing their session cookies.
3.3 Network-Based and Remote Access Vectors
Compromised Infrastructure
Organizations often trust third-party services, ISPs, DNS providers, and CDNs (Content Delivery Networks). If these providers are compromised, traffic flowing through them becomes vulnerable.
DNS hijacking redirects domain names to attacker-controlled servers. Users intending to visit legitimate websites are redirected to phishing pages or malware distribution sites. DNS hijacking can occur through:
- Compromised DNS servers: Attackers modify DNS records at authoritative servers.
- Compromised routers: Home or office routers are reconfigured to redirect DNS queries to attacker-controlled servers.
- ISP-level manipulation: Compromised ISP infrastructure redirects traffic for entire regions.
Remote Access Protocols
Organizations grant remote access to employees, contractors, and support personnel using protocols such as RDP (Remote Desktop Protocol), VNC (Virtual Network Computing), and VPN (Virtual Private Network).
Remote Desktop Protocol (RDP)
RDP enables graphical remote desktop access to Windows systems. RDP is convenient but creates significant attack surface:
- Default credentials: Many administrators deploy systems with default or shared passwords.
- Weak credentials: Attackers use credential spraying and brute-force attacks against RDP services exposed to the Internet.
- Protocol vulnerabilities: Older RDP versions contain remote code execution vulnerabilities.
- Credential harvesting: Attackers capture credentials used to authenticate to RDP, then use those same credentials for lateral movement.
VPN and Remote Access Compromises
VPN concentrators aggregate remote access and authenticate users. Compromised VPN credentials grant direct access to internal networks. VPN infrastructure may lack multi-factor authentication (MFA), making credential theft sufficient for full network access.
3.4 Endpoint, Supply Chain, and Physical Vectors
Mobile Devices
Mobile devices (smartphones, tablets) are endpoints with access to email, messaging, and corporate applications. Mobile attack vectors include:
- Malicious mobile applications: Apps distributed through official stores or sideloaded from third-party sources that steal data or provide system access.
- Mobile device compromise: Exploiting OS vulnerabilities to gain system-level access and monitor all user activity.
- SIM swapping: Attackers convince mobile carriers to transfer phone numbers to attacker-controlled devices, intercepting SMS-based authentication codes.
Supply Chain Compromises
Organizations depend on software, hardware, and services from external vendors. Compromising a vendor may provide access to all customers using that vendor's products.
Software supply chain attacks include:
- Malicious code injection: Attackers compromise a software vendor's build system and inject malware into legitimate releases.
- Dependency vulnerabilities: Open-source libraries used by many organizations contain vulnerabilities exploited to compromise all downstream consumers.
- Trojanized legitimate tools: Attackers distribute modified versions of legitimate tools (npm packages, Docker images, development tools) through package repositories.
Hardware supply chain attacks include:
- Firmware modifications: Attacker-installed firmware provides persistence even after OS reinstalls.
- Physical device tampering: Attackers modify hardware components or insert additional components (monitoring devices, hardware keyloggers) before devices reach customers.
USB and Removable Media
USB attacks exploit the trust users place in removable media:
- USB drop attacks: Attackers leave USB devices in parking lots or public spaces. Users who find the devices insert them into computers, executing malware.
- Malicious USB devices: Purpose-built devices that emulate keyboards or network adapters, executing commands or capturing traffic.
Internet of Things (IoT) and Operational Technology (OT)
IoT devices such as smart building controls, industrial sensors, and networked cameras frequently lack security updates and run outdated firmware. Compromised IoT devices may serve as entry points to networks or platforms for distributed attacks.
Operational Technology systems control physical infrastructure: power grids, manufacturing equipment, water treatment facilities. OT systems often prioritize reliability over security and may run unpatched systems for decades. Compromised OT systems can cause physical harm (equipment damage, power outages, product safety hazards).
Wireless Vectors
Bluetooth and NFC
Bluetooth is a short-range wireless protocol used for headsets, mice, keyboards, and mobile devices. Bluetooth vulnerabilities allow attackers to:
- Intercept communications: Eavesdrop on unencrypted Bluetooth data.
- Inject commands: Send malicious commands to Bluetooth devices.
- Blue jacking: Send unsolicited messages to Bluetooth-enabled devices.
Near-Field Communication (NFC) is a contactless protocol used in payment cards, access badges, and public transportation tickets. Attackers can read or modify NFC data from a distance of a few centimeters, enabling payment fraud or credential forgery.
Wi-Fi Attacks
Rogue access points broadcast Wi-Fi networks with names identical to legitimate networks. Users automatically connect to the rogue network, allowing attackers to intercept all traffic, insert malicious content, or harvest credentials.
WPA2/WPA3 vulnerabilities: Even encrypted Wi-Fi networks contain vulnerabilities. The KRACK attack, disclosed in 2017, allowed decryption of WPA2 traffic. Newer WPA3 protocol addresses some issues but deployment remains incomplete.
Physical Security and Tailgating
Tailgating (also called "piggybacking") occurs when an unauthorized person follows an authorized employee through a secured door without using a badge. An attacker gains physical access to a facility, enabling theft, sabotage, or planting of malicious devices.
Shoulder surfing is observation of a user entering credentials, PINs, or sensitive information. Attackers may stand nearby and watch a user unlock a computer or enter a password.
Human-Based Vectors
Social engineering exploits human psychology rather than technical vulnerabilities. Effective social engineering techniques include:
- Pretexting: Creating a false scenario to build trust and extract information (e.g., "I'm from IT, resetting your password").
- Authority impersonation: Posing as a legitimate authority figure (manager, law enforcement, security personnel) to compel compliance.
- Urgency and scarcity: Creating pressure to bypass normal caution (e.g., "Your account will be closed if you don't verify immediately").
- Reciprocity: Performing a favor to create obligation (e.g., "I helped you before, now please help me access the system").
Social engineering is highly effective because humans are inherently trusting and vulnerable to manipulation. Technical controls alone cannot eliminate human-based attack vectors.
Analyst Perspective
The most successful attacks often combine multiple vectors. A phishing email (message vector) contains a malicious attachment (attachment vector) targeting a user who works remotely (remote access vector). Defending against one vector while neglecting others leaves critical gaps.
3.5 Vulnerability Types and Attack Surfaces
System Vulnerabilities
System vulnerabilities are weaknesses in operating systems, server software, and system services:
- Unpatched software: Running outdated versions with known exploitable vulnerabilities.
- Weak authentication: Default credentials, easily guessable passwords, or lack of multi-factor authentication.
- Insecure configurations: Systems deployed with unnecessary services enabled, open shares, or overly permissive access controls.
Application Vulnerabilities
Application vulnerabilities include:
Input Validation Flaws
Injection vulnerabilities occur when applications fail to validate or sanitize user input. Common injection types include:
- SQL injection: Attackers insert SQL commands into input fields, allowing unauthorized database queries or modifications.
- Command injection: Attackers inject shell commands through application input, achieving remote code execution.
- LDAP injection: Attackers manipulate LDAP queries to modify directory access controls or extract sensitive information.
Authentication and Access Control
Broken authentication allows attackers to compromise user accounts or bypass login mechanisms.
Broken access control allows users to access resources or perform actions outside their authorization, such as viewing other users' data or performing administrative functions without proper permissions.
Insecure Deserialization
Applications sometimes serialize objects (convert them to byte streams) for storage or transmission. If an application deserializes untrusted data without validation, attackers can inject malicious objects that execute code during deserialization.
Cross-Site Request Forgery (CSRF)
CSRF exploits the trust a website places in a user's browser. If a user is authenticated to a website and subsequently visits an attacker-controlled page, the attacker can craft requests that the browser executes in the context of the authenticated session, potentially transferring funds or changing account settings.
Credential Vulnerabilities
Credential-based attacks target authentication mechanisms:
- Credential stuffing: Attackers obtain credential lists from previous breaches and attempt to reuse credentials against other services.
- Password spraying: Attackers systematically try common passwords (qwerty, Password123, etc.) against many accounts.
- Brute-force attacks: Attackers systematically try all possible password combinations until finding a match.
- Credential replay: Attackers intercept credentials transmitted over unencrypted channels and replay them to authenticate without knowing the password.
Misconfiguration
Misconfiguration vulnerabilities arise from deployment and operational choices rather than software flaws:
- Cloud storage buckets exposed to public read or write access through misconfigured permissions.
- Development credentials committed to version control repositories, exposing API keys and passwords.
- Debug endpoints left enabled in production environments.
- Open ports allowing unauthorized services to be discovered and exploited.
Emerging Vulnerabilities: AI and LLMs
Large Language Model (LLM) attacks exploit the training and operational characteristics of AI systems:
- Prompt injection: Attackers craft inputs that manipulate LLM behavior, extracting training data, bypassing safety guardrails, or generating malicious content.
- Data poisoning: Attackers inject malicious data into training datasets, causing models to learn harmful patterns.
- Model extraction: Attackers query models repeatedly to reverse-engineer proprietary models.
Emerging Vulnerabilities: Identity Providers
Identity providers (single sign-on systems, directory services) are high-value targets because compromising the identity provider provides access to all services that trust it:
- Federation vulnerabilities: Attackers exploit trust relationships between identity providers to access federated services.
- Token forgery: Attackers create forged authentication tokens, impersonating legitimate users.
- Credential storage vulnerabilities: Identity provider databases are attractive targets because they often contain plaintext or poorly encrypted credentials.
Putting It Together: Layered Defense Against Multiple Vectors
A financial services organization assesses its attack surface:
Identified Vectors: 1. Email phishing and BEC attacks. 2. RDP compromise and lateral movement. 3. Compromised software dependencies in custom applications. 4. Malicious USB device insertion by physical intruders.
Layered Defense Strategy:
-
Email vector: Deploy email filtering with sandboxing for attachment detonation. Require MFA for all email-based authentication. Implement DMARC/SPF/DKIM to prevent domain spoofing. Train users to identify phishing indicators.
-
RDP vector: Disable RDP on the Internet (use VPN for remote access instead). Require MFA for all remote access. Implement network segmentation to limit lateral movement if RDP is compromised. Monitor RDP connections for suspicious patterns.
-
Supply chain vector: Implement SBOM (Software Bill of Materials) scanning to identify vulnerable dependencies. Use automated dependency update tools. Require security assessments from critical vendors.
-
Physical vector: Implement badge access controls with logging. Provide USB ports in locked cabinets. Deploy device-control software to restrict USB peripheral access.
This multi-vector approach acknowledges that no single control is sufficient; instead, layered defenses address the most likely and highest-impact vectors.
Chapter Summary
-
Message-based vectors (email, collaboration tools) exploit trust and scale. Phishing, spear-phishing, BEC, vishing, and smishing use social engineering to trick users into clicking malicious links, opening infected attachments, or divulging credentials.
-
Attachment-based attacks leverage macro-enabled Office documents, PDF/RTF vulnerabilities, and compressed archives that evade scanning. Malicious QR codes provide a user-friendly method to direct targets to phishing pages or malware.
-
Browser-based vectors include malicious extensions, drive-by downloads, malvertising, cookie theft, session hijacking, and JavaScript injection. Modern browser security has reduced but not eliminated these risks.
-
Remote access protocols (RDP, VPN) present significant attack surface when exposed to the Internet or protected with weak authentication. Compromised remote access credentials grant direct internal network access.
-
Supply chain vulnerabilities span software dependencies, hardware modifications, and vendor compromises. A single compromised vendor may affect hundreds of downstream organizations.
-
Endpoint, IoT, and OT devices expand attack surfaces beyond traditional IT systems. Mobile devices, smart buildings, industrial equipment, and legacy systems often run unpatched firmware with weak authentication.
-
Wireless protocols (Bluetooth, NFC, Wi-Fi) enable attacks from distance with minimal user interaction. Rogue access points and protocol vulnerabilities remain common.
-
Physical security vectors including tailgating, shoulder surfing, and USB attacks demonstrate that technical controls alone are insufficient. Human factors and physical access must be addressed.
-
Emerging vulnerabilities in AI systems (prompt injection, data poisoning), identity providers (federation attacks, token forgery), and cloud infrastructure (misconfiguration) represent rapidly evolving threats.
-
Effective defense requires a layered approach addressing multiple vectors simultaneously. No single control is sufficient; organizations must understand their attack surface and prioritize based on likelihood, impact, and organizational risk profile.