Client-Server Anti-Cheat System with Custom Encryption – Seeking Feedback!

I’ll think about adding it later but remember this is just the basic version.

I’m not talking about the ping here. I’m talking about the encryption of the data sent to execute the remote.

The only way I could think here is that if you somehow managed to change encryptions everytime. Other than that, can’t I just send an encrypted version data to the script and make the remote execute ?

(also how is the local script supposed to know what code to send to the script, the only way i could think is u sending a ping with the data in it, but that can be intercepted)

1 Like

Many people will not catch what is really important to us here after reading this. I haven’t lost sight of what really matters here because my way of thinking is gifted in certain ways. What exactly does your anti cheat system do? You don’t have to tell us but I will put this message here and the reason being is because I strongly suspect you are vulnerable to your actual anti cheat itself being bypassed due to how client and server works. The way your anti cheat works is fine and even the basic version of how it is enabled is good but yeah I don’t think you are as safe as you think you are and without identifying what cheats you are blocking there really is still so much on the table for the exploiters. It is just as I said I will quote what I said.

As i stated before the ping that the server sends to the client has a 92 digit code that is encrypted the server is waiting for the client to unencrypted the message retrieve the instructions and then encrypt those instructions and the 92 digit code that they then send to the server the server then checks if the 92 digit code is the same as the one they encrypted and then sent them and if it matches up then it knows that the anti-cheat is the one that responded to the request

2 Likes

I haven’t developed the specific things the anti-cheat will combat i have developed the system where the client anti-cheat is secure and that is most important making sure the client anti-cheat is not being bypassed and is running along with being able to send encrypted messages to the server to kick the players who have been flagged by the anti-cheat i’d assume that u can do alot more things to detect exploiters on the client then u can on the server i will do more research into that but i have came here and given my basic system to make sure that the anti-cheat is not being bypassed.

(Another thing to note that each encrypted message contains an encryption key this key is used to decrypt it every-time the system encrypts something it has a randomly generated encryption key attached to it which is the only way the text can be decrypted this ensures that each time even if its the same message being encrypted its a different encryption)

1 Like

I see. That’s a very good idea. Definitely would win in an Alice And Bob cryptography problem. May I ask you, what system is your encryption ?

I can’t tell you what methods i use to encrypt messages/tables yet because that would make this entire anti-cheat useless but i am willing to provide more information in the future regarding the encryption once its mastered.

I still haven’t lost sight of what really counts here. I am doing this because it will educate you and help you learn exactly what can be done by the exploiter. In this “Alice and Bob cryptography” game as fancy calls it, you are simply encrypting data. Let’s pretend that I am the one who is going to bypass your security. Here’s how I would do it. I would break it down to a microscopic level. Let’s say your system involves sending a 1 number code from a string value in your humanoidrootpart from the client to the server to keep the client anti cheat running and if the client deletes the local script, the server kicks the client because the code is no longer sending to the server. What exactly would stop the exploiter from sending the code themselves without the anti cheat script? It’s a 1 digit code so all the exploiter has to do is take the code and fire the server with it while the local anti cheat is deleted. Isn’t that how easy this is to bypass on a microscopic level with no encryption?

This message is what gave me clues that your anti cheat isn’t as genius as I thought it was without more detailed explanations of exactly what it’s doing. It would be great if you can confirm that my microscopic level bypass would actually work using the system I provided.

This quote is the system

This quote is the bypass

I think it would be easier for you to understand if i gave you access to a local copy where you can clearly see how this system happens.

The bypass doesnt work because the ping has to be responded to with the instructions in the encrypted message that the server sent the client which can only be retrieved by decrypting the message the server sent

I completely understand. So here’s the algorithm you are using if I understand correctly.

Server(String Value randomize the value to a random number let’s say it’s 5) -----> Client(Now my string value the value is 5)

Client(Now I must pass this string value with value 5 back to the server because if I fail to respond to the server without the instructions I will get kicked) ----> Server(Success! The client’s string value is 5 and if it wasn’t changing to the exact number the server generated, the client would have been kicked)

Correct me if I’m wrong

Yes that is what happens except all the responses are encrypted so for the client to retrieve the instructions from the server it must first decrypt the message that the server sent them to retrieve the unencrypted instructions

it then encrypts those same instructions with a different encryption key and sends it back to the server the server then unencrypts that messsage and checks if the instructions are the same ones that the server originally sent them and if they arent it kicks the client

(And to clear up any future confusion these messages are sent using remote events which would usually be unsecure but with encryption the messages they send to eachother are now secure as the messages are encrypted)

1 Like

Does this remote event you are using have a cooldown? A cooldown would be essential here because the exploiter could obviously just guess the code within the minimum and maximum range of your randomizer. (might seem like a common sense question but really it makes sense to ask because it wasn’t made known yet)

im going to provide the randomizer i use to generate the what i call “prompts” the prompts that the client got from the server and decrypted that they then encrypt and send back to the server

local SecureSentenceModule = {}

local words = {
	"alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa",
	"lambda", "mu", "nu", "xi", "omicron", "pi", "rho", "sigma", "tau", "upsilon",
	"phi", "chi", "psi", "omega", "zenith", "quasar", "neutron", "galaxy", "binary",
	"quark", "vector", "matrix", "lambda", "omega", "quantum", "flux", "nucleus", "cosmos",
	"void", "stellar", "nebula", "particle", "helium", "argon", "neon", "photon", "plasma",
	"electron", "proton", "neutron", "fusion", "gravity", "blackhole", "singularity", "event",
	"horizon", "celestial", "supernova", "darkmatter", "antimatter", "subatomic", "frequency",
	"velocity", "entropy", "dimension", "parallel", "photon", "alphaWave", "gammaRay", "betaDecay",
	"ion", "oscillation", "muon", "meson", "boson", "tachyon", "lepton", "gluon", "atom", "molecule",
	"crystal", "spatial", "energy", "velocity", "momentum", "galactic", "vortex", "interstellar"
}


local function randomizeCapitalization(word)
	local randomizedWord = ""
	for i = 1, #word do
		if math.random() > 0.5 then
			randomizedWord = randomizedWord .. string.upper(word:sub(i, i))
		else
			randomizedWord = randomizedWord .. word:sub(i, i)
		end
	end
	return randomizedWord
end


function SecureSentenceModule.generateSecureSentence()
	local sentenceLength = math.random(12, 16) 
	local selectedWords = {}
	local sentence = ""

	for i = 1, sentenceLength do
		local word
		repeat
			word = words[math.random(#words)]
		until not selectedWords[word] 

		selectedWords[word] = true

		
		if math.random() > 0.7 then
			word = randomizeCapitalization(word)
		end
		if math.random() > 0.5 then
			word = word .. tostring(math.random(0, 9))
		end
		if math.random() > 0.5 then
			word = tostring(math.random(0, 9)) .. word
		end
		if math.random() > 0.5 then
			word = word .. string.char(math.random(33, 47)) 
		end

		sentence = sentence .. word .. " "
	end

	return sentence:sub(1, -2) 
end

return SecureSentenceModule

Note: I’m really sorry it took like this long and this many responses to explain to everybody how it worked its just really complicated explaining how this process is because of how many moving parts are involved in it

1 Like

I don’t trust ChatGPT for everything here but based on the response I got I’d have to say you are out of luck my friend(Lua.rh and other heavily trusted obfuscators do work but otherwise this would have been true). This is not secure unless there’s other hidden checks that are extremely difficult for exploiters to discover on their own. The reason is because the system you are using matches what I described… it falls into 4 different vulnerabilities. If you can work to secure it from all of these vulnerabilities than perhaps you should seek employment in this field because it seems you are very passionate for it and I think you would be very good at it. Your script is incredibly smart but it is definitely bypassable.

  1. Memory Editing: An exploiter could use tools to read and modify the game’s memory, changing the value stored for the string before sending it back to the server.

  2. Code Injection: By injecting custom scripts into the game, an exploiter could automate the response to always match the server’s expected value.

  3. Network Manipulation: They could intercept and modify the data being sent between the client and server, changing the response to whatever value they choose.

  4. Automation Scripts: Exploiters might create scripts that listen for the server’s random value and automatically send back the correct response without user intervention.

I hope this helps! Sorry for the bad news but unfortunately it is a part of life and if security were easy… everyone would be doing it.

1 Like

The best way to go about what I just said is to either try and do what is impossible to most people and continue gaining more knowledge into the field of security or you can always take the server sided approach / trickster approach and apply things to the client that aren’t easily readable and make it super difficult for an exploiter to figure out(the less info that can be logged by them the better because remote event loggers just make it too darn easy for them to figure out)

1 Like

I appreciate your feedback the reason i posted it on there is so that people could tell me about vulnerabilities i did not know about.

But number 4 would not happen because as i said the random value that its sending is encrypted before its sent to retrieve the random value the message containing the random value must first be decrypted

this answer also makes number 2 wrong as the exploiters would be unable to retrieve the expected value without first decrypting the message that has the expected value

but in complete honesty i appreciate your feedback and will take more of a look into all of your stated points.

1 Like

I’ve personally used deobfuscation in the past and can definitely confirm it is possible and the more devs that use such a system the more deobfuscating will be learned until eventually it will be so popular that just like exploiting itself, would become unstoppable(the stuff I mentioned is still entirely immune to exploits which is why I would take my approach instead but that’s only my approach I don’t expect everyone else to follow it)

Yes that is true that is why i will be using Lua.rh its originally an obfuscator that every paid exploit uses and has proven to be reliable in the past so for any obfuscation i will be using the market standard in roblox which is lua.rh

1 Like

Perfect. That is exactly what you should do and this will be my last message because it concludes this conversation. Your approach with Lua.rh is a valid and secure way to anti cheat using a server to client to server model. My approach is also a viable option and would be the much easier route to take. I made a post not too long ago

Summary

[Solved] Creative Anti Cheat for Roblox games - #38 by 1O10010I10011

about how I would go about it and I have so many tricks up my sleeve. I would be happy to privately show you a place file where I demonstrate my knowledge of anti cheat. I would gladly do this for you because you are an asset to this community and you took much time out of your day to help the community understand exactly how to approach encryptioned based anti cheat.

1 Like