Skip to content

Kaal-Bhairaav/Mirzapur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Mirzapur

CTF Writeup

  1. CTF url is given, Let's see what is there...

  2. I checked the source of the page and there I found

Mirzapur_ka_Rasta.js

  1. The JS code written inside was...

  2. Let's call the Desi_Katta() function...

  3. Check the alertBox it looks like a path to some directory...

  4. Going there only gave me more and more web pages...

  5. One of the URL linked there has parameter "id" and the value was 1. I tried SQL injection with many tempore scripts but no luck. After a few times I got the hint that not every parameter is vulnerable to SQL injection. Hence I tried file retrieval and it was a success.

?id=/etc/passwd

  1. From /etc/passwd we have the user "munna". But what is the password??? Let's check Bash History for clues...

id=/home/munna/.bash_history

  1. Looks like the user have typed password along with passwd command without giving enter.(or at least the CTF builder wants to tell us that). SSH Done. It was RBash. The PATH variable lead me to this directory and the available commands were very few. Also, we have an interesting language that we can use "LUA".

  2. A quick search on google gave me lua to shell...

  3. Once I am out of RBash I tried grep command and two flags at once...

About

CTF Writeup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published