Cybercriminals Exploit CVE-2017-0199 to Deliver Fileless Remcos RAT Malware

Research Wing
Research Wing
Innovation and Research
PUBLISHED ON
Nov 21, 2024
10

Introduction

Recently the attackers employed the CVE-2017-0199 vulnerability in Microsoft Office to deliver a fileless form of the Remcos RAT. The Remcos RAT makes the attacker have full control of the systems that have been infected by this malware. This research will give a detailed technical description of the identified vulnerability, attack vector, and tactics together with the practical steps to counter the identified risks.

The Targeted Malware: Remcos RAT

Remcos RAT (Remote Control & Surveillance) is a commercially available remote access tool designed for legitimate administrative use. However, it has been widely adopted by cybercriminals for its stealth and extensive control capabilities, enabling:

  • System control and monitoring
  • Keylogging
  • Data exfiltration
  • Execution of arbitrary commands

The fileless variant utilised in this campaign makes detection even more challenging by running entirely in system memory, leaving minimal forensic traces.

Attack Vector: Phishing with Malicious Excel Attachments

The phishing email will be sent which appears as legitimate business communication, such as a purchase order or invoice. This email contains an Excel attachment that is weaponized to exploit the CVE-2017-0199 vulnerability.

Technical Analysis: CVE-2017-0199 Exploitation

Vulnerability Assessment

  • CVE-2017-0199 is a Remote Code Execution (RCE) vulnerability in Microsoft Office which uses Object Linking and Embedding (OLE) objects.
  • Affected Components:some text
    • Microsoft Word
    • Microsoft Excel
    • WordPad
  • CVSS Score: 7.8 (High Severity)

Mechanism of Exploitation

The vulnerability enables attackers to craft a malicious document when opened, it fetches and executes an external payload via an HTML Application (HTA) file. The execution process occurs without requiring user interaction beyond opening the document.

Detailed Exploitation Steps

  1. Phishing Email and Malicious Document some text
    • The email contains an Excel file designed to make use of CVE-2017-0199.
    • When the email gets opened, the document automatically connects to a remote server (e.g., 192.3.220[.]22) to download an HTA file (cookienetbookinetcache.hta).
  2. Execution via mshta.exe some text
    • The downloaded HTA file is executed using mshta.exe, a legitimate Windows process for running HTML Applications.
    • This execution is seamless and does not prompt the user, making the attack stealthy.
  3. Multi-Layer Obfuscation some text
    • The HTA file is wrapped in several layers of scripting, including: some text
      • JavaScript
      • VBScript
      • PowerShell
    • This obfuscation helps evade static analysis by traditional antivirus solutions.
  4. Fileless Payload Deployment some text
    • The downloaded executable leverages process hollowing to inject malicious code into legitimate system processes.
    • The Remcos RAT payload is loaded directly into memory, avoiding the creation of files on disk.

Fileless Malware Techniques

1. Process Hollowing
The attack replaces the memory of a legitimate process (e.g., explorer.exe) with the malicious Remcos RAT payload. This allows the malware to:

  • Evade detection by blending into normal system activity.
  • Run with the privileges of the hijacked process.

2. Anti-Analysis Techniques

  • Anti-Debugging: Detects the presence of debugging tools and terminates malicious processes if found.
  • Anti-VM and Sandbox Evasion: Ensures execution only on real systems to avoid detection during security analysis.

3. In-Memory Execution

  • By running entirely in system memory, the malware avoids leaving artifacts on the disk, making forensic analysis and detection more challenging.

Capabilities of Remcos RAT

Once deployed, Remcos RAT provides attackers with a comprehensive suite of functionalities, including:

  • Data Exfiltration: some text
    • Stealing system information, files, and credentials.
  • Remote Execution: some text
    • Running arbitrary commands, scripts, and additional payloads.
  • Surveillance: some text
    • Enabling the camera and microphone.
    • Capturing screen activity and clipboard contents.
  • System Manipulation: some text
    • Modifying Windows Registry entries.
    • Controlling system services and processes.
    • Disabling user input devices (keyboard and mouse).

Advanced Phishing Techniques in Parallel Campaigns

1. DocuSign Abuse
Attackers exploit legitimate DocuSign APIs to create authentic-looking phishing invoices. These invoices can trick users into authorising payments or signing malicious documents, bypassing traditional email security systems.

2. ZIP File Concatenation
By appending multiple ZIP archives into a single file, attackers exploit inconsistencies in how different tools handle these files. This allows them to embed malware that evades detection by certain archive managers.

Broader Implications of Fileless Malware

Fileless malware like Remcos RAT poses significant challenges:

  • Detection Difficulties: Traditional signature-based antivirus systems struggle to detect fileless malware, as there are no static files to scan.
  • Forensic Limitations: The lack of disk artifacts complicates post-incident analysis, making it harder to trace the attack's origin and scope.
  • Increased Sophistication: These campaigns demonstrate the growing technical prowess of cybercriminals, leveraging legitimate tools and services for malicious purposes.

Mitigation Strategies

  1. Patch Management some text
    • It is important to regularly update software to address known vulnerabilities like CVE-2017-0199. Microsoft released a patch for this vulnerability in April 2017.
  2. Advanced Email Security some text
    • It is important to implement email filtering solutions that can detect phishing attempts, even those using legitimate services like DocuSign.
  3. Endpoint Detection and Response (EDR)some text
    • Always use EDR solutions to monitor for suspicious behavior, such as unauthorized use of mshta.exe or process hollowing.
  4. User Awareness and Training some text
    • Educate users about phishing techniques and the risks of opening unexpected attachments.
  5. Behavioral Analysis some text
    • Deploy security solutions capable of detecting anomalous activity, even if no malicious files are present.

Conclusion

The attack via CVE-2017-0199 further led to the injection of a new fileless variant of Remcos RAT, proving how threats are getting more and more sophisticated. Thanks to the improved obfuscation and the lack of files, the attackers eliminate all traditional antiviral protection and gain full control over the infected computers. It is real and organisations have to make sure that they apply patches on time, that they build better technologies for detection and that the users themselves are more wary of the threats.

References

  • Fortinet FortiGuard Labs: Analysis by Xiaopeng Zhang
  • Perception Point: Research on ZIP File Concatenation
  • Wallarm: DocuSign Phishing Analysis
  • Microsoft Security Advisory: CVE-2017-0199

PUBLISHED ON
Nov 21, 2024
Category
TAGS
No items found.

Related Blogs