Threat intelligence

Adversary in the Middle Attacks - Abusing Trust via Weaponized PDFs

by Bindiya Panwar

Overview

The SonicWall Capture Labs threat research team has identified an active Adversary-in-the-Middle (AiTM) phishing campaign that leverages PDF documents as the initial delivery vector. This is a technique that bypasses multi-factor authentication entirely by stealing authenticated session cookies, not just credentials.

Conventional Phishing Attack Vs Adversary In the Middle

A conventional phishing attack is essentially deception technique, where typically an attacker builds a fake website that looks identical to a legitimate one, subsequently crafting an email designed to create sense of urgency and send it to victims while making it appear to come from a trusted source. The victim, believing it is real, clicks the link, lands on the fake page, and enters their credentials on the phishing page. Those credentials are instantly captured, and the attacker logs in to the real account, where they can steal sensitive data, commit financial fraud, or misuse it in any other way. However, with the widespread adoption of Multi-Factor Authentication (MFA), obtaining a password alone is often insufficient for attackers to gain unauthorized access.

Adversary in the Middle (AiTM ) Attack is an advanced phishing technique that goes beyond just stealing passwords; it steals authenticated session cookies, allowing attackers to bypass Multi-Factor Authentication (MFA) entirely.  In AiTM, the attacker deploys a proxy server between the victim and the genuine website (in this campaign, the Microsoft login page), allowing the attacker to steal and intercept the target’s password and the session cookie that proves their ongoing and authenticated session with the legitimate website

Once the session cookie is exfiltrated, it can be loaded into any browser, and consequently, the session resumes without requiring any further authentication . Below Figure 1 shows the complete infection chain of Adversary in the Middle Attacks

002_Attack_chain_flow_1.jpg
Figure 1: AiTM Attack Chain

Adversary-in-the-Middle (AiTM) attacks overcome the limitation of Conventional Phishing techniques by functioning as a real-time transparent proxy between the victim and the legitimate authentication service. Instead of simply collecting credentials, the AiTM server intercepts and relays all communication between the user and the legitimate website during the login session, effectively bypassing MFA.

Infection Cycle

A PDF document is delivered to the victim’s system via email, which looks legitimate. To seek immediate action from the user action buttons with texts like “View Legal Documents on amcal multi-housing” or “View Document”. Figure 2 shows some of the PDF files using in the ongoing campaign.  

003_pdf_1.png
Figure 2: PDF Files used in the Campaign

Once the user clicks on it, a malicious URL opens, hoping to see the document. Before any content is rendered, the victim encounters a CAPTCHA challenge, either a slider or a checkbox variant. This serves dual purposes: it appears legitimate, and it prevents automated analysis tools from reaching the phishing payload. Below Figure 3 shows the CAPTCHA validation page using a slider:

 

004_Captcha_1human.jpg
Figure 3: Captcha

In another scenario, a human check is done via a check box, as shown in the figure below: 

005_captcha_2.jpg
Figure 4: Captcha showing HumanCheck

 

Below is the network capture, showing the redirection of the malicious page:

006_bs6.jpg
Figure 5: Malicious URL Redirection

 

The rendered webpage employs anti-analysis techniques, including debugger traps that halt execution upon inspection, preventing visibility into the page's underlying behavior.

007_Anti_debug.jpg
Figure 6: Anti Analysis techniques

The malicious page presents the victim with a randomly generated code alongside a "Copy Code" button, mimicking a legitimate verification flow, which is similar to what users encounter in real authentication portals. The victim is prompted to copy the code under the pretence that it is required to access or verify the document. This single interaction of copying the code is sufficient to trigger the automatic redirect to the genuine Microsoft login page, meaning the attack progresses with minimal user friction. The code itself serves no functional verification purpose; it is purely a social engineering mechanism designed to make the redirect feel like a natural next step rather than a suspicious event.

In the first scenario, “Review Document” sent by Docusign as shown below: 

008_code.jpg
Figure 7: Review Document with random code

 

In the second scenario, Non-Disclosure Agreement is presented with a 3-step completion process one of which is random code verification, as shown in the image below:

009_pdf3_code.PNG
Figure 8: Non-Disclosure Agreement with code verification

 

In yet another scenario, a blurred check document is shown in the background to view the check victim needs to complete the verification, as shown in the figure below:

010_captcha.jpg
Figure 9: Random code on a malicious webpage and the Microsoft authentication page
IP fingerprinting:

The page makes a cross-origin request to ipinfo.io via a Cloudflare-hosted intermediary. Since ipinfo[.]io permits browser-based access, the CORS policy is satisfied, and the request succeeds. This mechanism simultaneously performs geolocation, traffic filtering, and legitimacy scoring to evade sandboxed analysis environments.

011_ip_fingerprinting.jpg
Figure 10: IP fingerprinting request

 

The attacker operates a reverse proxy that transparently forwards all victim traffic to the real Microsoft endpoint. The victim authenticates normally by submitting credentials, receiving the MFA challenge, and approving the push or entering the OTP, while every packet traverses the attacker's infrastructure.

Although this phase of the attack exhibited multiple characteristics associated with device code phishing, only the AiTM component of the attack chain could be conclusively verified. Then, the real site issues an authenticated session cookie, and the proxy intercepts it. The attacker loads that cookie into their own browser. From the server's perspective, the session is valid, MFA-verified, and active, no credentials or additional factors required. 

SonicWall customers are protected against this threat.

Indicator Of Compromise ( IOCs ) 
IOCIOC TYPE
8a33f094ec95d11ebb5d7905354c7a04e00268a6a95408323a6690560a183853PDF
468620b8f8f4e2d62fd7db4b78cb55de3bbcc522c5f2388cb2caafcbae0e074aPDF
b269747c42eec3d6629951c56add3a472bd00a0fde97fb3c922d9c2c942e9a9dPDF
0dc0a30e3d26fc3566791cf341b2be2b606446d9660a5110e2432ea0d0b181c2PDF
29cfd2e7437560d8a641f123661e3c814fffc642ac8d02a03fe8230d774858bdPDF
5b0013eb20c756215b201e564dabb4601d87def1addced27e7cc5087f5e72e01PDF
684a4b9daa3793cc41cba80e61cf7159e99031499e03f5f59f89c5883cf25aaaPDF
901ef11851c97a93268f3c5f7d54219ddaec1b758189d3054b2afc2fd1fabffcPDF
d49b835f6b06af0f037bb61fe04cf4d6368ac4351b5514941f54def8c85b722aPDF
de8a6688164c0fc22edfdb47ce3065a34d105aea2b9c14876625b3c7ad35cb37PDF
468620b8f8f4e2d62fd7db4b78cb55de3bbcc522c5f2388cb2caafcbae0e074aPDF
8a33f094ec95d11ebb5d7905354c7a04e00268a6a95408323a6690560a183853PDF
b269747c42eec3d6629951c56add3a472bd00a0fde97fb3c922d9c2c942e9a9dPDF
hxxp://rothan[.]com[.]mx/URL
hxxps://check[.]ricsta[.]workers[.]dev/URL
hxxps://review[.]canvario[.]nl/admin-sign/URL
hxxps://fdeboogwoz-3040541580[.]ekliniktofit[.]com/remittance/slide[.]htmlURL
hxxps://tracking[.]us[.]nylas[.]com/l/0edbb50019d342d6ad0197363f4ea1cc/0/18b1d8c26df027607b36fded8622abb452f483cfe036426b9bacce50c59eb90e?cache_buster=1778103430URL

 

 

Share This Article

An Article By

Bindiya Panwar

Threat Researcher

Bindiya is a security researcher specializing in malware reverse engineering and threat analysis, with proven experience investigating infection chains, evasion techniques, and diverse attack vectors. Actively contributes to threat intelligence through technical research and content creation, delivering actionable insights to strengthen user and enterprise security.

Related Articles

  • The Small Components Behind the High Performance of SonicWall Connectivity
    Read More
  • Bridging IPv4 and IPv6: Native Connectivity for Modern ISP Networks
    Read More