Tryhackme Walkthrough of Git Happens

Tryhackme Walkthrough of Git Happens


1. Introduction

Before Getting Started

This is a Short Room from tryhackme which can completed by tracking down the changes made through version Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files.

There is only one task in this room

Our Objective is to obtain the password for the login


As always lets start with our nmap

nmap -sS -A
└──╼ [★]$ sudo nmap -sS -A
[sudo] password for zen-prime:
Starting Nmap 7.80 ( ) at 2020-09-13 22:43 IST
Nmap scan report for
Host is up (0.22s latency).
Not shown: 999 closed ports
80/tcp open  http    nginx 1.14.0 (Ubuntu)
| http-git:
|     Git repository found!
|_    Repository description: Unnamed repository; edit this file 'description'
|     to name the...
|_http-server-header: nginx/1.14.0 (Ubuntu)
|_http-title: Super Awesome Site!
No exact OS matches for host (If you know what OS is running on it, see

As nmap shows that there is only one service is running on this machine 80 http

also nmap found a directory called .git and it is Git Repository

Lets First Check our Index Page

Index page

It just shows a Simple Login Page

3. Cracking

I tried some default credentials for this page but nothing happends

Let move on to the next

From Nmap result we identify a hidden directory called .git which reveals that it is Github Repository

so lets check that out

.git hidden directory

Here we use a tool called Git Dumper to clone this repository to our local machine which will help us look around on it.

or We can simply use our wget command also to download this report

wget -m -I .git


-m : <To mirror the directory, –mirror

-I : list of allowed directories

We can use tool at this time

after downloading the tool . Let start cloneing

./ git-dump

It will take some few minutes to completly clone the repository

Now using the git command we can now successfully look this repository

git log
  └──╼ [★]$ git log
  commit d0b3578a628889f38c0affb1b75457146a4678e5 (HEAD -> master, tag: v1.0)
  Author: Adam Bertrand <>
  Date:   Thu Jul 23 22:22:16 2020 +0000

    Update .gitlab-ci.yml

  commit 77aab78e2624ec9400f9ed3f43a6f0c942eeb82d
  Author: Hydragyrum <>
  Date:   Fri Jul 24 00:21:25 2020 +0200

    add gitlab-ci config to build docker file.

  commit 2eb93ac3534155069a8ef59cb25b9c1971d5d199
  Author: Hydragyrum <>
  Date:   Fri Jul 24 00:08:38 2020 +0200

    setup dockerfile and setup defaults.

  commit d6df4000639981d032f628af2b4d03b8eff31213
  Author: Hydragyrum <>
  Date:   Thu Jul 23 23:42:30 2020 +0200

    Make sure the css is standard-ish!

  commit d954a99b96ff11c37a558a5d93ce52d0f3702a7d
  Author: Hydragyrum <>
  Date:   Thu Jul 23 23:41:12 2020 +0200

    re-obfuscating the code to be really secure!

  commit bc8054d9d95854d278359a432b6d97c27e24061d
  Author: Hydragyrum <>
  Date:   Thu Jul 23 23:37:32 2020 +0200

  Security says obfuscation isn't enough.

  commit e56eaa8e29b589976f33d76bc58a0c4dfb9315b1
  Author: Hydragyrum <>
  Date:   Thu Jul 23 23:25:52 2020 +0200

      Obfuscated the source code.

      Hopefully security will be happy!

  commit 395e087334d613d5e423cdf8f7be27196a360459
  Author: Hydragyrum <>
  Date:   Thu Jul 23 23:17:43 2020 +0200

      Made the login page, boss!

  commit 2f423697bf81fe5956684f66fb6fc6596a1903cc
  Author: Adam Bertrand <>
  Date:   Mon Jul 20 20:46:28 2020 +0000

      Initial commit

From the commits e56eaa8e29b589976f33d76bc58a0c4dfb9315b1 & e56eaa8e29b589976f33d76bc58a0c4dfb9315b1

we can understand that the source code is obsulated there. so lets check

the previous commit 395e087334d613d5e423cdf8f7be27196a360459 done by the Author which also shows that the Login Page is Maded.

git show 395e087334d613d5e423cdf8f7be27196a360459

Looking at the result and scrolling through it we can see a login() written in javascript which reveals

the Password for the Login Page.


4. Conclusion

The Room was great .Keep in mind that nowdays many websites exposes the .git repositories to public. So cloneing or mirroring these repo can lead exposes the contents inside it. It is better to delete these git from the webserver to ensure the Security.

Hope We learned something new from this.