MyGit
π¦ My Git
| Category | Author |
|---|---|
| π¦ Miscellaneous | Darkraicg492 |
Challenge Prompt
I have built my own Git server with my own rules!
You can clone the challenge repo using the command below.
git clone ssh://git@foggy-cliff.picoctf.net:56891/git/challenge.git
Check the README to get your flag!
Problem Type
- Git
Solve
We are told to pull down the Git repo so we will start with that:
Next we are told to check the README to get the flag. Letβs move into the challenge folder and cat the file out:
1
2
3
4
5
6
7
# MyGit
### If you want the flag, make sure to push the flag!
Only flag.txt pushed by ```root:root@picoctf``` will be updated with the flag.
GOOD LUCK!
So we need to push a flag.txt file as root:root@picoctf. Letβs start by making a new flag.txt file.
We will use touch to make a new file.
Now we need to set our username and email address to make the push with:
1
2
3
4
5
6
7
8
# Set the Username
git config user.name "root"
# Set the email address
git config user.email "root@picoctf"
# Verify set correctly
git config --list
Next we need to add the file, and push the commit:
1
2
3
4
5
6
7
8
# Add all new files
git add .
# Commit the staged files to local repo
git commit -m "Add flag.txt"
# Push to remote repo
git push origin HEAD
We will re-enter the password and then we get the flag!