AI-Assisted Malware: When Artificial Intelligence Helps Cybercriminals

September 3, 2025 | By Pietro Dubsky

Cybersecurity faces a new challenge. Attackers are systematically using artificial intelligence to create sophisticated attacks that can bypass traditional security measures. Analysis of real malware captured in September 2025 reveals a disturbing trend of hybrid attacks combining AI-generated content with expert knowledge of human hackers.

Anatomy of Modern AI-Assisted Attacks

A recently captured phishing email represents a textbook example of this new generation of threats. At first glance, it appears to be regular business correspondence - an order from a Czech company Nexa Tools and Equipment s.r.o. with an address on Vinohradská in Prague 3. The email contains professionally written Czech text, legitimate contact details, and an order attachment.

The reality is different. This is a carefully constructed phishing attack that combines several advanced techniques:

1. Perfect Social Engineering

The email uses classic social engineering techniques, but at an exceptionally high level:

  • Legitimate business identity with realistic address and phone numbers
  • Urgent business context - request for quick order confirmation
  • Czech localization including the name "Marek Novák" and Prague address
  • Professional appearance matching standard business correspondence

2. Technical Masking

The attackers used multiple layers of technical masking:

  • Sender mismatch: From field shows Marek.Novak@outlook.com, but actual address is office@pinehurstrnfg.com
  • DKIM signature: False authentication to increase trustworthiness
  • Domain spoofing: Registration of domain pinehurstrnfg.com specifically for this campaign

3. Multi-Stage Payload

The attachment contains a 7-Zip archive with a JavaScript file. This approach has several advantages:

  • Bypassing email filters: Compressed files are harder to scan
  • Smaller size: 17 KB is under the limits of most email servers
  • Legitimate format: .7z doesn't raise as much suspicion as .exe

Where AI Comes Into Play

When analyzing the JavaScript code in the attachment, characteristic features emerge that suggest the use of artificial intelligence:

Masking Czech Content

The malware contains hundreds of lines of meaningful Czech comments that have no connection to the code functionality:

//Radiostationer monospore coffined svanekniv
//Miljplanens elementarladnings stemmespildets
//Skdebrn serigraphic fljet katanker
//Svigerfdre megalichthyidae nonexerciser

These comments serve as a masking layer, and their scope and quality suggest AI generation. A human programmer wouldn't insert such an amount of irrelevant but grammatically correct text.

Systematic Obfuscation

The code uses a consistent substitution technique where the string "Srinks" is replaced by other characters to deobfuscate actual commands. This technique is applied systematically throughout the code, which is typical of automated production.

Hybrid Architecture

The malware structure suggests a combination of:

  • AI-generated masking content: Czech comments, obfuscation layers
  • Human expertise: Functional malware code, PowerShell payload, Windows API calls
  • Automated diversification: Polymorphic variations to bypass detection

Why Traditional Protection Fails

This new generation of malware presents challenges for traditional security solutions for several reasons:

Email Filters

Spam filters like SpamAssassin have problems with:

  • Legitimate appearance: Email looks like standard business correspondence
  • Absence of known patterns: AI-generated content doesn't contain typical spam indicators
  • Obfuscation: Masking techniques hide the real purpose
  • Localization: Czech texts may confuse filters trained on English

Antiviruses

Traditional antiviruses fail due to:

  • New signatures: Each AI-generated variant looks different
  • Fileless techniques: Code runs in memory without saving to disk
  • Living-off-the-land: Using legitimate tools (PowerShell, WScript)
  • Multi-stage payloads: Real malware is downloaded only upon execution

Behavioral Detection

Even advanced behavioral detection has problems with:

  • Gradual activation: Malware activates in multiple phases
  • Legitimate API calls: Uses standard Windows functions
  • Delayed execution: Long delay between launch and malicious activity

Technical Attack Breakdown

Phase 1: Email Delivery

Email passes through standard filters thanks to legitimate appearance and DKIM signature.

Phase 2: User Interaction

User extracts and runs JavaScript file from archive.

Phase 3: Local Preparation

var klaneren = Konge202.ExpandEnvironmentStrings("%APPDATA%")+'\\Waster';
function Afka217(Delagt, Revoltu) {
    var Ignom = new ActiveXObject("Scripting.FileSystemObject");
    var Folkefl = Ignom.CreateTextFile(Delagt, true); 
    Folkefl.Write(Revoltu);
    Folkefl.Close();
}

Code creates file Waster in %APPDATA% folder with additional obfuscated PowerShell payload.

Phase 4: PowerShell Execution

$filmstje=$env:appdata+'\\Waster';
$Headlongwi=(Get-Item $filmstje).OpenText().ReadToEnd();
$befng=$Headlongwi[4236..4238] -join '';
.$befng $Headlongwi

PowerShell reads file, extracts command (probably iex - Invoke-Expression) and runs the rest as code.

Phase 5: Network Communication

Final payload likely downloads additional malware from the internet and ensures system persistence.

Real Dangers

Immediate Risks

  • Credential theft from browsers and applications
  • Ransomware deployment for file encryption
  • Cryptojacking - cryptocurrency mining in background
  • Remote access for attackers (backdoor)

Long-Term Consequences

  • Persistence - malware survives system reboot
  • Lateral movement - spreading through corporate network
  • Data exfiltration - theft of sensitive documents
  • Botnet enrollment - inclusion in botnet network

Business Impact

  • System outages due to infection or cleanup
  • Reputational damage from customer data breaches
  • Regulatory fines for GDPR/NIS2 violations
  • Financial losses from ransom or system recovery

Defense Strategies Against AI-Assisted Attacks

Immediate Measures

Email security:

  • Implement sandboxing for all attachments
  • Block JavaScript files in attachments
  • Set DMARC/SPF/DKIM checks more strictly
  • Train users to recognize encoding errors in emails

Endpoint protection:

  • Activate PowerShell logging and monitoring
  • Implement application whitelisting
  • Set up behavioral analysis for suspicious activities
  • Monitor file creation in %APPDATA% folders

Long-Term Strategies

AI-powered defense:

  • Use machine learning for anomaly detection
  • Implement NLP analysis to detect AI-generated content
  • Deploy behavioral profiling of users and systems

User education:

  • Train employees in social engineering recognition
  • Create incident reporting processes
  • Conduct regular phishing simulations
  • Emphasize verification of unexpected requests

Technical hardening:

  • Implement zero-trust architecture
  • Segment networks using micro-segmentation
  • Set up continuous monitoring of all systems
  • Create incident response plans

Future of AI in Cyber Attacks

The trend of using AI in malware will only intensify. We expect:

Shorter Time Frames

  • Faster iterations of new malware variants
  • Real-time adaptation to detection mechanisms
  • Personalized attacks based on target person/company

Greater Sophistication

  • Deep fake technology in social engineering
  • Advanced language models for perfect localization
  • Autonomous penetration testing for reconnaissance

Broader Availability

  • Malware-as-a-Service platforms with AI capabilities
  • Democratization of advanced techniques for less technical criminals
  • Lower barrier to entry for cybercrime

Conclusion

AI-assisted malware represents a paradigm shift in cybersecurity. Traditional approaches based on signatures and static rules are no longer sufficient. Defense must be as intelligent and adaptive as the attacks.

The key is layered security combining technical measures with the human factor. No technical solution is perfect - educated users remain the most important line of defense.

Organizations that don't adapt their security strategies to this new reality will become easy targets for increasingly sophisticated attacks. The time to act is now.

Need help analyzing suspicious emails or implementing defensive measures? Contact me for cybersecurity consultation.

« Back to Blog