Threat Intelligence

The Employee Handbook That Built Its Own Links at Runtime

Written by Audian Paxson | Sep 15, 2025 11:00:00 AM
TL;DR A phishing email impersonating a cybersecurity vendor's HR department delivered an HTML attachment with zero static forms and zero embedded URLs. Inline JavaScript used String.fromCharCode to construct the phishing link at runtime, and a base64-encoded token identified the target recipient. Static analysis rated the attachment LOW risk because there was nothing to scan. The email body was a single image promoting an employee handbook acknowledgement, with no selectable text. IRONSCALES Themis flagged the first-time sender from a nonprofit advocacy domain and the behavioral mismatch between an internal HR communication and external delivery infrastructure.
Severity: High Credential Harvesting Brand Impersonation Social Engineering MITRE: {'id': 'T1566.001', 'name': 'Phishing: Spearphishing Attachment'} MITRE: {'id': 'T1027', 'name': 'Obfuscated Files or Information'} MITRE: {'id': 'T1204.002', 'name': 'User Execution: Malicious File'}

The HTML attachment contained zero forms. Zero external URLs. Zero embedded links of any kind. Static analysis scored it LOW risk, because from a markup perspective there was nothing malicious to find.

That was the point.

The phishing links did not exist until the file was opened in a browser. Inline JavaScript assembled them character by character at runtime, pulling a base64-encoded recipient token from a variable declaration to personalize the attack. The file had no malicious content until it had a victim.

A Handbook Nobody Wrote

The email arrived from Advocacy@cdr-ct[.]org, a nonprofit advocacy domain sending to a cybersecurity vendor for the first time. SPF and DKIM passed for the sender domain. The subject line referenced the target organization's brand, giving the message the appearance of an internal HR communication arriving through external infrastructure.

The body was a single image. No selectable text anywhere. The image displayed an "EMPLOYEE HANDBOOK" banner with a "Reminder Acknowledgement request terms form" call to action. Because the entire message was rendered as a graphic, text-based analysis engines (keyword matching, NLP, sentiment detection) had nothing to process. The lure existed only as pixels.

The attachment filename mimicked an internal document: a 2025 handbook reference with an alphanumeric tracking code appended. An additional .eml attachment was also present but could not be analyzed by the scanning infrastructure, producing a FileNotFoundError during automated inspection.

JavaScript That Builds Itself

Inside the HTML file, a variable declaration stored the obfuscated recipient token: a base64 string wrapped in delimiter characters. Decoded, the token resolved to the target's email address. A String.fromCharCode sequence then assembled the credential harvesting URL character by character, concatenated the decoded email as a parameter, and rendered the result as a clickable element in the DOM.

No eval() call appeared in the source. The script relied on standard DOM manipulation to inject the link, which is why automated sandbox evasion scoring flagged it as MEDIUM for obfuscated script rather than HIGH. Without eval(), without document.write(), without any of the typical red-flag functions, the JavaScript fell below the heuristic threshold that triggers dynamic execution in most scanning environments.

This is the detection gap that runtime link construction exploits. Static scanners see clean markup. Dynamic scanners need to actually execute the JavaScript and inspect the resulting DOM, a step many email security pipelines skip for HTML attachments because of performance and resource constraints.

See Your Risk: Calculate how many threats your SEG is missing

Indicators of Compromise

TypeIndicatorContext
Sender EmailAdvocacy@cdr-ct[.]orgFirst-time sender, nonprofit advocacy domain
AttachmentHTML file with alphanumeric tracking code in filenameRuntime link construction via obfuscated JS
Script PatternString.fromCharCode + base64 recipient token variableObfuscated URL assembly, no static URLs
Attachment.eml file (unanalyzable)FileNotFoundError during automated scan

MITRE ATT&CK Mapping

TechniqueIDContext
Phishing: Spearphishing AttachmentT1566.001HTML attachment with obfuscated JavaScript payload
Obfuscated Files or InformationT1027String.fromCharCode + base64 token conceals phishing URL
User Execution: Malicious FileT1204.002Opening HTML file in browser triggers runtime link construction
Email Attack of the Day is a daily series from IRONSCALES spotlighting real phishing attacks caught by Adaptive AI and our community of 35,000+ security professionals. Each post breaks down a real attack. What it looked like, why it worked, and what to do about it.

Related attacks

Attack What happened
The Bank Statement You Had to Unlock With Your Birthday: PII-Gated PDF Evasion From Authenticated InfrastructureA fully authenticated email from banking infrastructure delivered a password-protected PDF that required the recipient's mobile number and date of birth...
136 Bytes Was All It Took: The SVG That Redirected to a Credential HarvestA 136-byte SVG attachment used a JavaScript onload event to redirect the browser to a credential-harvesting page.
The Tooltip Said Coupa. The Link Said Genesis Cleaning. Only One of Them Was Real.A phishing email passed SPF, DKIM, and DMARC for a UAE law firm domain while its CTA button displayed a Coupa procurement portal tooltip but linked to an...
Three Domains, Two Brands, One Frankenphish: The DocuSign Lure That Led to MailchimpA DocuSign-themed email stitched together Lloyds Banking Group Qualtrics survey blocks, resolved its CTA to Mailchimp.
The Fax Notification That Was Just a Pregnancy Test for Your CuriosityA Gmail account sent a fax notification with a 24KB HTML attachment.