Az - Enumerasie gereedskap
Tip
Leer en oefen AWS Hacking:
HackTricks Training AWS Red Team Expert (ARTE)
Leer en oefen GCP Hacking:HackTricks Training GCP Red Team Expert (GRTE)
Leer en oefen Azure Hacking:
HackTricks Training Azure Red Team Expert (AzRTE)
Ondersteun HackTricks
- Kyk na die subskripsie planne!
- Sluit aan by die đŹ Discord groep of die telegram groep of volg ons op Twitter đŠ @hacktricks_live.
- Deel hacking truuks deur PRs in te dien na die HackTricks en HackTricks Cloud github repos.
Installeer PowerShell op Linux
Tip
Op Linux moet jy PowerShell Core installeer:
sudo apt-get update
sudo apt-get install -y wget apt-transport-https software-properties-common
# Ubuntu 20.04
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
# Update repos
sudo apt-get update
sudo add-apt-repository universe
# Install & start powershell
sudo apt-get install -y powershell
pwsh
# Az cli
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
Installeer PowerShell op MacOS
Instruksies vanaf die dokumentasie:
- Installeer
brewas dit nog nie geĂŻnstalleer is nie:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Installeer die nuutste stabiele weergawe van PowerShell:
brew install powershell/tap/powershell
- Voer PowerShell uit:
pwsh
- Opdatering:
brew update
brew upgrade powershell
Belangrikste enumerasie-gereedskap
az cli
Azure Command-Line Interface (CLI) is ân platformonafhanklike hulpmiddel geskryf in Python vir die bestuur en administrasie van (meestal) Azure en Entra ID hulpbronne. Dit skakel aan by Azure en voer administratiewe opdragte uit via die opdraglyn of skripte.
Volg hierdie skakel vir die installation instructionsÂĄ.
Opdragte in Azure CLI is gestruktureer volgens die patroon: az <service> <action> <parameters>
Foutsporing | MitM az cli
Deur die parameter --debug te gebruik, is dit moontlik om al die versoeke te sien wat die hulpmiddel az stuur:
az account management-group list --output table --debug
Om ân MitM op die tool uit te voer en al die versoeke wat dit stuur handmatig te kontroleer, kan jy die volgende doen:
export ADAL_PYTHON_SSL_NO_VERIFY=1
export AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1
export HTTPS_PROXY="http://127.0.0.1:8080"
export HTTP_PROXY="http://127.0.0.1:8080"
# If this is not enough
# Download the certificate from Burp and convert it into .pem format
# And export the following env variable
openssl x509 -in ~/Downloads/cacert.der -inform DER -out ~/Downloads/cacert.pem -outform PEM
export REQUESTS_CA_BUNDLE=/Users/user/Downloads/cacert.pem
Regstelling van âCA cert does not include key usage extensionâ
Waarom die fout gebeur
Wanneer Azure CLI autentiseer, maak dit HTTPS-versoeke (via MSAL â Requests â OpenSSL). As jy TLS met Burp onderskep, genereer Burp âon the flyâ sertifikate vir webwerwe soos login.microsoftonline.com en teken dit met Burp se CA.
Op nuwer stacks (Python 3.13 + OpenSSL 3) is CA-validasie strenger:
- A CA certificate must include Basic Constraints:
CA:TRUEand a Key Usage extension permitting certificate signing (keyCertSign, and typicallycRLSign).
Burpâs default CA (PortSwigger CA) is old and typically lacks the Key Usage extension, so OpenSSL rejects it even if you âtrust itâ.
Dit lewer foute soos:
CA cert does not include key usage extensionCERTIFICATE_VERIFY_FAILEDself-signed certificate in certificate chain
Dus moet jy:
- Create a modern CA (with proper Key Usage).
- Make Burp use it to sign intercepted certs.
- Trust that CA in macOS.
- Point Azure CLI / Requests to that CA bundle.
Stap-vir-stap: werkende konfigurasie
0) Vereistes
- Burp plaaslik aan die gang (proxy by
127.0.0.1:8080) - Azure CLI geĂŻnstalleer (Homebrew)
- Jy kan
sudogebruik (om die CA in die stelsel-keychain te vertrou)
1) Skep ân standaarde-kompatibele Burp CA (PEM + KEY)
Skep ân OpenSSL-konfigurasielĂȘer wat uitdruklik CA-uitbreidings instel:
mkdir -p ~/burp-ca && cd ~/burp-ca
cat > burp-ca.cnf <<'EOF'
[ req ]
default_bits = 2048
prompt = no
default_md = sha256
distinguished_name = dn
x509_extensions = v3_ca
[ dn ]
C = US
O = Burp Custom CA
CN = Burp Custom Root CA
[ v3_ca ]
basicConstraints = critical,CA:TRUE
keyUsage = critical,keyCertSign,cRLSign
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
EOF
Genereer die CA-sertifikaat + privaat sleutel:
openssl req -x509 -new -nodes \
-days 3650 \
-keyout burp-ca.key \
-out burp-ca.pem \
-config burp-ca.cnf
Basiese kontrole (jy MOET Key Usage sien):
openssl x509 -in burp-ca.pem -noout -text | egrep -A3 "Basic Constraints|Key Usage"
Verwag om iets soos die volgende in te sluit:
CA:TRUEKey Usage: ... Certificate Sign, CRL Sign
2) Skakel om na PKCS#12 (Burp import-formaat)
Burp benodig sertifikaat + private sleutel, die maklikste as PKCS#12:
openssl pkcs12 -export \
-out burp-ca.p12 \
-inkey burp-ca.key \
-in burp-ca.pem \
-name "Burp Custom Root CA"
Jy sal gevra word vir ân eksport-wagwoord (stel een; Burp sal daarna vra).
3) Importeer die CA in Burp en herbegin Burp
In Burp:
- Proxy â Options
- Find Import / export CA certificate
- Click Import CA certificate
- Choose PKCS#12
- Select
burp-ca.p12 - Enter the password
- Restart Burp completely (important)
Hoekom herbegin? Burp kan die ou CA steeds gebruik totdat dit herbegin is.
4) Vertrou die nuwe CA in die macOS system keychain
Dit laat stelselprogramme en baie TLS-stakke toe om die CA te vertrou.
sudo security add-trusted-cert \
-d -r trustRoot \
-k /Library/Keychains/System.keychain \
~/burp-ca/burp-ca.pem
(As jy die GUI verkies: Keychain Access â System â Certificates â import â stel âAlways Trustâ.)
5) Konfigureer proxy env vars
export HTTPS_PROXY="http://127.0.0.1:8080"
export HTTP_PROXY="http://127.0.0.1:8080"
6) Konfigureer Requests/Azure CLI om jou Burp CA te vertrou
Azure CLI gebruik Python Requests intern; stel albei hiervan in:
export REQUESTS_CA_BUNDLE="$HOME/burp-ca/burp-ca.pem"
export SSL_CERT_FILE="$HOME/burp-ca/burp-ca.pem"
Aantekeninge:
REQUESTS_CA_BUNDLEword deur Requests gebruik.SSL_CERT_FILEhelp vir ander TLS-kliënte en uitsonderingsgevalle.- Jy het gewoonlik nie die ou
ADAL_PYTHON_SSL_NO_VERIFY/AZURE_CLI_DISABLE_CONNECTION_VERIFICATIONnodig sodra die CA korrek is.
7) Verifieer dat Burp werklik met jou nuwe CA onderteken (kritieke kontrole)
Dit bevestig dat jou onderskeppingsketting korrek is:
openssl s_client -connect login.microsoftonline.com:443 \
-proxy 127.0.0.1:8080 </dev/null 2>/dev/null \
| openssl x509 -noout -issuer
Die verwagte issuer bevat jou CA-naam, bv.:
O=Burp Custom CA, CN=Burp Custom Root CA
As jy steeds PortSwigger CA sien, gebruik Burp nie jou geĂŻmporteerde CA nie â hersien die import en herbegin.
8) Verifieer dat Python Requests deur Burp werk
python3 - <<'EOF'
import requests
requests.get("https://login.microsoftonline.com")
print("OK")
EOF
Verwag: OK
9) Azure CLI toets
az account get-access-token --resource=https://management.azure.com/
As jy reeds ingelog is, behoort dit JSON terug te gee met ân accessToken.
Az PowerShell
Azure PowerShell is ân module met cmdlets om Azure resources direk vanaf die PowerShell-opdragreĂ«l te bestuur.
Follow this link for the installation instructions.
Opdragte in die Azure PowerShell AZ Module is gestruktureer soos: <Action>-Az<Service> <parameters>
Debug | MitM Az PowerShell
Deur die parameter -Debug te gebruik, is dit moontlik om al die versoeke te sien wat die tool stuur:
Get-AzResourceGroup -Debug
Om ân MitM op die tool te doen en check all the requests wat dit handmatig stuur, kan jy die omgewingsveranderlikes HTTPS_PROXY en HTTP_PROXY stel volgens die docs.
Microsoft Graph PowerShell
Microsoft Graph PowerShell is ân cross-platform SDK wat toegang tot alle Microsoft Graph APIs moontlik maak, insluitend dienste soos SharePoint, Exchange en Outlook, deur ân enkele endpoint. Dit ondersteun PowerShell 7+, moderne verifikasie via MSAL, eksterne identiteite en gevorderde navrae. Met ân fokus op die beginsel van minste voorreg verseker dit veilige bedrywighede en ontvang gereelde opdaterings om met die nuutste Microsoft Graph API-funksies in lyn te bly.
Volg hierdie skakel vir die installasie-instruksies.
Opdragte in Microsoft Graph PowerShell is gestruktureer soos: <Action>-Mg<Service> <parameters>
Ontfout Microsoft Graph PowerShell
Deur die parameter -Debug te gebruik is dit moontlik om al die requests te sien wat die tool stuur:
Get-MgUser -Debug
AzureAD Powershell
Die Azure Active Directory (AD) module, nou verouderd, is deel van Azure PowerShell vir die bestuur van Azure AD-bronne. Dit bied cmdlets vir take soos die bestuur van gebruikers, groepe, en aansoekregistrasies in Entra ID.
Tip
Dit is vervang deur Microsoft Graph PowerShell
Volg hierdie skakel vir die installation instructions.
Outomatiese Recon & Compliance Tools
turbot azure plugins
Turbot met steampipe en powerpipe maak dit moontlik om inligting vanaf Azure en Entra ID in te samel en compliance kontroles uit te voer en misconfigurasies te vind. Die tans mees aanbevole Azure-modules om te gebruik is:
- https://github.com/turbot/steampipe-mod-azure-compliance
- https://github.com/turbot/steampipe-mod-azure-insights
- https://github.com/turbot/steampipe-mod-azuread-insights
# Install
brew install turbot/tap/powerpipe
brew install turbot/tap/steampipe
steampipe plugin install azure
steampipe plugin install azuread
# Config creds via env vars or az cli default creds will be used
export AZURE_ENVIRONMENT="AZUREPUBLICCLOUD"
export AZURE_TENANT_ID="<tenant-id>"
export AZURE_SUBSCRIPTION_ID="<subscription-id>"
export AZURE_CLIENT_ID="<client-id>"
export AZURE_CLIENT_SECRET="<secret>"
# Run steampipe-mod-azure-insights
cd /tmp
mkdir dashboards
cd dashboards
powerpipe mod init
powerpipe mod install github.com/turbot/steampipe-mod-azure-insights
steampipe service start
powerpipe server
# Go to http://localhost:9033 in a browser
Prowler
Prowler is ân Open Source security tool om AWS, Azure, Google Cloud en Kubernetes se beste praktyke vir sekuriteit te assesseer, ouditte uit te voer, incident response te hanteer, continuous monitoring te verskaf, hardening toe te pas en forensics readiness te ondersteun.
Dit maak dit basies moontlik om honderde kontroles teen ân Azure-omgewing uit te voer om sekuriteits-misconfigurasies te vind en die resultate in json (en ander teksformate) te versamel of dit op die web te bekyk.
# Create a application with Reader role and set the tenant ID, client ID and secret in prowler so it access the app
# Launch web with docker-compose
export DOCKER_DEFAULT_PLATFORM=linux/amd64
curl -LO https://raw.githubusercontent.com/prowler-cloud/prowler/refs/heads/master/docker-compose.yml
curl -LO https://raw.githubusercontent.com/prowler-cloud/prowler/refs/heads/master/.env
## If using an old docker-compose version, change the "env_file" params to: env_file: ".env"
docker compose up -d
# Access the web and configure the access to run a scan from it
# Prowler cli
python3 -m pip install prowler --break-system-packages
docker run --rm toniblyx/prowler:v4-latest azure --list-checks
docker run --rm toniblyx/prowler:v4-latest azure --list-services
docker run --rm toniblyx/prowler:v4-latest azure --list-compliance
docker run --rm -e "AZURE_CLIENT_ID=<client-id>" -e "AZURE_TENANT_ID=<tenant-id>" -e "AZURE_CLIENT_SECRET=<secret>" toniblyx/prowler:v4-latest azure --sp-env-auth
## It also support other authentication types, check: prowler azure --help
Monkey365
Dit laat toe om Azure-subskripsies en Microsoft Entra ID-sekuriteitskonfigurasie-oorsigte outomaties uit te voer.
Die HTML-verslae word gestoor binne die ./monkey-reports gids binne die github repository folder.
git clone https://github.com/silverhack/monkey365
Get-ChildItem -Recurse monkey365 | Unblock-File
cd monkey365
Import-Module ./monkey365
mkdir /tmp/monkey365-scan
cd /tmp/monkey365-scan
Get-Help Invoke-Monkey365
Get-Help Invoke-Monkey365 -Detailed
# Scan with user creds (browser will be run)
Invoke-Monkey365 -TenantId <tenant-id> -Instance Azure -Collect All -ExportTo HTML
# Scan with App creds
$SecureClientSecret = ConvertTo-SecureString "<secret>" -AsPlainText -Force
Invoke-Monkey365 -TenantId <tenant-id> -ClientId <client-id> -ClientSecret $SecureClientSecret -Instance Azure -Collect All -ExportTo HTML
ScoutSuite
Scout Suite versamel konfigurasiedata vir handmatige inspeksie en beklemtoon risikogebiede. Dit is ân multi-cloud security-auditing tool wat sekuriteitsposisie-assessering van cloud-omgewings moontlik maak.
virtualenv -p python3 venv
source venv/bin/activate
pip install scoutsuite
scout --help
# Use --cli flag to use az cli credentials
# Use --user-account to have scout prompt for user credentials
# Use --user-account-browser to launch a browser to login
# Use --service-principal to have scout prompt for app credentials
python scout.py azure --cli
Azure-MG-Sub-Governance-Reporting
Dit is ân powershell-skrip wat jou help om al die hulpbronne en toestemmings binne ân Management Group en die Entra ID tenant te visualiseer en sekuriteitsmiskonfigurasies te vind.
Dit werk met die Az PowerShell module, dus word enige verifikasie wat deur hierdie tool ondersteun word ook deur die tool ondersteun.
import-module Az
.\AzGovVizParallel.ps1 -ManagementGroupId <management-group-id> [-SubscriptionIdWhitelist <subscription-id>]
Outomatiese Post-Exploitation gereedskap
ROADRecon
Die enumerasie deur ROADRecon bied inligting oor die konfigurasie van Entra ID, soos gebruikers, groepe, rolle, conditional access policiesâŠ
cd ROADTools
pipenv shell
# Login with user creds
roadrecon auth -u test@corp.onmicrosoft.com -p "Welcome2022!"
# Login with app creds
roadrecon auth --as-app --client "<client-id>" --password "<secret>" --tenant "<tenant-id>"
roadrecon gather
roadrecon gui
AzureHound
AzureHound is die BloodHound-versamelaar vir Microsoft Entra ID en Azure. Dit is ân enkele statiese Go-binarie vir Windows/Linux/macOS wat direk met die volgende kommunikeer:
- Microsoft Graph (Entra ID directory, M365) en
- Azure Resource Manager (ARM) control plane (subscriptions, resource groups, compute, storage, key vault, app services, AKS, etc.)
Belangrike kenmerke
- Werk vanaf enige plek op die openbare internet teen tenant-APIs (geen toegang tot interne netwerk benodig nie)
- Gee JSON uit vir BloodHound CE-inname om aanvalspaaie oor identiteite en cloudhulpbronne te visualiseer
- Standaard User-Agent waargeneem: azurehound/v2.x.x
Verifikasie-opsies
- Gebruikersnaam + wagwoord: -u
-p - Refresh token: ârefresh-token
- JSON Web Token (access token): âjwt
- Service principal secret: -a
-s - Service principal certificate: -a
âcert <cert.pem> âkey <key.pem> [âkeypass ]
Voorbeelde
# Full tenant collection to file using different auth flows
## User creds
azurehound list -u "<user>@<tenant>" -p "<pass>" -t "<tenant-id|domain>" -o ./output.json
## Use an access token (JWT) from az cli for Graph
JWT=$(az account get-access-token --resource https://graph.microsoft.com -o tsv --query accessToken)
azurehound list --jwt "$JWT" -t "<tenant-id>" -o ./output.json
## Use a refresh token (e.g., from device code flow)
azurehound list --refresh-token "<refresh_token>" -t "<tenant-id>" -o ./output.json
## Service principal secret
azurehound list -a "<client-id>" -s "<secret>" -t "<tenant-id>" -o ./output.json
## Service principal certificate
azurehound list -a "<client-id>" --cert "/path/cert.pem" --key "/path/key.pem" -t "<tenant-id>" -o ./output.json
# Targeted discovery
azurehound list users -t "<tenant-id>" -o users.json
azurehound list groups -t "<tenant-id>" -o groups.json
azurehound list roles -t "<tenant-id>" -o roles.json
azurehound list role-assignments -t "<tenant-id>" -o role-assignments.json
# Azure resources via ARM
azurehound list subscriptions -t "<tenant-id>" -o subs.json
azurehound list resource-groups -t "<tenant-id>" -o rgs.json
azurehound list virtual-machines -t "<tenant-id>" -o vms.json
azurehound list key-vaults -t "<tenant-id>" -o kv.json
azurehound list storage-accounts -t "<tenant-id>" -o sa.json
azurehound list storage-containers -t "<tenant-id>" -o containers.json
azurehound list web-apps -t "<tenant-id>" -o webapps.json
azurehound list function-apps -t "<tenant-id>" -o funcapps.json
Wat word opgevra
- Graph endpunte (voorbeelde):
- /v1.0/organization, /v1.0/users, /v1.0/groups, /v1.0/roleManagement/directory/roleDefinitions, directoryRoles, owners/members
- ARM endpunte (voorbeelde):
- management.azure.com/subscriptions/âŠ/providers/Microsoft.Storage/storageAccounts
- âŠ/Microsoft.KeyVault/vaults, âŠ/Microsoft.Compute/virtualMachines, âŠ/Microsoft.Web/sites, âŠ/Microsoft.ContainerService/managedClusters
Preflight-gedrag en endpunte
- Elke azurehound list
- Identiteitsplatform: login.microsoftonline.com
- Graph: GET https://graph.microsoft.com/v1.0/organization
- ARM: GET https://management.azure.com/subscriptions?api-version=âŠ
- Cloud environment base URLs verskil vir Government/China/Germany. Sien constants/environments.go in die repo.
ARM-oorwegend voorwerpe (minder sigbaar in Activity/Resource logs)
- Die volgende teikens gebruik hoofsaaklik ARM control plane reads: automation-accounts, container-registries, function-apps, key-vaults, logic-apps, managed-clusters, management-groups, resource-groups, storage-accounts, storage-containers, virtual-machines, vm-scale-sets, web-apps.
- Hierdie GET/list operasies word gewoonlik nie in Activity Logs geskryf nie; data-plane reads (bv. *.blob.core.windows.net, *.vault.azure.net) word op hulpbronvlak deur Diagnostic Settings gedek.
OPSEC en logboeknotas
- Microsoft Graph Activity Logs is nie standaard geaktiveer nie; aktiveer en voer uit na ân SIEM om sigbaarheid van Graph-oproepe te kry. Verwag die Graph preflight GET /v1.0/organization met UA azurehound/v2.x.x.
- Entra ID non-interactive sign-in logs registreer die identiteitsplatform-auth (login.microsoftonline.com) wat deur AzureHound gebruik is.
- ARM control-plane read/list operations word nie in Activity Logs aangeteken nie; baie azurehound list operasies teen hulpbronne sal daar nie verskyn nie. Slegs data-plane logging (via Diagnostic Settings) sal reads na service endpoints vang.
- Defender XDR GraphApiAuditEvents (preview) kan Graph-oproepe en token-identifiers openbaar, maar mag UserAgent ontbreek en het beperkte bewaring.
Wenk: Wanneer jy vir privilege paths enumereer, dump gebruikers, groepe, rolle en rol-toewysings, laai dit dan in BloodHound en gebruik voorafgeboude cypher queries om Global Administrator/Privileged Role Administrator en transitive escalation via nested groups en RBAC assignments te identifiseer.
Start die BloodHound web met curl -L https://ghst.ly/getbhce | docker compose -f - up en importeer die output.json lĂȘer. Dan, in die EXPLORE tab, in die CYPHER section kan jy ân gids-ikoon sien wat voorafgeboude queries bevat.
MicroBurst
MicroBurst bevat funksies en skripte wat Azure Services discovery, weak configuration auditing, en post exploitation aksies soos credential dumping ondersteun. Dit is bedoel om gebruik te word tydens penetration tests waar Azure in gebruik is.
Import-Module .\MicroBurst.psm1
Import-Module .\Get-AzureDomainInfo.ps1
Get-AzureDomainInfo -folder MicroBurst -Verbose
PowerZure
PowerZure is geskep uit die behoefte aan ân raamwerk wat beide reconnaissance en exploitation van Azure, EntraID en die geassosieerde hulpbronne kan uitvoer.
Dit gebruik die Az PowerShell-module, dus enige authentication wat deur hierdie hulpmiddel ondersteun word, word ook deur die hulpmiddel ondersteun.
# Login
Import-Module Az
Connect-AzAccount
# Clone and import PowerZure
git clone https://github.com/hausec/PowerZure
cd PowerZure
ipmo ./Powerzure.psd1
Invoke-Powerzure -h # Check all the options
# Info Gathering (read)
Get-AzureCurrentUser # Get current user
Get-AzureTarget # What can you access to
Get-AzureUser -All # Get all users
Get-AzureSQLDB -All # Get all SQL DBs
Get-AzureAppOwner # Owners of apps in Entra
Show-AzureStorageContent -All # List containers, shared and tables
Show-AzureKeyVaultContent -All # List all contents in key vaults
# Operational (write)
Set-AzureUserPassword -Password <password> -Username <username> # Change password
Set-AzureElevatedPrivileges # Get permissions from Global Administrator in EntraID to User Access Administrator in Azure RBAC.
New-AzureBackdoor -Username <username> -Password <password>
Invoke-AzureRunCommand -Command <command> -VMName <vmname>
[...]
GraphRunner
GraphRunner is ân post-exploitation gereedskapstel vir interaksie met die Microsoft Graph API. Dit verskaf verskeie gereedskap om reconnaissance, persistence, en pillaging van data uit ân Microsoft Entra ID (Azure AD) rekening uit te voer.
#A good place to start is to authenticate with the Get-GraphTokens module. This module will launch a device-code login, allowing you to authenticate the session from a browser session. Access and refresh tokens will be written to the global $tokens variable. To use them with other GraphRunner modules use the Tokens flag (Example. Invoke-DumpApps -Tokens $tokens)
Import-Module .\GraphRunner.ps1
Get-GraphTokens
#This module gathers information about the tenant including the primary contact info, directory sync settings, and user settings such as if users have the ability to create apps, create groups, or consent to apps.
Invoke-GraphRecon -Tokens $tokens -PermissionEnum
#A module to dump conditional access policies from a tenant.
Invoke-GraphRecon -Tokens $tokens -PermissionEnum
#A module to dump conditional access policies from a tenant.
Invoke-DumpCAPS -Tokens $tokens -ResolveGuids
#This module helps identify malicious app registrations. It will dump a list of Azure app registrations from the tenant including permission scopes and users that have consented to the apps. Additionally, it will list external apps that are not owned by the current tenant or by Microsoft's main app tenant. This is a good way to find third-party external apps that users may have consented to.
Invoke-DumpApps -Tokens $tokens
#Gather the full list of users from the directory.
Get-AzureADUsers -Tokens $tokens -OutFile users.txt
#Create a list of security groups along with their members.
Get-SecurityGroups -AccessToken $tokens.access_token
#Gets groups that may be able to be modified by the current user
Get-UpdatableGroups -Tokens $tokens
#Finds dynamic groups and displays membership rules
Get-DynamicGroups -Tokens $tokens
#Gets a list of SharePoint site URLs visible to the current user
Get-SharePointSiteURLs -Tokens $tokens
#This module attempts to locate mailboxes in a tenant that have allowed other users to read them. By providing a userlist the module will attempt to access the inbox of each user and display if it was successful. The access token needs to be scoped to Mail.Read.Shared or Mail.ReadWrite.Shared for this to work.
Invoke-GraphOpenInboxFinder -Tokens $tokens -Userlist users.txt
#This module attempts to gather a tenant ID associated with a domain.
Get-TenantID -Domain
#Runs Invoke-GraphRecon, Get-AzureADUsers, Get-SecurityGroups, Invoke-DumpCAPS, Invoke-DumpApps, and then uses the default_detectors.json file to search with Invoke-SearchMailbox, Invoke-SearchSharePointAndOneDrive, and Invoke-SearchTeams.
Invoke-GraphRunner -Tokens $tokens
Stormspotter
Stormspotter skep ân âattack graphâ van die hulpbronne in ân Azure subscription. Dit stel red teams en pentesters in staat om die attack surface en pivot opportunities binne ân tenant te visualiseer, en gee jou verdedigers ân groot hupstoot om vinnig te oriĂ«nteer en incident response-werk te prioritiseer.
Ongelukkig lyk dit of dit nie meer onderhou word nie.
# Start Backend
cd stormspotter\backend\
pipenv shell
python ssbackend.pyz
# Start Front-end
cd stormspotter\frontend\dist\spa\
quasar.cmd serve -p 9091 --history
# Run Stormcollector
cd stormspotter\stormcollector\
pipenv shell
az login -u test@corp.onmicrosoft.com -p Welcome2022!
python stormspotter\stormcollector\sscollector.pyz cli
# This will generate a .zip file to upload in the frontend (127.0.0.1:9091)
Verwysings
- Wolkontdekking met AzureHound (Unit 42)
- AzureHound repository
- BloodHound repository
- AzureHound Community Edition-vlae
- AzureHound constants/environments.go
- AzureHound client/storage_accounts.go
- AzureHound client/roles.go
Tip
Leer en oefen AWS Hacking:
HackTricks Training AWS Red Team Expert (ARTE)
Leer en oefen GCP Hacking:HackTricks Training GCP Red Team Expert (GRTE)
Leer en oefen Azure Hacking:
HackTricks Training Azure Red Team Expert (AzRTE)
Ondersteun HackTricks
- Kyk na die subskripsie planne!
- Sluit aan by die đŹ Discord groep of die telegram groep of volg ons op Twitter đŠ @hacktricks_live.
- Deel hacking truuks deur PRs in te dien na die HackTricks en HackTricks Cloud github repos.
HackTricks Cloud

