Skip to main content

Command Obfuscation Detection

This project currently only supports cmd.exe command obfuscation detection on Windows. In a previous iteration of this project, we used deep learning. Now, we have shifted the approach towards XGBoost instead.

Quick Installation

You can install our package through pip!

pip install obfuscation-detection

This is a basic usage of our package:

from obfuscation_detection import ObfuscationDetectionClassifier

model = ObfuscationDetectionClassifier()
commands = ['cmd.exe /c "echo Invoke-DOSfuscation"',
            'cm%windir:~ -4, -3%.e^Xe,;^,/^C",;,S^Et ^^o^=fus^cat^ion&,;,^se^T ^ ^ ^B^=o^ke-D^OS&&,;,s^Et^^ d^=ec^ho I^nv&&,;,C^Al^l,;,^%^D%^%B%^%o^%"',
            'cat /etc/passwd']
y = model.predict(commands)
y_prob = model.predict_proba(commands)

# 1 is obfuscated, 0 is non-obfuscated
print(y) # [0, 1, 0]
print(y_prob)

Usage

  1. Install python dependencies: pip install -r requirements.txt

  2. For quick usage, give a .csv file with column commands and you can run the commands through the model: python obfuscation_detection/main.py --filename commands.csv

  3. You can also write your own scripts to use the model class directly: python obfuscation_detection/model.py

Contributing

Contributions are welcomed! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

Release files for obfuscation-detection 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for obfuscation-detection 1.0.0
File Size Uploaded
obfuscation_detection-1.0.0.tar.gz 30.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for obfuscation-detection 1.0.0
File Interpreter ABI Platform
obfuscation_detection-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 59.9 kB

Release files / obfuscation_detection-1.0.0.tar.gz

Download URL obfuscation_detection-1.0.0.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5dd63ea8102aea818de431ba39f6756927825aac1bde7c734d9ed8b0eb9b0fff
BLAKE2b-256 checksum
How to use checksums
9a4739b4131bc27ba4816387e910746fd52d0229549e08117e8678c780dc767c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / obfuscation_detection-1.0.0-py3-none-any.whl

Download URL obfuscation_detection-1.0.0-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffa5c2c2641775d34743732fa535715a4451ed9a7767f239de4e278885d8dded
BLAKE2b-256 checksum
How to use checksums
a8adc0a302eb8aaa29d4d4a9b28e0bdc16452749d539a06ee97be148fb085f3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7

2 release files

0.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page