A lockout aware password sprayer for golang

Crimson-Spray


Crimson-Spray is a lockout aware password sprayer for active directory testing. The goal of this tool was allow password spraying without having lock out end user accounts. Most tools do allow throttling, but this tool aim to make locking out accounts less of an issue.

Safe Guard Features:

  • Each user has their own thread. A single lockout will not prevent other user attempts from proceeding with their guess, nor will it effect the order passwords are guess.
  • Once a password has been confirmed as working, attempts for that user will cease.
  • If account is detected to be lockedout, crimson-spray will wait the duration of lockout period plus an additional minute.

crimson-spray -u ".\testcase\users.txt" -p ".\testcase\passwords.txt" -d "attack.local" -t "10.255.0.2" -a 10 -l 5 -r 15 -v 1

This command will run 9 password attempts then wait 6 minutes before trying another 9 attempts. If the account is detected to be locked out, it will wait 16 minutes before trying more passwords. This will only show success messages.

--help output

usage: crimson-spray [-h|--help] -u|--username-file "<value>"
                     -p|--password-file "<value>" -d|--domain "<value>"
                     -t|--target "<value>" -a|--Lockout-Threshold <integer>
                     -l|--Lockout-Reset <integer> -r|--Lockout-Timer <integer>
                     [--bypass-wait] [--no-stats] [-v|--verbose <integer>]
                     [-o|--logfile "<value>"] [--no-console]

                     (v.0.2.0) A lockout aware password sprayer for Active
                     Directory. Please enter the raw net accounts /domain
                     variables for best results. It is also advisable to use
                     this against service accounts.

Arguments:

  -h  --help               Print help information
  -u  --username-file      (Required) File of users separated by newlines
  -p  --password-file      (Required) File of passwords seperated by newlines.
                           A good wordlist generator can be found at
                           https://weakpass.com/generate
  -d  --domain             (Required) Domain of user
  -t  --target             (Required) IP or Hostname of target to authenticate
                           against
  -a  --Lockout-Threshold  (Required) Number of passwords attempts before
                           lockout. Attempts will not exceed this amount - 1.
  -l  --Lockout-Reset      (Required) Duration of time in minutes for the
                           threshold timer to elapse. An addition minute is
                           added
  -r  --Lockout-Timer      (Required) Duration of time in minutes for an locked
                           out account to become unlocked. If account lockout
                           is detected, program will wait this time + 1
                           minute.

      --bypass-wait        Bypass initial lock threshold reset period
      --no-stats           Suppress stats banner. Default: false
  -v  --verbose            0 - Reserved | 1 - Success Messages | 2 - Lockout ,
                           Pause , and Success Messages | 3 - Attempts, Pause,
                           Lockout and Success Messages | 4 - Debug Messages.
                           Default: 2
  -o  --logfile            If defined, output log to file. Default:
      --no-console         No console output

Considerations before running

  • Although the command net accounts /domain will show you the lockout policy in the current context, the Domain may have separate policy's for different user groups and you may end up locking out accounts. Default verbosity is set to show when lockouts occur.
  • Ensure there is no duplicates in the usernames list. This will cause a lockout as they are run twice.
  • Don't run rockyou.txt or any other giant wordlist. It will just increase the time considerably. This is a tool for weak password that could be easily guesses. Check out https://weakpass.com/generate for good password generation.
  • At the moment, this tool does not limit how many users at once it can do. Try to limit your users list to only service accounts, high value targets, or handpicked users.
  • Consider the password policy and don't include passwords that don't meet the required length or complexity. This might be set independently for certain groups.
  • If running on a non interactive session, consider using --no-console and --logfile <file> to output to a file.

Installation instructions

Install instructions:

go get github.com/ILightThings/crimson-spray

Linux:

~/go/bin/crimson-spray

Windows:

%USERPATH%/go/bin/crimson-spray

Alternatively, add the GOPATH/bin to your env:PATH variable.

Todo:

  • Add a pause and resume feature.
  • Add a lockout check before ever attempt (Will need working creds)
  • Add LDAP as a protocol method
  • Add estimated timer completion
  • Add Jitter option
  • Add a default flag to wait lockout threshold before beginning
  • Add different attack modes
  • Add an option for max concurrent users
  • Add a pre-Spray Stats display
  • Add found_users.txt file for output
  • Verbose Levels
  • Add a message for account password expiry
  • Check for duplicates in passwordlist and username list
  • Add Output to file
  • Trim whitespace
  • Spray across multiple IPs
Similar Resources

Golang Super Simple Load Balance

SSLB (Super Simple Load Balancer) ver 0.1.0 It's a Super Simple Load Balancer, just a little project to achieve some kind of performance. Features Hig

Dec 18, 2022

golang tcp server

TCPServer Package tcp_server created to help build TCP servers faster. Install package go get -u github.com/firstrow/tcp_server Usage: NOTICE: OnNewMe

Dec 28, 2022

A LWM2M Client and Server implementation (For Go/Golang)

Betwixt - A LWM2M Client and Server in Go Betwixt is a Lightweight M2M implementation written in Go OMA Lightweight M2M is a protocol from the Open Mo

Dec 23, 2022

Simple hosts file management in Golang (deprecated).

Simple hosts file management in Golang (deprecated).

Goodhosts (deprecated) This library is now deprecated. See the goodhosts organisation for the current maintained version. Simple hosts file (/etc/host

Mar 17, 2022

Golang library for Radius

goradius Description goradius package implements basic Radius client capabilities, allowing Go code to authenticate against a Radius server. It is bas

May 16, 2022

Simple, fast and scalable golang rpc library for high load

gorpc Simple, fast and scalable golang RPC library for high load and microservices. Gorpc provides the following features useful for highly loaded pro

Dec 19, 2022

Decentralized VPN in golang

Decentralized VPN in golang

LCVPN - Light decentralized VPN in golang Originally this repo was just an answer on a question "how much time it'll take to write my own simple VPN i

Dec 28, 2022

Package for writing Nagios/Icinga/et cetera plugins in Go (golang)

nagiosplugin Package for writing Nagios/Icinga/et cetera plugins in Go (golang). Documentation See http://godoc.org/github.com/olorin/nagiosplugin. Us

Aug 30, 2022

Golang client for NATS, the cloud native messaging system.

NATS - Go Client A Go client for the NATS messaging system. Installation # Go client go get github.com/nats-io/nats.go/ # Server go get github.com/na

Jan 4, 2023
Comments
  • added thread control

    added thread control

    Added thread control using -T or --max-threads. Default 0 which will make all listed users will be guessed at once.

    Note that this will increase the amount of time overall it will take to spray the whole list of passwords.

Passwordstrength - Returns the strength of the password

passwordstrength service returns the strength of the password. Developer Setup A

Dec 30, 2021
Hprose 1.0 for Golang (Deprecated). Hprose 2.0 for Golang is here:

Hprose for Golang Introduction Installation Usage Http Server Http Client Synchronous Invoking Synchronous Exception Handling Asynchronous Invoking As

Dec 15, 2022
A Minecraft scanner written in Golang (first Golang project)

__ __/ \__ Gothyc A Minecraft port scanner written in Go. ?? / \__/ \__ \__/ \__/ \ Version 0.3.0 \__/ \__/ Author @toas

Nov 6, 2022
Fast IP to CIDR lookup in Golang
Fast IP to CIDR lookup in Golang

cidranger Fast IP to CIDR block(s) lookup using trie in Golang, inspired by IPv4 route lookup linux. Possible use cases include detecting if a IP addr

Dec 30, 2022
High performance async-io(proactor) networking for Golang。golangのための高性能非同期io(proactor)ネットワーキング
High performance async-io(proactor) networking for Golang。golangのための高性能非同期io(proactor)ネットワーキング

gaio Introduction 中文介绍 For a typical golang network program, you would first conn := lis.Accept() to get a connection and go func(net.Conn) to start a

Dec 29, 2022
Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.1.1 and V5 in golang

中文文档 Gmqtt News: MQTT V5 is now supported. But due to those new features in v5, there area lots of breaking changes. If you have any migration problem

Jan 5, 2023
An SNMP library written in GoLang.

gosnmp GoSNMP is an SNMP client library fully written in Go. It provides Get, GetNext, GetBulk, Walk, BulkWalk, Set and Traps. It supports IPv4 and IP

Jan 7, 2023
A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC
 A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC

Introduction kcp-go is a Production-Grade Reliable-UDP library for golang. This library intents to provide a smooth, resilient, ordered, error-checked

Dec 28, 2022
Simple mDNS client/server library in Golang

mdns Simple mDNS client/server library in Golang. mDNS or Multicast DNS can be used to discover services on the local network without the use of an au

Jan 4, 2023
Easy SSH servers in Golang

gliderlabs/ssh The Glider Labs SSH server package is dope. —@bradfitz, Go team member This Go package wraps the crypto/ssh package with a higher-level

Dec 28, 2022