MrEHasher [Pitching Concept]

Search, find and discuss about Mutators!
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

MrEHasher [Pitching Concept]

Post by The_Cowboy »

Howdy!

While working on my Karma Engine, I stumbled upon the idea of using part of the code for hashing electronics present on the system. Actually I am using modified version of dmidecode that I made workable on Windows.

Dmidecode can access pretty much every id corresponding to the electronic item present on the motherboard including ram, processor, and cache memory device. I think enough data to generate unique ID. What and how to do crunch data is the reason why this thread has been made. Best part is that code is Linux and Mac friendly.

And voila, I cooked up https://github.com/ravimohan1991/MrEHasher, which works on Windows for now. To begin the test, I have made a little unreal script mod menu to display the cpuid (see dmidecode's google search results)

Image
Here the top line is the cpuid generated by MrEHasher and pink line is the corresponding MD5 hash (from unreal script code written by Feralidragon).

There can be several usages one being ability to ban players based on unique hash generated. Displaying the client ram size and processor version (including all the electronics information that dmidecode detects) is another use.

Download the package and feel free to post your cpuids so that I may know that dmidecode is working flawlessly!
Attachments
MrEHasher.zip
(324.69 KiB) Downloaded 9 times
Last edited by The_Cowboy on Sun Jan 15, 2023 12:19 pm, edited 1 time in total.
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
f7r
Experienced
Posts: 111
Joined: Mon Oct 19, 2020 6:53 pm

Re: MrEHasher [Pitching Concept]

Post by f7r »

Is this native library needs admin/root rights? lol
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: MrEHasher [Pitching Concept]

Post by The_Cowboy »

f7r wrote: Sun Jan 15, 2023 12:07 pm Is this native library needs admin/root rights? lol
On lInux maybe. On window feel free to use without admin right.

Edit:
Minor rectification, please download again :mrgreen:
Attachments
MrEHasher.zip
(324.69 KiB) Downloaded 5 times
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
f7r
Experienced
Posts: 111
Joined: Mon Oct 19, 2020 6:53 pm

Re: MrEHasher [Pitching Concept]

Post by f7r »

Crash on Wine x86 when click MrEHasher in ModMenu
Log: Log file open, 01/15/23 14:26:22
Critical: AMrEActor::execGetCPUSerialNumber
Critical: (Transient.MrEHashWindow0 MrEHasher.MrEHashWindow.Created)
Critical: (Transient.MrEModMenuWindowFrame0 UWindow.UWindowWindow.CreateWindow)
Critical: (Transient.MrEModMenuWindowFrame0 UWindow.UWindowFramedWindow.Created)
Critical: (Transient.MrEModMenuWindowFrame0 MrEHasher.MrEModMenuWindowFrame.Created)
Critical: (Transient.osxRootWindow0 UWindow.UWindowWindow.CreateWindow)
Critical: (Transient.EWindowMoreModsMenu0.MrEModMenuItem2 MrEHasher.MrEModMenuItem.Execute)
Critical: (Transient.EWindowMoreModsMenu0 ModMenuExtension.EWindowMoreModsMenu.ExecuteItem)
Critical: (Transient.EWindowMoreModsMenu0 ModMenuExtension.EWindowMoreModsMenu.Tick)
Critical: (Transient.EWindowMoreModsMenu0 UWindow.UWindowWindow.DoTick)
Critical: (Transient.osxRootWindow0 UWindow.UWindowWindow.DoTick)
Critical: (Transient.XConsole0 UWindow.WindowConsole.UWindow.Tick)
Critical: UObject::ProcessEvent
Critical: (XConsole Transient.XConsole0, Function UTMenu.UTConsole.UWindow.Tick)
Critical: UConsole::PreRender
Critical: UGameEngine::Draw
Critical: UWindowsViewport::Repaint
Critical: UWindowsClient::Tick
Critical: ClientTick
Critical: UGameEngine::Tick
Critical: UXC_GameEngine::Tick
Critical: UpdateWorld
Critical: MainLoop
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: MrEHasher [Pitching Concept]

Post by The_Cowboy »

Are you testing on 469c? not tested on wine :(

Also xconsole may not be compatible. Can't say for sure by seeing logs.
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
OjitroC
Godlike
Posts: 3613
Joined: Sat Sep 12, 2015 8:46 pm

Re: MrEHasher [Pitching Concept]

Post by OjitroC »

The_Cowboy wrote: Sun Jan 15, 2023 1:59 am Dmidecode can access pretty much every id corresponding to the electronic item present on the motherboard including ram, processor, and cache memory device. I think enough data to generate unique ID. What and how to do crunch data is the reason why this thread has been made ...
There can be several usages one being ability to ban players based on unique hash generated. Displaying the client ram size and processor version (including all the electronics information that dmidecode detects) is another use.
Have you considered what the legal implications may be for those running servers who gather, store and use this kind of information? The implications will depend, of course, on the jurisdiction in which the server is based and, possibly, on the countries from which players come - at the least presumably those running servers would need to inform players that this kind of information is being gathered (and stored/used - and potentially linked with other personal information like an IP address) so that they can opt not to play on a particular server?
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: MrEHasher [Pitching Concept]

Post by The_Cowboy »

Valid point. Seems like the server needs to inform the players which should be done when installing the mod via NPLoader or similar product. Just like ACE does.

I am no expert but all ears for what people at the board have to say.
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
OjitroC
Godlike
Posts: 3613
Joined: Sat Sep 12, 2015 8:46 pm

Re: MrEHasher [Pitching Concept]

Post by OjitroC »

I also get the crash reported by f7r - running UT in a wineskin wrapper on a mac - using 469c but not XC_Engine nor Xconsole - so the crash is not related specifically to XConsole.
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MrEHasher [Pitching Concept]

Post by sektor2111 »

Code: Select all

Critical: AMrEActor::execGetCPUSerialNumber
What has to do XConsole with line from above ? That is the first "Critical" line, the rest are side effects...
Let me see, no sanity check if something has denied the query and a null thing is about to be shown. I have never seen the "None" or "The Nothing".
There is needed something to point out "unable to gain data in current context" or such (a picture with mid finger maybe...).
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: MrEHasher [Pitching Concept]

Post by The_Cowboy »

I did write to log the relevant message if typecasting failed (implying nullness of the information)

Code: Select all

void AMrEActor::execGetCPUSerialNumber(FFrame& Stack, RESULT_DECL)
{
	guard(AMrEActor::execGetCPUSerialNumber);
	P_FINISH;//you MUST call this or it will crash.

	std::string CPUSn;

	// Catcher rhymes with Hatcher, the Topologist, just for information!
	void* catcher = electronics_spit(ps_processor);

	if (central_processing_unit* pInfo = static_cast<central_processing_unit*>(catcher))
	{
		CPUSn = pInfo->cpuid;
	}
	else
	{
		GLog->Logf(TEXT("Couldn't get the relevant information. Contact the author!!"));
		*(FString*)Result = "";

		return;
	}

	std::wstring WideCPUSn = std::wstring(CPUSn.begin(), CPUSn.end());
	*(FString*)Result = WideCPUSn.c_str();

	unguard;
}
Maybe wine layer is interfering with the dll function call though I can't see the reason why.

Edit:
Maybe line causing crash is

Code: Select all

*(FString*)Result = "";
:facepalm: I think why wine won't work, because dmidecode program that MrEHasher uses is not expected to work on Mac natively therefore I wrote a work around for natively running on Mac, the emulation layer won't have any idea what is happening and hence the crash.
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: MrEHasher [Pitching Concept]

Post by The_Cowboy »

I think we are at the situation that TheDane envisioned in 2019
TheDane wrote: all you need to know about banning him/her/it once and for all is right here: https://stackoverflow.com/questions/434 ... ial-number

Code it native, have nploader to launch it - viola! Linux players can ** **** ********** and use wine :-)
The latest commit is https://github.com/ravimohan1991/MrEHas ... 9342e41795 and I am attaching the relevant binaries assuming Windows only server and clients scenario.

We are progressing towards actual release with the planned multi platform support!
Attachments
MrEHasher-TestRelease.zip
(509.92 KiB) Downloaded 1 time
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
OjitroC
Godlike
Posts: 3613
Joined: Sat Sep 12, 2015 8:46 pm

Re: MrEHasher [Pitching Concept]

Post by OjitroC »

I come back to the point I made before - the collection, storage and use of personal information (including CPUID but also presumably IP address) may well have legal ramifications for server owners/operators and they should be advised that they need to familiarise themselves with the data protection and on-line privacy legislation relevant to their jurisdiction - so that they can take whatever (if any) action may be necessary.
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: MrEHasher [Pitching Concept]

Post by The_Cowboy »

Ye ye, I hear ya. Therefore I demand you help me draft or write the EULA for MrEHasher. That should provide server owners and admins firm basis for dealing with legal, umm, ramifications.

To give a context, MrEHasher is doing what may be considered to be a subset of ACE's functioning in obtaining HwID only that I am planning for multi platform support with more amount of electronics data noted by by SMBIOS which may include RAM, cache memory, and motherboard related (serial) numbers.

For ACE that be something like
AddLine("================================================");
AddLine("AntiCheatEngine 1.2 - End User License Agreement");
AddLine("================================================");
AddLine("");
AddLine("By installing ACE, the player accepts that ACE:");
AddLine("* may monitor the game's virtual address space to look for mods, libraries or programs that enable or facilitate cheating;");
AddLine("* may generate checksums for the game's core files and certain system libraries;");
AddLine("* may generate and submit screenshots;");
AddLine("* may submit non-personal system information to the gameserver;");
AddLine("* may store certain ACE specific settings in User.ini;");
AddLine("* may install minor updates of the ACE module without prompting the user;");
AddLine("* will NOT analyze, alter or submit any personal information;");
AddLine("* will NOT open or read files that are not directly related to the game;");
AddLine("* will NOT run after the game has been shut down;");
AddLine("* will NOT run while playing on servers without ACE;");
AddLine("* will NOT modify, delete or rename any files or settings (besides the ACE specific settings in ACE.ini);");
AddLine("* will NOT install major updates of the ACE module without prompting the user;");
AddLine("* will ALWAYS notify the user if the terms of this agreement change;");
AddLine("* will ALWAYS prompt the user when installing a major update.");
AddLine("");
AddLine("ACE is partially based on components of the following 3rd party products:");
AddLine("");
AddLine("--------------------------------------------");
AddLine("1) The Independent JPEG Group's jpeg library");
AddLine("--------------------------------------------");
AddLine("");
AddLine("This software is based in part on the work of the Independent JPEG Group.");
AddLine("Copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding.");
AddLine("");
AddLine("--------------------------------------------");
AddLine("2) The CxImage Library");
AddLine("--------------------------------------------");
AddLine("");
AddLine("Copyright (C) 2001 - 2008, Davide Pizzolato");
AddLine("");
AddLine("--------------------------------------------");
AddLine("3) Hacker's Disassembler Engine 32");
AddLine("--------------------------------------------");
AddLine("");
AddLine("Hacker Disassembler Engine 32 C");
AddLine("Copyright (c) 2008-2009, Vyacheslav Patkov.");
AddLine("All rights reserved.");
AddLine("");
AddLine("Redistribution and use in source and binary forms, with or without");
AddLine("modification, are permitted provided that the following conditions");
AddLine("are met:");
AddLine("");
AddLine(" 1. Redistributions of source code must retain the above copyright");
AddLine(" notice, this list of conditions and the following disclaimer.");
AddLine(" 2. Redistributions in binary form must reproduce the above copyright");
AddLine(" notice, this list of conditions and the following disclaimer in the");
AddLine(" documentation and/or other materials provided with the distribution.");
AddLine("");
AddLine("THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS");
AddLine("\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED");
AddLine("TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A");
AddLine("PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR");
AddLine("CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,");
AddLine("EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,");
AddLine("PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR");
AddLine("PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF");
AddLine("LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING");
AddLine("NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS");
AddLine("SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.");
AddLine("");
AddLine("--------------------------------------------");
AddLine("4) The ENet Network Protocol");
AddLine("--------------------------------------------");
AddLine("");
AddLine("Copyright (c) 2002-2011 Lee Salzman");
AddLine("");
AddLine("Permission is hereby granted, free of charge, to any person obtaining");
AddLine("a copy of this software and associated documentation files (the");
AddLine("\"Software\"), to deal in the Software without restriction, including");
AddLine("without limitation the rights to use, copy, modify, merge, publish,");
AddLine("distribute, sublicense, and/or sell copies of the Software, and to");
AddLine("permit persons to whom the Software is furnished to do so, subject to");
AddLine("the following conditions:");
AddLine("");
AddLine("The above copyright notice and this permission notice shall be");
AddLine("included in all copies or substantial portions of the Software.");
AddLine("");
AddLine("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,");
AddLine("EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF");
AddLine("MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND");
AddLine("NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE");
AddLine("LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION");
AddLine("OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION");
AddLine("WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.");
AddLine("");
AddLine("--------------------------------------------");
AddLine("5) xxHash - Fast Hash algorithm");
AddLine("--------------------------------------------");
AddLine("");
AddLine("Copyright (C) 2012-2016, Yann Collet");
AddLine("");
AddLine("BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)");
AddLine("");
AddLine("Redistribution and use in source and binary forms, with or without");
AddLine("modification, are permitted provided that the following conditions are");
AddLine("met:");
AddLine("");
AddLine("* Redistributions of source code must retain the above copyright");
AddLine("notice, this list of conditions and the following disclaimer.");
AddLine("* Redistributions in binary form must reproduce the above");
AddLine("copyright notice, this list of conditions and the following disclaimer");
AddLine("in the documentation and/or other materials provided with the");
AddLine("distribution.");
AddLine("");
AddLine("THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS");
AddLine("\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT");
AddLine("LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR");
AddLine("A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO event SHALL THE COPYRIGHT");
AddLine("OWNER OR CONTRIBUTORS BE LIABLE for ANY DIRECT, INDIRECT, INCIDENTAL,");
AddLine("SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT");
AddLine("LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,");
AddLine("DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY");
AddLine("THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT");
AddLine("(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY out OF THE USE");
AddLine("OF THIS SOFTWARE, EVEN if ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.");
AddLine("");
AddLine("--------------------------------------------");
AddLine("6) Microsoft Detours");
AddLine("--------------------------------------------");
AddLine("");
AddLine("# Copyright (c) Microsoft Corporation");
AddLine("");
AddLine("All rights reserved.");
AddLine("");
AddLine("# MIT License");
AddLine("");
AddLine("Permission is hereby granted, free of charge, to any person obtaining a copy of");
AddLine("this software and associated documentation files (the \"Software\"), to deal in");
AddLine("the Software without restriction, including without limitation the rights to");
AddLine("use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies");
AddLine("of the Software, and to permit persons to whom the Software is furnished to do");
AddLine("so, subject to the following conditions:");
AddLine("");
AddLine("The above copyright notice and this permission notice shall be included in all");
AddLine("copies or substantial portions of the Software.");
AddLine("");
AddLine("THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR");
AddLine("IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,");
AddLine("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE");
AddLine("AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER");
AddLine("LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,");
AddLine("OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE");
AddLine("SOFTWARE.");
Also I have a question for Feralidragon. Can xxHash be used to compute the hash for electronics product serial numbers? Atm I am using your unreal script based hashing algorithm. Is the library better suited for the purpose in the "proper" hashing sense?
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MrEHasher [Pitching Concept]

Post by Barbie »

If you store a hash of the IP address instead of the IP itself, that data should be anonymous and not covered by the GDPR any more. But IANAL.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
OjitroC
Godlike
Posts: 3613
Joined: Sat Sep 12, 2015 8:46 pm

Re: MrEHasher [Pitching Concept]

Post by OjitroC »

The_Cowboy wrote: Fri Jan 20, 2023 9:52 pm Ye ye, I hear ya. Therefore I demand you help me draft or write the EULA for MrEHasher. That should provide server owners and admins firm basis for dealing with legal, umm, ramifications.
With respect, you are the one producing this software and thus the onus is on you to ascertain the legal and other implications of the use of your software (the gathering and storage of people's personal information). This is not something I agree with nor support in any way, shape or form and so I have no desire to help draft an EULA. Besides which an EULA would need to comply with the relevant legislation in any jurisdiction in which a server or a client/user may be based - and that would require knowledge of that legislation, which I do not possess.

Doesn't what you are proposing go well beyond ACE's EULA?

AddLine("* may submit non-personal system information to the gameserver;");
Your software proposes to submit personal information to the gameserver - unique identifiers of a person's hardware are personal information and they can, if stored, be linked to other personal infomation like an IP Address.

AddLine("* will NOT analyze, alter or submit any personal information;");
Your software will analyze personal information and submit it to the server owner/operator - that is the purpose of the software.

AddLine("* will NOT open or read files that are not directly related to the game;");
It may not open or read files but the software will gather information not directly related to UT99.

AddLine("* will NOT run while playing on servers without ACE;");
Presumably NPLoader will run on a server not using ACE and so your software could be used on servers not running ACE?

How do people joining a server get to agree or disagree with ACE's EULA? I have several ACE versions in my Cache and have never been asked to agree or otherwise to their installation or to the EULA - in fact this is the first time I have seen this EULA.

How will people joining a server using your software get to agree or disagree with its installation?

Automatically merged

Barbie wrote: Fri Jan 20, 2023 11:10 pm If you store a hash of the IP address instead of the IP itself, that data should be anonymous and not covered by the GDPR any more. But IANAL.
Presumably though the whole purpose of the proposed software is not that the data is anonymous but that it is and can be linked to a specific and identifiable piece of hardware (and hence is personal information)?

Presumably also in order to avoid false positives and chance, one would need more than one piece of non-anonymized data (llke an IP address together with the data about the hardware like the CPUID) to confirm positive identification?
Post Reply