File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 2020
2121## 分类
2222
23- 当前问题总数:78
23+ 当前问题总数:79
2424
2525[ Java本身的安全问题 - 16个] ( https://github.com/4ra1n/JavaSecInterview/tree/master/java )
2626
3232
3333[ Spring框架相关的安全问题 - 16个] ( https://github.com/4ra1n/JavaSecInterview/tree/master/spring )
3434
35- [ 内存马专题 - 8个 ] ( https://github.com/4ra1n/JavaSecInterview/tree/master/memshell )
35+ [ 内存马专题 - 9个 ] ( https://github.com/4ra1n/JavaSecInterview/tree/master/memshell )
3636
3737[ 反序列化CC链专题 - 8个] ( https://github.com/4ra1n/JavaSecInterview/tree/master/cc )
3838
Original file line number Diff line number Diff line change @@ -14,9 +14,11 @@ Java Agent内存马:这种方式不仅限于`Tomcat`或`Spring`
1414
1515直接能想到的办法是利用Java Agent遍历所有JVM中的class,判断是否是内存马
1616
17- 例如使用阿里的arthas分析,查看是否存在恶意的类名,然后删除
17+ 例如使用阿里的arthas分析,根据继承实现类黑名单,注解包名类名等黑名单来做
1818
19- 或者使用c0ny1师傅的java-memshell-scanner项目,从Tomcat API角度删除
19+ 例如` LandGrey ` 师傅的` copagent ` 项目,根据黑名单和风险注解作为依据,
20+
21+ 或者使用c0ny1师傅的` java-memshell-scanner ` 项目,从Tomcat API角度删除
2022
2123
2224
@@ -59,6 +61,18 @@ Java Agent内存马:这种方式不仅限于`Tomcat`或`Spring`
5961
6062
6163
64+ ### Java Agent内存马的查杀的难点是什么(★★★★)
65+
66+ JVMTI有
67+
68+ 一般Agent内存马会调用` Java Agent ` 提供的` redefineClass ` 方法加入内存马
69+
70+ 如果想检测,拿到的字节码并不是修改过的字节码,而是原始字节码,因此无法判断某个类是否合法
71+
72+ 准确描述:无法获取到被` redefineClass ` 修改后的字节码,只能获取到被` retransformClass ` 修改后的字节码
73+
74+
75+
6276### 如果有一个陌生的框架你如何挖内存马(★★★)
6377
6478核心是找到类似` Tomcat ` 和` Spring ` 中的` Context ` 对象,然后尝试从其中获取` request ` 和` response ` 对象以实现内存马的功能。
You can’t perform that action at this time.
0 commit comments