# Committed Writeup - TryHackMe

### 👋 Introduction

  
Hi there!, Committed is a room created by [Cmnatic](https://tryhackme.com/p/cmnatic) in [TryHackme](https://tryhackme.com/room/committed) Rated as Easy . Its actually quite simple if you have used git before. Without Further Ado lets Start!

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715194997021/cbaa51f0-d312-4006-8ffb-6ed47091825b.jpeg align="center")

### 🔍 Enumeration

  
Honestly, there isn't much to enumerate here as the files we need to are stored in the attack box.  
So Deploy the machine and Press the *'Show split screen'* button in the top right corner.  
  

As the TryHackMe room says there is a ZIP file in **/home/ubuntu/commited** directory. unzipping it,  
we are give two files - `commited.py and README.md`. This looks to be git folder since it has  
.git directory.  

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715195055953/687135a6-5ea8-4c36-b760-146202071e9b.png align="center")

  
The Python file:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715195080328/a631d515-3ac4-4de2-8ba4-4bec2f1d29a3.png align="center")

  
  
This appears to be a script to connect to Mysql. but we are not given the credentials.  

### **Checking Git branches:**

  
If you don't know yet, here is a good blog post explaining [what git branches](https://www.toolsqa.com/git/branch-in-git/) are. We can list for all git branches using the command:  
  
`git branch -a`  
  
where '-a' is used to list local and remote branches.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715195108870/c53d09ba-a67f-4c25-bd6f-cb51e8489dac.png align="center")

  
  
This returns two Branches. master branch and "dbint" branch. The one branch marked with star symbol(\*) is where we are at.  
  
We can check for all the Commit history with the command:  
  
`git log`  
  
This returns all the Commit logs for the current Branch.  
  
We can check for each Commit with the command:  
  
`git show <hash-value>`  
  
The first branch doesn't give us any Real output after checking each commit. and nothing seems suspicious.Lets move on  
to the second branch.  
  
`git log dbint`  

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715195123993/e8dd165c-85e7-4ef3-85a8-15385a618cc4.png align="center")

  
  
We can see one Odd commit straight away commented as 'oops'. That might mean the commit contains a mistake done by the developer. Lets check it out.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715195138185/ee0feea5-eb6b-4411-af9d-f043432f8608.png align="center")

  
We staight away sees the flag. That means this writeup is over.
