Collaborative Development (picoCTF 7)

Challenge Author: Jeffery John

Difficulty: Easy

Description

My team has been working very hard on new features for our flag printing program! I wonder how they’ll work together?

Process / Notes

  1. wget the zip
  2. Another git-based challenge
  3. There’s a python file (.py)
  4. cat on the commitedit message says to add part 3 to the program
  5. in refs/heads/feature here seem to be 3 parts
  6. git log
  7. It looks like we’re on the version with just the flag printer. So we’ll need to go to a version with everything assembled
  8. cat refs/heads/feature/part-3
  9. git checkout the result of that10.
  10. Now when we cat the python file, it also has the flag! BUT it doesn’t look like the whole flag. Going to check out the other parts next.
  11. Checking part 1 and it has revealed the beginning of the flag
  12. Part 2 contains the middle of the flag
  13. All together… we have the full flag
  14. Looking at the hints, it looks like there’s a more elegant way to solve this than checking each part individually
  15. From one tutorial video, it looks like we can use:
    git merge <branch-name-you-got-from-the-git-branch--a-command>

16 minutes 38 seconds to complete

Hints

  1. git branch -a will let you see the available branches
  2. How can fill ‘diffs’ be brought to the main branch? Don’t forget to use git config!
  3. Merge conflicts can be tricky! Try a text editor like nano, emacs, or vim.

Core Lessons

  1. The git branch -a command to see the available branches
  2. The git merge <branch> command to merge in the desired git branches