Files
Anthropic-Cybersecurity-Skills/skills/performing-cloud-penetration-testing.bak/references/api-reference.md
T
mukul975 c47eed6a64 Production hardening: security fixes, code quality, 724 skills complete
- Fix 25 shell=True subprocess calls with list-based commands
- Fix 49 verify=False in defensive skills (env-var override)
- Add timeout to 231 HTTP/subprocess/socket calls
- Fix 6 SQL injection patterns with whitelist validation
- Replace 8 __import__() with standard imports
- Remove 701 unused imports across 442 files
- Add authorized-testing disclaimers to all offensive skills
- Complete 11 incomplete skill directories
- Expand 10 stub SKILL.md files with full content
- Fix 2 YAML parse errors in frontmatter
- Fix 5 pre-existing syntax errors
- Convert 22 hardcoded paths/ports to environment variables
- Back up 21 redundant skill pairs to .bak
- Fix 2 global declaration errors
- 724/724 skills with full folder anatomy (SKILL.md + agent.py + api-reference.md + LICENSE)
- 0 compile errors across all 724 agent.py files
2026-03-19 13:26:49 +01:00

57 lines
2.0 KiB
Markdown

# API Reference: Performing Cloud Penetration Testing
## AWS S3 API (boto3)
| Method | Description |
|--------|-------------|
| `s3.list_buckets()` | Enumerate all S3 buckets in account |
| `s3.get_bucket_acl(Bucket)` | Check bucket ACL for public grants |
| `s3.get_bucket_policy(Bucket)` | Get bucket policy for public access |
| `s3.get_bucket_encryption(Bucket)` | Check default encryption status |
## AWS EC2 API
| Method | Description |
|--------|-------------|
| `ec2.describe_security_groups()` | Enumerate security groups and ingress rules |
| `ec2.describe_instances()` | List instances with metadata options (IMDSv1/v2) |
| `ec2.describe_network_interfaces()` | Enumerate ENIs and public IPs |
## AWS Lambda API
| Method | Description |
|--------|-------------|
| `lambda.list_functions()` | Enumerate Lambda functions |
| `lambda.get_function(FunctionName)` | Get function config including env vars |
| `lambda.get_policy(FunctionName)` | Get resource-based policy |
## AWS IAM API
| Method | Description |
|--------|-------------|
| `iam.list_users()` | Enumerate IAM users |
| `iam.list_roles()` | Enumerate IAM roles and trust policies |
| `iam.get_policy_version()` | Analyze policy documents |
## Key Libraries
- **boto3** (`pip install boto3`): AWS SDK for all service enumeration
- **ScoutSuite** (`pip install scoutsuite`): Multi-cloud security auditing tool
- **prowler**: AWS/Azure/GCP security best practices assessment
- **cloudfox**: Cloud penetration testing enumeration
## Configuration
| Variable | Description |
|----------|-------------|
| `AWS_PROFILE` | AWS CLI profile with test credentials |
| `AWS_DEFAULT_REGION` | Target AWS region |
## References
- [AWS Penetration Testing Policy](https://aws.amazon.com/security/penetration-testing/)
- [ScoutSuite GitHub](https://github.com/nccgroup/ScoutSuite)
- [Prowler](https://github.com/prowler-cloud/prowler)
- [CloudFox](https://github.com/BishopFox/cloudfox)
- [HackTricks Cloud](https://cloud.hacktricks.xyz/)