Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 31, 2025

The CSAW CTF 2014 aerosol can challenge had a flagCheck binary that only accepted a specific hardcoded solution, but the issue requested that it should accommodate various inputs that make the aerosol_can binary output "You win!".

Changes Made

Replaced the large PyInstaller executable (4.8MB) with a concise Python script (1.3KB) that:

  • Accepts any input that causes aerosol_can to output "You win!" instead of expecting a single hardcoded flag
  • Maintains original behavior for incorrect inputs (displays "Incorrect flag.")
  • Provides robust error handling with timeouts and subprocess failure protection
  • Follows pwn.college flag format when displaying the success flag

Implementation Details

The new flagCheck script:

  1. Prompts user with "Enter the flag: "
  2. Executes ./aerosol_can <user_input> as a subprocess
  3. Captures stdout and checks for the "You win!" string
  4. Returns pwncollege{aerosol_can_reverse_engineering_victory} on success
  5. Returns "Incorrect flag." for all other cases

Example Usage

# Any input that doesn't produce "You win!" from aerosol_can
$ echo "wrong_input" | ./flagCheck
Enter the flag: Incorrect flag.

# Any input that produces "You win!" from aerosol_can would show:
# Enter the flag: pwncollege{aerosol_can_reverse_engineering_victory}

This change allows the reverse engineering challenge to work as intended - users can find any solution that makes the binary output the winning message, rather than being constrained to a single expected input.

Fixes #137.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: prathamgupta36 <63730759+prathamgupta36@users.noreply.github.com>
Copilot AI changed the title [WIP] CSAW CTF 2014 - REV - 500 - aerosol can Fix flagCheck for CSAW CTF 2014 aerosol can to accept various valid inputs Aug 1, 2025
Copilot AI requested a review from prathamgupta36 August 1, 2025 00:01
@nuggetpilot
Copy link

lmao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSAW CTF 2014 - REV - 500 - aerosol can

3 participants