Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
z9 — Detects PowerShell-based malware artifacts from event logs and performs static analysis on PowerShell scripts to identify malicious activity. | Kitploit
Tools/GitHubGitHub/sh1n0g1/z9
Static AnalysisForensicsMalware AnalysisThreat IntelligenceLog Analysis
GitHubsh1n0g1/z9

z9

Detects PowerShell-based malware artifacts from event logs and performs static analysis on PowerShell scripts to identify malicious activity.

View Repository
688202 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

z9 PowerShell Log Analyzer

Japanese

Z9 Logo

Abstract

This tools detects the artifact of the PowerShell based malware from the eventlog of PowerShell logging.
Online Demo

Install

git clone https://github.com/Sh1n0g1/z9
cd z9
pip install -r requirements.txt

How to use

usage: z9.py [-h] [--output OUTPUT] [-s] [--no-viewer] [--utf8] input

positional arguments:
  input                 Input file path

options:
  -h, --help            show this help message and exit
  --output OUTPUT, -o OUTPUT
                        Output file path
  -s, --static          Enable Static Analysis mode
  --no-viewer           Disable opening the JSON viewer in a web browser
  --utf8                Read scriptfile in utf-8 (deprecated)

Analyze Event Logs (Recommended)

python z9.py <input file> -o <output json>
python z9.py <input file> -o <output json> --no-viewer
ArgumentsMeaning
input fileXML file exported from eventlog
-o output jsonfilename of z9 result
--no-viewer do not open the viewer

Example)

python z9.py util\log\mwpsop.xml -o sample1.json

Analyze PowerShell File Statically

  • This approach will only do the static analysis and may not provide a proper result especially when the sample is obfuscated.
python z9.py <input file> -o <output json> -s
python z9.py <input file> -o <output json> -s --utf8
python z9.py <input file> -o <output json> -s --no-viewer
ArgumentsMeaning
input filePowerShell file to be analyzed
-o output jsonfilename of z9 result
-sperform static analysis
--utf8specify when the input file is in UTF-8
--no-viewer do not open the viewer

Example)

python z9.py malware.ps1 -o sample1.json -s

How to prepare the XML file

Enable PowerShell Logging

  1. Right-click and merge this registry file:util/enable_powershell_logging.reg .
  2. Reboot the PC
  3. All powershell execution will be logged in eventlog

Export Eventlog to XML

  1. Execute this batch file:util/collect_psevent.bat .
  2. The XML files will be created under util/log directory.
  3. Both XML file can be parsed by this tool.

How to Delete the Existing Eventlog

  • Execute this batch file:util/collect_psevent.bat with "Run as Admin"

Authors

hanataro-miz
si-tm
take32457
Bigdrea6
azaberrypi
Sh1n0g1

Download Tool