Skip to content

Commit

Permalink
Use proxy for azure user enumeration
Browse files Browse the repository at this point in the history
  • Loading branch information
nodauf committed Feb 16, 2022
1 parent f062f61 commit 64de983
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/modules/azure/userEnum.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package azure
import (
"GoMapEnum/src/utils"
"bytes"
"crypto/tls"
"encoding/xml"
"fmt"
"io/ioutil"
Expand Down Expand Up @@ -56,6 +57,13 @@ func UserEnum(optionsInterface *interface{}, username string) bool {
options.Log.Error("Only email format is supported, skipping " + username)
return false
}
client := &http.Client{

Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
Proxy: options.Proxy,
},
}
domain := strings.Split(username, "@")[1]
// Random password for authentication
password := utils.RandomString(10)
Expand All @@ -68,7 +76,6 @@ func UserEnum(optionsInterface *interface{}, username string) bool {
dataToSend := fmt.Sprintf(BASE_XML, created, expired, username, password)
url := fmt.Sprintf(AZURE_URL, domain, uuid)
req, _ := http.NewRequest("POST", url, bytes.NewBufferString(dataToSend))
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
options.Log.Error("Error on response.\n[ERRO] - " + err.Error())
Expand Down

0 comments on commit 64de983

Please sign in to comment.