Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cloud-audit — Automated cloud security auditing tool that detects AK/SK credential misuse by periodically auditing cloud platform logs using anomaly detection, blacklist rules, and baseline analysis for Tencent Cloud and AWS. | Kitploit
Tools/GitHubGitHub/al0ne/cloud-audit
Cloud SecurityThreat IntelligenceIncident ResponseAnomaly DetectionLog Analysis
GitHubal0ne/cloud-audit

cloud-audit

Automated cloud security auditing tool that detects AK/SK credential misuse by periodically auditing cloud platform logs using anomaly detection, blacklist rules, and baseline analysis for Tencent Cloud and AWS.

View Repository
4482 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Project Introduction

cloud-audit (Cloud Security Audit Assistant) is a tool for detecting the exploitation of leaked AK/SK from public cloud vendors. It periodically calls cloud platform APIs to audit logs and identifies suspected intrusions based on abnormal behavior, black features, and baselines.

Currently only supports Tencent Cloud and AWS

Features

  • Supports detecting Tencent Cloud AK/SK exploitation alerts (abnormal behavior)
    • Monitor AK/SK used to create/execute commands
    • Monitor AK/SK used to add/delete sub-accounts
    • Monitor AK/SK used to list databases across regions
    • Monitor AK/SK used to list instances across regions
  • Supports detecting AWS AK/SK exploitation alerts (baseline detection)
    • Monitor AK/SK used to create users
    • Monitor AK/SK used to list users
    • Monitor AK/SK used to list S3 buckets
    • Monitor AK/SK used to list databases
    • Monitor AK/SK used for privilege escalation
  • Supports WeCom / Discord alert notifications

Usage Instructions

Step 1: Run the command to install dependencies

root@kitploit:~
cd /opt/ && git clone https://github.com/al0ne/cloud-audit
cd cloud-audit && pip3 install -r requirements.txt

Step 2: Create and modify the .env configuration

root@kitploit:~
cp .env.example .env

Fill in the .env file according to your actual configuration

root@kitploit:~
# Tencent Cloud AK/SK information, used to call API interfaces to obtain logs
TencentAccessKey="xxx"
TencentSecretKey="xxx"

# List of AK/SK to monitor on Tencent Cloud
AccesskeyList="xxx,xxx,xxx"

# AWS AK/SK information
AWS_ACCESS_KEY_ID="xxx"
AWS_SECRET_ACCESS_KEY="xxx"

# Discord notification information
discord_webhook_url=""

# WeCom robot notification
weixin_webhook_url=""

Step 3: Important program configuration

root@kitploit:~
# Trusted network segments. Sensitive operations from untrusted segments will trigger alerts directly.
while_cidr = ["192.168.0.0/16", "172.16.0.0/12", "10.0.0.0/8"]

# AWS regions of interest. Events outside these regions will not be queried
aws_region = [
    "us-east-1",
    "us-east-2",
    "ap-northeast-1",
    "ap-southeast-1"
]

Run

root@kitploit:~
python3 cloud-audit.py

The program executes and searches for results every 15 minutes

AWS Permissions Notes

Since AWS logs are read and audited using the AWS CloudTrail service, please ensure your account's IAM permissions include AWSCloudTrail_ReadOnlyAccess to use this product, otherwise you may encounter the following error:

root@kitploit:~
botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the LookupEvents operation: User: arn:aws:iam::xxxxx:user/test is not authorized to perform: cloudtrail:LookupEvents because no identity-based policy allows the cloudtrail:LookupEvents action

Go to the AWS IAM console, select Users -> Permissions to add permissions.

Detection Logic

Cloud Platform Exploitation Detection Logic

When using some cloud platform exploitation tools, typical actions include scanning all regions for RDS instances, ECS instances, or containers, creating/deleting sub-accounts, executing commands, etc. These actions themselves are relatively sensitive, so they are obtained through the log interfaces of each cloud platform.

Another approach is based on sensitive operations from untrusted network segments. Normally, calls come from the IDC internal network or IDC egress IPs. If AK/SK calls appear from non-enterprise trusted network segments and involve high-risk operations, an alert is triggered directly.

Common sensitive key operations include:

  • CreateUser
  • ListUsers
  • ListBuckets
  • DescribeInstances
  • DescribeDBInstances
  • AttachUserPolicy
  • RunCommand/CreateCommand (Tencent Cloud)

Tencent Cloud Detection

The biggest difference between Tencent Cloud and AWS API calls is that Tencent Cloud can query the detailed actions of a specific AK ID through an API, while AWS can only search on the platform and cannot query the recent execution information of a specific AK ID via AK/SK API calls.

Therefore, to detect Tencent Cloud AK/SK exploitation, you need to input a list of AK IDs used by online business to monitor, and periodically check the actions performed by a specific AK ID.

AWS Detection

AWS can only obtain logs based on region and action, calling the CloudTrail API with AK/SK to check if there are logs for a specific action in a specific region.

Therefore, AWS detection relies more on baselines.

root@kitploit:~
def DescribeInstances(CloudTrailEvent: dict):
    """
    Detect AK/SK used to list EC2 instances
    :param CloudTrailEvent:
    :return: None
    """
    accessKeyId = CloudTrailEvent.get('userIdentity').get('accessKeyId')
    arn = CloudTrailEvent.get('userIdentity').get('arn')
    eventTime = utc_to_china_tz(CloudTrailEvent.get('eventTime'))
    eventName = CloudTrailEvent.get('eventName')
    awsRegion = CloudTrailEvent.get('awsRegion')
    sourceIPAddress = CloudTrailEvent.get('sourceIPAddress')
    userAgent = CloudTrailEvent.get('userAgent')

    sip_verify = False

    for cidr in while_cidr:
        if ipaddress.ip_address(sourceIPAddress) in ipaddress.ip_network(cidr):
            sip_verify = True

    if not sip_verify and 'aws-internal' not in userAgent:
        message = f"{text_title}\nTime: {eventTime}\nAccount ID: {arn}\nRegion: {awsRegion}\nAccessKey ID:{accessKeyId}\n" \
                  f"Action: {eventName}\nIP Address: {sourceIPAddress}\nUser-Agent: {userAgent}\n\n" \
                  f"Detected an external IP request to list instance information. Please check if it is being exploited by an attacker!"
    send_message(message)

Screenshots

Discord alert screenshot

1

1

2

Future Plans

Currently only detects based on behavior. In practice, it can also detect based on baselines.

  • Non-SDK User-Agent AK/SK calls
  • Baseline detection: if a command has never been executed before and is executed for the first time, trigger an alert directly
Download Tool