/CVE-2021-25646

CVE-2021-25646 Apache Druid 远程代码执行漏洞 Wker脚本

CVE-2021-25646 Apache Druid 远程代码执行漏洞 Wker脚本

编写ing...

=====================================================================================

首先感谢Wker大佬远程解答。

写脚本的目的在于练习。

使用

脚本是使用DNSLog进行判断,如果存在漏洞则会自动获取dnslog网址进行ping操作,将返回结果打印输出。

  • 使用之间先在script\ATTACKUTILS目录下新建一dns.wker文件
#define dnsqian = Set-Cookie:[
#define dnshou =  path=/
#define re = "(.*?)"
function DnsRef(cookie){
	res = HttpGet("http://dnslog.cn/getrecords.php?t=0.3741317873165926",cookie.StrRN()."User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0");
	r = StrRe(res[0],re);
	if(GetArrayNum(r) >= 3){
		return r[3];
	}else{
		return "";
	}
}
function GetDomain(){
	array r;
	res = HttpGet("http://dnslog.cn/getdomain.php?t=0.16082432252184475","User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0");
	tmp = StrSplit(res[0],StrRN());
	dns = tmp[0];
	cookie = "Cookie: ".GettextMiddle(res[1],dnsqian,dnshou);
	ArrayAddEle(r,dns);
	ArrayAddEle(r,cookie);
	return r;
}

截图