Bsides 2017 - The Year 2000 (100 Points)
I tried http://theyear2000.ctf.bsidessf.net/.git/
and it returned me Forbidden error. So there is a .git repo here.
As usual I used GitTools to dump the repository.
$ ./gitdumper.sh http://theyear2000.ctf.bsidessf.net/.git/ repo
Destination folder does not exist
Creating repo/.git/
Downloaded: HEAD
Downloaded: objects/info/packs
Downloaded: description
Downloaded: config
Downloaded: COMMIT_EDITMSG
Downloaded: index
Downloaded: packed-refs
Downloaded: refs/heads/master
Downloaded: refs/remotes/origin/HEAD
Downloaded: refs/stash
Downloaded: logs/HEAD
Downloaded: logs/refs/heads/master
Downloaded: logs/refs/remotes/origin/HEAD
Downloaded: info/refs
Downloaded: info/exclude
Downloaded: objects/4e/ec6b9c6e464c35fff1efb8444dd0ac1ae67b30
Downloaded: objects/00/00000000000000000000000000000000000000
Downloaded: objects/e0/39a6684f53e818926d3f62efd25217b25fc97e
Downloaded: objects/9e/9ce4da43d0d2dc10ece64f75ec9cab1f4e5de0
Downloaded: objects/f3/a3f88425975542bb0058651867f8090fed250f
Downloaded: objects/0c/e1cbf654058dd4b9ba0df440a02aef408f76da
Downloaded: objects/bd/72ee2c7c5adb017076fd47a92858cef2a04c11
Downloaded: objects/e1/6b652d659d50fc5e7aecae789e743c0a8fa035
Downloaded: objects/7c/57d178eea98e174f3d6ef521126117478085ed
Downloaded: objects/7b/aff32394e517c44f35b75079a9496559c88053
A quick git log -p
show me this commit.
commit 4eec6b9c6e464c35fff1efb8444dd0ac1ae67b30
Author: Mark Zuckerberg <[email protected]>
Date: Sat Feb 11 22:54:32 2017 +0000
Wooops, didn't want to commit that. Rebased.
diff --git a/index.html b/index.html
index 7c57d17..e16b652 100644
--- a/index.html
+++ b/index.html
@@ -15,7 +15,7 @@ pre {
</style>
</head>
<body>
-<h1>Welcome to my homepage!!!!</h1>
+<h1>Welcome to my homepage, there are no flags here.!!!!</h1>
<hr>
<p>I made this website all by myself using these tools
<ul>
There was a rebase so let's see when it happened.
$ git reflog
4eec6b9 HEAD@{0}: commit: Wooops, didn't want to commit that. Rebased.
e039a66 HEAD@{1}: reset: moving to HEAD~1
9e9ce4d HEAD@{2}: commit: Fixed a spelling error
e039a66 HEAD@{3}: commit (initial): First commit on my website
Ok so we have to come back before the HEAD reset.
$ git reset --hard HEAD@{2}
HEAD is now at 9e9ce4d Fixed a spelling error
Now let's take a look at this fix, git log -p -1
.
commit 9e9ce4da43d0d2dc10ece64f75ec9cab1f4e5de0
Author: Mark Zuckerberg <[email protected]>
Date: Sat Feb 11 22:54:27 2017 +0000
Fixed a spelling error
diff --git a/index.html b/index.html
index 7c57d17..7baff32 100644
--- a/index.html
+++ b/index.html
@@ -43,3 +43,4 @@ ______________________
</pre>
</marquee>
</body></html>
+Your flag is... FLAG:what_is_HEAD_may_never_die
Here is the flag FLAG:what_is_HEAD_may_never_die
.