利用Weblogic进行入侵的一些总结 | WooYun知识库
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.
利用Weblogic进行入侵的一些总结
本文主要总结一下在利用Weblogic
进行渗透时的一些错误的解决方法以及一些信息的收集手段。
0x01 最常见的两种错误
- 上传
war
时拒绝访问,如下图
出现此种原因可能是因为管理对默认上传目录upload
做了权限设置
用burp
截取上传时的数据,修改upload为其他目录
- 上传后无法部署,出现java.util.zip.ZipException:Could not find End Of Central Directory,如下图(经过整理的错误信息)
原因分析: 出现此种原因是因为上传的时候没有使用二进制模式,而是采用的ASCII
模式,导致上传的文件全部乱码
这是采用ASCII
模式上传之后再下载下来的文件,全部乱码
而原本的文件应该是这个样子的
默认上传war
的content-type
为application/octet-stream
或者application/x-zip-compressed
(记不清了)
这两种模式本来应该为二进制上传模式的,但是却无缘无故变成了ASCII
模式,原因未知(暂且认定为管理员的设置)
在二进制上传模式中,除了普通的程序,即content-type
为application
开头的,还有图片image
开头
用burp
抓取上传的数据content-type
改成image/gif
,还一定要加上文件头GIF89a
,否则还是要出错,下图的那个filename
为key1.gif
仅为测试,实际上传还是以war
结尾
0x02 其他的信息收集
拿到shell
之后先找配置文件,一般在WEB-INF
目录下,有些在WEB-INF/classes
目录下,文件名一般以properties
结尾。
还有一种是JDBC
在Weblogic
里面配置好的,如下图
这种的解密方式请参考解密JBoss和Weblogic数据源连接字符串和控制台密码
Weblogic
还提供虚拟主机的功能,通过这个,可以收集到一些域名的信息,所属单位等,以便进一步通知处理。
0x03 进内网
由于Weblogic
权限比较大,在Windows
一般都是administrator
,Linux
则是weblogic
用户,也有root
权限的。
所以拿到shell
之后,先看看能否访问外网,以便转发内网,进行更深的渗透,一条ping命令即可,若不能访问外网,可以尝试下面这个方法
http://wooyun.org/bugs/wooyun-2015-0127056
以上只是鄙人的个人见解,望各路大神指正
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK