Doublepulsar Detection Script Save

A python2 script for sweeping a network to find windows systems compromised with the DOUBLEPULSAR implant.

Project README

Author: Luke Jennings ([email protected] - @jukelennings)

Company: Countercept (@countercept)


A set of python2 scripts for sweeping a list of IPs for the presence of both SMB and RDP versions of the DOUBLEPULSAR implant that was released by the Shadow Brokers. Supports both single IP checking and a list of IPs in a file with multi-threading support. The SMB version also supports the remote uninstall of the implant for remediation, which was helped by knowledge of the opcode mechanism reversed by @zerosum0x0.

This is an early release in the interests of allowing people to find compromises on their network now that these exploits are in the wild and no doubt being used to target organizations. It re-implements the ping command of the implant, which can be used remotely without authentication, in order to determine if a system is infected or not. Both SMB and RDP versions of the implant are supported.

Not all OS versions have been tested and some currently fail. For example, 2012 will reject the SMB sequence with ACCESS_DENIED. However, this system is not vulnerable to the ETERNALBLUE exploit and the DOUBLEPULSAR implant receives the same error when trying to ping a target. Therefore, it is possible that errors against certain windows versions may be indicative that the system is not compromised.


[email protected]:~# python --ip
[-] [] No presence of DOUBLEPULSAR SMB implant

[email protected]:~# python --ip

[email protected]:~# python --file ips.list --verbose --threads 1
[*] [] Sending negotiation request
[*] [] Server explicitly refused SSL, reconnecting
[*] [] Sending non-ssl negotiation request
[*] [] Sending ping packet
[-] [] No presence of DOUBLEPULSAR RDP implant
[*] [] Sending negotiation request
[*] [] Server chose to use SSL - negotiating SSL connection
[*] [] Sending SSL client data
[*] [] Sending ping packet
[-] [] No presence of DOUBLEPULSAR RDP implant
[*] [] Sending negotiation request
[*] [] Sending client data
[*] [] Sending ping packet

[email protected]:~# python2 --ip --uninstall
[+] [] DOUBLEPULSAR uninstall successful

Scanning your network

# target network (adapt this to your network)
# install the required scanning tools
brew install masscan || apt-get install masscan
git clone
cd doublepulsar-detection-script
# scan open ports
masscan -p445  $NETWORKRANGE > smb.lst
masscan -p3389 $NETWORKRANGE > rdp.lst
# clean the list of IPs
sed -i "s/^.* on //" smb.lst
sed -i "s/^.* on //" rdp.lst
# check vulnerabilities on the hosts who have the service open
python --file smb.lst
python --file rdp.lst

# Or, if you have the python netaddr library
python --net


This repository also contains three Snort signatures that can be used for detecting the use of the unimplemented SESSION_SETUP Trans2 command that the SMB ping utility uses and different response cases. While we do not condone the reliance on signatures for effective attack detection, due to how easily they are bypassed, these rules are highly specific and should provide some detection capability against new threat groups reusing these exploits and implants without modification.

More info

Open Source Agenda is not affiliated with "Doublepulsar Detection Script" Project. README Source: WithSecureLabs/doublepulsar-detection-script
Open Issues
Last Commit
3 years ago

Open Source Agenda Badge

Open Source Agenda Rating