From 4aa3ba05456a1a110c9b0677d0962088ffb0eac4 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 13 Sep 2021 23:43:24 -0700 Subject: [PATCH] Disable possibly overly-broad CD Check check --- BurnOutSharp/ProtectionType/CDCheck.cs | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/BurnOutSharp/ProtectionType/CDCheck.cs b/BurnOutSharp/ProtectionType/CDCheck.cs index 14e50ac2..62da0af8 100644 --- a/BurnOutSharp/ProtectionType/CDCheck.cs +++ b/BurnOutSharp/ProtectionType/CDCheck.cs @@ -7,19 +7,6 @@ namespace BurnOutSharp.ProtectionType { public class CDCheck : IContentCheck { - /// - private List GetContentMatchSets() - { - // TODO: Obtain a sample to find where this string is in a typical executable - // TODO: Is this too broad in general? It _does_ indicate a CD check, but there's no real - // way of knowing how consistent it is - return new List - { - // CDCheck - new ContentMatchSet(new byte?[] { 0x43, 0x44, 0x43, 0x68, 0x65, 0x63, 0x6B }, "Executable-Based CD Check"), - }; - } - /// public string CheckContents(string file, byte[] fileContent, bool includeDebug, PortableExecutable pex, NewExecutable nex) { @@ -46,7 +33,15 @@ namespace BurnOutSharp.ProtectionType return match; } - var contentMatchSets = GetContentMatchSets(); + // TODO: Obtain a sample to find where this string is in a typical executable + // TODO: Is this too broad in general? It _does_ indicate a CD check, but there's no real + // way of knowing how consistent it is + var contentMatchSets = new List + { + // // CDCheck + // new ContentMatchSet(new byte?[] { 0x43, 0x44, 0x43, 0x68, 0x65, 0x63, 0x6B }, "Executable-Based CD Check"), + }; + if (contentMatchSets != null && contentMatchSets.Any()) return MatchUtil.GetFirstMatch(file, fileContent, contentMatchSets, includeDebug);