Hey all
I wonder how do I encrypt files ?
I need it for secruity reasons for my server.
Ty,
Avi
Printable View
Hey all
I wonder how do I encrypt files ?
I need it for secruity reasons for my server.
Ty,
Avi
http://support.microsoft.com/kb/307877
good luck avi :D :thumbup:
Hey Avi
Here!
Good Luck..
http://www.strongbit.com/download_tr...h=81DF4FCAE3FE
What do you want to encrypt, and what security do you expect to gain by doing that?
he want his files to be encrypt wich means the weapons skins etc i dont think u can do that since upt items been stolen so trying to become elevated then them should be very hard
@bobsobol
I want to encrypt the game.exe and the server.exe and the secruity I expect to get : ppls will not be able to edit the client and so on.
Ppls can still get gm acess to my server even after i put checksum protection and IP. even if I don't put their IP in hotuk , they can still use GM acess . I don't know how they do it.
Okay... here's how encryption works.
You modify data, making it unreadable without a "key" (pass phrase or whatever). This key you keep to your self, any anyone else you want to be able to read that data. For those with the key, it is transparent, for those without, it is gobbledy goop.
So... for your data (game.exe, weapons an armours) to be useful to players (so they can play the game) if you encrypt that, you have to give them the key. Okay, now they have the key they can play... how do you now identify which of your players have servers of their own and may want to steal your resources? You don't want them to have the key right?
The answer is, you have to vet your players very carefully... meet them in person, or so on, and even then, they may take your client away, and then decide to set up a server... they have the key, they can do that.
Encryption is really useful on network streams, where the key is updated on the fly and synchronised between client and server, as in SSL. It's pretty good at securing data for a user on a shared system, so the user supplies a password to access their personal data... it is completely useless at securing data you want to make publicly available to a large number of people.
---EDIT---
Encrypt server.exe and that will achieve a very difficult server to maintain and higher hardware requirements from the server (poor performance) nothing else.
Encrypt game.exe, and you will cause compatibility issues for players, increase the resource requirements for them, and have given hackers the keys to decrypt the encryption... It's effective at stopping "skript kiddies", but not much more than that.
What you want, is to get some effective DEP protection, make sure you have Read Only access to the vast majority of your game.exe memory sections, and ensure you have CLSafeCode options enabled and working on your server. You can also add anti-debug code to the start of your executable to prevent people from running in a debugger and tracing the execution.
you have antihack software from what i know and if i edit ur client i get recconect main and and then dc..try edit your client and see
Correct Imri... but some people can "hack" GM-like skills into their client in memory, without altering it.
So you need to be sure that they are "gaining GM access" and not just using GM abilities without being logged in as a GM.
If they are hacking, this is what tools like PT Protector are for. Trouble is, you can't really stop people from doing it, only disallow people who do do it from accessing your server again after they have done it.
how you do that?"hack" GM-like skills into their client in memory how they do that more correctly i mean when u log with hotuk to another game you get dc..
if you know how they do that u will know how to stop it =]
1. How do I do DEP Protection ?Quote:
What you want, is to get some effective DEP protection, make sure you have Read Only access to the vast majority of your game.exe memory sections, and ensure you have CLSafeCode options enabled and working on your server. You can also add anti-debug code to the start of your executable to prevent people from running in a debugger and tracing the execution.
2. How do i put Read-Only access to the game.exe ?
3. ClSafeCode = *CL_Protect for example ?
4. How do I add anti-debug code to the game.exe ?
Here is the Security hotuk commands I use in server's hotuk :
Are there more to add to the secruity commands ?Code:*RECORD ITEM
*REC_ADMIN_CMD
*RECORD_JOBCHANGER
*CL_PROTECT
*DISCONNECT_ITEM_ERROR
*CLIENT_CHECK_FUNC
*SERVER_RECORD_MEM
*CHECK_PLAYFIELD
*SERVER_INVENTORY
*CHECK_POTION_COUNT 1000
*CLIENT_CHECK_PROCESS_TIME 30
*RECORD COPIED ITEM
*RECORD COPIED ITEM IN WAREHOUSE
*CONNECT_CLIENT_CODE
*DISCONNECT_CLIENT_BADCODE 1
Edit -
And about the Encrypt , I didn't mean programs that encrypt it with a key.
I meant programs like PECompact - http://www.bitsum.com/pecompact.php.
It doesn't use any keys. ir just make the data unreadable when you try hex it or ollydbg.
PECompact doesn't encrypt, it compresses, the decompression algorithm is built into it and therefore quite possible to reverse.
All executable "encrypters" encrypt with a key which is built into the executable... and therefore perfectly possible to reverse. You are giving hackers the thing they need to reverse your encryption with your encrypted executable. The only way to securely protect an executable is to request a key in a file, or password dialogue so that it cannot un-encrypt without that... then you mustn't give hackers the password, or file key... but your players can't use your game either unless you give them the password or key... therefore, it is just as effective to only let players who you KNOW are not hackers download you client in the first place, and not bother with encryption which will only confuse them and cause problems with their systems.
There are many companies who will spread FUD to sell executable encryptions. Search any RCE forum for Executable decryptors or "Unbreakable Exe Encryptors" and you will find the same answer. Their effectiveness is limited. They may slow a hacker down by a day or two, depending on how lame the hacker is, but they will NOT stop it. EVER.
It doesn't make it unreadable in Olly or Hex editor, provided you reverse the encryption before you look at it in Olly or Hex editor. That process is fairly simple, because the decryption algorithm is at the start of the program. In fact, if you can run it in Olly, wait till the D3D DC is created, and look at the state of the program and it's segments then... it looks pretty much how it did before you wasted a lot of time encrypting it. :wink:
The safe code for the encrypted client is the same as the one for the original client, because that is calculated in memory after decryption has taken place... so they can just decrypt it back to disk and hack away from there... if they can be bothered, as in memory hacks don't care what state the image on disk is anyway.
The useful part of some of these "crypters" and "packers" is when they include anti-debug routines... that makes it difficult to open the exe in Olly at all. Sadly, many use deliberately corrupted PE formats to make it hard for the executive in a debugger to load it, taking advantage of bugs in the Windows OS which mean it often loads corrupt PEs anyway, provided you only corrupt parts that are not used by the Win32 Executive Kernel... sadly, because the Executive Kernels in Win9x, NT5 and NT6 or 7 (Vista or Window 7) are now quite different, and have VERY different tolerances to corrupted PE headers. So you can find one that works, and it will break your compatibility with one or the other OS Kernel... not to mention people who may wish to run via Wine or on ReactOS Win32 Kernels.
Additionally, one of the most basic Heuristic scanning techniques used by all anti-virus routines is to check for encrypted executables. The best reason to encrypt an executable is because you are shipping spyware with your product that you would rather users didn't instantly realise was spyware... so most encrypters flag up on many popular AV scans, and then 20% of your players have their game.exe automatically deleted for them.
The correct way to implement anti-debug is to build a good debugger into the source of your application in the first place, which will override any attempt an external debugger may make to intercept interrupt 13. We don't have the source to PT so we can't do that, but there are tips on many RCE forums as to how you can update the EIP to point to a new code block that would implement a custom debugger that will override any external attempt.
IMHO, the attempt is futile. As Imri says, the best attempts at implementing this in PT are always foiled eventually. After all, anyone who has a server of their own, knows what clients should look like when they are not protected, and is used to reversing any code implemented.
The best existing system for protection of the server (not the client) is XTrap, and we all know that that can be hacked out of any client with just 1 byte replaced. If you automate that 1 byte replacement to happen after the safecode has been transmitted, you can then shut down XTrap from that point on, and continue loading your hacks into memory at will.
More useful CL_SafeCode functions in Server Hotuk:-@Imri: I will not elaborate on memory injection techniques used for hacking PT on these forums... either in private messages or in public. That would be a contravention of the rules of these forums, and is largely unnecessary.Code:*CONNECT_CLIENT_CODE
*DISCONNECT_CLIENT_BADCODE
*CLSAFE_CODE
*DISCONNECT_CLSAFE_CODE
Almost everyone here has some experience of a certain tool which will allow characters to fly, walk through walls, port to any field, become invisible, invincible, level up with a single key press, buy whatever they want without their gold decreasing, 1 hit kill, player kill even in Ric etc etc etc. And it will work on any server and any client.
There is NO real way to stop it... unless you insist that your players don't use MS Windows, (as process memory injections are an integral part of the way the Windows OS works, and it's not alone in that, but some OS do not allow it) or radically change what parts of the game are run on the client and what is run on the server. Which amounts to making a game more like WoW than PT, because PT is designed to check for level ups, damage taken and given, hits made, blocked, missed etc in the client, which is in the hackers hands, not the server, which is in your control. You can only get the server to log who does it, and add their IP to your firewall so they cannot return.
It is the same with all PT servers. Hacks can't be stopped, but hackers are banned. The turnaround between a hack attempt and a ban is the thing which server owners need to keep a close eye on.
all this software worth shit because they give logs.. the only way to hack pt i already told you lol and like you said no adv here how to hack a pt server and of course i am not a hacker or somthing..and avi u cant do your client only read able
Well, you can... provided it is run on a machine you are the administrator of.
If someone else is the administrator, for example, your players administer their own PC (heaven forbid) then they can set it read only, and set it to be readable and writeable.
And there in lies the problem... we want players to be able to use our files, but not hackers... but the hackers are smarter than the players, so anything we do to stop hackers will stop players first. :grr:
Decent modern MMOs have this in hand, and run all critical code on the server... where it can't be hacked. Older On-line RPGs like PT and Diablo didn't realise how damaging it would be to run such code on the client, and only saw how much bandwidth and processing power it would take to do it server side. :(:
Thank you bobsobol for all the information.
Some more questions:
1. What parameter I have to add to :
*CLSAFE_CODE
*DISCONNECT_CLSAFE_CODE
?
Because I tried to use them without any parameter and it made me DC every time I logged on server.
2. how to put DEP Protection
3. What firewall should I use on the Dedi Host ? (I used Comodo firewall and it made the server very unstable and rebooted it with no reason)
DEP is part of the OS, it defaults to on in 2003 Server, and off in XP... it isn't available on XP pre-SP2, and isn't supported by all CPUs in hardware, but can be implemented in software. Many KPT clients fail DEP testing anyway, especially the ones which use the KPTTrans section, as DEP requires that no section be declared Writeable, and Executable in the kernel, which is why a decent DEP implementation is good at stopping hacks.
Many linux kernels are built with DEP enforced. It is possible, theoretically, to build a Windows program which implements DEP in software, or hardware where available, regardless of the OS... but it would have to give way to the OS on systems above XP SP2 where DEP is handled via the kernel, and only kick in if the OS doesn't support DEP. The other option is to check the OS supports DEP, and disallow the program from running unless it is enabled.
In short, it's a heck of a lot of work, and it's implementation would be similar to anti-debug implementation.
I wouldn't like to recommend a firewall, as there are many many good options out there. However, I can tell you that running a firewall on your gateway, rather than on your server will interfere with your server executable less, and being able to control the firewall programatically from your server will help you stop hackers quicker than if you have to manually check logs and block IPs.
Running the firewall in a gateway often means in your router / switch box, though you can use a second server. Controlling it programatically often means accessing it via telnet / SSH / scripted web browser... catching hackers in the logs is the sort of thing that PT Protector does, but that disables user IDs, not IPs, so some adaptation would be required to do the job so thoroughly. I know DKs original idea was to re-write it as a proxy, then detected logs could be blocked in the proxy... DeleGate proxy supports a plug-in system for new protocols, so it may be possible to write an effective log alert IP block via that proxy.
Your description of CLSAFE_CODE is an example of it doing exactly what it is supposed to. It will disconnect anyone who connects with a client who's checksum does not match the one passed as it's parameter. The checksum of any client disconnected because it does not match is logged in the server logs. Take the code your OFFICIAL client uses (the one your good players have) and use that as the parameter for CLSAFE_CODE.
After that, any attempt to log in with a modified (or similar protocol compatible version correct) version of that client with cause a DC and server log entry.
Ty again for the information.
You told me what parameter to put in the CLSafe_Code , but what about the *DISCONNECT_CLSAFE_CODE, which parameter put in it ?
Also what's the defferent between *CLSafe_Code and *CONNECT_CLIENT_CODE ?
And may you explain me how to write an effective log alert IP block with DeleGate proxy ? or give me any guide ?
Ty,
Avi
This thread contains one of quantumfusions attempts to stop the remote server connection GM mode attack, ULTIMATEDEF. I have seen some crippled versions of this that he was trying to sell, and some versions that are old betas and have some vulnerabilities remaining.
I've managed to implement one form of this attack on my own server, and can partially block (catch) it... but UD does more, and I've not had time to research it's operations to understand just how it works.
I have no experience of writing a DeleGate plug-in, but suspect that DarkKnightH20's PTProtector could be re-written as one. You'd have to convert his VB source into a C / C++ program compiled against the API headers for DeleGate... I think it's quite well documented, but I've not looked in about 2 years when I used to use DeleGate a lot. I'm also sure that there will be many other possible solutions. Including writing a proxy in VB6 along with DKs' PT-Protector.
The CLSafe_Code thing I picked up from a guide hereabouts on protecting your server better than just by the version string... I'm hunting for that guide, since it seems not to have made it into the Tutorial section.
You can do that... basically what you have to do is inject .dll files into the client containing the specific code you wish to use (in this case the gm commands) and it bypasses the checksums as you haven't actually modified the hotuk, etc so you don't get disconnected from the server. In original pristonale (ept by suba) there is someone I know who was an ex BloodPT admin and has the .dll in his client which allows him to have gm functions.
The most popular hack, isn't actually GM commands... they are just hacks, but many (flying, porting to any map, walking through walls etc.) look very much like GM skillz. ;)
You don't issue GM commands with it, the abilities are all mapped to hot-keys. In most incarnations.
It is available as a source code project, and hackers adapt the source to match specific clients. Therefore, they can also adapt the interface (hot-keys, pop-up dialogues or what ever) to meet their own desires.
XTrap blocks many implementations of it, killing the game.exe task from the task list as soon as they are spotted, but a cleaver hacker can disable XTrap just prior to injection, and provided the game has already passed it's checksum authentication, it will carry on running.
Basically, it's harder to make this "hack" work if the client uses XTrap, but it's still only "skript kiddie" proofing.