15

利用Weblogic进行入侵的一些总结 | WooYun知识库

 6 years ago
source link:
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

利用Weblogic进行入侵的一些总结

本文主要总结一下在利用Weblogic进行渗透时的一些错误的解决方法以及一些信息的收集手段。

0x01 最常见的两种错误


  • 上传war时拒绝访问,如下图

enter image description here

出现此种原因可能是因为管理对默认上传目录upload做了权限设置

burp截取上传时的数据,修改upload为其他目录

enter image description here

  • 上传后无法部署,出现java.util.zip.ZipException:Could not find End Of Central Directory,如下图(经过整理的错误信息)

enter image description here

原因分析: 出现此种原因是因为上传的时候没有使用二进制模式,而是采用的ASCII模式,导致上传的文件全部乱码

这是采用ASCII模式上传之后再下载下来的文件,全部乱码

enter image description here

而原本的文件应该是这个样子的

enter image description here

默认上传warcontent-typeapplication/octet-stream或者application/x-zip-compressed (记不清了)

这两种模式本来应该为二进制上传模式的,但是却无缘无故变成了ASCII模式,原因未知(暂且认定为管理员的设置)

在二进制上传模式中,除了普通的程序,即content-typeapplication开头的,还有图片image开头

burp抓取上传的数据content-type改成image/gif,还一定要加上文件头GIF89a,否则还是要出错,下图的那个filenamekey1.gif仅为测试,实际上传还是以war结尾

enter image description here

0x02 其他的信息收集


拿到shell之后先找配置文件,一般在WEB-INF目录下,有些在WEB-INF/classes目录下,文件名一般以properties结尾。

还有一种是JDBCWeblogic里面配置好的,如下图

enter image description here

enter image description here

这种的解密方式请参考解密JBoss和Weblogic数据源连接字符串和控制台密码

Weblogic还提供虚拟主机的功能,通过这个,可以收集到一些域名的信息,所属单位等,以便进一步通知处理。

enter image description here

0x03 进内网


由于Weblogic权限比较大,在Windows一般都是administratorLinux则是weblogic用户,也有root权限的。

所以拿到shell之后,先看看能否访问外网,以便转发内网,进行更深的渗透,一条ping命令即可,若不能访问外网,可以尝试下面这个方法

http://wooyun.org/bugs/wooyun-2015-0127056

以上只是鄙人的个人见解,望各路大神指正


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK