Skip to content

SiteQ8/S7aba

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

S7aba Banner

Cloud Privilege Escalation & Post-Exploitation Framework

Version License Clouds Bash Stars Issues Security

Features β€’ Quick Start β€’ Usage β€’ Attack Flow β€’ Providers β€’ Contributing


⚠️ Legal Disclaimer

S7aba is designed for authorized security testing only. Usage of this tool for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state, and federal laws. The author assumes no liability and is not responsible for any misuse or damage caused by this program.


πŸ” What is S7aba?

S7aba (Ψ³Ψ­Ψ§Ψ¨Ψ© β€” Arabic word for "Cloud") is a pure Bash cloud privilege escalation and post-exploitation framework designed for red teamers, penetration testers, and cloud security professionals.

It auto-detects your cloud environment, enumerates permissions and misconfigurations, identifies privilege escalation paths, and provides post-exploitation capabilities β€” all from a single command-line tool with zero dependencies beyond standard cloud CLIs.

Why S7aba?

  • Pure Bash β€” No Python, Go, or Ruby required. Runs anywhere Bash runs
  • Multi-Cloud β€” Single framework for AWS, Azure, GCP, and Kubernetes
  • Modular β€” Plug-and-play modules for each provider and attack phase
  • Safe by Default β€” Dry-run mode, confirmation prompts, full audit logging
  • Extensible β€” Add new providers or techniques by creating simple shell scripts

πŸ“Έ Screenshots

Help Menu

S7aba Help Menu

Cloud Reconnaissance

S7aba Recon Output

Privilege Escalation Discovery

S7aba Privesc Output


✨ Features

Phase Capability Description
πŸ” Recon Identity & Permissions Enumerate IAM users, roles, policies, and effective permissions
πŸ” Recon Service Discovery Map S3, EC2, Lambda, RDS, and other cloud resources
πŸ” Recon Network Analysis VPCs, security groups, public endpoints, IMDS configuration
πŸ” Recon Secret Scanning SSM parameters, Secrets Manager, Lambda env vars
⚑ Privesc IAM Escalation 14+ AWS privilege escalation methods (Rhino Security style)
⚑ Privesc Policy Abuse CreatePolicyVersion, SetDefaultPolicyVersion, inline policies
⚑ Privesc Role Chaining PassRole+Lambda, PassRole+EC2, PassRole+CloudFormation
πŸ”— Lateral Trust Mapping Cross-account roles, service-linked roles, federation
πŸ”— Lateral Service Pivots Move between cloud services using discovered credentials
πŸ›‘οΈ Persist IAM Backdoors Create persistent access through IAM manipulation
πŸ“€ Exfil Data Discovery Find and classify sensitive data across cloud storage
🧹 Cleanup Artifact Removal Remove traces, logs, and created resources
πŸ“Š Report Multi-Format Generate reports in Text, JSON, or HTML

πŸš€ Quick Start

# Clone
git clone https://github.com/SiteQ8/S7aba.git
cd S7aba

# Make executable
chmod +x s7aba.sh

# Run reconnaissance (auto-detects cloud provider)
./s7aba.sh recon

# Or specify provider
./s7aba.sh -p aws recon

Prerequisites

Required:

  • Bash 4.0+
  • curl, jq, grep, awk, sed, base64

At least one cloud CLI:

  • AWS CLI (aws) β€” for AWS assessments
  • Azure CLI (az) β€” for Azure assessments
  • Google Cloud SDK (gcloud) β€” for GCP assessments
  • kubectl β€” for Kubernetes assessments

πŸ“– Usage

./s7aba.sh [OPTIONS] <COMMAND> [ARGS]

COMMANDS:
  recon          Enumerate cloud environment & permissions
  privesc        Identify & exploit privilege escalation paths
  persist        Establish persistence mechanisms
  exfil          Data discovery & exfiltration techniques
  lateral        Lateral movement across cloud services
  cleanup        Remove artifacts & cover tracks
  report         Generate assessment report
  interactive    Launch interactive TUI mode

OPTIONS:
  -p, --provider   Target cloud (aws|azure|gcp|k8s|multi)
  -r, --region     Target region
  -o, --output     Output format (text|json|html)
  -v, --verbose    Verbose output
  -d, --dry-run    Simulate without executing
  -h, --help       Show help
  --version        Show version

Examples

# Full recon with verbose logging
./s7aba.sh -v -p aws recon

# Privilege escalation scan (dry-run)
./s7aba.sh -p aws -d privesc

# Kubernetes lateral movement
./s7aba.sh -p k8s lateral

# Generate HTML report
./s7aba.sh -o html report

# Interactive TUI mode
./s7aba.sh interactive

🎯 Attack Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    RECON      │────▢│   PRIVESC    │────▢│   LATERAL    β”‚
β”‚              β”‚     β”‚              β”‚     β”‚   MOVEMENT   β”‚
β”‚ β€’ Identity   β”‚     β”‚ β€’ IAM Paths  β”‚     β”‚ β€’ Trust Map  β”‚
β”‚ β€’ Permissionsβ”‚     β”‚ β€’ Policy Abuseβ”‚    β”‚ β€’ Svc Pivots β”‚
β”‚ β€’ Services   β”‚     β”‚ β€’ Role Chain β”‚     β”‚ β€’ Targets    β”‚
β”‚ β€’ Network    β”‚     β”‚ β€’ Exploit    β”‚     β”‚              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                                                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”
β”‚    REPORT    │◀────│   CLEANUP    │◀────│  PERSIST &   β”‚
β”‚              β”‚     β”‚              β”‚     β”‚   EXFIL      β”‚
β”‚ β€’ Text/JSON  β”‚     β”‚ β€’ Remove     β”‚     β”‚ β€’ Backdoors  β”‚
β”‚ β€’ HTML       β”‚     β”‚   artifacts  β”‚     β”‚ β€’ Data Disc. β”‚
β”‚ β€’ Findings   β”‚     β”‚ β€’ Cover logs β”‚     β”‚ β€’ Exfil Chan.β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

AWS Privilege Escalation Methods

S7aba checks for 14+ known AWS IAM privilege escalation techniques:

# Method Risk Description
1 CreatePolicyVersion HIGH Create admin policy version, set as default
2 SetDefaultPolicyVersion HIGH Switch to older, more permissive policy version
3 PassRole+Lambda HIGH Pass admin role to Lambda function
4 PassRole+EC2 HIGH Launch EC2 with admin instance profile
5 AttachUserPolicy CRITICAL Attach AdministratorAccess to self
6 AttachGroupPolicy HIGH Attach admin policy to user's group
7 PutUserPolicy CRITICAL Add inline admin policy to user
8 AddUserToGroup HIGH Join admin group
9 UpdateAssumeRolePolicy HIGH Modify admin role trust policy
10 PassRole+CloudFormation HIGH CFN stack with admin role
11 LambdaCodeInjection MEDIUM Modify Lambda to exfil credentials
12 SSMCommand HIGH Execute on EC2 via SSM
13 CreateAccessKey MEDIUM Generate keys for other users
14 PassRole+Glue HIGH Glue dev endpoint with admin role

Azure Privilege Escalation Methods

# Method Risk Description
1 UserAccessAdmin→Owner CRITICAL Self-assign Owner role via User Access Admin
2 Contributor→RunCommand HIGH Execute commands on VMs via Run Command
3 Contributor→CustomScript HIGH Deploy Custom Script Extension on VMs
4 Contributor→FunctionApp HIGH Create Function App with managed identity
5 VMRunCommand HIGH Run arbitrary commands on virtual machines
6 AutomationRunbook HIGH Create runbook with RunAs account
7 LogicAppManagedId HIGH Logic App with managed identity for ARM access
8 KeyVaultPolicyMod HIGH Modify Key Vault access policies
9 AppSecretAdd HIGH Add credentials to owned application
10 ManagedIdentityToken HIGH Extract MI token from IMDS
11 TenantConsent CRITICAL Abuse tenant-wide consented permissions

GCP Privilege Escalation Methods

# Method Risk Description
1 SetIamPolicy CRITICAL Modify project IAM to grant Owner
2 CreateSAKey HIGH Generate key for privileged SA
3 GetSAToken HIGH Generate access token for SA
4 SignBlobJwt HIGH Sign blobs/JWTs as service account
5 ActAs+Compute HIGH Create VM with privileged SA
6 ActAs+CloudFunction HIGH Deploy Cloud Function with privileged SA
7 ActAs+CloudRun HIGH Deploy Cloud Run with privileged SA
8 SetMetadata HIGH Inject startup script via instance metadata
9 CloudBuild HIGH Submit build using Cloud Build SA
10 UpdateRole HIGH Add permissions to custom role
11 DeploymentManager HIGH Create deployment with DM SA
12 OrgPolicyOverride CRITICAL Override org security policies

Kubernetes Privilege Escalation Methods

# Method Risk Description
1 BindClusterAdmin CRITICAL ClusterRoleBinding to cluster-admin
2 EscalateClusterRole CRITICAL Modify ClusterRole with wildcard perms
3 PrivilegedPod HIGH Privileged pod to escape to host
4 HostPathPod HIGH Mount host filesystem into pod
5 HostPIDPod HIGH Pod with hostPID for node process access
6 ReadSecrets HIGH Read SA tokens and secrets
7 Impersonate HIGH Impersonate privileged users/SAs
8 PodExec HIGH Exec into existing privileged pods
9 PatchWorkload HIGH Modify pods/deployments for escalation
10 DaemonSetAllNodes HIGH Deploy DaemonSet on every node
11 MintSAToken HIGH Create tokens for privileged SAs
12 CronJobBackdoor MEDIUM CronJob for persistent execution

☁️ Supported Providers

Provider Status Recon Privesc Lateral Persist Exfil Cleanup
AWS βœ… Ready βœ… βœ… βœ… βœ… βœ… βœ…
Azure βœ… Ready βœ… βœ… βœ… βœ… βœ… βœ…
GCP βœ… Ready βœ… βœ… βœ… βœ… βœ… βœ…
Kubernetes βœ… Ready βœ… βœ… βœ… βœ… βœ… βœ…

All 4 providers fully implemented across all 6 attack phases + reporting.


πŸ“ Project Structure

S7aba/
β”œβ”€β”€ s7aba.sh                  # Main entry point
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ utils.sh          # Utility functions
β”‚   β”‚   β”œβ”€β”€ logger.sh         # Logging & output formatting
β”‚   β”‚   └── cloud_detect.sh   # Cloud provider auto-detection
β”‚   └── modules/
β”‚       β”œβ”€β”€ recon_aws.sh       # AWS reconnaissance
β”‚       β”œβ”€β”€ privesc_aws.sh     # AWS privilege escalation
β”‚       β”œβ”€β”€ lateral_*.sh       # Lateral movement modules
β”‚       β”œβ”€β”€ persist_*.sh       # Persistence modules
β”‚       β”œβ”€β”€ exfil_*.sh         # Data exfiltration modules
β”‚       β”œβ”€β”€ cleanup_*.sh       # Cleanup modules
β”‚       └── report.sh          # Report generation
β”œβ”€β”€ ui/
β”‚   └── index.html             # Web UI landing page
β”œβ”€β”€ docs/
β”‚   └── screenshots/           # Documentation screenshots
β”œβ”€β”€ logs/                      # Runtime logs (gitignored)
β”œβ”€β”€ reports/                   # Generated reports (gitignored)
β”œβ”€β”€ SECURITY.md                # Security policy
β”œβ”€β”€ CONTRIBUTING.md            # Contribution guidelines
β”œβ”€β”€ CODE_OF_CONDUCT.md         # Code of conduct
β”œβ”€β”€ LICENSE                    # MIT License
└── README.md                  # This file

🀝 Contributing

Contributions are welcome! Whether it's new cloud provider modules, additional escalation techniques, bug fixes, or documentation improvements.

See CONTRIBUTING.md for guidelines.

Areas for Contribution

  • πŸ”§ Azure/GCP/K8s modules β€” Implement recon, privesc, lateral, persist, exfil
  • πŸ§ͺ New escalation techniques β€” Add emerging IAM abuse methods
  • πŸ“Š Report templates β€” PDF reports, SARIF output, integration with platforms
  • 🧹 Testing β€” Unit tests, integration tests, CI/CD
  • πŸ“– Documentation β€” Tutorials, walkthroughs, video demos

πŸ”’ Security

Found a vulnerability? Please report it responsibly.

See SECURITY.md for our security policy and disclosure process.

Do NOT open public issues for security vulnerabilities.


πŸ“„ License

This project is licensed under the MIT License β€” see LICENSE for details.


πŸ™ Acknowledgments


Built by @SiteQ8 β€” Ali AlEnezi πŸ‡°πŸ‡Ό

Sponsor this project

 

Packages

 
 
 

Contributors