mirror of
https://github.com/peass-ng/PEASS-ng.git
synced 2025-12-24 03:57:39 -08:00
Compare commits
3 Commits
20241205-c
...
20241222-e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa5f5c0e2f | ||
|
|
d576055342 | ||
|
|
a3e3e9799b |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
.vs/*
|
||||
.vscode/*
|
||||
winPEAS/winPEASexe/.vs/*
|
||||
v16/*
|
||||
winPEAS/winPEASexe/.vs/winPEAS/v16/*
|
||||
@@ -24,6 +25,8 @@ __pycache__
|
||||
linPEAS/builder/__pycache__/*
|
||||
linPEAS/builder/src/__pycache__/*
|
||||
linPEAS/linpeas.sh
|
||||
linPEAS/builder/linpeas_base_tmp.sh
|
||||
build_lists/regexes.yaml
|
||||
sh2bin
|
||||
sh2bin/*
|
||||
.dccache
|
||||
|
||||
@@ -13,13 +13,12 @@
|
||||
# Small linpeas: 0
|
||||
|
||||
|
||||
API_VERSION="2021-12-13" #https://learn.microsoft.com/en-us/azure/virtual-machines/instance-metadata-service?tabs=linux#supported-api-versions
|
||||
API_VERSION="2019-08-01" #https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity?tabs=portal%2Chttp
|
||||
|
||||
if [ "$is_az_app" = "Yes" ]; then
|
||||
print_2title "Azure App Service Enumeration"
|
||||
echo "I haven't tested this one, if it doesn't work, please send a PR fixing and adding functionality :)"
|
||||
|
||||
HEADER="secret:$IDENTITY_HEADER"
|
||||
HEADER="X-IDENTITY-HEADER:$IDENTITY_HEADER"
|
||||
|
||||
az_req=""
|
||||
if [ "$(command -v curl || echo -n '')" ]; then
|
||||
@@ -33,13 +32,13 @@ if [ "$is_az_app" = "Yes" ]; then
|
||||
if [ "$az_req" ]; then
|
||||
print_3title "Management token"
|
||||
exec_with_jq eval $az_req "$IDENTITY_ENDPOINT?api-version=$API_VERSION\&resource=https://management.azure.com/"
|
||||
|
||||
echo
|
||||
print_3title "Graph token"
|
||||
exec_with_jq eval $az_req "$IDENTITY_ENDPOINT?api-version=$API_VERSION\&resource=https://graph.microsoft.com/"
|
||||
|
||||
echo
|
||||
print_3title "Vault token"
|
||||
exec_with_jq eval $az_req "$IDENTITY_ENDPOINT?api-version=$API_VERSION\&resource=https://vault.azure.net/"
|
||||
|
||||
echo
|
||||
print_3title "Storage token"
|
||||
exec_with_jq eval $az_req "$IDENTITY_ENDPOINT?api-version=$API_VERSION\&resource=https://storage.azure.com/"
|
||||
fi
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
check_az_app(){
|
||||
is_az_app="No"
|
||||
|
||||
if [ -d "/opt/microsoft" ] && env | grep -q "IDENTITY_ENDPOINT"; then
|
||||
if [ -d "/opt/microsoft" ] && env | grep -iq "azure"; then
|
||||
is_az_app="Yes"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user