Posts Lian_Yu
Post
Cancel

Lian_Yu

Description

A beginner level security challenge.

RoomLian_Yu
OSLinux
DifficultyEasy
CreatorDeamon

Deploy the machine and quickly scan the ports with rustscan,

1
rustscan -a 10.10.10.149

image

we get 5 open port. Lets scan this using nmap,

1
nmap -sV -sC -p21,22,80,111,52167 10.10.10.149 -oN nmap.txt

image

Scan result reveals that port 21 is running ftp service, port 22 is running ssh service, port 80 is running apache webserver, port 111 and 52167 are running rpc services. Enumerate port 80.

Visit http://10.10.10.149,

image

we got a webpage showing background image and some context of Arrowverse.

I decided to find hidden directories using ffuf tool,

1
ffuf -u http://10.10.10.149/FUZZ -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -mc 200,301 2>/dev/null

image

a directory named island was found.

Visit http://10.10.10.149/island,

image

we got a message and a username vigilante.

Again, finding hidden directories using ffuf tool,

1
ffuf -u http://10.10.10.149/island/FUZZ -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -mc 200,301 -ic 2>/dev/null

image

a directory named 2100 was found.

Visit http://10.10.10.149/island/2100,

image

we got a video which was unavailable to us.

Viewing the source code,

image

we got the message that we can find a file with extension .ticket here.

Again, finding hidden directories using ffuf tool,

1
ffuf -u http://10.10.10.149/island/2100/FUZZ -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -mc 200,301 -e .ticket -ic 2>/dev/null

image

we found the name of the ticket.

Navigating to http://10.10.10.149/island/2100/green_arrow.ticket,

image

we got a encoded string.

Visit cyberchef,

image

decoding the string with base58 result in the pasword.

Let’s access the ftp service with following credentials,

1
ftp 10.10.10.149

image

we got in.

Enumerating directory,

image

we got some files which we can transfer to our system.

1
2
3
4
get .other_user
get .bash_history
get Leave_me_alone.png
get "Queen's_Gambit.png"

image

Navigating one directory back, I found another user, slade. We can’t do inside slade user directory (access denied)

image

read the content of .bash_history,

image

it says we can look into .other_user to find something useful.

Looking into .other_user, I found the username slade starting right of the file.

Now, we can crack the password of the image and extract the data hidden inside using stegseek,

1
stegseek --crack aa.jpg /usr/share/wordlists/rockyou.txt

image

the data got extracted.

Unzipping the zip file,

1
unzip aa.jpg.out

image

this extracts the 2 files.

Looking inside passwd.txt file,

image

a small note which was not useful!

Viewing inside shado file,

image

we got password.

Using credentials to drop into machine via ssh,

1
ssh slade@10.10.32.225

image

we got in.

Enumerating directory and we got our user flag,

image

There is another file named .Important, taking a look inside,

image

we need to find Secret_Mission file to elevate our privileges to root user.

So lets search for the file in whole system,

1
find / -name Secret_Mission -type f 2>/dev/null

image

location of the file is /usr/src/Secret_Mission.

Reading the Secret_Mission file,

1
cat /usr/src/Secret_Mission

image

at the end of message, there is the term mentioned “super powers”. I wonder this term refers to ability to run binaries as sudo user. Let’s find out.

1
sudo -l

image

providing password of slade user and we got /usr/bin/pkexec binary which we can run using sudo.

Visit gtfobins for method to elevate privilege using pkexec,

image

now, we can run /bin/bash with /usr/bin/pkexec binary which will elevate our privileges to root,

1
sudo /usr/bin/pkexec /bin/bash

image

issuing id command reveals us that we are root user.

This post is licensed under CC BY 4.0 by the author.