cloudxpl 4.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cloudxpl/__init__.py +8 -0
- cloudxpl/__main__.py +188 -0
- cloudxpl/core/__init__.py +0 -0
- cloudxpl/core/credential.py +37 -0
- cloudxpl/core/dispatcher.py +575 -0
- cloudxpl/core/identity_resolver.py +192 -0
- cloudxpl/core/policy_engine.py +198 -0
- cloudxpl/core/shell_mixin.py +96 -0
- cloudxpl/core/shells/__init__.py +47 -0
- cloudxpl/modules/__init__.py +0 -0
- cloudxpl/modules/alibaba/__init__.py +0 -0
- cloudxpl/modules/alibaba/cloudtoolkit_bridge.py +40 -0
- cloudxpl/modules/alibaba/cve_2026_19339.py +40 -0
- cloudxpl/modules/alibaba/ecs_enum.py +40 -0
- cloudxpl/modules/alibaba/ecs_metadata.py +40 -0
- cloudxpl/modules/alibaba/oss_enum.py +40 -0
- cloudxpl/modules/alibaba/oss_exploit.py +40 -0
- cloudxpl/modules/alibaba/ram_enum.py +40 -0
- cloudxpl/modules/alibaba/rds_enum.py +40 -0
- cloudxpl/modules/aws/__init__.py +0 -0
- cloudxpl/modules/aws/cloudformation_exploit.py +61 -0
- cloudxpl/modules/aws/cloudtrail_disable.py +66 -0
- cloudxpl/modules/aws/cloudtrail_tamper.py +59 -0
- cloudxpl/modules/aws/codebuild_exploit.py +62 -0
- cloudxpl/modules/aws/codepipeline_exploit.py +62 -0
- cloudxpl/modules/aws/cognito_exploit.py +71 -0
- cloudxpl/modules/aws/cve_2024_28056.py +59 -0
- cloudxpl/modules/aws/cve_2026_5707.py +59 -0
- cloudxpl/modules/aws/cve_2026_5708.py +40 -0
- cloudxpl/modules/aws/cve_2026_5709.py +40 -0
- cloudxpl/modules/aws/dynamodb_enum.py +54 -0
- cloudxpl/modules/aws/ebs_snapshot.py +67 -0
- cloudxpl/modules/aws/ec2_enum.py +69 -0
- cloudxpl/modules/aws/ec2_imds_pivot.py +86 -0
- cloudxpl/modules/aws/ec2_ssm.py +64 -0
- cloudxpl/modules/aws/ec2_userdata.py +70 -0
- cloudxpl/modules/aws/ecr_enum.py +64 -0
- cloudxpl/modules/aws/ecs_exploit.py +77 -0
- cloudxpl/modules/aws/eks_enum.py +67 -0
- cloudxpl/modules/aws/eks_exploit.py +66 -0
- cloudxpl/modules/aws/eventbridge_exploit.py +65 -0
- cloudxpl/modules/aws/glue_exploit.py +63 -0
- cloudxpl/modules/aws/guardduty_bypass.py +71 -0
- cloudxpl/modules/aws/iam_enum.py +101 -0
- cloudxpl/modules/aws/iam_privesc.py +92 -0
- cloudxpl/modules/aws/lambda_enum.py +85 -0
- cloudxpl/modules/aws/lambda_inject.py +79 -0
- cloudxpl/modules/aws/lambda_persist.py +69 -0
- cloudxpl/modules/aws/org_enum.py +58 -0
- cloudxpl/modules/aws/pacu_bridge.py +45 -0
- cloudxpl/modules/aws/rds_enum.py +64 -0
- cloudxpl/modules/aws/rds_exploit.py +57 -0
- cloudxpl/modules/aws/route53_takeover.py +63 -0
- cloudxpl/modules/aws/s3_enum.py +96 -0
- cloudxpl/modules/aws/s3_exfil.py +60 -0
- cloudxpl/modules/aws/s3_exploit.py +85 -0
- cloudxpl/modules/aws/secrets_manager.py +62 -0
- cloudxpl/modules/aws/sns_exploit.py +66 -0
- cloudxpl/modules/aws/sqs_exploit.py +62 -0
- cloudxpl/modules/aws/ssm_param_store.py +69 -0
- cloudxpl/modules/aws/sso_enum.py +63 -0
- cloudxpl/modules/aws/ssrf_imds.py +97 -0
- cloudxpl/modules/aws/stepfunctions_exploit.py +57 -0
- cloudxpl/modules/aws/sts_enum.py +70 -0
- cloudxpl/modules/aws/vpc_enum.py +66 -0
- cloudxpl/modules/azure/__init__.py +0 -0
- cloudxpl/modules/azure/aks_enum.py +85 -0
- cloudxpl/modules/azure/aks_exploit.py +85 -0
- cloudxpl/modules/azure/app_service_exploit.py +85 -0
- cloudxpl/modules/azure/arm_injection.py +144 -0
- cloudxpl/modules/azure/automation_exploit.py +85 -0
- cloudxpl/modules/azure/azure_functions_escape.py +29 -0
- cloudxpl/modules/azure/azurehound_bridge.py +85 -0
- cloudxpl/modules/azure/azurescape.py +41 -0
- cloudxpl/modules/azure/azurescape_bridge.py +29 -0
- cloudxpl/modules/azure/blob_exfil.py +85 -0
- cloudxpl/modules/azure/blob_exploit.py +85 -0
- cloudxpl/modules/azure/conditional_access.py +85 -0
- cloudxpl/modules/azure/cosmosdb_exploit.py +85 -0
- cloudxpl/modules/azure/cve_2024_50603.py +85 -0
- cloudxpl/modules/azure/cve_2025_29813.py +85 -0
- cloudxpl/modules/azure/cve_2025_29827.py +85 -0
- cloudxpl/modules/azure/cve_2025_29972.py +85 -0
- cloudxpl/modules/azure/cve_2025_53767.py +85 -0
- cloudxpl/modules/azure/cve_2026_20965.py +41 -0
- cloudxpl/modules/azure/defender_bypass.py +85 -0
- cloudxpl/modules/azure/devops_exploit.py +85 -0
- cloudxpl/modules/azure/entra_consent.py +85 -0
- cloudxpl/modules/azure/entra_enum.py +85 -0
- cloudxpl/modules/azure/entra_privesc.py +85 -0
- cloudxpl/modules/azure/entra_tokens.py +85 -0
- cloudxpl/modules/azure/fabricscape.py +41 -0
- cloudxpl/modules/azure/fabricscape_cve_2022_30137.py +30 -0
- cloudxpl/modules/azure/function_exploit.py +85 -0
- cloudxpl/modules/azure/function_persist.py +85 -0
- cloudxpl/modules/azure/functions_escape.py +41 -0
- cloudxpl/modules/azure/graph_api_abuse.py +85 -0
- cloudxpl/modules/azure/keyvault_exploit.py +85 -0
- cloudxpl/modules/azure/logic_apps_exploit.py +85 -0
- cloudxpl/modules/azure/managed_identity.py +115 -0
- cloudxpl/modules/azure/nsg_enum.py +85 -0
- cloudxpl/modules/azure/pim_abuse.py +85 -0
- cloudxpl/modules/azure/rbac_enum.py +85 -0
- cloudxpl/modules/azure/rbac_exploit.py +85 -0
- cloudxpl/modules/azure/resource_group_enum.py +85 -0
- cloudxpl/modules/azure/sentinel_bypass.py +85 -0
- cloudxpl/modules/azure/service_principal.py +85 -0
- cloudxpl/modules/azure/sql_enum.py +85 -0
- cloudxpl/modules/azure/sql_exploit.py +85 -0
- cloudxpl/modules/azure/storage_enum.py +94 -0
- cloudxpl/modules/azure/stormspotter_bridge.py +85 -0
- cloudxpl/modules/azure/subscription_enum.py +72 -0
- cloudxpl/modules/azure/vm_enum.py +85 -0
- cloudxpl/modules/azure/vm_exploit.py +85 -0
- cloudxpl/modules/azure/vm_imds.py +85 -0
- cloudxpl/modules/cicd/__init__.py +0 -0
- cloudxpl/modules/cicd/cicd_secret_dump.py +22 -0
- cloudxpl/modules/cicd/circleci_runner_escape.py +22 -0
- cloudxpl/modules/cicd/gha_runner_escape.py +22 -0
- cloudxpl/modules/cicd/gha_supply_chain.py +22 -0
- cloudxpl/modules/cicd/gitlab_ci_rce.py +22 -0
- cloudxpl/modules/cicd/gitlab_runner_hijack.py +22 -0
- cloudxpl/modules/cicd/jenkins_agent_abuse.py +22 -0
- cloudxpl/modules/cicd/jenkins_plugin_privesc.py +22 -0
- cloudxpl/modules/cicd/terraform_agent_abuse.py +22 -0
- cloudxpl/modules/cicd/terraform_token_leak.py +22 -0
- cloudxpl/modules/cred/__init__.py +0 -0
- cloudxpl/modules/cred/config_file_scan.py +85 -0
- cloudxpl/modules/cred/credential_report.py +85 -0
- cloudxpl/modules/cred/env_var_scan.py +85 -0
- cloudxpl/modules/cred/federation_abuse.py +85 -0
- cloudxpl/modules/cred/key_rotation_check.py +85 -0
- cloudxpl/modules/cred/leaked_key_exploit.py +85 -0
- cloudxpl/modules/cred/metadata_harvest.py +85 -0
- cloudxpl/modules/cred/mfa_relay.py +40 -0
- cloudxpl/modules/cred/oauth_token_theft.py +85 -0
- cloudxpl/modules/cred/rsa_netwitness_exploit.py +40 -0
- cloudxpl/modules/cred/rsa_securid_enum.py +40 -0
- cloudxpl/modules/cred/seed_theft_check.py +40 -0
- cloudxpl/modules/cred/temp_cred_extend.py +85 -0
- cloudxpl/modules/cred/token_lifetime_abuse.py +85 -0
- cloudxpl/modules/digitalocean/__init__.py +0 -0
- cloudxpl/modules/digitalocean/api_token_abuse.py +40 -0
- cloudxpl/modules/digitalocean/doks_enum.py +40 -0
- cloudxpl/modules/digitalocean/droplet_agent_rce.py +40 -0
- cloudxpl/modules/digitalocean/droplet_enum.py +40 -0
- cloudxpl/modules/digitalocean/firewall_enum.py +40 -0
- cloudxpl/modules/digitalocean/metadata_ssrf.py +40 -0
- cloudxpl/modules/digitalocean/spaces_enum.py +40 -0
- cloudxpl/modules/digitalocean/spaces_exploit.py +40 -0
- cloudxpl/modules/gcp/__init__.py +0 -0
- cloudxpl/modules/gcp/artifact_registry.py +85 -0
- cloudxpl/modules/gcp/bigquery_exploit.py +85 -0
- cloudxpl/modules/gcp/bucket_enum.py +84 -0
- cloudxpl/modules/gcp/bucket_exfil.py +85 -0
- cloudxpl/modules/gcp/bucket_exploit.py +85 -0
- cloudxpl/modules/gcp/cloud_armor_bypass.py +40 -0
- cloudxpl/modules/gcp/cloudbuild_exploit.py +85 -0
- cloudxpl/modules/gcp/cloudbuild_supply_chain.py +40 -0
- cloudxpl/modules/gcp/cloudfunctions_exploit.py +85 -0
- cloudxpl/modules/gcp/cloudfunctions_persist.py +85 -0
- cloudxpl/modules/gcp/cloudrun_exploit.py +85 -0
- cloudxpl/modules/gcp/cloudsql_enum.py +85 -0
- cloudxpl/modules/gcp/cloudsql_exploit.py +85 -0
- cloudxpl/modules/gcp/composer_exploit.py +85 -0
- cloudxpl/modules/gcp/compute_enum.py +85 -0
- cloudxpl/modules/gcp/compute_exploit.py +85 -0
- cloudxpl/modules/gcp/compute_imds.py +85 -0
- cloudxpl/modules/gcp/cve_2025_51591.py +85 -0
- cloudxpl/modules/gcp/cve_2026_2031.py +85 -0
- cloudxpl/modules/gcp/cve_2026_2264.py +85 -0
- cloudxpl/modules/gcp/cve_2026_31431.py +40 -0
- cloudxpl/modules/gcp/cve_2026_46300.py +40 -0
- cloudxpl/modules/gcp/cve_2026_81867.py +85 -0
- cloudxpl/modules/gcp/dataflow_exploit.py +85 -0
- cloudxpl/modules/gcp/dns_takeover.py +85 -0
- cloudxpl/modules/gcp/gcpbucketbrute_bridge.py +85 -0
- cloudxpl/modules/gcp/gke_autopilot_escape.py +40 -0
- cloudxpl/modules/gcp/gke_enum.py +85 -0
- cloudxpl/modules/gcp/gke_exploit.py +85 -0
- cloudxpl/modules/gcp/iam_privesc.py +85 -0
- cloudxpl/modules/gcp/iap_bypass.py +40 -0
- cloudxpl/modules/gcp/imagerunner_exploit.py +40 -0
- cloudxpl/modules/gcp/kms_exploit.py +85 -0
- cloudxpl/modules/gcp/logging_bypass.py +85 -0
- cloudxpl/modules/gcp/metadata_ssrf.py +94 -0
- cloudxpl/modules/gcp/org_policy_enum.py +85 -0
- cloudxpl/modules/gcp/project_enum.py +123 -0
- cloudxpl/modules/gcp/pubsub_exploit.py +85 -0
- cloudxpl/modules/gcp/sa_impersonate.py +85 -0
- cloudxpl/modules/gcp/sa_key_theft.py +85 -0
- cloudxpl/modules/gcp/secretmanager_exploit.py +85 -0
- cloudxpl/modules/gcp/service_account_enum.py +107 -0
- cloudxpl/modules/gcp/terraform_state.py +85 -0
- cloudxpl/modules/gcp/vpc_firewall_enum.py +85 -0
- cloudxpl/modules/gcp/wif_abuse.py +40 -0
- cloudxpl/modules/gcp/workload_identity.py +85 -0
- cloudxpl/modules/hetzner/__init__.py +0 -0
- cloudxpl/modules/hetzner/api_token_abuse.py +40 -0
- cloudxpl/modules/hetzner/firewall_enum.py +40 -0
- cloudxpl/modules/hetzner/floating_ip_hijack.py +40 -0
- cloudxpl/modules/hetzner/metadata_ssrf.py +40 -0
- cloudxpl/modules/hetzner/server_enum.py +40 -0
- cloudxpl/modules/ibm/__init__.py +0 -0
- cloudxpl/modules/ibm/cloudpak_exploit.py +40 -0
- cloudxpl/modules/ibm/cos_enum.py +40 -0
- cloudxpl/modules/ibm/cos_exploit.py +40 -0
- cloudxpl/modules/ibm/iam_enum.py +40 -0
- cloudxpl/modules/ibm/qradar_exploit.py +40 -0
- cloudxpl/modules/ibm/vpc_enum.py +40 -0
- cloudxpl/modules/k8s/__init__.py +0 -0
- cloudxpl/modules/k8s/admission_bypass.py +85 -0
- cloudxpl/modules/k8s/api_server_anon.py +85 -0
- cloudxpl/modules/k8s/cluster_enum.py +85 -0
- cloudxpl/modules/k8s/configmap_dump.py +85 -0
- cloudxpl/modules/k8s/container_cve_2026_52910.py +42 -0
- cloudxpl/modules/k8s/container_escape.py +85 -0
- cloudxpl/modules/k8s/crd_abuse.py +85 -0
- cloudxpl/modules/k8s/cve_2019_5736.py +40 -0
- cloudxpl/modules/k8s/cve_2021_30465.py +40 -0
- cloudxpl/modules/k8s/cve_2022_0492.py +40 -0
- cloudxpl/modules/k8s/cve_2022_0847.py +40 -0
- cloudxpl/modules/k8s/cve_2022_23648.py +40 -0
- cloudxpl/modules/k8s/cve_2024_0132.py +41 -0
- cloudxpl/modules/k8s/cve_2024_1753.py +41 -0
- cloudxpl/modules/k8s/cve_2024_21626.py +85 -0
- cloudxpl/modules/k8s/cve_2024_23651.py +41 -0
- cloudxpl/modules/k8s/cve_2024_23652.py +41 -0
- cloudxpl/modules/k8s/cve_2024_23653.py +41 -0
- cloudxpl/modules/k8s/cve_2025_23266.py +41 -0
- cloudxpl/modules/k8s/cve_2025_31133.py +85 -0
- cloudxpl/modules/k8s/cve_2025_52565.py +85 -0
- cloudxpl/modules/k8s/cve_2025_52881.py +85 -0
- cloudxpl/modules/k8s/etcd_exploit.py +85 -0
- cloudxpl/modules/k8s/helm_exploit.py +85 -0
- cloudxpl/modules/k8s/hostpath_mount.py +85 -0
- cloudxpl/modules/k8s/kube_hunter_bridge.py +85 -0
- cloudxpl/modules/k8s/kubelet_exploit.py +85 -0
- cloudxpl/modules/k8s/network_policy_bypass.py +85 -0
- cloudxpl/modules/k8s/node_proxy.py +85 -0
- cloudxpl/modules/k8s/peirates_bridge.py +85 -0
- cloudxpl/modules/k8s/pod_enum.py +85 -0
- cloudxpl/modules/k8s/pod_escape_cve.py +85 -0
- cloudxpl/modules/k8s/privileged_pod.py +85 -0
- cloudxpl/modules/k8s/rbac_enum.py +85 -0
- cloudxpl/modules/k8s/rbac_escalation.py +85 -0
- cloudxpl/modules/k8s/registry_exploit.py +85 -0
- cloudxpl/modules/k8s/runc_cve_2019_5736.py +41 -0
- cloudxpl/modules/k8s/runc_cve_2024_23651.py +30 -0
- cloudxpl/modules/k8s/runc_cve_2024_23652.py +30 -0
- cloudxpl/modules/k8s/runc_cve_2024_23653.py +30 -0
- cloudxpl/modules/k8s/sa_token_theft.py +85 -0
- cloudxpl/modules/k8s/secret_dump.py +85 -0
- cloudxpl/modules/k8s/service_mesh_exploit.py +85 -0
- cloudxpl/modules/k8s/sidecar_inject.py +85 -0
- cloudxpl/modules/multi/__init__.py +0 -0
- cloudxpl/modules/multi/ci_cd_exploit.py +85 -0
- cloudxpl/modules/multi/cloud_side_channel.py +41 -0
- cloudxpl/modules/multi/cloudfox_bridge.py +85 -0
- cloudxpl/modules/multi/cloudtoolkit_multi.py +40 -0
- cloudxpl/modules/multi/container_escape_collection_bridge.py +41 -0
- cloudxpl/modules/multi/cross_cloud_pivot.py +85 -0
- cloudxpl/modules/multi/docker_escape.py +85 -0
- cloudxpl/modules/multi/docker_socket.py +85 -0
- cloudxpl/modules/multi/firecracker_escape.py +41 -0
- cloudxpl/modules/multi/git_secret_scan.py +85 -0
- cloudxpl/modules/multi/github_actions_runner_exploit.py +29 -0
- cloudxpl/modules/multi/huawei_recon.py +40 -0
- cloudxpl/modules/multi/iac_secret_scan.py +85 -0
- cloudxpl/modules/multi/openstack_generic.py +40 -0
- cloudxpl/modules/multi/prowler_bridge.py +85 -0
- cloudxpl/modules/multi/scoutsuite_bridge.py +85 -0
- cloudxpl/modules/multi/steampipe_bridge.py +85 -0
- cloudxpl/modules/multi/terraform_plan_inject.py +85 -0
- cloudxpl/modules/multi/terraform_state_exploit.py +85 -0
- cloudxpl/modules/net/__init__.py +0 -0
- cloudxpl/modules/net/dns_takeover.py +85 -0
- cloudxpl/modules/net/exposed_services.py +85 -0
- cloudxpl/modules/net/load_balancer_enum.py +85 -0
- cloudxpl/modules/net/peering_abuse.py +85 -0
- cloudxpl/modules/net/privatelink_abuse.py +85 -0
- cloudxpl/modules/net/sg_analysis.py +85 -0
- cloudxpl/modules/net/vpc_enum.py +85 -0
- cloudxpl/modules/net/vpn_exploit.py +85 -0
- cloudxpl/modules/oci/__init__.py +0 -0
- cloudxpl/modules/oci/audit_bypass.py +40 -0
- cloudxpl/modules/oci/bucket_enum.py +40 -0
- cloudxpl/modules/oci/bucket_exploit.py +40 -0
- cloudxpl/modules/oci/compute_enum.py +40 -0
- cloudxpl/modules/oci/cve_2025_61882.py +40 -0
- cloudxpl/modules/oci/cve_2026_21962.py +40 -0
- cloudxpl/modules/oci/iam_enum.py +40 -0
- cloudxpl/modules/oci/metadata_ssrf.py +40 -0
- cloudxpl/modules/oci/ocinfernobridge.py +40 -0
- cloudxpl/modules/oci/volume_attach.py +40 -0
- cloudxpl/modules/ovh/__init__.py +0 -0
- cloudxpl/modules/ovh/api_abuse.py +40 -0
- cloudxpl/modules/ovh/bare_metal_ipmi.py +40 -0
- cloudxpl/modules/ovh/email_spoof.py +40 -0
- cloudxpl/modules/ovh/openstack_enum.py +40 -0
- cloudxpl/modules/ovh/swift_exploit.py +40 -0
- cloudxpl/modules/ovh/vrack_lateral.py +40 -0
- cloudxpl/modules/paas/__init__.py +0 -0
- cloudxpl/modules/paas/aci_azurescape.py +22 -0
- cloudxpl/modules/paas/appservice_sandbox_escape.py +22 -0
- cloudxpl/modules/paas/beanstalk_escape.py +22 -0
- cloudxpl/modules/paas/cloudrun_runc_escape.py +22 -0
- cloudxpl/modules/paas/fargate_firecracker.py +22 -0
- cloudxpl/modules/paas/gcp_appint_sandbox.py +22 -0
- cloudxpl/modules/paas/heroku_dyno_recon.py +22 -0
- cloudxpl/modules/paas/lambda_tmp_persist.py +22 -0
- cloudxpl/modules/paas/paas_metadata_pivot.py +22 -0
- cloudxpl/modules/paas/railway_escape.py +22 -0
- cloudxpl/modules/serverless/__init__.py +0 -0
- cloudxpl/modules/serverless/api_gateway_bypass.py +85 -0
- cloudxpl/modules/serverless/cold_start_abuse.py +85 -0
- cloudxpl/modules/serverless/concurrency_abuse.py +85 -0
- cloudxpl/modules/serverless/env_extraction.py +85 -0
- cloudxpl/modules/serverless/event_injection.py +85 -0
- cloudxpl/modules/serverless/iam_role_chain.py +85 -0
- cloudxpl/modules/serverless/layer_poisoning.py +85 -0
- cloudxpl/modules/serverless/log_injection.py +85 -0
- cloudxpl/modules/serverless/reverse_shell.py +85 -0
- cloudxpl/modules/serverless/runtime_rce.py +85 -0
- cloudxpl/modules/serverless/step_function_abuse.py +85 -0
- cloudxpl/modules/serverless/tmp_persistence.py +85 -0
- cloudxpl/modules/serverless/trigger_hijack.py +85 -0
- cloudxpl/modules/serverless/vpc_pivot.py +85 -0
- cloudxpl/modules/storage/__init__.py +0 -0
- cloudxpl/modules/storage/acl_check.py +85 -0
- cloudxpl/modules/storage/bucket_bruteforce.py +85 -0
- cloudxpl/modules/storage/bucket_finder.py +85 -0
- cloudxpl/modules/storage/bucketloot_bridge.py +85 -0
- cloudxpl/modules/storage/cors_exploit.py +85 -0
- cloudxpl/modules/storage/download_mass.py +85 -0
- cloudxpl/modules/storage/grayhat_search.py +85 -0
- cloudxpl/modules/storage/policy_abuse.py +85 -0
- cloudxpl/modules/storage/presigned_abuse.py +85 -0
- cloudxpl/modules/storage/public_objects.py +85 -0
- cloudxpl/modules/storage/ransomware_sim.py +85 -0
- cloudxpl/modules/storage/s3scanner_bridge.py +85 -0
- cloudxpl/modules/storage/static_site_takeover.py +85 -0
- cloudxpl/modules/storage/upload_exploit.py +85 -0
- cloudxpl/modules/storage/versioning_exploit.py +85 -0
- cloudxpl/modules/tencent/__init__.py +0 -0
- cloudxpl/modules/tencent/cam_enum.py +40 -0
- cloudxpl/modules/tencent/cloudtoolkit_bridge.py +40 -0
- cloudxpl/modules/tencent/cos_enum.py +40 -0
- cloudxpl/modules/tencent/cos_exploit.py +40 -0
- cloudxpl/modules/tencent/cve_2026_30859.py +40 -0
- cloudxpl/modules/tencent/cvm_metadata.py +40 -0
- cloudxpl/modules/vdi/__init__.py +0 -0
- cloudxpl/modules/vdi/avd_privesc.py +22 -0
- cloudxpl/modules/vdi/citrix_session_recording_rce.py +22 -0
- cloudxpl/modules/vdi/citrix_vda_lpe.py +22 -0
- cloudxpl/modules/vdi/citrix_vdi_cve_2025_6759.py +30 -0
- cloudxpl/modules/vdi/horizon_escape.py +22 -0
- cloudxpl/modules/vdi/vdi_breakout_clipboard.py +22 -0
- cloudxpl/modules/vdi/vdi_breakout_dialog.py +22 -0
- cloudxpl/modules/vdi/vdi_breakout_drive.py +22 -0
- cloudxpl/modules/vdi/vdi_breakout_print.py +22 -0
- cloudxpl/modules/vdi/vdi_breakout_usb.py +22 -0
- cloudxpl/modules/vdi/vdi_kiosk_escape.py +22 -0
- cloudxpl/modules/vdi/workspaces_lpe.py +22 -0
- cloudxpl/modules/virt/__init__.py +0 -0
- cloudxpl/modules/virt/amd_microcode_cve_2024_56161.py +30 -0
- cloudxpl/modules/virt/awesome_hyperv_bridge.py +33 -0
- cloudxpl/modules/virt/awesome_vm_exploit_bridge.py +33 -0
- cloudxpl/modules/virt/citrix_cve_2026_53562.py +30 -0
- cloudxpl/modules/virt/citrix_escape.py +40 -0
- cloudxpl/modules/virt/citrix_vapd_exploit.py +34 -0
- cloudxpl/modules/virt/citrix_vdi_cve_2025_6759.py +30 -0
- cloudxpl/modules/virt/citrix_xsa_486.py +40 -0
- cloudxpl/modules/virt/container_cve_2026_80521.py +42 -0
- cloudxpl/modules/virt/container_escape_collection_bridge.py +33 -0
- cloudxpl/modules/virt/cve_2019_5544.py +40 -0
- cloudxpl/modules/virt/cve_2020_3952.py +40 -0
- cloudxpl/modules/virt/cve_2020_3992.py +40 -0
- cloudxpl/modules/virt/cve_2021_21972.py +40 -0
- cloudxpl/modules/virt/cve_2021_21974.py +40 -0
- cloudxpl/modules/virt/cve_2021_21985.py +40 -0
- cloudxpl/modules/virt/cve_2021_22005.py +40 -0
- cloudxpl/modules/virt/cve_2022_22954.py +40 -0
- cloudxpl/modules/virt/cve_2022_31705.py +40 -0
- cloudxpl/modules/virt/cve_2023_20867.py +40 -0
- cloudxpl/modules/virt/cve_2023_34048.py +40 -0
- cloudxpl/modules/virt/cve_2024_37085.py +40 -0
- cloudxpl/modules/virt/cve_2025_22225.py +40 -0
- cloudxpl/modules/virt/cve_2025_22226.py +40 -0
- cloudxpl/modules/virt/esxi_brute_bridge.py +33 -0
- cloudxpl/modules/virt/esxi_cve_2019_5544.py +30 -0
- cloudxpl/modules/virt/esxi_cve_2020_3992.py +30 -0
- cloudxpl/modules/virt/esxi_cve_2021_21974.py +30 -0
- cloudxpl/modules/virt/esxi_cve_2024_22252.py +41 -0
- cloudxpl/modules/virt/esxi_cve_2024_22253.py +41 -0
- cloudxpl/modules/virt/esxi_cve_2024_22254.py +41 -0
- cloudxpl/modules/virt/esxi_cve_2024_22255.py +41 -0
- cloudxpl/modules/virt/esxi_cve_2024_37085.py +30 -0
- cloudxpl/modules/virt/esxi_cve_2025_22224.py +40 -0
- cloudxpl/modules/virt/esxi_cve_2026_47876.py +30 -0
- cloudxpl/modules/virt/esxi_enum.py +40 -0
- cloudxpl/modules/virt/esxi_fingerprint_bridge.py +33 -0
- cloudxpl/modules/virt/esxi_log4shell.py +41 -0
- cloudxpl/modules/virt/esxi_ransomware.py +40 -0
- cloudxpl/modules/virt/esxi_ssh_exploit.py +40 -0
- cloudxpl/modules/virt/esxi_vm_escape.py +40 -0
- cloudxpl/modules/virt/firecracker_cve_2026_1386.py +30 -0
- cloudxpl/modules/virt/firecracker_cve_2026_5747.py +30 -0
- cloudxpl/modules/virt/firecracker_escape.py +40 -0
- cloudxpl/modules/virt/horizon_log4shell.py +30 -0
- cloudxpl/modules/virt/hyperv_cve_2019_0887.py +30 -0
- cloudxpl/modules/virt/hyperv_cve_2021_28476.py +40 -0
- cloudxpl/modules/virt/hyperv_cve_2021_34450.py +30 -0
- cloudxpl/modules/virt/hyperv_cve_2022_21995.py +30 -0
- cloudxpl/modules/virt/hyperv_cve_2022_30163.py +30 -0
- cloudxpl/modules/virt/hyperv_cve_2024_20700.py +41 -0
- cloudxpl/modules/virt/hyperv_cve_2024_21407.py +40 -0
- cloudxpl/modules/virt/hyperv_cve_2024_38080.py +41 -0
- cloudxpl/modules/virt/hyperv_cve_2024_49117.py +30 -0
- cloudxpl/modules/virt/hyperv_cve_2025_21333.py +41 -0
- cloudxpl/modules/virt/hyperv_cve_2025_21334.py +41 -0
- cloudxpl/modules/virt/hyperv_cve_2025_21335.py +41 -0
- cloudxpl/modules/virt/hyperv_cve_2026_40402.py +40 -0
- cloudxpl/modules/virt/hyperv_cve_2026_45607.py +30 -0
- cloudxpl/modules/virt/hyperv_cve_2026_45641.py +41 -0
- cloudxpl/modules/virt/hyperv_cve_2026_57092.py +41 -0
- cloudxpl/modules/virt/hyperv_cve_2026_69603.py +41 -0
- cloudxpl/modules/virt/hyperv_cve_2026_72961.py +41 -0
- cloudxpl/modules/virt/hyperv_cve_2026_80083.py +41 -0
- cloudxpl/modules/virt/hyperv_cve_2026_89927.py +41 -0
- cloudxpl/modules/virt/hyperv_enum.py +40 -0
- cloudxpl/modules/virt/hyperv_escape.py +40 -0
- cloudxpl/modules/virt/hyperv_remotefx.py +40 -0
- cloudxpl/modules/virt/hypervisor_resources_bridge.py +41 -0
- cloudxpl/modules/virt/intel_tdx_enum.py +29 -0
- cloudxpl/modules/virt/kata_cve_2026_24834.py +30 -0
- cloudxpl/modules/virt/kata_escape.py +40 -0
- cloudxpl/modules/virt/kvm_arm64_escape.py +40 -0
- cloudxpl/modules/virt/kvm_cve_2019_14835.py +40 -0
- cloudxpl/modules/virt/kvm_cve_2019_18389.py +40 -0
- cloudxpl/modules/virt/kvm_cve_2026_3842.py +41 -0
- cloudxpl/modules/virt/kvm_cve_2026_64561.py +41 -0
- cloudxpl/modules/virt/kvm_cve_2026_99999.py +41 -0
- cloudxpl/modules/virt/kvm_januscape.py +40 -0
- cloudxpl/modules/virt/libvirt_enum.py +40 -0
- cloudxpl/modules/virt/lolesxi_bridge.py +33 -0
- cloudxpl/modules/virt/msf_vmware_bridge.py +40 -0
- cloudxpl/modules/virt/nitro_sidechannel.py +29 -0
- cloudxpl/modules/virt/nutanix_cve_2018_7750.py +30 -0
- cloudxpl/modules/virt/nutanix_cve_2026_84731.py +30 -0
- cloudxpl/modules/virt/nutanix_enum.py +40 -0
- cloudxpl/modules/virt/qemu_cve_2019_14378.py +30 -0
- cloudxpl/modules/virt/qemu_cve_2019_18389.py +30 -0
- cloudxpl/modules/virt/qemu_cve_2020_14364.py +30 -0
- cloudxpl/modules/virt/qemu_cve_2023_6693.py +41 -0
- cloudxpl/modules/virt/qemu_cve_2024_3446.py +41 -0
- cloudxpl/modules/virt/qemu_cve_2024_4467.py +41 -0
- cloudxpl/modules/virt/qemu_cve_2024_49841.py +41 -0
- cloudxpl/modules/virt/qemu_cve_2024_6519.py +40 -0
- cloudxpl/modules/virt/qemu_dma_reentrancy.py +40 -0
- cloudxpl/modules/virt/qemu_rtl8139_chain.py +41 -0
- cloudxpl/modules/virt/qemu_slirp_escape.py +41 -0
- cloudxpl/modules/virt/qemu_slirp_escape_bridge.py +42 -0
- cloudxpl/modules/virt/qemu_virtio_exploit.py +40 -0
- cloudxpl/modules/virt/sev_snp_enum.py +29 -0
- cloudxpl/modules/virt/sidechannel_cachewarp.py +30 -0
- cloudxpl/modules/virt/sidechannel_ddrop.py +29 -0
- cloudxpl/modules/virt/sidechannel_downfall.py +30 -0
- cloudxpl/modules/virt/sidechannel_inception.py +30 -0
- cloudxpl/modules/virt/sidechannel_wesee.py +30 -0
- cloudxpl/modules/virt/sidechannel_zenbleed.py +30 -0
- cloudxpl/modules/virt/vcenter_cve_2020_3952.py +30 -0
- cloudxpl/modules/virt/vcenter_cve_2021_21972.py +30 -0
- cloudxpl/modules/virt/vcenter_cve_2021_22005.py +34 -0
- cloudxpl/modules/virt/vcenter_cve_2021_44228.py +34 -0
- cloudxpl/modules/virt/vcenter_cve_2024_22252.py +30 -0
- cloudxpl/modules/virt/vcenter_cve_2024_22274.py +30 -0
- cloudxpl/modules/virt/vcenter_cve_2024_37079.py +40 -0
- cloudxpl/modules/virt/vcenter_cve_2024_37080.py +41 -0
- cloudxpl/modules/virt/vcenter_cve_2024_37081.py +30 -0
- cloudxpl/modules/virt/vcenter_cve_2024_38812.py +41 -0
- cloudxpl/modules/virt/vcenter_cve_2024_38813.py +41 -0
- cloudxpl/modules/virt/vcenter_cve_2025_41225.py +41 -0
- cloudxpl/modules/virt/vcenter_cve_2026_59309.py +40 -0
- cloudxpl/modules/virt/vcenter_cve_2026_59310.py +40 -0
- cloudxpl/modules/virt/vcenter_exploit.py +40 -0
- cloudxpl/modules/virt/vcenter_saml_bypass.py +41 -0
- cloudxpl/modules/virt/vcenter_secrets_dump.py +33 -0
- cloudxpl/modules/virt/vcenter_vmdir_bridge.py +34 -0
- cloudxpl/modules/virt/vcenterkit_bridge.py +40 -0
- cloudxpl/modules/virt/vdi_breakout.py +40 -0
- cloudxpl/modules/virt/virt_cross_domain.py +41 -0
- cloudxpl/modules/virt/virt_maestro_detect.py +41 -0
- cloudxpl/modules/virt/virt_side_channel.py +41 -0
- cloudxpl/modules/virt/virt_snapshot_theft.py +41 -0
- cloudxpl/modules/virt/virt_vtpm_extract.py +41 -0
- cloudxpl/modules/virt/vmware_api_enum.py +29 -0
- cloudxpl/modules/virt/vmware_enum_vms_bridge.py +33 -0
- cloudxpl/modules/virt/vmware_exploitation_bridge.py +33 -0
- cloudxpl/modules/virt/vmware_http_login_bridge.py +33 -0
- cloudxpl/modules/virt/vmware_tools_lpe.py +40 -0
- cloudxpl/modules/virt/xen_cve_2023_46842.py +41 -0
- cloudxpl/modules/virt/xen_grant_escape.py +40 -0
- cloudxpl/modules/virt/xen_iommu_exploit.py +40 -0
- cloudxpl/modules/virt/xen_venom.py +41 -0
- cloudxpl/modules/virt/xen_xsa486.py +41 -0
- cloudxpl/modules/virt/xen_xsa500.py +41 -0
- cloudxpl/modules/virt/xen_xsa505.py +41 -0
- cloudxpl/modules/virt/xen_xsa507.py +30 -0
- cloudxpl/modules/virt/xen_xsa517.py +41 -0
- cloudxpl/modules/virt/xen_xsa521.py +41 -0
- cloudxpl/modules/virt/xen_xsa_500.py +30 -0
- cloudxpl/modules/virt/xen_xsa_505.py +30 -0
- cloudxpl/modules/virt/xen_xsa_507.py +30 -0
- cloudxpl/modules/virt/xen_xsa_517.py +30 -0
- cloudxpl/modules/virt/xen_xsa_521.py +30 -0
- cloudxpl/py.typed +0 -0
- cloudxpl-4.2.0.dist-info/METADATA +98 -0
- cloudxpl-4.2.0.dist-info/RECORD +522 -0
- cloudxpl-4.2.0.dist-info/WHEEL +5 -0
- cloudxpl-4.2.0.dist-info/entry_points.txt +3 -0
- cloudxpl-4.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""AWS Lambda enumeration — list functions, runtimes, env vars, layers."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
MANIFEST = {
|
|
13
|
+
"capability_id": "cloudxpl.aws.lambda_enum.v1",
|
|
14
|
+
"safety_class": "READ_ONLY",
|
|
15
|
+
"requires_authorization": True,
|
|
16
|
+
"side_effects": ["aws_api_calls"],
|
|
17
|
+
"output_schema": "xpl.finding.v1",
|
|
18
|
+
"mitre": ["T1526"],
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def run(args: Any) -> int:
|
|
23
|
+
print(f"[*] AWS Lambda Enumeration (region: {args.region})")
|
|
24
|
+
|
|
25
|
+
try:
|
|
26
|
+
import boto3
|
|
27
|
+
except ImportError:
|
|
28
|
+
print("[!] boto3 not installed", file=sys.stderr)
|
|
29
|
+
return 1
|
|
30
|
+
|
|
31
|
+
session = boto3.Session(profile_name=args.profile, region_name=args.region)
|
|
32
|
+
lam = session.client("lambda")
|
|
33
|
+
|
|
34
|
+
try:
|
|
35
|
+
paginator = lam.get_paginator("list_functions")
|
|
36
|
+
functions = []
|
|
37
|
+
for page in paginator.paginate():
|
|
38
|
+
functions.extend(page["Functions"])
|
|
39
|
+
except Exception as exc:
|
|
40
|
+
print(f"[-] list_functions failed: {exc}", file=sys.stderr)
|
|
41
|
+
return 1
|
|
42
|
+
|
|
43
|
+
print(f"[+] {len(functions)} Lambda functions")
|
|
44
|
+
results = []
|
|
45
|
+
|
|
46
|
+
for fn in functions:
|
|
47
|
+
entry = {
|
|
48
|
+
"name": fn["FunctionName"],
|
|
49
|
+
"runtime": fn.get("Runtime", "container"),
|
|
50
|
+
"role": fn["Role"],
|
|
51
|
+
"handler": fn.get("Handler"),
|
|
52
|
+
"code_size": fn["CodeSize"],
|
|
53
|
+
"timeout": fn.get("Timeout"),
|
|
54
|
+
"memory": fn.get("MemorySize"),
|
|
55
|
+
"last_modified": fn.get("LastModified"),
|
|
56
|
+
"layers": [l["Arn"] for l in fn.get("Layers", [])],
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
env_vars = fn.get("Environment", {}).get("Variables", {})
|
|
60
|
+
if env_vars:
|
|
61
|
+
sensitive_keys = [k for k in env_vars if any(
|
|
62
|
+
s in k.upper() for s in ["SECRET", "KEY", "TOKEN", "PASSWORD", "CREDENTIAL", "API_KEY"]
|
|
63
|
+
)]
|
|
64
|
+
entry["env_var_count"] = len(env_vars)
|
|
65
|
+
entry["sensitive_env_keys"] = sensitive_keys
|
|
66
|
+
if sensitive_keys:
|
|
67
|
+
print(f" [!] {fn['FunctionName']}: sensitive env vars: {', '.join(sensitive_keys)}")
|
|
68
|
+
|
|
69
|
+
vpc = fn.get("VpcConfig", {})
|
|
70
|
+
if vpc.get("SubnetIds"):
|
|
71
|
+
entry["vpc"] = True
|
|
72
|
+
entry["subnets"] = vpc["SubnetIds"]
|
|
73
|
+
else:
|
|
74
|
+
entry["vpc"] = False
|
|
75
|
+
|
|
76
|
+
results.append(entry)
|
|
77
|
+
|
|
78
|
+
os.makedirs(args.output, exist_ok=True)
|
|
79
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
80
|
+
out_path = os.path.join(args.output, f"aws_lambda_{ts}.json")
|
|
81
|
+
with open(out_path, "w") as fh:
|
|
82
|
+
json.dump(results, fh, indent=2, default=str)
|
|
83
|
+
|
|
84
|
+
print(f"[+] Output: {out_path}")
|
|
85
|
+
return 0
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"""AWS Lambda event injection — trigger abuse, environment extraction, layer analysis."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
MANIFEST = {
|
|
13
|
+
"capability_id": "cloudxpl.aws.lambda_inject.v1",
|
|
14
|
+
"safety_class": "ACTIVE",
|
|
15
|
+
"requires_authorization": True,
|
|
16
|
+
"side_effects": ['aws_api_calls'],
|
|
17
|
+
"output_schema": "xpl.finding.v1",
|
|
18
|
+
"mitre": ["T1648"],
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _save(args: Any, prefix: str, data: Any) -> str:
|
|
23
|
+
out = getattr(args, "output", ".")
|
|
24
|
+
os.makedirs(out, exist_ok=True)
|
|
25
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
26
|
+
path = os.path.join(out, f"{prefix}_{ts}.json")
|
|
27
|
+
with open(path, "w") as fh:
|
|
28
|
+
json.dump(data, fh, indent=2, default=str)
|
|
29
|
+
print(f"[+] Results saved to {path}")
|
|
30
|
+
return path
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def run(args: Any) -> int:
|
|
34
|
+
|
|
35
|
+
print(f"[*] AWS Lambda Injection Analysis (region: {args.region})")
|
|
36
|
+
try:
|
|
37
|
+
import boto3
|
|
38
|
+
except ImportError:
|
|
39
|
+
print("[!] boto3 not installed", file=sys.stderr); return 1
|
|
40
|
+
session = boto3.Session(profile_name=args.profile, region_name=args.region)
|
|
41
|
+
lam = session.client("lambda")
|
|
42
|
+
results = {"functions": [], "injectable": []}
|
|
43
|
+
try:
|
|
44
|
+
paginator = lam.get_paginator("list_functions")
|
|
45
|
+
for page in paginator.paginate():
|
|
46
|
+
for fn in page["Functions"]:
|
|
47
|
+
fname = fn["FunctionName"]
|
|
48
|
+
info = {"name": fname, "runtime": fn.get("Runtime", "unknown"), "role": fn["Role"], "handler": fn.get("Handler", "")}
|
|
49
|
+
env_vars = fn.get("Environment", {}).get("Variables", {})
|
|
50
|
+
if env_vars:
|
|
51
|
+
info["env_var_count"] = len(env_vars)
|
|
52
|
+
sensitive_keys = [k for k in env_vars if any(s in k.upper() for s in ["KEY", "SECRET", "TOKEN", "PASSWORD", "API"])]
|
|
53
|
+
if sensitive_keys:
|
|
54
|
+
info["sensitive_env_keys"] = sensitive_keys
|
|
55
|
+
print(f" [!] {fname}: sensitive env vars: {sensitive_keys}")
|
|
56
|
+
layers = fn.get("Layers", [])
|
|
57
|
+
if layers:
|
|
58
|
+
info["layers"] = [l["Arn"] for l in layers]
|
|
59
|
+
try:
|
|
60
|
+
policy = lam.get_policy(FunctionName=fname)
|
|
61
|
+
import json as _json
|
|
62
|
+
pol = _json.loads(policy["Policy"])
|
|
63
|
+
for stmt in pol.get("Statement", []):
|
|
64
|
+
if stmt.get("Principal") in ("*", {"AWS": "*"}):
|
|
65
|
+
info["public_invoke"] = True
|
|
66
|
+
results["injectable"].append({"function": fname, "type": "public_invoke"})
|
|
67
|
+
print(f" [!] {fname}: publicly invokable!")
|
|
68
|
+
except Exception: pass
|
|
69
|
+
try:
|
|
70
|
+
mappings = lam.list_event_source_mappings(FunctionName=fname)["EventSourceMappings"]
|
|
71
|
+
if mappings:
|
|
72
|
+
info["event_sources"] = [{"source": m["EventSourceArn"], "state": m["State"]} for m in mappings]
|
|
73
|
+
except Exception: pass
|
|
74
|
+
results["functions"].append(info)
|
|
75
|
+
except Exception as exc:
|
|
76
|
+
print(f"[-] Lambda enum failed: {exc}"); return 1
|
|
77
|
+
_save(args, "aws_lambda_inject", results)
|
|
78
|
+
print(f"[+] {len(results['functions'])} functions, {len(results['injectable'])} injectable")
|
|
79
|
+
return 0
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""AWS Lambda persistence — layer poisoning analysis, trigger backdoor assessment."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
MANIFEST = {
|
|
13
|
+
"capability_id": "cloudxpl.aws.lambda_persist.v1",
|
|
14
|
+
"safety_class": "ACTIVE",
|
|
15
|
+
"requires_authorization": True,
|
|
16
|
+
"side_effects": ['aws_api_calls'],
|
|
17
|
+
"output_schema": "xpl.finding.v1",
|
|
18
|
+
"mitre": ["T1525","T1098"],
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _save(args: Any, prefix: str, data: Any) -> str:
|
|
23
|
+
out = getattr(args, "output", ".")
|
|
24
|
+
os.makedirs(out, exist_ok=True)
|
|
25
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
26
|
+
path = os.path.join(out, f"{prefix}_{ts}.json")
|
|
27
|
+
with open(path, "w") as fh:
|
|
28
|
+
json.dump(data, fh, indent=2, default=str)
|
|
29
|
+
print(f"[+] Results saved to {path}")
|
|
30
|
+
return path
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def run(args: Any) -> int:
|
|
34
|
+
|
|
35
|
+
print(f"[*] AWS Lambda Persistence Analysis (region: {args.region})")
|
|
36
|
+
try:
|
|
37
|
+
import boto3
|
|
38
|
+
except ImportError:
|
|
39
|
+
print("[!] boto3 not installed", file=sys.stderr); return 1
|
|
40
|
+
session = boto3.Session(profile_name=args.profile, region_name=args.region)
|
|
41
|
+
lam = session.client("lambda")
|
|
42
|
+
results = {"layers": [], "persistence_vectors": []}
|
|
43
|
+
try:
|
|
44
|
+
paginator = lam.get_paginator("list_layers")
|
|
45
|
+
for page in paginator.paginate():
|
|
46
|
+
for layer in page["Layers"]:
|
|
47
|
+
info = {"name": layer["LayerName"], "arn": layer["LayerArn"], "latest_version": layer["LatestMatchingVersion"]["Version"]}
|
|
48
|
+
results["layers"].append(info)
|
|
49
|
+
print(f" [*] Layer: {layer['LayerName']} (v{info['latest_version']})")
|
|
50
|
+
except Exception as exc:
|
|
51
|
+
print(f"[-] Layer enum failed: {exc}")
|
|
52
|
+
try:
|
|
53
|
+
for page in lam.get_paginator("list_functions").paginate():
|
|
54
|
+
for fn in page["Functions"]:
|
|
55
|
+
fname = fn["FunctionName"]
|
|
56
|
+
role = fn["Role"]
|
|
57
|
+
if fn.get("Layers"):
|
|
58
|
+
results["persistence_vectors"].append({"function": fname, "type": "layer_attached", "layers": [l["Arn"] for l in fn["Layers"]], "role": role})
|
|
59
|
+
url_config = None
|
|
60
|
+
try:
|
|
61
|
+
url_config = lam.get_function_url_config(FunctionName=fname)
|
|
62
|
+
if url_config.get("AuthType") == "NONE":
|
|
63
|
+
results["persistence_vectors"].append({"function": fname, "type": "public_url", "url": url_config["FunctionUrl"]})
|
|
64
|
+
print(f" [!] {fname}: public function URL (no auth)")
|
|
65
|
+
except Exception: pass
|
|
66
|
+
except Exception: pass
|
|
67
|
+
_save(args, "aws_lambda_persist", results)
|
|
68
|
+
print(f"[+] {len(results['layers'])} layers, {len(results['persistence_vectors'])} persistence vectors")
|
|
69
|
+
return 0
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""AWS Organizations enumeration — accounts, OUs, SCPs."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
MANIFEST = {
|
|
13
|
+
"capability_id": "cloudxpl.aws.org_enum.v1",
|
|
14
|
+
"safety_class": "READ_ONLY",
|
|
15
|
+
"requires_authorization": True,
|
|
16
|
+
"side_effects": [],
|
|
17
|
+
"output_schema": "xpl.finding.v1",
|
|
18
|
+
"mitre": ["T1526"],
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _save(args: Any, prefix: str, data: Any) -> str:
|
|
23
|
+
out = getattr(args, "output", ".")
|
|
24
|
+
os.makedirs(out, exist_ok=True)
|
|
25
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
26
|
+
path = os.path.join(out, f"{prefix}_{ts}.json")
|
|
27
|
+
with open(path, "w") as fh:
|
|
28
|
+
json.dump(data, fh, indent=2, default=str)
|
|
29
|
+
print(f"[+] Results saved to {path}")
|
|
30
|
+
return path
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def run(args: Any) -> int:
|
|
34
|
+
|
|
35
|
+
print(f"[*] AWS Organizations Enumeration")
|
|
36
|
+
try:
|
|
37
|
+
import boto3
|
|
38
|
+
except ImportError:
|
|
39
|
+
print("[!] boto3 not installed", file=sys.stderr); return 1
|
|
40
|
+
session = boto3.Session(profile_name=args.profile, region_name=args.region)
|
|
41
|
+
org = session.client("organizations")
|
|
42
|
+
results = {"organization": {}, "accounts": [], "roots": []}
|
|
43
|
+
try:
|
|
44
|
+
org_info = org.describe_organization()["Organization"]
|
|
45
|
+
results["organization"] = {"id": org_info["Id"], "master_account": org_info["MasterAccountId"], "master_email": org_info.get("MasterAccountEmail", "")}
|
|
46
|
+
print(f"[+] Org: {org_info['Id']} (master: {org_info['MasterAccountId']})")
|
|
47
|
+
except Exception as exc:
|
|
48
|
+
print(f"[-] Not an org member or insufficient permissions: {exc}"); return 1
|
|
49
|
+
try:
|
|
50
|
+
paginator = org.get_paginator("list_accounts")
|
|
51
|
+
for page in paginator.paginate():
|
|
52
|
+
for acct in page["Accounts"]:
|
|
53
|
+
results["accounts"].append({"id": acct["Id"], "name": acct["Name"], "email": acct.get("Email", ""), "status": acct["Status"]})
|
|
54
|
+
print(f" [+] {acct['Id']}: {acct['Name']} ({acct['Status']})")
|
|
55
|
+
except Exception: pass
|
|
56
|
+
_save(args, "aws_org_enum", results)
|
|
57
|
+
print(f"[+] {len(results['accounts'])} accounts found")
|
|
58
|
+
return 0
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""Bridge para Pacu AWS exploitation framework — execute and import results."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
MANIFEST = {
|
|
13
|
+
"capability_id": "cloudxpl.aws.pacu_bridge.v1",
|
|
14
|
+
"safety_class": "ACTIVE",
|
|
15
|
+
"requires_authorization": True,
|
|
16
|
+
"side_effects": ['api_calls'],
|
|
17
|
+
"output_schema": "xpl.finding.v1",
|
|
18
|
+
"mitre": ["T1078","T1068"],
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _save(args: Any, prefix: str, data: Any) -> str:
|
|
23
|
+
out = getattr(args, "output", ".")
|
|
24
|
+
os.makedirs(out, exist_ok=True)
|
|
25
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
26
|
+
path = os.path.join(out, f"{prefix}_{ts}.json")
|
|
27
|
+
with open(path, "w") as fh:
|
|
28
|
+
json.dump(data, fh, indent=2, default=str)
|
|
29
|
+
print(f"[+] Results saved to {path}")
|
|
30
|
+
return path
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def run(args: Any) -> int:
|
|
34
|
+
|
|
35
|
+
print("[*] Pacu Framework Bridge")
|
|
36
|
+
import shutil
|
|
37
|
+
import subprocess
|
|
38
|
+
pacu_path = shutil.which("pacu")
|
|
39
|
+
if not pacu_path:
|
|
40
|
+
print("[!] Pacu not found in PATH. Install: pip install pacu"); return 1
|
|
41
|
+
print(f"[+] Pacu found: {pacu_path}")
|
|
42
|
+
results = {"pacu_path": pacu_path, "available": True, "note": "Use pacu interactively for exploitation. This bridge verifies availability."}
|
|
43
|
+
_save(args, "aws_pacu_bridge", results)
|
|
44
|
+
print("[+] Pacu bridge ready — launch with: pacu")
|
|
45
|
+
return 0
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""AWS RDS enumeration — instances, clusters, public snapshots."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
MANIFEST = {
|
|
13
|
+
"capability_id": "cloudxpl.aws.rds_enum.v1",
|
|
14
|
+
"safety_class": "READ_ONLY",
|
|
15
|
+
"requires_authorization": True,
|
|
16
|
+
"side_effects": [],
|
|
17
|
+
"output_schema": "xpl.finding.v1",
|
|
18
|
+
"mitre": ["T1526"],
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _save(args: Any, prefix: str, data: Any) -> str:
|
|
23
|
+
out = getattr(args, "output", ".")
|
|
24
|
+
os.makedirs(out, exist_ok=True)
|
|
25
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
26
|
+
path = os.path.join(out, f"{prefix}_{ts}.json")
|
|
27
|
+
with open(path, "w") as fh:
|
|
28
|
+
json.dump(data, fh, indent=2, default=str)
|
|
29
|
+
print(f"[+] Results saved to {path}")
|
|
30
|
+
return path
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def run(args: Any) -> int:
|
|
34
|
+
|
|
35
|
+
print(f"[*] AWS RDS Enumeration (region: {args.region})")
|
|
36
|
+
try:
|
|
37
|
+
import boto3
|
|
38
|
+
except ImportError:
|
|
39
|
+
print("[!] boto3 not installed", file=sys.stderr); return 1
|
|
40
|
+
session = boto3.Session(profile_name=args.profile, region_name=args.region)
|
|
41
|
+
rds = session.client("rds")
|
|
42
|
+
results = {"instances": [], "public": [], "snapshots": []}
|
|
43
|
+
try:
|
|
44
|
+
paginator = rds.get_paginator("describe_db_instances")
|
|
45
|
+
for page in paginator.paginate():
|
|
46
|
+
for db in page["DBInstances"]:
|
|
47
|
+
info = {"id": db["DBInstanceIdentifier"], "engine": db["Engine"], "status": db["DBInstanceStatus"], "public": db.get("PubliclyAccessible", False), "encrypted": db.get("StorageEncrypted", False)}
|
|
48
|
+
if info["public"]:
|
|
49
|
+
results["public"].append(db["DBInstanceIdentifier"])
|
|
50
|
+
print(f" [!] {db['DBInstanceIdentifier']}: PUBLICLY accessible ({db['Engine']})")
|
|
51
|
+
else:
|
|
52
|
+
print(f" [+] {db['DBInstanceIdentifier']}: {db['Engine']} ({db['DBInstanceStatus']})")
|
|
53
|
+
results["instances"].append(info)
|
|
54
|
+
except Exception as exc:
|
|
55
|
+
print(f"[-] RDS enum failed: {exc}"); return 1
|
|
56
|
+
try:
|
|
57
|
+
snaps = rds.describe_db_snapshots(SnapshotType="public")
|
|
58
|
+
for snap in snaps.get("DBSnapshots", []):
|
|
59
|
+
results["snapshots"].append({"id": snap["DBSnapshotIdentifier"], "engine": snap["Engine"]})
|
|
60
|
+
print(f" [!] Public snapshot: {snap['DBSnapshotIdentifier']}")
|
|
61
|
+
except Exception: pass
|
|
62
|
+
_save(args, "aws_rds_enum", results)
|
|
63
|
+
print(f"[+] {len(results['instances'])} instances, {len(results['public'])} public")
|
|
64
|
+
return 0
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""AWS RDS exploitation — snapshot sharing, password reset vectors."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
MANIFEST = {
|
|
13
|
+
"capability_id": "cloudxpl.aws.rds_exploit.v1",
|
|
14
|
+
"safety_class": "ACTIVE",
|
|
15
|
+
"requires_authorization": True,
|
|
16
|
+
"side_effects": ['aws_api_calls'],
|
|
17
|
+
"output_schema": "xpl.finding.v1",
|
|
18
|
+
"mitre": ["T1530"],
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _save(args: Any, prefix: str, data: Any) -> str:
|
|
23
|
+
out = getattr(args, "output", ".")
|
|
24
|
+
os.makedirs(out, exist_ok=True)
|
|
25
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
26
|
+
path = os.path.join(out, f"{prefix}_{ts}.json")
|
|
27
|
+
with open(path, "w") as fh:
|
|
28
|
+
json.dump(data, fh, indent=2, default=str)
|
|
29
|
+
print(f"[+] Results saved to {path}")
|
|
30
|
+
return path
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def run(args: Any) -> int:
|
|
34
|
+
|
|
35
|
+
print(f"[*] AWS RDS Exploitation Analysis (region: {args.region})")
|
|
36
|
+
try:
|
|
37
|
+
import boto3
|
|
38
|
+
except ImportError:
|
|
39
|
+
print("[!] boto3 not installed", file=sys.stderr); return 1
|
|
40
|
+
session = boto3.Session(profile_name=args.profile, region_name=args.region)
|
|
41
|
+
rds = session.client("rds")
|
|
42
|
+
results = {"exploit_vectors": []}
|
|
43
|
+
try:
|
|
44
|
+
snaps = rds.describe_db_snapshots(SnapshotType="manual")
|
|
45
|
+
for snap in snaps.get("DBSnapshots", []):
|
|
46
|
+
try:
|
|
47
|
+
attrs = rds.describe_db_snapshot_attributes(DBSnapshotIdentifier=snap["DBSnapshotIdentifier"])
|
|
48
|
+
for attr in attrs.get("DBSnapshotAttributesResult", {}).get("DBSnapshotAttributes", []):
|
|
49
|
+
if attr.get("AttributeName") == "restore" and "all" in attr.get("AttributeValues", []):
|
|
50
|
+
results["exploit_vectors"].append({"type": "public_snapshot", "snapshot": snap["DBSnapshotIdentifier"]})
|
|
51
|
+
print(f" [!] {snap['DBSnapshotIdentifier']}: publicly restorable")
|
|
52
|
+
except Exception: pass
|
|
53
|
+
except Exception as exc:
|
|
54
|
+
print(f"[-] Snapshot analysis failed: {exc}"); return 1
|
|
55
|
+
_save(args, "aws_rds_exploit", results)
|
|
56
|
+
print(f"[+] {len(results['exploit_vectors'])} exploit vectors found")
|
|
57
|
+
return 0
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""AWS Route53 subdomain takeover — dangling CNAME, alias records, NS delegation."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
MANIFEST = {
|
|
13
|
+
"capability_id": "cloudxpl.aws.route53_takeover.v1",
|
|
14
|
+
"safety_class": "READ_ONLY",
|
|
15
|
+
"requires_authorization": True,
|
|
16
|
+
"side_effects": [],
|
|
17
|
+
"output_schema": "xpl.finding.v1",
|
|
18
|
+
"mitre": ["T1584.001"],
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _save(args: Any, prefix: str, data: Any) -> str:
|
|
23
|
+
out = getattr(args, "output", ".")
|
|
24
|
+
os.makedirs(out, exist_ok=True)
|
|
25
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
26
|
+
path = os.path.join(out, f"{prefix}_{ts}.json")
|
|
27
|
+
with open(path, "w") as fh:
|
|
28
|
+
json.dump(data, fh, indent=2, default=str)
|
|
29
|
+
print(f"[+] Results saved to {path}")
|
|
30
|
+
return path
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def run(args: Any) -> int:
|
|
34
|
+
|
|
35
|
+
print(f"[*] AWS Route53 Subdomain Takeover Analysis (region: {args.region})")
|
|
36
|
+
try:
|
|
37
|
+
import boto3
|
|
38
|
+
except ImportError:
|
|
39
|
+
print("[!] boto3 not installed", file=sys.stderr); return 1
|
|
40
|
+
session = boto3.Session(profile_name=args.profile, region_name=args.region)
|
|
41
|
+
r53 = session.client("route53")
|
|
42
|
+
results = {"zones": [], "dangling": []}
|
|
43
|
+
try:
|
|
44
|
+
zones = r53.list_hosted_zones()["HostedZones"]
|
|
45
|
+
for zone in zones:
|
|
46
|
+
zid = zone["Id"].split("/")[-1]
|
|
47
|
+
info = {"id": zid, "name": zone["Name"], "private": zone["Config"].get("PrivateZone", False), "records": []}
|
|
48
|
+
paginator = r53.get_paginator("list_resource_record_sets")
|
|
49
|
+
for page in paginator.paginate(HostedZoneId=zid):
|
|
50
|
+
for rr in page["ResourceRecordSets"]:
|
|
51
|
+
if rr["Type"] == "CNAME":
|
|
52
|
+
target = rr.get("ResourceRecords", [{}])[0].get("Value", "") if rr.get("ResourceRecords") else ""
|
|
53
|
+
info["records"].append({"name": rr["Name"], "type": "CNAME", "target": target})
|
|
54
|
+
takeover_sigs = [".s3.amazonaws.com", ".cloudfront.net", ".elasticbeanstalk.com", ".herokuapp.com", ".azurewebsites.net", ".trafficmanager.net"]
|
|
55
|
+
if any(sig in target for sig in takeover_sigs):
|
|
56
|
+
results["dangling"].append({"record": rr["Name"], "target": target, "zone": zone["Name"]})
|
|
57
|
+
print(f" [!] Potential takeover: {rr['Name']} -> {target}")
|
|
58
|
+
results["zones"].append(info)
|
|
59
|
+
except Exception as exc:
|
|
60
|
+
print(f"[-] Route53 enum failed: {exc}"); return 1
|
|
61
|
+
_save(args, "aws_route53_takeover", results)
|
|
62
|
+
print(f"[+] {len(results['zones'])} zones, {len(results['dangling'])} potential takeovers")
|
|
63
|
+
return 0
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""AWS S3 bucket enumeration — list buckets, check ACLs, detect public access."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
MANIFEST = {
|
|
13
|
+
"capability_id": "cloudxpl.aws.s3_enum.v1",
|
|
14
|
+
"safety_class": "READ_ONLY",
|
|
15
|
+
"requires_authorization": True,
|
|
16
|
+
"side_effects": ["aws_api_calls"],
|
|
17
|
+
"output_schema": "xpl.finding.v1",
|
|
18
|
+
"mitre": ["T1530"],
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def run(args: Any) -> int:
|
|
23
|
+
print(f"[*] AWS S3 Bucket Enumeration (region: {args.region})")
|
|
24
|
+
|
|
25
|
+
try:
|
|
26
|
+
import boto3
|
|
27
|
+
except ImportError:
|
|
28
|
+
print("[!] boto3 not installed", file=sys.stderr)
|
|
29
|
+
return 1
|
|
30
|
+
|
|
31
|
+
session = boto3.Session(profile_name=args.profile, region_name=args.region)
|
|
32
|
+
s3 = session.client("s3")
|
|
33
|
+
|
|
34
|
+
try:
|
|
35
|
+
buckets = s3.list_buckets()["Buckets"]
|
|
36
|
+
except Exception as exc:
|
|
37
|
+
print(f"[-] list_buckets failed: {exc}", file=sys.stderr)
|
|
38
|
+
return 1
|
|
39
|
+
|
|
40
|
+
print(f"[+] {len(buckets)} buckets found")
|
|
41
|
+
results = []
|
|
42
|
+
|
|
43
|
+
for bucket in buckets:
|
|
44
|
+
name = bucket["BucketName"]
|
|
45
|
+
entry: dict[str, Any] = {"name": name, "created": bucket["CreationDate"].isoformat()}
|
|
46
|
+
|
|
47
|
+
try:
|
|
48
|
+
acl = s3.get_bucket_acl(Bucket=name)
|
|
49
|
+
public_grants = [
|
|
50
|
+
g for g in acl.get("Grants", [])
|
|
51
|
+
if g.get("Grantee", {}).get("URI", "").endswith("AllUsers")
|
|
52
|
+
or g.get("Grantee", {}).get("URI", "").endswith("AuthenticatedUsers")
|
|
53
|
+
]
|
|
54
|
+
entry["public_acl"] = bool(public_grants)
|
|
55
|
+
if public_grants:
|
|
56
|
+
entry["public_grants"] = [g["Permission"] for g in public_grants]
|
|
57
|
+
print(f" [!] {name}: PUBLIC ACL — {', '.join(entry['public_grants'])}")
|
|
58
|
+
except Exception:
|
|
59
|
+
entry["acl_error"] = "AccessDenied"
|
|
60
|
+
|
|
61
|
+
try:
|
|
62
|
+
pab = s3.get_public_access_block(Bucket=name)["PublicAccessBlockConfiguration"]
|
|
63
|
+
entry["public_access_block"] = pab
|
|
64
|
+
all_blocked = all(pab.values())
|
|
65
|
+
if not all_blocked:
|
|
66
|
+
print(f" [!] {name}: Public access block INCOMPLETE")
|
|
67
|
+
except s3.exceptions.NoSuchPublicAccessBlockConfiguration:
|
|
68
|
+
entry["public_access_block"] = None
|
|
69
|
+
print(f" [!] {name}: NO public access block configured")
|
|
70
|
+
except Exception:
|
|
71
|
+
pass
|
|
72
|
+
|
|
73
|
+
try:
|
|
74
|
+
enc = s3.get_bucket_encryption(Bucket=name)
|
|
75
|
+
rules = enc["ServerSideEncryptionConfiguration"]["Rules"]
|
|
76
|
+
entry["encryption"] = rules[0]["ApplyServerSideEncryptionByDefault"]["SSEAlgorithm"]
|
|
77
|
+
except Exception:
|
|
78
|
+
entry["encryption"] = None
|
|
79
|
+
|
|
80
|
+
try:
|
|
81
|
+
versioning = s3.get_bucket_versioning(Bucket=name)
|
|
82
|
+
entry["versioning"] = versioning.get("Status", "Disabled")
|
|
83
|
+
except Exception:
|
|
84
|
+
pass
|
|
85
|
+
|
|
86
|
+
results.append(entry)
|
|
87
|
+
|
|
88
|
+
os.makedirs(args.output, exist_ok=True)
|
|
89
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
90
|
+
out_path = os.path.join(args.output, f"aws_s3_{ts}.json")
|
|
91
|
+
with open(out_path, "w") as fh:
|
|
92
|
+
json.dump(results, fh, indent=2, default=str)
|
|
93
|
+
|
|
94
|
+
public_count = sum(1 for r in results if r.get("public_acl"))
|
|
95
|
+
print(f"[+] {public_count} public buckets, {len(results)} total → {out_path}")
|
|
96
|
+
return 0
|