Update detection of CO types
This commit is contained in:
parent
957a8ab8dd
commit
0a5973e541
|
@ -65,7 +65,9 @@ namespace de4dot.code.deobfuscators.CryptoObfuscator {
|
||||||
if (!containsString(method, "debugger is activ") &&
|
if (!containsString(method, "debugger is activ") &&
|
||||||
!containsString(method, "debugger is running") &&
|
!containsString(method, "debugger is running") &&
|
||||||
!containsString(method, "run under a debugger") &&
|
!containsString(method, "run under a debugger") &&
|
||||||
!containsString(method, "Debugger detected"))
|
!containsString(method, "run under debugger") &&
|
||||||
|
!containsString(method, "Debugger detected") &&
|
||||||
|
!containsString(method, "Debugger was detected"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
antiDebuggerType = type;
|
antiDebuggerType = type;
|
||||||
|
|
|
@ -82,7 +82,7 @@ namespace de4dot.code.deobfuscators.CryptoObfuscator {
|
||||||
bool checkType(TypeDefinition type) {
|
bool checkType(TypeDefinition type) {
|
||||||
if (type.Methods.Count != 7)
|
if (type.Methods.Count != 7)
|
||||||
return false;
|
return false;
|
||||||
if (type.Fields.Count != 1)
|
if (type.Fields.Count < 1 || type.Fields.Count > 2)
|
||||||
return false;
|
return false;
|
||||||
if (!new FieldTypes(type).all(requiredTypes))
|
if (!new FieldTypes(type).all(requiredTypes))
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -110,7 +110,7 @@ namespace de4dot.code.deobfuscators.CryptoObfuscator {
|
||||||
MethodDefinition getProxyCreateMethod(TypeDefinition type) {
|
MethodDefinition getProxyCreateMethod(TypeDefinition type) {
|
||||||
if (DotNetUtils.findFieldType(type, "System.ModuleHandle", true) == null)
|
if (DotNetUtils.findFieldType(type, "System.ModuleHandle", true) == null)
|
||||||
return null;
|
return null;
|
||||||
if (type.Fields.Count < 1 || type.Fields.Count > 8)
|
if (type.Fields.Count < 1 || type.Fields.Count > 10)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
MethodDefinition createMethod = null;
|
MethodDefinition createMethod = null;
|
||||||
|
|
|
@ -304,8 +304,12 @@ namespace de4dot.code.deobfuscators.CryptoObfuscator {
|
||||||
return method;
|
return method;
|
||||||
if (DotNetUtils.isMethod(method, "System.Byte[]", "(System.Byte,System.IO.Stream)"))
|
if (DotNetUtils.isMethod(method, "System.Byte[]", "(System.Byte,System.IO.Stream)"))
|
||||||
return method;
|
return method;
|
||||||
|
if (DotNetUtils.isMethod(method, "System.Byte[]", "(System.SByte,System.IO.Stream)"))
|
||||||
|
return method;
|
||||||
if (DotNetUtils.isMethod(method, "System.Byte[]", "(System.Byte,System.IO.Stream,System.Int32)"))
|
if (DotNetUtils.isMethod(method, "System.Byte[]", "(System.Byte,System.IO.Stream,System.Int32)"))
|
||||||
return method;
|
return method;
|
||||||
|
if (DotNetUtils.isMethod(method, "System.Byte[]", "(System.SByte,System.IO.Stream,System.UInt32)"))
|
||||||
|
return method;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ namespace de4dot.code.deobfuscators.CryptoObfuscator {
|
||||||
|
|
||||||
if (!method.IsStatic || !DotNetUtils.isMethod(method, "System.Void", "()"))
|
if (!method.IsStatic || !DotNetUtils.isMethod(method, "System.Void", "()"))
|
||||||
return false;
|
return false;
|
||||||
if (type.Methods.Count < 3 || type.Methods.Count > 10)
|
if (type.Methods.Count < 3 || type.Methods.Count > 12)
|
||||||
return false;
|
return false;
|
||||||
if (DotNetUtils.getPInvokeMethod(type, "mscoree", "StrongNameSignatureVerificationEx") != null) {
|
if (DotNetUtils.getPInvokeMethod(type, "mscoree", "StrongNameSignatureVerificationEx") != null) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user