Kali Linux

Coercer : A Python Script To Automatically Coerce A Windows Server To Authenticate On An Arbitrary Machine

Coercer is a python script to automatically coerce a Windows server to authenticate on an arbitrary machine through 9 methods.

Features

  • Automatically detects open SMB pipes on the remote machine.
  • Calls one by one all the vulnerable RPC functions to coerce the server to authenticate on an arbitrary machine.
  • Analyze mode with --analyze, which only lists the vulnerable protocols and functions listening, without performing a coerced authentication.
  • Perform coerce attack on a list of targets from a file with --targets-file
  • Coerce to a WebDAV target with --webdav-host and --webdav-port

Installation

You can now install it from pypi (latest version is ) with this command:

sudo python3 -m pip install coercer

Usage

$ ./Coercer.py -h
_ / / _ ___ _ / / / _ \/ _ \/ / / _ \/ /
/ // // / / / / // / / v1.6 _/_/___// __/___// by @podalirius
usage: Coercer.py [-h] [-u USERNAME] [-p PASSWORD] [-d DOMAIN] [–hashes [LMHASH]:NTHASH] [–no-pass] [-v] [-a] [-k] [–dc-ip ip address] [-l LISTENER] [-wh WEBDAV_HOST] [-wp WEBDAV_PORT]
(-t TARGET | -f TARGETS_FILE) [–target-ip ip address]
Automatic windows authentication coercer over various RPC calls.
options:
-h, –help show this help message and exit
-u USERNAME, –username USERNAME
Username to authenticate to the endpoint.
-p PASSWORD, –password PASSWORD
Password to authenticate to the endpoint. (if omitted, it will be asked unless -no-pass is specified)
-d DOMAIN, –domain DOMAIN
Windows domain name to authenticate to the endpoint.
–hashes [LMHASH]:NTHASH
NT/LM hashes (LM hash can be empty)
–no-pass Don’t ask for password (useful for -k)
-v, –verbose Verbose mode (default: False)
-a, –analyze Analyze mode (default: Attack mode)
-k, –kerberos Use Kerberos authentication. Grabs credentials from ccache file (KRB5CCNAME) based on target parameters. If valid credentials cannot be found, it will use the ones specified in the
command line
–dc-ip ip address IP Address of the domain controller. If omitted it will use the domain part (FQDN) specified in the target parameter
-t TARGET, –target TARGET
IP address or hostname of the target machine
-f TARGETS_FILE, –targets-file TARGETS_FILE
IP address or hostname of the target machine
–target-ip ip address
IP Address of the target machine. If omitted it will use whatever was specified as target. This is useful when target is the NetBIOS name or Kerberos name and you cannot resolve it
-l LISTENER, –listener LISTENER
IP address or hostname of the listener machine
-wh WEBDAV_HOST, –webdav-host WEBDAV_HOST
WebDAV IP of the server to authenticate to.
-wp WEBDAV_PORT, –webdav-port WEBDAV_PORT
WebDAV port of the server to authenticate to.

Coerced WebDAV authentication demonstration

If you want to trigger an HTTP authentication, you can use WebDAV with --webdav-host and the netdbios name of your attacking machine!

Example output

In attack mode (without --analyze option) you get the following output:

After all the RPC calls, you get plenty of authentications in Responder:

R K

Recent Posts

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

1 week ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

2 weeks ago

Red Team Certification – A Comprehensive Guide To Advancing In Cybersecurity Operations

Embark on the journey of becoming a certified Red Team professional with our definitive guide.…

2 weeks ago

CVE-2024-5836 / CVE-2024-6778 : Chromium Sandbox Escape via Extension Exploits

This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…

3 weeks ago

Rust BOFs – Unlocking New Potentials In Cobalt Strike

This took me like 4 days (+2 days for an update), but I got it…

3 weeks ago

MaLDAPtive – Pioneering LDAP SearchFilter Parsing And Security Framework

MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…

3 weeks ago