Hackers Weaponize GenAI To Turn Clean Webpages Malicious In Seconds

Categories:

Cybercriminals are exploiting generative AI (GenAI) to transform innocent-looking webpages into sophisticated phishing traps in real time.

According to new research from Palo Alto Networks’ Unit 42 published January 21, 2026, attackers use trusted large language model (LLM) APIs to dynamically generate malicious JavaScript directly in victims’ browsers.

This evades traditional network defenses, as the initial page contains no suspicious code, leaving no static payload for scanners.

The proof-of-concept (PoC) replicates real-world attacks like LogoKit, an advanced phishing kit first spotted in 2021 and still active in 2025 campaigns targeting banks, logistics, and entities like HunCERT.

LogoKit pulls brand logos from Clearbit or Google Favicon APIs based on the victim’s email in the URL, auto-fills forms, and exfiltrates credentials via AJAX POST to attacker servers like mettcoint[.]com.

A benign page loads, then queries LLM services (e.g., DeepSeek or Google Gemini) via client-side API calls potentially proxied through CDNs or WebSockets.

Crafted prompts bypass safety guardrails, tricking the AI into outputting polymorphic JavaScript snippets for phishing pages.

Workflow of the PoC. The first two steps are initial preparation, and the third is an example of generating malicious content to be rendered in the browser. (source: unit42)
Workflow of the PoC. The first two steps are initial preparation, and the third is an example of generating malicious content to be rendered in the browser. (source: PaloAlto)

These assemble and execute at runtime using eval(), rendering personalized lures that steal credentials based on email, location, or geodata.

This “LLM-augmented runtime assembly” builds on prior threats: Unit 42’s earlier LLM-obfuscated JavaScript research, APT28’s LLM-powered malware, and ESET’s AI-ransomware. It affects 36% of daily detected malicious pages showing runtime behaviors.​

Attack Workflow, Evasion, and PoC Details

Unit 42’s three-step PoC expands LogoKit evasion:

  1. Select and Fragment Payload: Break LogoKit’s static JS personalization via email parsing and credential exfil—into snippets.
  2. Prompt Engineering Mastery: Convert to plain-text prompts with rephrasing (e.g., “generic AJAX POST” vs. blocked “exfiltrate credentials”). Embed Base64 IoCs; LLMs output unique variants per query, as in Figure 3 diffspure polymorphism. Simple tweaks jailbreak guardrails, reducing hallucinations via specificity.​
  3. Runtime Magic: Embed prompts in clean HTML/JS. Browser hits LLM API over trusted domains (bypassing filters), assembles via eval(), and executes. Proxies or non-HTTP like WebSockets hide further. Result: Functional phishing mimicking brands, zero network traces.​
Example of prompt engineering to bypass LLM guardrails and generate JavaScript code for phishing content (source: unit42)
Example of prompt engineering to bypass LLM guardrails and generate JavaScript code for phishing content (source: PaloAlto)

Evasion excels: Trusted LLM traffic blends legit; per-victim polymorphism kills signatures; eval() runtime foils static analysis. Echoes HTML smuggling (MITRE T1027.006) and “last-mile reassembly”.​

Indicator TypeDetails
Phishing KitLogoKit (email-based logo fetch, credential theft)
Exfil Domainsmettcoint[.]com/css/nk/error-404.php; flyplabtk[.]s3.us-east-2.amazonaws.com
APIs AbusedLLM chat APIs (DeepSeek, Gemini); Clearbit, Google Favicon
ObfuscationBase64 exfil URLs in prompts; eval() assembly
ExecutionPolymorphic JS variants (syntactic diffs per query)
Related ThreatsAPT28 LLM-malware; EtherHiding blockchain hiding

Follow us on Google News , LinkedIn and X to Get More Instant Updates. Set Cyberpress as a Preferred Source in Google.

Varshini
Varshini
Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies..

Trending News

Related Stories