Saturday, November 16, 2024
HomeComputer SecurityMacro Pack - Automatize Obfuscation and Generation of Malicious Office Documents

Macro Pack – Automatize Obfuscation and Generation of Malicious Office Documents

Published on

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.

- Advertisement - SIEM as a Service

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

Critical TP-Link DHCP Vulnerability Let Attackers Execute Arbitrary Code Remotely

A critical security flaw has been uncovered in certain TP-Link routers, potentially allowing malicious...

Chinese SilkSpecter Hackers Attacking Black Friday Shoppers

SilkSpecter, a Chinese financially motivated threat actor, launched a sophisticated phishing campaign targeting e-commerce...

Cybercriminals Launch SEO Poisoning Attack to Lure Shoppers to Fake Online Stores

The research revealed how threat actors exploit SEO poisoning to redirect unsuspecting users to...

Black Basta Ransomware Leveraging Social Engineering For Malware Deployment

Black Basta, a prominent ransomware group, has rapidly gained notoriety since its emergence in...

Free Webinar

Protect Websites & APIs from Malware Attack

Malware targeting customer-facing websites and API applications poses significant risks, including compliance violations, defacements, and even blacklisting.

Join us for an insightful webinar featuring Vivek Gopalan, VP of Products at Indusface, as he shares effective strategies for safeguarding websites and APIs against malware.

Discussion points

Scan DOM, internal links, and JavaScript libraries for hidden malware.
Detect website defacements in real time.
Protect your brand by monitoring for potential blacklisting.
Prevent malware from infiltrating your server and cloud infrastructure.

More like this

Digital Wallets Bypassed To Allow Purchase With Stolen Cards

Digital wallets enable users to securely store their financial information on smart devices and...

Best SIEM Tools List For SOC Team – 2024

The Best SIEM tools for you will depend on your specific requirements, budget, and...

Oracle Releases Biggest Security Update in 2024 – 372 Vulnerabilities Are Fixed – Update Now!

Oracle has released its April 2024 Critical Patch Update (CPU), addressing 372 security vulnerabilities...