Skip to content

Commit

Permalink
chore: 直接返回null避免非rmi和ldap协议的攻击向量
Browse files Browse the repository at this point in the history
  • Loading branch information
d1nfinite committed Dec 11, 2021
1 parent d957614 commit 869c024
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public byte[] transform(ClassLoader loader, String className, Class<?> classBein

// 修改lookup方法
assert ctMethod != null;
ctMethod.insertBefore("if(name.startsWith(\"ldap://\") || name.startsWith(\"rmi://\")){return null;}");
//ctMethod.insertBefore("if(name.startsWith(\"ldap://\") || name.startsWith(\"rmi://\")){return null;}");
ctMethod.insertBefore("return null;");

// 返回字节码
System.out.println("[Vaccine] Patch JndiManager Lookup Success!");
Expand Down

0 comments on commit 869c024

Please sign in to comment.