mirror of
https://github.com/qi4L/JYso.git
synced 2026-09-26 16:51:52 +08:00
++++3
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -48,7 +48,7 @@ public class StringUtil {
|
|||||||
public static boolean isFromExploit() {
|
public static boolean isFromExploit() {
|
||||||
StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
|
StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
|
||||||
for (int i = 0; i < stackTraceElements.length; i++) {
|
for (int i = 0; i < stackTraceElements.length; i++) {
|
||||||
if (stackTraceElements[i].getClassName().startsWith("com.qi4l.jndi.exploit")) {
|
if (stackTraceElements[i].getClassName().startsWith("com.qi4l.JYso.exploit")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public class Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static CtClass encapsulationByClassLoaderTemplate(byte[] bytes) throws Exception {
|
public static CtClass encapsulationByClassLoaderTemplate(byte[] bytes) throws Exception {
|
||||||
CtClass ctClass = POOL.get("com.qi4l.jndi.template.ClassLoaderTemplate");
|
CtClass ctClass = POOL.get("com.qi4l.JYso.template.ClassLoaderTemplate");
|
||||||
ctClass.setName(generateClassName());
|
ctClass.setName(generateClassName());
|
||||||
ByteArrayOutputStream outBuf = new ByteArrayOutputStream();
|
ByteArrayOutputStream outBuf = new ByteArrayOutputStream();
|
||||||
GZIPOutputStream gzipOutputStream = new GZIPOutputStream(outBuf);
|
GZIPOutputStream gzipOutputStream = new GZIPOutputStream(outBuf);
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class ClassNameHandler {
|
|||||||
|
|
||||||
|
|
||||||
public static String searchClassByName(String name) {
|
public static String searchClassByName(String name) {
|
||||||
Set<String> set = getClassSet("com.qi4l.jndi.template.");
|
Set<String> set = getClassSet("com.qi4l.JYso.template.");
|
||||||
for (String fullName : set) {
|
for (String fullName : set) {
|
||||||
if (fullName.endsWith(name)) {
|
if (fullName.endsWith(name)) {
|
||||||
return fullName.replace("\\", ".");
|
return fullName.replace("\\", ".");
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public class GlassHandler {
|
|||||||
case 1:
|
case 1:
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
CtClass newClass = Config.POOL.get("com.qi4l.jndi.template.HideMemShellTemplate");
|
CtClass newClass = Config.POOL.get("com.qi4l.JYso.template.HideMemShellTemplate");
|
||||||
newClass.setName(ClassNameHandler.generateClassName());
|
newClass.setName(ClassNameHandler.generateClassName());
|
||||||
String content = "b64=\"" + Base64.encodeBase64String(byteCodes) + "\";";
|
String content = "b64=\"" + Base64.encodeBase64String(byteCodes) + "\";";
|
||||||
String cName = "className=\"" + ctClass.getName() + "\";";
|
String cName = "className=\"" + ctClass.getName() + "\";";
|
||||||
|
|||||||
Reference in New Issue
Block a user