Skip to main content

Execute commands across Windows systems using multiple RCE methods (WinRM, SMB, WMI, RDP, SSH, MSSQL)

Project description

exec-across-windows

A tool for executing commands across multiple Windows systems using various remote execution methods. Automatically tries multiple techniques until one succeeds, based on return codes and output. Makes executing commands given credentials a hell of a lot easier.

Features

  • Multiple RCE Methods: Automatically tries various Windows remote execution techniques:
    • WinRM (HTTP/HTTPS)
    • PSExec (Impacket)
    • SMBExec (NetExec)
    • WMI (NetExec)
    • AtExec (Impacket)
    • RDP (NetExec)
    • SSH (NetExec)
    • MSSQL (Impacket)
  • Multi-threaded: Execute commands across multiple hosts simultaneously
  • Automatic Pass-the-Hash: Just paste the NTLM hash as the credential

Installation

pip install exec-across-windows

External Dependencies

This tool requires the following external tools to be installed:

# Impacket (for PSExec, AtExec, MSSQL)
pipx install impacket

# NetExec (for SMBExec, WMI, RDP, SSH)
pipx install git+https://github.com/Pennyw0rth/NetExec

# Evil-WinRM (for WinRM)
gem install evil-winrm

Usage

Basic Usage

# Execute command on single host
exec-across-windows 192.168.1.10 administrator Password123 whoami

# Execute across IP range of 192.168.1.1 to 192.168.1.50
exec-across-windows 192.168.1.1-50 admin Pass123 "net user"

# Use hash instead of password
exec-across-windows 10.0.0.1-10 admin :{32-bit-hash} whoami

IP Range Format

Supports various formats:

  • Single IP: 192.168.1.10
  • Range: 192.168.1.1-254
  • Multiple ranges: 10.0.1-5.10-20 (expands to all combinations)
  • File with IP ranges: targets.txt

Credential File Format

Create a text file with alternating username/password lines:

administrator
Password123!
admin
Pass123
backup_admin
:aad3b435b51404eeaad3b435b51404ee

Lines starting with # are treated as comments. For NT hashes, use them directly as the password.

Command-Line Options

Options:
  -v                      Verbose output (shows all tool attempts)
  -o                      Show successful command output (WARNING: may trigger AV)
  -f <file>               Use credential file instead of single username/password
  --threads <n>           Number of concurrent threads (default: 10)
  --tools <list>          Comma-separated list of tools to try in order
  --timeout <seconds>     Command timeout in seconds (default: 15)
  --run-all               Run all tools instead of stopping at first success
  --skip-portscan         Skip port scanning and attempt all tools

Todo

Add kerberos support lol

  • Requires supporting hostnames and configuring /etc/krb5.conf for tools like evil-winrm

License

MIT License - see LICENSE file for details

Disclaimer

This tool is intended for authorized security assessments only. Ensure you have proper authorization before using this tool on any systems you do not own or have explicit permission to test.

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

exec_across_windows-1.0.2.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

exec_across_windows-1.0.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file exec_across_windows-1.0.2.tar.gz.

File metadata

  • Download URL: exec_across_windows-1.0.2.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for exec_across_windows-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c089846862d811d19c1f9e8d41c6082d8ee4577b55a01c1cd51b50fe4c66bd86
MD5 02d8682aaa17703892cfdb8474f39be4
BLAKE2b-256 c233277f8d6577123529df7658885ec23353ad4db0364182968110818566d3f6

See more details on using hashes here.

File details

Details for the file exec_across_windows-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for exec_across_windows-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 566c6a195b2eca999ead5d6a7b0fe057ea6aa7c1ca972bbf75d2017993f1f930
MD5 8e1f029f49431f9f56ef73e36befafad
BLAKE2b-256 b6b2c285eb4933a6433def1679e0288f87f94f58073e5aea421d69fbdae10389

See more details on using hashes here.

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