Vulnhub-drippingblues

environment

kali:192.168.235.148

Target machine: put it in the same segment as kali

download link

infiltration process

If you don’t know the address of the target machine, use nmap to scan it first

nmap -sP 192.168.235.0/24

image-20230403145630900

Find the address of the target machine: 192.168.235.132

Continue to scan ports

nmap -A 192.168.235.132

image-20230403145950513

Opened 22ssh, 21ftp and 80http ports

FTP

FTP is the abbreviation of File Transfer Protocol (File Transfer Protocol), which is used for two-way transmission of control files on the Internet. It's also an app.

In the Tcp/ip protocol, the FTP standard command TCP port number is 21, and the Port mode data port is 20. The task of the FTP protocol is to transfer files from one computer to another, regardless of where the two computers are located, how they are connected, or even whether they use the same operating system.

The FTP transmission uses the TCP packet protocol, and the TCP is established; a three-way handshake will be performed before the connection. However, the FTP server is more troublesome, because the FTP server uses two connections, which are the command channel and the data channel. Because it is a TCP packet, both connections need to go through a three-way handshake.

Try to log in to the ftp service anonymously

anonymous

image-20230403154732464

It is found that there is no password to log in successfully, ls checks that there is a zip file to download him

get respectmydrip.zip

image-20230403155226180

Open it and find that a password is required, use the tools that come with kali fcrackzipto blast

fcrackzip -D -p rockyou.txt -u respectmydrip.zip

Among them rockyou.txtis the dictionary that comes with kali

image-20230403161801609

The password to run out is 072528035, you can see the txt content

image-20230403194033644

There is also an encrypted compressed package inside, but it cannot be cracked

80http

visit port 80

image-20230403163030684

Nothing, scan his catalog

dirsearch -u http://192.168.235.132/

image-20230403190930275

have a robots.txtvisit to see

image-20230403191027085

continue to take a look/dripisreal.txt

image-20230403191426702

translation

English: hello dear hacker wannabe,

go for this lyrics:

https://www.azlyrics.com/lyrics/youngthug/constantlyhating.html

count the n words and put them side by side then md5sum it

ie, hellohellohellohello >> md5sum hellohellohellohello

it’s the password of ssh

Translation: Hello dear hacker want,

Go listen to the lyrics:

https://www.azlyrics.com/lyrics/youngthug/constantlyhating.html

count n words and put them side by side, then md5 sum it

ie, hello hello hello >> md5sum hellohellohellohello

This is the password for SSH

This should find the ssh password

go see again/etc/dripispowerful.html

This should be on the server, the webpage is not accessed

In this case, there should be a file inclusion vulnerability here.

Test index.php directly, the page exists, so you need to find the parameters

At this time, the txt prompt downloaded from the ftp service above is used.

image-20230403194045906

Use dripas parameter to file include

image-20230403194142349

It is determined that there is a file containing a vulnerability, continue to read/etc/dripispowerful.html

image-20230403194300087

translation

The password is: imdrippinbiatch driftingblues was hacked again so it is now called drippingblues. D: Hahaha

pass

Travisscott & thugger

The password is imdrippinbiatchan account test, it should be Travisscott & thuggerone of them

ssh

Account: thugger

Password: imdrippinbiatch

connection succeeded

Then ls saw that there is a user.txt in this directory

image-20230403200300329

md5 decryption

image-20230403200331866

look at the process

ps -ef

image-20230403201302493

polkitdcan be used to elevate rights

polkitd privilege escalation

Find the privilege escalation script

https://github.com/Almorabea/Polkit-exploit

Download to the target machine

image-20230403201652941

After running, you will get root privileges

image-20230403201746031

Just find the flag in the root directory at the end

Guess you like

Origin blog.csdn.net/qq_63928796/article/details/129938616