Bot Detection in C#

02/03/2023 20:02 Coded by Alfa#1
Hello guys, I would like to get your opinion. Can you give me a hint on how I can prevent a player from entering a bot?
PS: Can you give an example with C#?
02/03/2023 21:06 Devsome#2
Do you already have a try in C#? We can work on yours and help you with it. The best way to hire someone is to pay money in the Silkroad Trading section.
02/04/2023 21:11 Coded by Alfa#3
Thank you for your return.
Of course, I have my own files that I am working on, and I am developing them day by day, I am stuck because I do not have advanced knowledge. so i need some hint or example

[Only registered and activated users can see links. Click Here To Register...]

currently my current bot blocking method is old and can be overcome, i know there is a better and insurmountable way but i couldn't find any idea how to proceed
02/05/2023 07:36 JellyBitz#4
You'll have to analyze the client itself, from server side only wouldn't be an option actually secure.

You can start by taking the ip and port the client is connected. Then check if there is something unusual (like values are not the same public ip/port your server use) then it is actually using an altered connection aka proxy/vpn/bot.

You can take a quick look at what I've done in the past: [Only registered and activated users can see links. Click Here To Register...]

Such check can be done client or server side, however, at both options you'll have to consider to protect the client/dll code doing such process to avoid any bypass same like the HWID stuff where you'll have to make sure nobody is gonna be able to alter the code.
02/05/2023 20:52 qoaway#5
Quote:
Originally Posted by JellyBitz View Post
You'll have to analyze the client itself, from server side only wouldn't be an option actually secure.

You can start by taking the ip and port the client is connected. Then check if there is something unusual (like values are not the same public ip/port your server use) then it is actually using an altered connection aka proxy/vpn/bot.

You can take a quick look at what I've done in the past: [Only registered and activated users can see links. Click Here To Register...]

Such check can be done client or server side, however, at both options you'll have to consider to protect the client/dll code doing such process to avoid any bypass same like the HWID stuff where you'll have to make sure nobody is gonna be able to alter the code.
this method is better then anti bot, it also works as anti VPN / proxy method to prevent IP / PC limit spoofing. I was using this method (but calling ioctl not winapi) on f8filter.
02/06/2023 10:29 bimbum*#6
it can be simple as , knowing a little about networking, all our routers are considered to be class c ipv4 classification and some little are a.

so getting the gateway ip which client connected to and comparing it with the private possible ips in the class c you would prevent it super easily.

[Only registered and activated users can see links. Click Here To Register...]

most likely its 127.0.0.1 at most proxies/bots
02/08/2023 20:26 painmaker_#7
A prepared fancy code would be something like this.

Code:
if (connections.size() > 0)
        {
            // Read the first one only
            MIB_TCPROW_OWNER_PID* info = connections[0];

            // Address buffer
            in_addr IpAddr;
            char remoteAddr[128];   
            // Convert long to address
            IpAddr.S_un.S_addr = (u_long)info->dwRemoteAddr;
            strcpy_s(remoteAddr, sizeof(remoteAddr), inet_ntoa(IpAddr));
            result << remoteAddr << ":" << ntohs(info->dwRemotePort);
            std::string b = result.str();
            std::string token;
            std::getline(result, token, ':'); // extract the ip before : 
            if (acp_decode(token).compare(L"111.111.111.111") == 0)
            {
                g_pCGInterface->ShowMessage_Global(L"Normal Client");
            }
            else {
                g_pCGInterface->ShowMessage_Global(L"Logged in with bot");

            }
        }