Friday, February 21, 2025
HomeComputer SecurityMacro Pack - Automatize Obfuscation and Generation of Malicious Office Documents

Macro Pack – Automatize Obfuscation and Generation of Malicious Office Documents

Published on

SIEM as a Service

Follow Us on Google News

Malware delivery trends change every day. For the last few years, we have observed various hacker groups like ( APT12 to Turla ) uses various techniques to deliver malware on the system or network.

One of the best technique hackers groups used is to write malicious code and obfuscate it and embed with Office documents and deliver to the victim through Social engineering ( Spearphishing Attachment ).

Lack of user awareness results with (Compromising the system to lateral movement in the network). Let’s check out the tool Macro pack to do some automation in embedding malicious code into Office Documents.

Here we have used Kali Linux(Attacker Machine) and Victim Machine (Windows 10)

You can Download the Macro Pack from GitHub.

Attacker Machine:-

Macro Pack
  • Metasploit is a very good tool to understand the attack logic and infect Word or Excel documents with malicious Metasploit payloads.
  • Let me generate the malicious VBA code with Msfvenom.
Macro Pack
  • Here I have crafted a payload for VBA which can be embedded into Office Document and once a victim opens a malicious DOCX file, reverse connection should connect back to attacker machine to access and control victim workstation on port 443.

Generation of Weaponized Document:

Macro Pack

-f = input-file=INPUT_FILE_PATH A VBA macro file or file containing params

-o = obfuscate Same as ‘–obfuscate-form –obfuscate-names –obfuscate-strings

-G = generate=OUTPUT_FILE_PATH.

  • Most anti-virus programs can easily read the attacker’s raw code and block, so I used -o parameter to obfuscate malicious VBA payload.
  • Decoding the obfuscated code is quite challenging for most Anti-virus vendors.
  • Now your Weaponized document is ready to fly!

Starting Metasploit:

  • As soon as the victim clicks the malicious document “hikeletter.docx”, Attacker should get full access to the victim workstation.

Attacker Accessing Victim Workstation:

  • Victim compromised and full access to the system obtained! Shell! Shell! Shell!
  • According to below MITRE ATT&CK Matrix, an attacker can do lateral movement to the exfiltration of data.
Macro Pack

Virus Total Analysis:

  • I have uploaded this file to Virus total and found detection for 29/60. Other vendors say this document as clean or undetected category.
Macro Pack
Macro Pack

File-less malware’s are challenging and evolving faster. Windows utility ( Powershell) is abused in later stages to run an executable on the system local storage or run the code into memory itself.

Implement best endpoint solutions, Email Security products to block unsolicited emails or files. Spread awareness to employees with internal phishing exercises.

Happy Hacking!

You can follow us on Linkedin, Twitter, Facebook for daily Cybersecurity and hacking news updates

Latest articles

SPAWNCHIMERA Malware Exploits Ivanti Buffer Overflow Vulnerability by Applying a Critical Fix

In a recent development, the SPAWNCHIMERA malware family has been identified exploiting the buffer...

Sitevision Auto-Generated Password Vulnerability Lets Hackers Steal Signing Key

A significant vulnerability in Sitevision CMS, versions 10.3.1 and earlier, has been identified, allowing...

NSA Allegedly Hacked Northwestern Polytechnical University, China Claims

Chinese cybersecurity entities have accused the U.S. National Security Agency (NSA) of orchestrating a...

ACRStealer Malware Abuses Google Docs as C2 to Steal Login Credentials

The ACRStealer malware, an infostealer disguised as illegal software such as cracks and keygens,...

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

Is this Website Safe: How to Check Website Safety – 2025

is this website safe? In this digital world, Check a website is safe is...

LegionLoader Abusing Chrome Extensions To Deliver Infostealer Malware

LegionLoader, a C/C++ downloader malware, first seen in 2019, delivers payloads like malicious Chrome...

PentestGPT – A ChatGPT Powered Automated Penetration Testing Tool

GBHackers come across a new ChatGPT-powered Penetration testing Tool called "PentestGPT" that helps penetration...