Ausnahme gefangen: SSL certificate problem: certificate is not yet valid ๐Ÿ“Œ MSI Dump - A Tool That Analyzes Malicious MSI Installation Packages, Extracts Files, Streams, Binary Data And Incorporates YARA Scanner

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š MSI Dump - A Tool That Analyzes Malicious MSI Installation Packages, Extracts Files, Streams, Binary Data And Incorporates YARA Scanner


๐Ÿ’ก Newskategorie: IT Security Nachrichten
๐Ÿ”— Quelle: kitploit.com


MSI Dump - a tool that analyzes malicious MSI installation packages, extracts files, streams, binary data and incorporates YARA scanner.

On Macro-enabled Office documents we can quickly use oletools mraptor to determine whether document is malicious. If we want to dissect it further, we could bring in oletools olevba or oledump.

To dissect malicious MSI files, so far we had only one, but reliable and trustworthy lessmsi. However, lessmsi doesn't implement features I was looking for:

  • quick triage
  • Binary data extraction
  • YARA scanning

Hence this is where msidump comes into play.


Features

This tool helps in quick triages as well as detailed examinations of malicious MSIs corpora. It lets us:

  • Quickly determine whether file is suspicious or not.
  • List all MSI tables as well as dump specific records
  • Extract Binary data, all files from CABs, scripts from CustomActions
  • scan all inner data and records with YARA rules
  • Uses file/MIME type deduction to determine inner data type

It was created as a companion tool to the blog post I released here:

Limitations

  • The program is still in an early alpha version, things are expected to break and triaging/parsing logic to change
  • Due to this tool heavy relience on Win32 COM WindowsInstaller.Installer interfaces, currently it is not possible to support native Linux platforms. Maybe wine python msidump.py could help, but haven't tried that yet.

Use Cases

  1. Perform quick triage of a suspicious MSI augmented with YARA rule:
cmd> python msidump.py evil.msi -y rules.yara

Here we can see that input MSI is injected with suspicious VBScript and contains numerous executables in it.

  1. Now we want to take a closer look at this VBScript by extracting only that record.

We see from the triage table that it was present in Binary table. Lets get him:

python msidump.py putty-backdoored.msi -l binary -i UBXtHArj

We can specify which to record dump either by its name/ID or its index number (here that would be 7).

Lets have a look at another example. This time there is executable stored in Binary table that will be executed during installation:

To extract that file we're gonna go with

python msidump.py evil2.msi -x binary -i lmskBju -O extracted

Where

  • -x binary tells to extract contents of Binary table
  • -i lmskBju specifies which record exactly to extract
  • -O extracted sets output directory

For the best output experience, run the tool on a maximized console window or redirect output to file:

python msidump.py [...] -o analysis.log

Full Usage

PS D:\> python .\msidump.py --help
options:
-h, --help show this help message and exit

Required arguments:
infile Input MSI file (or directory) for analysis.

Options:
-q, --quiet Surpress banner and unnecessary information. In triage mode, will display only verdict.
-v, --verbose Verbose mode.
-d, --debug Debug mode.
-N, --nocolor Dont use colors in text output.
-n PRINT_LEN, --print-len PRINT_LEN
When previewing data - how many bytes to include in preview/hexdump. Default: 128
-f {text,json,csv}, --format {text,json,csv}
Output format: text, json, csv. Default: text
-o path, --outfile path
Redirect program output to this file.
-m, --mime When sniffing inner data type, report MIME types

Analysis Modes:
-l what, --list what List specific table contents. See help message to learn what can be listed.
-x what, --extract what
Extract data from MSI. For what can be extracted, refer to help message.

Analysis Specific options:
-i number|name, --record number|name
Can be a number or name. In --list mode, specifies which record to dump/display entirely. In --extract mode dumps only this particular record to --outdir
-O path, --outdir path
When --extract mode is used, specifies output location where to extract data.
-y path, --yara path Path to YARA rule/directory with rules. YARA will be matched against Binary data, streams and inner files

------------------------------------------------------

- What can be listed:
--list CustomAction - Specific table
--lis t Registry,File - List multiple tables
--list stats - Print MSI database statistics
--list all - All tables and their contents
--list olestream - Prints all OLE streams & storages.
To display CABs embedded in MSI try: --list _Streams
--list cabs - Lists embedded CAB files
--list binary - Lists binary data embedded in MSI for its own purposes.
That typically includes EXEs, DLLs, VBS/JS scripts, etc

- What can be extracted:
--extract all - Extracts Binary data, all files from CABs, scripts from CustomActions
--extract binary - Extracts Binary data
--extract files - Extracts files
--extract cabs - Extracts cabinets
--extract scripts - Extrac ts scripts

------------------------------------------------------

TODO

  • Triaging logic is still a bit flakey, I'm not very proud of it. Hence it will be subject for constant redesigns and further ramifications
  • Test it on a wider test samples corpora
  • Add support for input ZIP archives with passwords
  • Add support for ingesting entire directory full of YARA rules instead of working with a single file only
  • Currently, the tool matches malicious CustomAction Types based on assessing their numbers, which is prone to being evaded.
    • It needs to be reworked to properly consume Type number and decompose it onto flags

Tool's Name

Apparently when naming my tool, I didn't think on checking whether it was already taken. There is another tool named msidump being part of msitools GNU package:


Show Support

This and other projects are outcome of sleepless nights and plenty of hard work. If you like what I do and appreciate that I always give back to the community, Consider buying me a coffee (or better a beer) just to say thank you!

Mariusz Banach / mgeeky, (@mariuszbit)
<mb [at] binary-offensive.com>


...



๐Ÿ“Œ MSI Dump - A Tool That Analyzes Malicious MSI Installation Packages, Extracts Files, Streams, Binary Data And Incorporates YARA Scanner


๐Ÿ“ˆ 199.61 Punkte

๐Ÿ“Œ The Yaralyzer is a new tool for visualizing and force decoding YARA and regular expression matches in binary and text data of any kind


๐Ÿ“ˆ 42.58 Punkte

๐Ÿ“Œ Yaralyzer - Visually Inspect And Force Decode YARA And Regex Matches Found In Both Binary And Text Data, With Colors


๐Ÿ“ˆ 37.2 Punkte

๐Ÿ“Œ Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/brave-browser


๐Ÿ“ˆ 36.13 Punkte

๐Ÿ“Œ Elcomsoft System Recovery 6.0 Extracts Hibernation Files and Data to Break Full Disk Encryption Passwords


๐Ÿ“ˆ 35.21 Punkte

๐Ÿ“Œ Package Analysis dynamic analyzes packages in open-source repositories


๐Ÿ“ˆ 34.54 Punkte

๐Ÿ“Œ Detecting Malicious Files with YARA Rules as They Traverse the Network


๐Ÿ“ˆ 32.53 Punkte

๐Ÿ“Œ DataSurgeon - Quickly Extracts IP's, Email Addresses, Hashes, Files, Credit Cards, Social Secuirty Numbers And More From Text


๐Ÿ“ˆ 31.86 Punkte

๐Ÿ“Œ Photon- A Web Crawler which Extracts URLs, E-mails, Files, Website Accounts and much more.


๐Ÿ“ˆ 31.86 Punkte

๐Ÿ“Œ ChatGPT extracts data for ischaemic stroke almost perfectly - Useful for thrombectomy data transfer


๐Ÿ“ˆ 29.7 Punkte

๐Ÿ“Œ Just-Metadata - Tool That Gathers And Analyzes Metadata About IP Addresses


๐Ÿ“ˆ 29.61 Punkte

๐Ÿ“Œ XSS-Scanner - XSS Scanner That Detects Cross-Site Scripting Vulnerabilities In Website By Injecting Malicious Scripts


๐Ÿ“ˆ 28.66 Punkte

๐Ÿ“Œ YARASAFE - Automatic Binary Function Similarity Checks with Yara


๐Ÿ“ˆ 28.5 Punkte

๐Ÿ“Œ FindYara - IDA Python Plugin To Scan Binary With Yara Rules


๐Ÿ“ˆ 28.5 Punkte

๐Ÿ“Œ New Microsoft Tool Analyzes Memory Corruption Bugs


๐Ÿ“ˆ 27.83 Punkte

๐Ÿ“Œ Dump file creation failed due to error during dump creation


๐Ÿ“ˆ 27.65 Punkte

๐Ÿ“Œ The 2018 cost of a data breach study from ponemon institute analyzes hundreds of cost factors surrounding a breach, and offers unique insight.


๐Ÿ“ˆ 27.59 Punkte

๐Ÿ“Œ Asigra Tigris Data Protection now incorporates CDR for protection against deeply embedded malware


๐Ÿ“ˆ 27.57 Punkte

๐Ÿ“Œ software extracts emails, texts and contacts and could be used to track movements


๐Ÿ“ˆ 26.57 Punkte

๐Ÿ“Œ Kaspersky Open Sources Internal Distributed YARA Scanner


๐Ÿ“ˆ 26.41 Punkte

๐Ÿ“Œ IRFuzz - Simple Scanner with Yara Rule


๐Ÿ“ˆ 26.41 Punkte

๐Ÿ“Œ Spyre - Simple YARA-based IOC Scanner


๐Ÿ“ˆ 26.41 Punkte

๐Ÿ“Œ Kraken - Cross-platform Yara Scanner Written In Go


๐Ÿ“ˆ 26.41 Punkte

๐Ÿ“Œ Open source โ€˜Package Analysisโ€™ tool finds malicious npm, PyPI packages


๐Ÿ“ˆ 26.39 Punkte

๐Ÿ“Œ Package Analysis โ€“ OpenSSf Tool to Detect Malicious Packages in Popular Open-Source Repositories


๐Ÿ“ˆ 26.39 Punkte

๐Ÿ“Œ Hacker extracts customer data from Canadian Telecom Firm after rebuttal


๐Ÿ“ˆ 26.35 Punkte











matomo