Commitment Issues

Difficulty
Very Easy
Year
2024
Points
50pts
Categories
Programming
Tools
Git

27 September 2026

Summary

I accidentally wrote the flag down. Good thing I deleted it!

Analysis

Let's unzip the archive: by doing so, we notice the presence of a .git directory which indicates the folder is a Git repository.

Commitment Issues - Unzipping challenge files

There is also one file called message.txt with the content "TOP SECRET".

Commitment Issues - Checking CTF flag file

About Git

Git is a distributed version control system; this implies that it saves different version of your project and make collaborating with other people easier. A folder tracked by Git is called a repository and a commit is a snapshot of the saved changes. Users can clone a repository to work on it locally and commit any changes they make. Every commit has an hash that serves as an identifier. The repo is usually hosted on platforms such as GitLab, GitHub or Bitbucket.

Solution

Commitment Issues - Checking commits log

We are interested in the first commit as this is before the flag was overwritten. We can use the checkout subcommand to move around in the commit tree:

git checkout ea85 # only the first four characters of the commit hash we want to move to are needed

We can now read the flag in the message.txt file.


Thank you for reading!

F0XGL0V3