Python Wrangling (picoCTF 37)

Challenge Author: SYREAL

Category: General Skills

Difficulty: Easy

Description

Python scripts are invoked kind of like programs in the Terminal… Can you run this Python script using this password to get the flag?

Process / Notes

  1. Running in the web-shell
  2. cat ende.py –> grabbing some system arguments, probably need to grab the pw.txt and flag.txt.en to fill those out
  3. Looks like there are specific options for each of our arguments
  4. Going to check those with the -h flag after I cat the other two
  5. Password is a long mess - looks like hex
  6. Flag is really a long encoded mess - glad we have the program
  7. Ran python ende.py -h - said to run the program with the -d flag followed by the file name, so I’ll do that
  8. Asked for the password
  9. -e and -d might be ’encrypt’ and ‘decrypt’ based on the script
  10. Copied the password manually from the password file
  11. The flag is revealed

10 minutes 19 seconds to complete

Hints

Core Lessons

  1. Understand how to input arguments and options as appropriate in concert with Python scripts