Skip to main content

Identify AV signatures in files using binary search.

Project description

ThreatCheck-Py

Python port of Rasta-Mouse's ThreatCheck, a tool to identify AV signatures in files.

Requirements

  • Python 3.8 or higher
  • Windows OS (for Defender and AMSI scanners)

Installation

From PyPi

pip install threatcheck-py

From Source

git clone https://github.com/ruvolof/threatcheck-py.git
cd threatcheck-py
pip install -e .

Usage

Command Line Options

$ threatcheck --help
usage: threatcheck [-h] [-e {defender,amsi,clamav}] [-f FILE] [-u URL] [-d DIRECTORY] [--debug] [--version]

Identify AV signatures in files

options:
  -h, --help            show this help message and exit
  -e {defender,amsi,clamav}, --engine {defender,amsi,clamav}
                        Scanning engine (default: defender)
  -f FILE, --file FILE  Analyze a file on disk
  -u URL, --url URL     Analyze a file from a URL
  -d DIRECTORY, --directory DIRECTORY
                        Analyze all files in a directory
  --debug               Enable debug output
  --version             show program's version number and exit

Defender Test Environment Setup

It is recommended to force autosubmission of samples to never send them, or the amount of notification can be overwhelming. This can be forced through group policies:

  1. Open Local Group Policy Editor (gpedit.msc)
  2. Navigate to Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > MAPS
  3. Double click on "Send file samples when further analysis is required"
  4. Set it to "Enabled" and in the bottom-left panel select "Never send"

All other Defender settings can be left on as long:

  1. There's a path exception in place for the original location of your samples (otherwise real-time protection will prevent the initial loading of the files).
  2. (Maybe?) The original location has to be on your C drive. In my experience Defender ignores exception for external drives and I run in problem 1 above.

Credits

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

threatcheck_py-0.2.0.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

threatcheck_py-0.2.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file threatcheck_py-0.2.0.tar.gz.

File metadata

  • Download URL: threatcheck_py-0.2.0.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for threatcheck_py-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1b9ca2aa9fa353f9134fa03cb0a3c4e36c12df2e8e0845b2b6cc52cc865ecda8
MD5 9c32af0df2df42b9dbd4f30cca31eb0d
BLAKE2b-256 249f8b6c2b8ca5fa6c6b80ed0fedb2051b48c071dfda392a570cb6f68bf08793

See more details on using hashes here.

Provenance

The following attestation bundles were made for threatcheck_py-0.2.0.tar.gz:

Publisher: python-publish.yml on ruvolof/threatcheck-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file threatcheck_py-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: threatcheck_py-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for threatcheck_py-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe2dcc09ea294b481a940b6c9897123d0371fcba82212bd6c07fdc552e2524f1
MD5 40289f3350b02330d989eb4fe989d1a0
BLAKE2b-256 169b4ea6eade7b0f65f922fb84d83cf107a6f3012a1c005fb44caf67ee364953

See more details on using hashes here.

Provenance

The following attestation bundles were made for threatcheck_py-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on ruvolof/threatcheck-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page