Jump to content
  • We need you!

    You must register to discover all the features of our community!

[FIX] Disable loading MIX, ASI, M3D, etc. files from client directory


Recommended Posts

Hey again :D

 

Yesterday I was looking into mss32.dll and just found out this is the library being responsible for loading asi, mix, m3d, etc.. files. So I made a library that will hook the Miles Sound System so that it won't load unwanted files, only what is needed.

 

Download: https://distraught.hu/DistraughtProtector/

VirusTotal: https://www.virustotal.com/gui/file/ed62ee15ecf2927cde4fa47f85204aa4aa1648bf4343386b358ed2cff245fc7a/detection

 

There are 3 files in the zip:

  • .lib -> put it in your extern/lib folder
  • .h -> put it in your extern/include folder
  • .dll -> put it in your client

 

Open UserInterface/UserInterface.cpp and find the WinMain function.

Add this to the beginning of the function:

DistraughtProtector::Initialize();

DistraughtProtector::SetFileBlockedCallback(&HackerDetected);

DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssmp3.asi", 125952);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssvoice.asi", 197120);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssa3d.m3d", 83456);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssds3d.m3d", 70656);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssdx7.m3d", 80896);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\msseax.m3d", 103424);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssrsx.m3d", 354816);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\msssoft.m3d", 67072);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssdsp.flt", 93696);

You have to specify the files that are enabled to load by the Miles Sound System (path, file size in bytes).

 

 

And add this before that function:

static void _stdcall HackerDetected(const char* blockedFile)
{
	MessageBox(NULL, blockedFile, ApplicationStringTable_GetStringz(IDS_APP_NAME, "APP_NAME"), MB_ICONSTOP);
}

This is a callback where you get notified if the user would load a file that he/she shouldn't :D

You don't have to specify a callback, in that case remove DistraughtProtector::SetFileBlockedCallback(&HackerDetected); from WinMain and the client just simply won't load the dangerous files. 

 

Here's an image what it should look like:

image_howto.jpg

 

 

After that just add

DistraughtProtector::Destroy();

to the end of WinMain (surely before the return!).

 

Hope you like it! If you have ideas what new features should I add to the library, let me know in the comments! :)

Edited by Distraught (see edit history)
  • Love 5

AxgtRfG.png
C++ programmer at Gameloft

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.