Monday, March 3, 2025
Homecyber securityThreat Actors Exploiting AES Encryption for Stealthy Payload Protection

Threat Actors Exploiting AES Encryption for Stealthy Payload Protection

Published on

SIEM as a Service

Follow Us on Google News

Cybersecurity researchers have uncovered a surge in the use of Advanced Encryption Standard (AES) encryption by threat actors to shield malicious payloads from detection.

This technique, combined with code virtualization and staged payload delivery, is being employed by malware families such as Agent Tesla, XWorm, and FormBook/XLoader to evade static analysis tools and sandbox environments.

Multi-Layered Obfuscation: A Technical Breakdown

Malware developers are leveraging sophisticated obfuscation methods to protect their payloads.

At the forefront is AES encryption, a symmetric block cipher that encrypts data using a shared key.

AES Encryption
AES encryption operating in CBC mode.

Unlike simpler methods such as XOR encryption, AES offers robust security by transforming plaintext into ciphertext through multiple rounds of substitution and permutation.

In the observed samples, AES operates in Cipher Block Chaining (CBC) mode, ensuring that each block of plaintext is encrypted with a unique initialization vector (IV), further complicating decryption efforts.

The initial stage of these malware samples involves embedding encrypted payloads within the Portable Executable (PE) overlay.

This area of the file, often overlooked by static analysis tools, contains key cryptographic parameters such as the AES key and IV, delimited by specific markers.

These parameters are padded with arbitrary sequences to evade signature-based detection systems.

Following decryption, the second stage employs code virtualization using KoiVM, a plugin for the ConfuserEx obfuscation tool.

This technique converts standard code into a proprietary intermediate language that can only be executed by a custom virtual machine (VM).

The VM’s dispatcher routes instructions to specialized handlers, making reverse engineering extremely challenging for analysts.

The Stage 2 payload acts as a dropper, decrypting and loading the final malicious code into memory.

Final Payload Execution: A Stealthy Approach

The final stage involves executing the decrypted payload directly in memory, bypassing traditional file-based detection methods.

The payloads analyzed predominantly belong to the Agent Tesla and XWorm families, with some samples delivering FormBook/XLoader shellcode.

Notably, XWorm further encrypts its configuration parameters using AES in Electronic Codebook (ECB) mode, with hardcoded keys stored within the malware’s variables.

According to Unit 42 researchers, these multi-staged techniques allow threat actors to dynamically load and execute malicious code while evading detection mechanisms.

By leveraging .NET reflection capabilities, malware can introduce new objects or manipulate existing ones at runtime, further complicating analysis.

The adoption of advanced obfuscation techniques underscores the evolving sophistication of cyber threats.

Traditional static analysis tools face significant challenges in detecting such multi-layered malware.

Security solutions must adapt by incorporating behavioral analytics and machine learning to identify anomalies during runtime.

The solutions leverage behavioral threat protection and anti-exploitation modules to detect and neutralize threats before they can execute.

As threat actors continue to innovate, collaboration among cybersecurity researchers and vendors remains critical to counteract these advanced techniques effectively.

Are you from SOC/DFIR Teams? – Analyse Malware Incidents & get live Access with ANY.RUN -> Start Now for Free.

Aman Mishra
Aman Mishra
Aman Mishra is a Security and privacy Reporter covering various data breach, cyber crime, malware, & vulnerability.

Latest articles

33.3 Million Cyber Attacks Targeted Mobile Devices in 2024 as Threats Surge

Kaspersky's latest report on mobile malware evolution in 2024 reveals a significant increase in...

Routers Under Attack as Scanning Attacks on IoT and Networks Surge to Record Highs

In a concerning trend, the frequency of scanning attacks targeting Internet of Things (IoT)...

Google Launches Shielded Email to Keep Your Address Hidden from Apps

Google is rolling out a new privacy-focused feature called Shielded Email, designed to prevent apps...

Hackers Using PowerShell and Microsoft Legitimate Apps to Deploy Malware

Cybersecurity experts are warning of an increasing trend in fileless attacks, where hackers leverage...

Supply Chain Attack Prevention

Free Webinar - Supply Chain Attack Prevention

Recent attacks like Polyfill[.]io show how compromised third-party components become backdoors for hackers. PCI DSS 4.0’s Requirement 6.4.3 mandates stricter browser script controls, while Requirement 12.8 focuses on securing third-party providers.

Join Vivekanand Gopalan (VP of Products – Indusface) and Phani Deepak Akella (VP of Marketing – Indusface) as they break down these compliance requirements and share strategies to protect your applications from supply chain attacks.

Discussion points

Meeting PCI DSS 4.0 mandates.
Blocking malicious components and unauthorized JavaScript execution.
PIdentifying attack surfaces from third-party dependencies.
Preventing man-in-the-browser attacks with proactive monitoring.

More like this

33.3 Million Cyber Attacks Targeted Mobile Devices in 2024 as Threats Surge

Kaspersky's latest report on mobile malware evolution in 2024 reveals a significant increase in...

Routers Under Attack as Scanning Attacks on IoT and Networks Surge to Record Highs

In a concerning trend, the frequency of scanning attacks targeting Internet of Things (IoT)...

Google Launches Shielded Email to Keep Your Address Hidden from Apps

Google is rolling out a new privacy-focused feature called Shielded Email, designed to prevent apps...