Chamber of Offensive Security

Author: Mariusz

MSI Shenanigans. Part 1 – Offensive Capabilities Overview

Abstract

Windows Installer file format – .MSI – exhibits capabilities that might be interesting from an offensive perspective. Somewhat hardly explored or discussed, they could be used to circumvent modern cyber defenses and existing threat intelligence rulesets. Knowledge of how Red Teams abuse that format for gaining initial foothold in tougher environments was kept secret to avoid unnecessarily giving away TTPs.

However since Threat Actors started knocking to this door as well, I concluded its finally time to disclose underlying MSI installation format sorcery and let security vendors, defensive community, detection engineers & malware researchers focus on addressing threats posed by them. Some EDRs still don’t seem to support MOTW which could be used to prevent MSI’s execution, as demonstrated by MS Defender for Endpoint’s SmartScreen.

This article opens a serie discussing offensive features presented by MSI Windows Installer file format.

Part 1 discusses the format’s structure, walks through procedures for building it, discusses various viable weaponization scenarios and explains how to dissect MSI specimens + introduces my tool for quickly triaging them (msidump).

Part 2 will tell the untold story of backdooring existing MSIs.

As a closure, Part 3 shall focus on how Red Teams can incorporate MSIs into their engagement Initial Access stages, elaborate a bit on different ways packages can be installed as well as review impact of security countermeasures that could disrupt them.

Continue reading

Backdooring Office Structures. Part 2: Payload Crumbs In Custom Parts

Abstract

First part of this article outlined the basic techniques for hiding malware payloads within Office document structures, as well as mildly touched on dilemmas for embedding them into VBA and pulling from the Internet.

This blog post discusses yet another technique, which as far as I’m concerned – represents a novel, stealthy primitive for storing larger chunks of data that could be easily extracted using specific VBA logic. We introduce an idea of weaponising Custom XML parts storage, available in MS Word, Excel and PowerPoint for the purpose of concealing initial access payloads.

Continue reading

Backdooring Office Structures. Part 1: The Oldschool

Abstract

This blog posts serie discusses various means adversaries employ to deliver their malicious code using macro-enabled Office documents. We outline staged vs. stageless considerations and relevant VBA implementations to then delve into problem of concealing attacker’s intents in OpenXML structures. This article explores currently known and understood strategies, whereas in second part I’ll release my novel (at least as far as I’m concerned) technique for uniformly hiding malware in Word, Excel and PowerPoint in a storage that isn’t covered by open-source maldoc analysis tooling.

Continue reading

ProtectMyTooling – Don’t detect tools, detect techniques

Introduction

Threat Actors and malware developers need to protect their intellectual property just as much as benign software vendors. Every Cybersecurity professional who worked with malware samples will also know, that such a protection employed helps adversaries morph/mutate how their malicious artifacts look & feel under the hood, eventually evading signatured detection.

Executable protectors, obfuscators, encoders, packers/compressors, virtualizers – are all specialized software attempting to manipulate input artifacts, producing output with often altered code layout and contents. Sometimes for file size reduction purposes, other time to fend off reverse engineers aiming to disclose their technology & implementation details.

Continue reading

WarCon 2022 – Modern Initial Access and Evasion Tactics

Hi there!

Looks like its my first blog post, yay! What is it that I should write about to begin that journey? Have no clue really, but also it just happens I had a great pleasure of presenting at todays (25/06/2022) @WarConPL conference.

The conference full of Exploit Development geeks, Vulnerablity Research wizards and other sort of hardcore experts…. and me with that kinda out of place Red Teaming stuff slide deck 🤩

These were my initial thoughts at least, before I started talking. Having finished my presentation turned out many folks in there did their share in Adversary Simulation – and to my surprise – approached me to express how they’ve enjoyed my talk, came to start up cool discussions, shared ideas for awesome new TTPs.

Also, I’ve been asked at numerous occassions whether my slides are going to be shared anywhere. Since I promised, therefore I deliver:

WarCon22 – Modern Initial Access and Evasion Tactics.pdf

Let me know in comments and on Twitter what you think!

Continue reading

© 2024 mgeeky's lair

Theme by Anders NorenUp ↑