┌──(kali㉿kali)-[~] └─$ sudo nmap --min-rate 10000 -p- 192.168.56.103 Starting Nmap 7.94 ( https://nmap.org ) at 2023-06-27 04:08 EDT Nmap scan report for 192.168.56.103 Host is up (0.000073s latency). Not shown: 65528 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 53/tcp open domain 80/tcp open http 110/tcp open pop3 139/tcp open netbios-ssn 143/tcp open imap 445/tcp open microsoft-ds MAC Address: 08:00:27:06:73:F2 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 2.41 seconds
┌──(kali㉿kali)-[~] └─$ sudo nmap -sT -sV -sC -O -p22,53,80,110,139,143,445 192.168.56.103 Starting Nmap 7.94 ( https://nmap.org ) at 2023-06-27 04:08 EDT Nmap scan report for 192.168.56.103 Host is up (0.00031s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.2 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 2048 a2:d3:34:13:62:b1:18:a3:dd:db:35:c5:5a:b7:c0:78 (RSA) | 256 85:48:53:2a:50:c5:a0:b7:1a:ee:a4:d8:12:8e:1c:ce (ECDSA) |_ 256 36:22:92:c7:32:22:e3:34:51:bc:0e:74:9f:1c:db:aa (ED25519) 53/tcp open domain ISC BIND 9.10.3-P4 (Ubuntu Linux) | dns-nsid: |_ bind.version: 9.10.3-P4-Ubuntu 80/tcp open http Apache httpd 2.4.18 ((Ubuntu)) |_http-title: Apache2 Ubuntu Default Page: It works |_http-server-header: Apache/2.4.18 (Ubuntu) 110/tcp open pop3 Dovecot pop3d |_pop3-capabilities: CAPA TOP RESP-CODES SASL AUTH-RESP-CODE UIDL PIPELINING 139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP) 143/tcp open imap Dovecot imapd |_imap-capabilities: ENABLE have ID LOGINDISABLEDA0001 more post-login IMAP4rev1 IDLE listed capabilities SASL-IR OK Pre-login LOGIN-REFERRALS LITERAL+ 445/tcp open `�J�V Samba smbd 4.3.11-Ubuntu (workgroup: WORKGROUP) MAC Address: 08:00:27:06:73:F2 (Oracle VirtualBox virtual NIC) Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Device type: general purpose Running: Linux 3.X|4.X OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4 OS details: Linux 3.2 - 4.9 Network Distance: 1 hop Service Info: Host: UBUNTU-EXTERMELY-VULNERABLE-M4CH1INE; 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 20.99 seconds
┌──(kali㉿kali)-[~] └─$ sudo nmap --script=vuln -p22,53,80,110,139,143,445 192.168.56.103 Starting Nmap 7.94 ( https://nmap.org ) at 2023-06-27 04:09 EDT Nmap scan report for 192.168.56.103 Host is up (0.00024s latency).
PORT STATE SERVICE 22/tcp open ssh 53/tcp open domain 80/tcp open http |_http-dombased-xss: Couldn\'t find any DOM based XSS. | http-enum: | /wordpress/: Blog | /info.php: Possible information file |_ /wordpress/wp-login.php: Wordpress login page. |_http-csrf: Couldn\'t find any CSRF vulnerabilities. |_http-stored-xss: Couldn\'t find any stored XSS vulnerabilities. | http-slowloris-check: | VULNERABLE: | Slowloris DOS attack | State: LIKELY VULNERABLE | IDs: CVE:CVE-2007-6750 | Slowloris tries to keep many connections to the target web server open and hold | them open as long as possible. It accomplishes this by opening connections to | the target web server and sending a partial request. By doing so, it starves | the http server\'s resources causing Denial Of Service. | | Disclosure date: 2009-09-17 | References: | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6750 |_ http://ha.ckers.org/slowloris/ 110/tcp open pop3 139/tcp open netbios-ssn 143/tcp open imap 445/tcp open microsoft-ds MAC Address: 08:00:27:06:73:F2 (Oracle VirtualBox virtual NIC)
Host script results: |_smb-vuln-ms10-061: false | smb-vuln-regsvc-dos: | VULNERABLE: | Service regsvc in Microsoft Windows systems vulnerable to denial of service | State: VULNERABLE | The service regsvc in Microsoft Windows 2000 systems is vulnerable to denial of service caused by a null deference | pointer. This script will crash the service if it is vulnerable. This vulnerability was discovered by Ron Bowes | while working on smb-enum-sessions. |_ |_smb-vuln-ms10-054: false
Nmap done: 1 IP address (1 host up) scanned in 321.68 seconds
┌──(kali㉿kali)-[~] └─$ sudo nmap --script=smb-enum-shares.nse,smb-enum-users.nse 192.168.56.103 Starting Nmap 7.94 ( https://nmap.org ) at 2023-06-27 04:25 EDT Nmap scan report for 192.168.56.103 Host is up (0.000092s latency). Not shown: 993 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 53/tcp open domain 80/tcp open http 110/tcp open pop3 139/tcp open netbios-ssn 143/tcp open imap 445/tcp open microsoft-ds MAC Address: 08:00:27:06:73:F2 (Oracle VirtualBox virtual NIC)
Host script results: | smb-enum-shares: | account_used: guest | \\192.168.56.103\IPC$: | Type: STYPE_IPC_HIDDEN | Comment: IPC Service (ubuntu-extermely-vulnerable-m4ch1ine server (Samba, Ubuntu)) | Users: 2 | Max Users: <unlimited> | Path: C:\tmp | Anonymous access: READ/WRITE | Current user access: READ/WRITE | \\192.168.56.103\print$: | Type: STYPE_DISKTREE | Comment: Printer Drivers | Users: 0 | Max Users: <unlimited> | Path: C:\var\lib\samba\printers | Anonymous access: <none> |_ Current user access: <none>
Nmap done: 1 IP address (1 host up) scanned in 0.47 seconds
WordPress Security Scanner by the WPScan Team Version 3.8.24 Sponsored by Automattic - https://automattic.com/ @_WPScan_, @ethicalhack3r, @erwan_lr, @firefart _______________________________________________________________
[i] It seems like you have not updated the database for some time. [?] Do you want to update now? [Y]es [N]o, default: [N]n [+] URL: http://192.168.56.103/wordpress/ [192.168.56.103] [+] Started: Tue Jun 27 04:31:05 2023
[+] XML-RPC seems to be enabled: http://192.168.56.103/wordpress/xmlrpc.php | Found By: Direct Access (Aggressive Detection) | Confidence: 100% | References: | - http://codex.wordpress.org/XML-RPC_Pingback_API | - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_ghost_scanner/ | - https://www.rapid7.com/db/modules/auxiliary/dos/http/wordpress_xmlrpc_dos/ | - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_xmlrpc_login/ | - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_pingback_access/
[+] WordPress readme found: http://192.168.56.103/wordpress/readme.html | Found By: Direct Access (Aggressive Detection) | Confidence: 100%
[+] Upload directory has listing enabled: http://192.168.56.103/wordpress/wp-content/uploads/ | Found By: Direct Access (Aggressive Detection) | Confidence: 100%
[+] The external WP-Cron seems to be enabled: http://192.168.56.103/wordpress/wp-cron.php | Found By: Direct Access (Aggressive Detection) | Confidence: 60% | References: | - https://www.iplocation.net/defend-wordpress-from-ddos | - https://github.com/wpscanteam/wpscan/issues/1299
[+] WordPress version 5.2.4 identified (Insecure, released on 2019-10-14). | Found By: Rss Generator (Passive Detection) | - http://192.168.56.103/wordpress/index.php/feed/, <generator>https://wordpress.org/?v=5.2.4</generator> | - http://192.168.56.103/wordpress/index.php/comments/feed/, <generator>https://wordpress.org/?v=5.2.4</generator>
[+] WordPress theme in use: twentynineteen | Location: http://192.168.56.103/wordpress/wp-content/themes/twentynineteen/ | Last Updated: 2023-03-29T00:00:00.000Z | Readme: http://192.168.56.103/wordpress/wp-content/themes/twentynineteen/readme.txt | [!] The version is out of date, the latest version is 2.5 | Style URL: http://192.168.56.103/wordpress/wp-content/themes/twentynineteen/style.css?ver=1.4 | Style Name: Twenty Nineteen | Style URI: https://wordpress.org/themes/twentynineteen/ | Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom sty... | Author: the WordPress team | Author URI: https://wordpress.org/ | | Found By: Css Style In Homepage (Passive Detection) | | Version: 1.4 (80% confidence) | Found By: Style (Passive Detection) | - http://192.168.56.103/wordpress/wp-content/themes/twentynineteen/style.css?ver=1.4, Match: 'Version: 1.4'
[!] No WPScan API Token given, as a result vulnerability data has not been output. [!] You can get a free API token with 25 daily requests by registering at https://wpscan.com/register
WordPress Security Scanner by the WPScan Team Version 3.8.24 Sponsored by Automattic - https://automattic.com/ @_WPScan_, @ethicalhack3r, @erwan_lr, @firefart _______________________________________________________________
[i] It seems like you have not updated the database for some time. [?] Do you want to update now? [Y]es [N]o, default: [N]n [+] URL: http://192.168.56.103/wordpress/ [192.168.56.103] [+] Started: Tue Jun 27 04:42:18 2023
[+] XML-RPC seems to be enabled: http://192.168.56.103/wordpress/xmlrpc.php | Found By: Direct Access (Aggressive Detection) | Confidence: 100% | References: | - http://codex.wordpress.org/XML-RPC_Pingback_API | - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_ghost_scanner/ | - https://www.rapid7.com/db/modules/auxiliary/dos/http/wordpress_xmlrpc_dos/ | - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_xmlrpc_login/ | - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_pingback_access/
[+] WordPress readme found: http://192.168.56.103/wordpress/readme.html | Found By: Direct Access (Aggressive Detection) | Confidence: 100%
[+] Upload directory has listing enabled: http://192.168.56.103/wordpress/wp-content/uploads/ | Found By: Direct Access (Aggressive Detection) | Confidence: 100%
[+] The external WP-Cron seems to be enabled: http://192.168.56.103/wordpress/wp-cron.php | Found By: Direct Access (Aggressive Detection) | Confidence: 60% | References: | - https://www.iplocation.net/defend-wordpress-from-ddos | - https://github.com/wpscanteam/wpscan/issues/1299
[+] WordPress version 5.2.4 identified (Insecure, released on 2019-10-14). | Found By: Rss Generator (Passive Detection) | - http://192.168.56.103/wordpress/index.php/feed/, <generator>https://wordpress.org/?v=5.2.4</generator> | - http://192.168.56.103/wordpress/index.php/comments/feed/, <generator>https://wordpress.org/?v=5.2.4</generator>
[+] WordPress theme in use: twentynineteen | Location: http://192.168.56.103/wordpress/wp-content/themes/twentynineteen/ | Last Updated: 2023-03-29T00:00:00.000Z | Readme: http://192.168.56.103/wordpress/wp-content/themes/twentynineteen/readme.txt | [!] The version is out of date, the latest version is 2.5 | Style URL: http://192.168.56.103/wordpress/wp-content/themes/twentynineteen/style.css?ver=1.4 | Style Name: Twenty Nineteen | Style URI: https://wordpress.org/themes/twentynineteen/ | Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom sty... | Author: the WordPress team | Author URI: https://wordpress.org/ | | Found By: Css Style In Homepage (Passive Detection) | | Version: 1.4 (80% confidence) | Found By: Style (Passive Detection) | - http://192.168.56.103/wordpress/wp-content/themes/twentynineteen/style.css?ver=1.4, Match: 'Version: 1.4'
[+] Enumerating All Plugins (via Passive Methods) [+] Checking Plugin Versions (via Passive and Aggressive Methods)
[i] Plugin(s) Identified:
[+] photo-gallery | Location: http://192.168.56.103/wordpress/wp-content/plugins/photo-gallery/ | Last Updated: 2023-06-02T15:32:00.000Z | [!] The version is out of date, the latest version is 1.8.16 | | Found By: Urls In Homepage (Passive Detection) | | Version: 1.5.34 (100% confidence) | Found By: Query Parameter (Passive Detection) | - http://192.168.56.103/wordpress/wp-content/plugins/photo-gallery/css/jquery.mCustomScrollbar.min.css?ver=1.5.34 | - http://192.168.56.103/wordpress/wp-content/plugins/photo-gallery/css/styles.min.css?ver=1.5.34 | - http://192.168.56.103/wordpress/wp-content/plugins/photo-gallery/js/jquery.mCustomScrollbar.concat.min.js?ver=1.5.34 | - http://192.168.56.103/wordpress/wp-content/plugins/photo-gallery/js/scripts.min.js?ver=1.5.34 | Confirmed By: | Readme - Stable Tag (Aggressive Detection) | - http://192.168.56.103/wordpress/wp-content/plugins/photo-gallery/readme.txt | Readme - ChangeLog Section (Aggressive Detection) | - http://192.168.56.103/wordpress/wp-content/plugins/photo-gallery/readme.txt
[!] No WPScan API Token given, as a result vulnerability data has not been output. [!] You can get a free API token with 25 daily requests by registering at https://wpscan.com/register
www-data@ubuntu-extermely-vulnerable-m4ch1ine:/var/www/html$ ls -liah ls -liah total 11M 276855 drwxr-xr-x 3 www-data www-data 4.0K Nov 1 2019 . 276854 drwxr-xr-x 3 root root 4.0K Oct 30 2019 .. 281328 -rw-r--r-- 1 www-data www-data 11K Nov 1 2019 index.html 282142 -rw-r--r-- 1 www-data www-data 21 Oct 30 2019 info.php 401054 drwxr-xr-x 5 www-data www-data 4.0K Nov 1 2019 wordpress 407076 -rw-r--r-- 1 www-data www-data 2.9K Oct 31 2019 wp-config.php 20482 -rw-r--r-- 1 www-data www-data 11M Oct 30 2019 wp.tar.gz www-data@ubuntu-extermely-vulnerable-m4ch1ine:/var/www/html$ cat wp-config.php cat wp-config.php <?php /** * The base configuration for WordPress * * The wp-config.php creation script uses this file during the * installation. You don\'t have to use the web site, you can * copy this file to "wp-config.php" and fill in the values. * * This file contains the following configurations: * * * MySQL settings * * Secret keys * * Database table prefix * * ABSPATH * * @link https://codex.wordpress.org/Editing_wp-config.php * * @package WordPress */
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define( 'DB_NAME', 'hackme_wp' );
/** MySQL database username */ define( 'DB_USER', 'root' );
/** MySQL database password */ define( 'DB_PASSWORD', '123' );
/** MySQL hostname */ define( 'DB_HOST', 'localhost' );
/** Database Charset to use in creating database tables. */ define( 'DB_CHARSET', 'utf8' );
/** The Database Collate type. Don\'t change this ifin doubt. */ define( 'DB_COLLATE', '' );
/**#@+ * Authentication Unique Keys and Salts. * * Change these to different unique phrases! * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to login again. * * @since 2.6.0 */ define( 'AUTH_KEY', 'put your unique phrase here' ); define( 'SECURE_AUTH_KEY', 'put your unique phrase here' ); define( 'LOGGED_IN_KEY', 'put your unique phrase here' ); define( 'NONCE_KEY', 'put your unique phrase here' ); define( 'AUTH_SALT', 'put your unique phrase here' ); define( 'SECURE_AUTH_SALT', 'put your unique phrase here' ); define( 'LOGGED_IN_SALT', 'put your unique phrase here' ); define( 'NONCE_SALT', 'put your unique phrase here' );
/**#@-*/
/** * WordPress Database Table prefix. * * You can have multiple installations in one database if you give each * a unique prefix. Only numbers, letters, and underscores please! */ $table_prefix = 'wp_';
/** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development environments. * * For information on other constants that can be used for debugging, * visit the Codex. * * @link https://codex.wordpress.org/Debugging_in_WordPress */ define( 'WP_DEBUG', false );
/* That\'s all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', dirname( __FILE__ ) . '/' ); }
/** Sets up WordPress vars and included files. */ require_once( ABSPATH . 'wp-settings.php' );
mysql> use vulnwp use vulnwp Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
www-data@ubuntu-extermely-vulnerable-m4ch1ine:/$ cd /home cd /home www-data@ubuntu-extermely-vulnerable-m4ch1ine:/home$ ls ls root3r www-data@ubuntu-extermely-vulnerable-m4ch1ine:/home$ ls -liah ls -liah total 12K 262146 drwxr-xr-x 3 root root 4.0K Oct 30 2019 . 2 drwxr-xr-x 23 root root 4.0K Oct 30 2019 .. 286738 drwxr-xr-x 3 www-data www-data 4.0K Nov 1 2019 root3r
有个 root3r 用户,而且当前用户对此目录可控,进去看看
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
www-data@ubuntu-extermely-vulnerable-m4ch1ine:/home$ cd root3r cd root3r/ www-data@ubuntu-extermely-vulnerable-m4ch1ine:/home/root3r$ ls -liah ls -liah total 40K 286738 drwxr-xr-x 3 www-data www-data 4.0K Nov 1 2019 . 262146 drwxr-xr-x 3 root root 4.0K Oct 30 2019 .. 282108 -rw-r--r-- 1 www-data www-data 515 Oct 30 2019 .bash_history 278324 -rw-r--r-- 1 www-data www-data 220 Oct 30 2019 .bash_logout 262821 -rw-r--r-- 1 www-data www-data 3.7K Oct 30 2019 .bashrc 286752 drwxr-xr-x 2 www-data www-data 4.0K Oct 30 2019 .cache 282130 -rw-r--r-- 1 www-data www-data 22 Oct 30 2019 .mysql_history 278338 -rw-r--r-- 1 www-data www-data 655 Oct 30 2019 .profile 282736 -rw-r--r-- 1 www-data www-data 8 Oct 31 2019 .root_password_ssh.txt 282182 -rw-r--r-- 1 www-data www-data 0 Oct 30 2019 .sudo_as_admin_successful 282524 -rw-r--r-- 1 root root 4 Nov 1 2019 test.txt
www-data@ubuntu-extermely-vulnerable-m4ch1ine:/home/root3r$ cat .root_password_ssh.txt sh.txtoot_password_s willy26 www-data@ubuntu-extermely-vulnerable-m4ch1ine:/home/root3r$ cat .mysql_history cat .mysql_history _HiStOrY_V2_ exit\040 www-data@ubuntu-extermely-vulnerable-m4ch1ine:/home/root3r$ su - su - Password: _HiStOrY_V2_
su: Authentication failure www-data@ubuntu-extermely-vulnerable-m4ch1ine:/home/root3r$ ^[[A su - Password: willy26 root@ubuntu-extermely-vulnerable-m4ch1ine:~#