Solving Assumptions of Life: Winja CTF | Nullcon Goa 2022

Search for a command to run...

No comments yet. Be the first to comment.
Active Directory delegation is one of those features that makes complete sense on paper and causes constant headaches in practice. It solves a real problem. It's also misconfigured in almost every env
DOM Clobbering + JSONP Callback Injection via DOMPurify Misconfiguration
In the world of blockchain security and Capture The Flag (CTF) challenges, vulnerabilities in smart contracts often stem from subtle arithmetic issues, especially in older Solidity versions (pre-0.8.0), where unchecked operations could lead to overfl...

This post provides a rigorous, low-level analysis of a vulnerable casino smart contract system, focusing on the interaction between on-chain logic and an off-chain RNG oracle. We formalise the vulnerability as a probabilistic bias in the oracle's out...

Pentester Nepal, a leading cybersecurity community in Nepal, recently celebrated its 12th anniversary on August 16, 2025, at Ullens College in Lalitpur. The free event featured expert talks on bug bounty hunting, AI governance, OAuth attacks, and mor...

The challenge started with the web page accepting cmd parameter with only env command input. The output of the environment included AWS_ACCOUNT_ID and AWS_ROLE. After obtaining the credentials with assume-role, listing the available S3 buckets and the flag is read. For this challenge, we got the first blood and were the only solvers.

Identifying AWS_ACCOUNT_ID and AWS_ROLE, we constructed the arn with the identified information. The reconstructed arn is:
aws:iam::134345785945:role/S3Assumption
Since this information is public and the challenge title is hinting toward assumption, we tried to assume and obtain temporary security credentials that can be used to access AWS resources on the behalf of the role S3Assumption. These temporary credentials included an access key ID, a secret access key, and a security token. More on AWS role Assumptions can be found at https://docs.aws.amazon.com/cli/latest/reference/sts/assume-role.html.
The command to obtain the credentials are:
aws sts assume-role --role-arn arn:aws:iam::134345785945:role/S3Assumption --role-session-name dummy

After getting the security credentials, the keys are exported within the environment variables.
Since the role had S3 in its name, we tried to list the available S3 buckets.
Now, the objects within the buckets are listed and after flag.txt is identified, the file is downloaded and submitted.
