在日常得渗透测试工作中,经常遇到spring actuator未授权漏洞,而且在实际过程中也常常会下载到heapdump这个文件。了解过这个文件的人知道,Heap Dump也叫堆转储文件,是一个Java进程在某个时间点上的内存快照。Heap Dump是有着多种类型的。不过总体上heap dump在触发快照的时候都保存了java对象和类的信息。通常在写heap dump文件前会触发一次FullGC,所以heap dump文件中保存的是FullGC后留下的对象信息。
我们可以通过Heap Dump做哪些事情?
一般在Heap Dump文件中可以获取到(这仍然取决于heap dump文件的类型)如下信息:
HeapDump敏感信息提取工具
项目地址:https://github.com/whwlsfb/JDumpSpider
该工具暂支持提取以下类型的敏感信息
数据源
SpringDataSourceProperties
WeblogicDataSourceConnectionPoolConfig
MongoClient
AliDruidDataSourceWrapper
配置文件信息
MapPropertySource
OriginTrackedMapPropertySource
MutablePropertySource
ConsulPropertySource
OSS(模糊搜索)
Redis配置
RedisStandaloneConfiguration
JedisClient
ShiroKey
CookieRememberMeManager
本工具需要使用Oracle JDK 1.8版本(更高版本将导致异常)。
$ java -jar .\target\JDumpSpider-1.0-SNAPSHOT-full.jar
Missing required parameter: ‘’
Usage: JDumpSpider [-hV]
Extract sensitive information from heapdump file.
Heap file path.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
java -jar JDumpSpider-1.0-SNAPSHOT-full.jar heapdump

有的时候光有思路,没用趁手的“兵器”是不能把战果最大化的,如果你拿着一把好武器,而且具备很好的思维,那么战果一定不凡!欢迎各位关注我的公众号:小白学IT