add more azure metadata info
This commit is contained in:
parent
ae49e7fa02
commit
3559a62d51
@ -14,6 +14,7 @@
|
||||
|
||||
|
||||
printf "${YELLOW}Learn and practice cloud hacking techniques in ${BLUE}training.hacktricks.xyz\n"$NC
|
||||
echo ""
|
||||
|
||||
print_list "GCP Virtual Machine? ................. $is_gcp_vm\n"$NC | sed "s,Yes,${SED_RED}," | sed "s,No,${SED_GREEN},"
|
||||
print_list "GCP Cloud Funtion? ................... $is_gcp_function\n"$NC | sed "s,Yes,${SED_RED}," | sed "s,No,${SED_GREEN},"
|
||||
|
@ -32,21 +32,35 @@ if [ "$is_az_vm" = "Yes" ]; then
|
||||
if [ "$az_req" ]; then
|
||||
print_3title "Instance details"
|
||||
exec_with_jq eval $az_req "$URL/instance?api-version=$API_VERSION"
|
||||
echo ""
|
||||
|
||||
print_3title "Load Balancer details"
|
||||
exec_with_jq eval $az_req "$URL/loadbalancer?api-version=$API_VERSION"
|
||||
echo ""
|
||||
|
||||
print_3title "User Data"
|
||||
exec_with_jq eval $az_req "$URL/instance/compute/userData?api-version=$API_VERSION\&format=text" | base64 -d 2>/dev/null
|
||||
echo ""
|
||||
|
||||
print_3title "Custom Data and other configs (root needed)"
|
||||
(cat /var/lib/waagent/ovf-env.xml || cat /var/lib/waagent/CustomData/ovf-env.xml) 2>/dev/null | sed "s,CustomData.*,${SED_RED},"
|
||||
echo ""
|
||||
|
||||
print_3title "Management token"
|
||||
exec_with_jq eval $az_req "$URL/identity/oauth2/token?api-version=$API_VERSION\&resource=https://management.azure.com/"
|
||||
echo ""
|
||||
|
||||
print_3title "Graph token"
|
||||
exec_with_jq eval $az_req "$URL/identity/oauth2/token?api-version=$API_VERSION\&resource=https://graph.microsoft.com/"
|
||||
echo ""
|
||||
|
||||
print_3title "Vault token"
|
||||
exec_with_jq eval $az_req "$URL/identity/oauth2/token?api-version=$API_VERSION\&resource=https://vault.azure.net/"
|
||||
echo ""
|
||||
|
||||
print_3title "Storage token"
|
||||
exec_with_jq eval $az_req "$URL/identity/oauth2/token?api-version=$API_VERSION\&resource=https://storage.azure.com/"
|
||||
echo ""
|
||||
fi
|
||||
echo ""
|
||||
fi
|
@ -13,8 +13,7 @@
|
||||
# Small linpeas: 1
|
||||
|
||||
|
||||
|
||||
check_aliyun_ecs() {
|
||||
check_aliyun_ecs(){
|
||||
is_aliyun_ecs="No"
|
||||
if [ -f "/etc/cloud/cloud.cfg.d/aliyun_cloud.cfg" ]; then
|
||||
is_aliyun_ecs="Yes"
|
||||
|
Loading…
Reference in New Issue
Block a user