Blog··7 min read

Anonymous S3 listing to IT admin: a credential chain walked without a human

A publicly listable S3 bucket led to a PowerShell script with hardcoded IAM keys, which led to a credential export with six more sets, which led to an it-admin key. Five critical findings, all exploited, plus a card data exposure.

A publicly listable S3 bucket is usually reported as a medium: information disclosure, fix the ACL, move on. The severity depends entirely on what is in it, and what is in it is usually not known until someone reads every object. That is work, which is why it often does not happen.

This campaign is what happens when it does. The target was dev.huge-logistics.com, a Pwned Labs cloud scenario, and Darkmoon was given nothing but the domain name. It went from anonymous listing to a valid IT administrator credential in the same AWS account, then read what that identity could reach.

What the agent found

SeverityCount
Critical5 (all exploited)
High1 (confirmed)
Medium2 (confirmed)
Low1 (unconfirmed)
Total9

The bucket held 15 objects across four prefixes. Anonymous listing was the entry point and is recorded as its own high severity finding.

aws s3 ls s3://dev.huge-logistics.com/ --no-sign-request --region us-east-1

PRE admin/
PRE migration-files/
PRE shared/
PRE static/
2023-10-16 17:00:47   5347 index.html
DarkMoon Pro findings list for a demo campaign against DVGA, an intentionally vulnerable GraphQL app, on synthetic demo data: 68 vulnerabilities with severity and proof filters (exploited, confirmed, unconfirmed), and rows such as remote code execution and SQL injection, each with a CVSS bar, an Exploited status, its treatment-plan action and a link to the attack path it sits on.
The findings list in the current Pro interface, on a demo campaign against the DVGA lab: each row carries its severity, an evidence status and a CVSS bar, with filters for exploited, confirmed and unconfirmed. Each step of a chain is its own finding with its own status, as in the report above. Synthetic demo data (demo.dark-moon.org), not the campaign described in this article.Captured 22 November 2026 from demo.dark-moon.org.

The chain, one step at a time

The report records this as a single critical finding titled as a privilege escalation chain, with the five steps enumerated. Each step is also its own finding, so that a remediation team can fix any link independently.

# 1. anonymous: list the bucket, spot the archive
aws s3 cp s3://dev.huge-logistics.com/shared/hl_migration_project.zip \
  /tmp/hl_migration_project.zip --no-sign-request --region us-east-1
unzip /tmp/hl_migration_project.zip -d /tmp/hl_migration

# 2. anonymous: the archive contains a PowerShell script with hardcoded keys
cat /tmp/hl_migration/migrate_secrets.ps1
-> $accessKey = "AKIA<redacted>"
   $secretKey = "<redacted>"

# 3. as pam-test: the keys are live
aws sts get-caller-identity
-> Arn: arn:aws:iam::794929857501:user/pam-test

# 4. as pam-test: read an object anonymous access could not
aws s3 cp s3://dev.huge-logistics.com/migration-files/test-export.xml /tmp/test-export.xml

# 5. as it-admin: the export contains six more credential sets
aws sts get-caller-identity
-> Arn: arn:aws:iam::794929857501:user/it-admin

The pivot file is the interesting one. test-export.xml is a credential export holding six plaintext credential sets for different systems: an Oracle database account, a root account on an HP server cluster, an AWS IT admin access key pair, an Iron Mountain backup portal login, an Office 365 admin password and a Jira admin account. One file, six systems, three of them outside AWS entirely.

With the it-admin identity the agent read the admin/ prefix, which anonymous and pam-test could not. It found a transaction export with 29 credit card records including card numbers, CVVs, expiry dates, cardholder names and, in the same rows, usernames with plaintext passwords. The report treats that as a PCI data breach finding in its own right. It also retrieved the lab flag file, which is the scenario's proof of full compromise.

DarkMoon Pro finding detail on synthetic demo data: an exploited, critical SQL injection in the pastes(filter) parameter of the DVGA demo lab (CVSS 9.8), with the asset tree on the left, the description and the evidence the testing agent recorded in the centre, and a details rail with identifier, CVSS vector, endpoint, agent and first and last seen times.
A finding detail page in the current Pro interface, here an exploited SQL injection in the DVGA demo lab: the description and the evidence the testing agent recorded sit next to the CVSS vector and endpoint. A pivot such as reading a credential export is recorded with its evidence on the finding. Synthetic demo data (demo.dark-moon.org), not the campaign described in this article.Captured 22 November 2026 from demo.dark-moon.org.

Two things the report refused to inflate

A second key set that did not work. A second copy of migrate_secrets.ps1 under migration-files/ carried a different access key. The agent tried it and recorded the answer: InvalidClientTokenId: The security token included in the request is invalid. Rather than listing it as another critical credential leak, the finding is rated medium, because a hardcoded key that no longer authenticates is a hygiene problem, not an access path.

A sibling bucket it could not open. The agent enumerated eight plausible sibling bucket names. Seven returned NoSuchBucket. One, huge-logistics.com, returned AccessDenied, which proves the bucket exists and nothing more. That finding is rated low and marked unconfirmed, which is the correct status for an inference.

Why the chain worked

None of the five steps required an exploit. Every step was an authorised operation performed by an identity that should not have had it:

  • The bucket allowed anonymous listing, so the archive was discoverable.
  • A migration script carried long lived static keys instead of using a role.
  • Those keys belonged to a user that could read an object containing more credentials, which is the definition of a lateral movement primitive.
  • The second identity had access to cardholder data sitting unencrypted in object storage next to the public prefixes.

The report also records the AWS account id as disclosed through the leaked credentials, which is a small finding on its own and a useful one for anyone mapping the target.

DarkMoon Pro Attack paths tab on an anonymised real OWASP Juice Shop campaign: eleven Possible attack paths, each marked Inferred, a note that no path could be proven from the evidence of its 57 findings, and the first inferred path drawn as a dashed three-step route on the zoned map under an 'Inferred attack path · not proven' banner.
The Attack paths tab in the current Pro interface labels every path by provenance. On this campaign none could be proven from the evidence, so all eleven are Possible paths marked Inferred, and the selected one is drawn dashed under a « not proven » banner. It shows the current view of linked findings, not a drawing of the chain above. Anonymised real OWASP Juice Shop campaign of 26 April 2026 (demo.dark-moon.org), not the campaign described in this article.Captured 22 November 2026 from demo.dark-moon.org.

Remediation

  • Turn on S3 Block Public Access at the account level, then fix the bucket policy. Account level enforcement is what survives the next mistake.
  • Rotate every credential in test-export.xml and in both copies of migrate_secrets.ps1, including the non-AWS ones. Assume they are public.
  • Replace static IAM keys in scripts with roles and short lived credentials, and enable MFA on the human accounts.
  • Get cardholder data out of general purpose object storage. If it must be stored, it is encrypted, tokenised and access logged, and CVVs are never retained.
  • Scan buckets for credential shaped content on write, not on audit day, and alert on GetObject from unauthenticated principals.

What this proves about autonomous pentesting

The chain is five steps long and each step depends on reading the content of the previous one. That is exactly the kind of work that gets skipped in a time boxed manual test and that a scanner cannot do at all, because a scanner checks whether a bucket is public, not what is inside the ZIP inside the bucket. An agent that can unzip a file, read a PowerShell script, extract two variables, authenticate with them and try the next prefix is doing analyst work, and it does not get bored on object 12 of 15.

The platform is open source under AGPL-3.0: repository, documentation.

Next
Run it against your own lab

Darkmoon is open source (AGPL-3.0) and self hosted. Clone it, point it at a target you own, and read every line.