Wednesday, September 9, 2026

Hackers Abuse OneDrive.exe via DLL Sideloading to Run Malicious Code

Security researchers have discovered a sophisticated attack technique that exploits Microsoft’s OneDrive application to execute malicious code without detection.

The method, known as DLL sideloading, leverages the way Windows loads library files to trick legitimate applications into running attacker-controlled software.

This technique represents a significant threat to enterprise environments where OneDrive is widely deployed across thousands of machines.

Understanding the Attack Vector

The vulnerability stems from how Windows searches for library files when an application launches.

When OneDrive.exe starts, the operating system searches for required files, such as version.dll, in multiple locations. It checks the application’s directory first before searching system directories.

Attackers exploit this predictable search order by placing a malicious version.dll in the same folder as OneDrive.exe.

When the application launches, it unknowingly loads the attacker’s code instead of the legitimate Microsoft library, allowing unauthorized execution within the trusted OneDrive process context.

This approach is particularly dangerous because the malicious code runs under the identity and permissions of OneDrive.exe, a system-level application.

Security tools often trust processes that are digitally signed by Microsoft, making this technique extremely effective at bypassing traditional endpoint detection and response systems.

The attacker’s code inherits all the elevated privileges and network access that OneDrive normally possesses.

The proof-of-concept discovered by security researchers demonstrates additional sophistication beyond basic DLL sideloading.

The malicious library uses DLL proxying, a technique that maintains compatibility with the host application.

Rather than immediately crashing when OneDrive cannot find expected functions, the malicious DLL exports the same functions as the legitimate version.dll and forwards legitimate calls to the real system library.

This keeps OneDrive running normally while the attacker’s code operates invisibly in the background.

The implementation further employs advanced API hooking using Vectored Exception Handling and memory page protection techniques.

Instead of directly modifying code in obvious ways that security products might detect, the attack intercepts function calls at the Windows API level.

When OneDrive attempts to execute the CreateWindowExW function, the hooking mechanism captures this action and redirects execution flow to attacker-controlled code.

The technique continuously re-arms itself to maintain persistence throughout the application’s runtime.

In the proof-of-concept, the attacker executes arbitrary code execution through process creation. The malicious payload waits two seconds after DLL injection, then launches a command with elevated privileges.

While the demonstration uses a simple notepad process, in real attacks, this could execute ransomware, steal credentials, deploy backdoors, or establish command-and-control connections.

The two-second delay serves as a hiding mechanism, allowing the initial OneDrive process to appear legitimate before the actual attack begins.

Organisations using OneDrive for file synchronisation and collaboration face a particular risk since the application maintains persistent elevated permissions and network connectivity.

An attacker gaining code execution within OneDrive can access synchronised files, exfiltrate sensitive documents, establish persistence on the network, and move laterally to other systems.

This technique is especially concerning in hybrid work environments where employees synchronise corporate data through OneDrive across personal and corporate devices.

Organisations should implement multiple detection layers, including monitoring for unexpected DLL files in application directories, restricting where applications can load libraries, and implementing behavioural analysis for suspicious process creation from trusted applications.

Security teams should review OneDrive deployment configurations and ensure file integrity monitoring is enabled for critical application directories.

Follow us on Google NewsLinkedIn, and X to Get Instant Updates and Set GBH as a Preferred Source in Google.

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Hot this week

How To Access Dark Web Anonymously and know its Secretive and Mysterious Activities

What is Deep Web The deep web, invisible web, or...

How to Build and Run a Security Operations Center (SOC Guide) – 2023

Today’s Cyber security operations center (CSOC) should have everything...

Russian Hackers Bypass EDR to Deliver a Weaponized TeamViewer Component

TeamViewer's popularity and remote access capabilities make it an...

Web Server Penetration Testing Checklist – 2026

Web server pentesting is performed under three significant categories: identity,...

ATM Penetration Testing – Advanced Testing Methods to Find The Vulnerabilities

ATM Penetration testing, Hackers have found different approaches to...

GoldFactory Weaponizes Open-Source Vwork App Cloner in Gigabud Banking Malware Attacks

GoldFactory has expanded the evasion capabilities of its Gigabud...

Windows BitLocker Flaw Lets Attackers Execute Code on Vulnerable Systems

Microsoft disclosed CVE-2026-69449, an Important-severity vulnerability in Windows BitLocker....

ChatGPT Flaw Could Let Attackers Steal Gmail Data Across User Accounts

Security researchers have revealed a recently patched flaw in...

Hackers Weaponize Agentic AI to Automate Reconnaissance, Exploitation and Post-Exploitation

Threat actors are increasingly operationalizing agentic artificial intelligence to...

Hackers Exploit Critical FortiGate Flaw to Deploy AI-Assisted PivotC2 RAT

Threat actors are actively exploiting a critical vulnerability in...

Windows Defender ShieldCrash 0-Day Lets Attackers Read Arbitrary Files as SYSTEM

A newly published proof-of-concept (PoC) called ShieldCrash reveals an...

DeepSeek, Alibaba and Chinese AI Firms Extract Billions of Tokens From U.S. AI Models

U.S. intelligence and cybersecurity agencies have accused six China-based...

Related Articles

Recent News