mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-04 05:35:49 +00:00
Add initial detection of WMDS, and improve detection of MediaMax CD-3 (#122)
* Add initial detection of WMDS, and improve detection of MediaMax CD-3 Add initial detection of Windows Media Data Session, and improve detection of MediaMax CD-3. * Fix whitespace Fix whitespace as requested in PR review. * Add comment to WMDS * Further improve MediaMax CD-3 checks
This commit is contained in:
@@ -47,6 +47,10 @@ namespace BurnOutSharp.FileType
|
||||
if (string.Equals(extension?.TrimStart('.'), "txt", StringComparison.OrdinalIgnoreCase))
|
||||
return true;
|
||||
|
||||
// XML (multiple headers possible)
|
||||
if (string.Equals(extension?.TrimStart('.'), "xml", StringComparison.OrdinalIgnoreCase))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -86,6 +90,12 @@ namespace BurnOutSharp.FileType
|
||||
// MediaMax
|
||||
if (fileContent.Contains("MediaMax technology"))
|
||||
Utilities.AppendToDictionary(protections, file, "MediaMax CD-3");
|
||||
else if (fileContent.Contains("exclusive Cd3 technology"))
|
||||
Utilities.AppendToDictionary(protections, file, "MediaMax CD-3");
|
||||
else if (fileContent.Contains("<PROTECTION-VENDOR>MediaMAX</PROTECTION-VENDOR>"))
|
||||
Utilities.AppendToDictionary(protections, file, "MediaMax CD-3");
|
||||
else if (fileContent.Contains("MediaMax(tm)"))
|
||||
Utilities.AppendToDictionary(protections, file, "MediaMax CD-3");
|
||||
|
||||
// phenoProtect
|
||||
if (fileContent.Contains("phenoProtect"))
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using BurnOutSharp.ExecutableType.Microsoft.PE;
|
||||
using BurnOutSharp.Interfaces;
|
||||
@@ -6,6 +7,10 @@ using BurnOutSharp.Matching;
|
||||
|
||||
namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
// MediaMax CD-3 is a copy protection for audio CDs created by SunnComm, which once installed, restricted users by only allowing a limited number of copies to be made, and only using Windows Media Player.
|
||||
// It appears to accomplish this using the official Windows Media Data Session Toolkit.
|
||||
// List of discs known to contain MediaMax CD-3: https://en.wikipedia.org/wiki/List_of_compact_discs_sold_with_MediaMax_CD-3
|
||||
// TODO: Add support for detecting the Mac version, which is present on "All That I Am" by Santana (Barcode 8 2876-59773-2 6)
|
||||
public class MediaMaxCD3 : IPathCheck, IPortableExecutableCheck
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
@@ -16,6 +21,15 @@ namespace BurnOutSharp.ProtectionType
|
||||
if (sections == null)
|
||||
return null;
|
||||
|
||||
// Used to detect "LicGen.exe", found on "All That I Am" by Santana (Barcode 8 2876-59773-2 6)
|
||||
string name = pex.FileDescription;
|
||||
if (!string.IsNullOrWhiteSpace(name) && name.StartsWith("LicGen Module", StringComparison.OrdinalIgnoreCase))
|
||||
return $"MediaMax CD-3";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (!string.IsNullOrWhiteSpace(name) && name.StartsWith("LicGen Module", StringComparison.OrdinalIgnoreCase))
|
||||
return $"MediaMax CD-3";
|
||||
|
||||
var resource = pex.FindResource(dataContains: "Cd3Ctl");
|
||||
if (resource != null)
|
||||
return $"MediaMax CD-3";
|
||||
@@ -64,7 +78,31 @@ namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
new PathMatchSet(new PathMatch("LaunchCd.exe", useEndsWith: true), "MediaMax CD-3"),
|
||||
// Found on "All That I Am" by Santana (Barcode 8 2876-59773-2 6)
|
||||
new PathMatchSet(new List<PathMatch>
|
||||
{
|
||||
// TODO: Verify if these are OR or AND
|
||||
new PathMatch("PlayDisc.exe", useEndsWith: true),
|
||||
new PathMatch("PlayDisc.xml", useEndsWith: true),
|
||||
}, "MediaMax CD-3"),
|
||||
|
||||
// Found on "Contraband" by Velvet Revolver (Barcode 8 28766 05242 8)
|
||||
// "SCCD3X01.dll" should already be detected by the content checks, but not "SCCD3X02.dll".
|
||||
new PathMatchSet(new List<PathMatch>
|
||||
{
|
||||
// TODO: Verify if these are OR or AND
|
||||
new PathMatch("SCCD3X01.dll", useEndsWith: true),
|
||||
new PathMatch("SCCD3X02.dll", useEndsWith: true),
|
||||
}, "MediaMax CD-3"),
|
||||
|
||||
// Found on "Contraband" by Velvet Revolver (Barcode 8 28766 05242 8)
|
||||
// "LaunchCD.ini" needs to be confirmed to always be present as well, but it's added along with the exe check to minimize the risk of false positives due to it being a generic name. There is also a "launchcd.xml" that may also be checked for if needed.
|
||||
new PathMatchSet(new List<PathMatch>
|
||||
{
|
||||
// TODO: Verify if these are OR or AND
|
||||
new PathMatch("LaunchCD.exe", useEndsWith: true),
|
||||
new PathMatch("LaunchCD.ini", useEndsWith: true),
|
||||
}, "MediaMax CD-3"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetAllMatches(files, matchers, any: true);
|
||||
@@ -76,6 +114,12 @@ namespace BurnOutSharp.ProtectionType
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
new PathMatchSet(new PathMatch("LaunchCd.exe", useEndsWith: true), "MediaMax CD-3"),
|
||||
new PathMatchSet(new PathMatch("LaunchCd.ini", useEndsWith: true), "MediaMax CD-3"),
|
||||
new PathMatchSet(new PathMatch("LaunchCd.xml", useEndsWith: true), "MediaMax CD-3"),
|
||||
|
||||
// Found on "Contraband" by Velvet Revolver (Barcode 8 28766 05242 8)
|
||||
new PathMatchSet(new PathMatch("SCCD3X01.dll", useEndsWith: true), "MediaMax CD-3"),
|
||||
new PathMatchSet(new PathMatch("SCCD3X02.dll", useEndsWith: true), "MediaMax CD-3"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetFirstMatch(path, matchers, any: true);
|
||||
|
||||
61
BurnOutSharp/ProtectionType/WMDS.cs
Normal file
61
BurnOutSharp/ProtectionType/WMDS.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using BurnOutSharp.ExecutableType.Microsoft.PE;
|
||||
using BurnOutSharp.Interfaces;
|
||||
using BurnOutSharp.Matching;
|
||||
|
||||
namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
// The Windows Media Data Session Toolkit was created as a form of DRM for audio CDs (and supposedly DVDs, but with no standard for multiple sessions existing for pressed DVDs, this seems unlikely), which ultimately acts a framework
|
||||
// It seems to provide a framework for standardized storing of protected music, as well as allowing the disc publisher to specify how many copies they wish users to be able to create using Windows Media Player.
|
||||
// Known to be used along with MediaMax CD-3, possibly others.
|
||||
// Reference: https://news.microsoft.com/2003/01/20/microsoft-releases-new-windows-media-data-session-toolkit-enabling-second-session-creation/
|
||||
public class WMDS : IPathCheck, IPortableExecutableCheck
|
||||
{
|
||||
public string CheckPortableExecutable(string file, PortableExecutable pex, bool includeDebug)
|
||||
{
|
||||
// Get the sections from the executable, if possible
|
||||
var sections = pex?.SectionTable;
|
||||
if (sections == null)
|
||||
return null;
|
||||
|
||||
// Found on "All That I Am" by Santana (Barcode 8 2876-59773-2 6)
|
||||
string name = pex.FileDescription;
|
||||
if (!string.IsNullOrWhiteSpace(name) && name.StartsWith("Windows Media Data Session Licensing Engine", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Windows Media Data Session DRM";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ConcurrentQueue<string> CheckDirectoryPath(string path, IEnumerable<string> files)
|
||||
{
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
// Found on "All That I Am" by Santana (Barcode 8 2876-59773-2 6) and "Contraband" by Velvet Revolver (Barcode 8 28766 05242 8), likely among others.
|
||||
new PathMatchSet(new List<PathMatch>
|
||||
{
|
||||
// TODO: Verify if these are OR or AND
|
||||
new PathMatch("WMDS.dll", useEndsWith: true),
|
||||
new PathMatch("WMDS.ini", useEndsWith: true),
|
||||
}, "Windows Media Data Session DRM"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetAllMatches(files, matchers, any: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CheckFilePath(string path)
|
||||
{
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
// Found on "All That I Am" by Santana (Barcode 8 2876-59773-2 6) and "Contraband" by Velvet Revolver (Barcode 8 28766 05242 8), likely among others.
|
||||
new PathMatchSet(new PathMatch("WMDS.dll", useEndsWith: true), "Windows Media Data Session DRM"),
|
||||
new PathMatchSet(new PathMatch("WMDS.ini", useEndsWith: true), "Windows Media Data Session DRM"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetFirstMatch(path, matchers, any: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,6 +82,7 @@ Below is a list of protections detected by BurnOutSharp. The two columns explain
|
||||
| Tivola Ring Protection | False | True | |
|
||||
| TZCopyProtector | False | True | Unconfirmed¹ |
|
||||
| Uplay | True | True | |
|
||||
| Windows Media Data Session DRM | True | True | |
|
||||
| Winlock | False | True | Unconfirmed¹ |
|
||||
| WTM CD Protect | True | True | |
|
||||
| XCP | True | True | |
|
||||
|
||||
Reference in New Issue
Block a user