BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Preventing a game cheating program

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc
View previous topic :: View next topic  
Author Message
Andrew Wilks
Guest





PostPosted: Fri Feb 11, 2005 3:02 pm    Post subject: Preventing a game cheating program Reply with quote




I'm looking for suggestions on how to prevent a hacker writing a game cheating
program.

You know the sort of thing, a program that you run before executing the game
which allows you to add number of lives, increase scores, prevent death etc.

I'm assuming the way they write these programs is run the game and monitor which
variables (or memory locations?) change when you lose a life for example and
then make their program continually write to these locations.

So presumably one way around this would be to somehow change the location of
these variables each time the game is run, making it impossible for a hacker to
know which memory locations to poke into.

Any ideas how to do this?


Back to top
Charles Appel
Guest





PostPosted: Fri Feb 11, 2005 3:32 pm    Post subject: Re: Preventing a game cheating program Reply with quote



"Andrew Wilks" <nomail (AT) nospam (DOT) net> wrote

Quote:

I'm looking for suggestions on how to prevent a hacker writing a game
cheating
program.

You know the sort of thing, a program that you run before executing the
game
which allows you to add number of lives, increase scores, prevent death
etc.

I'm assuming the way they write these programs is run the game and monitor
which
variables (or memory locations?) change when you lose a life for example
and
then make their program continually write to these locations.

So presumably one way around this would be to somehow change the location
of
these variables each time the game is run, making it impossible for a
hacker to
know which memory locations to poke into.

Any ideas how to do this?

First, realize ther isn't anything you can do to stop a skilled
and determined cracker. All you can do is make thing a bit more
difficult. Having said that:

A) You might try encrypting the data.
B) Store the information in multiple places and,
1) perform checks against the extra data at random
intervals.
2) use another copy of the data to perform checks
at timed intervals - say every week or so, but not
during the first week after installation.
3) perform an immediate check against a different set of
data. This may temporarily fool the cracker into
thinking he has found your protection.
C) Visiting some of the cracker web-sites and studying the
techniques they use. Some crackers tend to be rather
open about their methods.

There are doubtless many other methods available.

Or you could simply decide not to care whether the players are
cheating. (That's my preferred solution.)

--
Charles Appel
http://charlesappel.home.mindspring.com/
Home of Chuck's Poker Libraries for Delphi,
Chuck's Video Poker and Chuck's Toys



Back to top
Andrew Wilks
Guest





PostPosted: Fri Feb 11, 2005 4:28 pm    Post subject: Re: Preventing a game cheating program Reply with quote



On Fri, 11 Feb 2005 15:32:32 GMT, "Charles Appel" <charlesappel (AT) mindspring (DOT) com>
wrote:

Quote:
"Andrew Wilks" <nomail (AT) nospam (DOT) net> wrote in message
news:6uhp01t3m0mm1t83eapt4l5n0tg2j97h8o (AT) 4ax (DOT) com...

I'm looking for suggestions on how to prevent a hacker writing a game
cheating
program.

You know the sort of thing, a program that you run before executing the
game
which allows you to add number of lives, increase scores, prevent death
etc.

I'm assuming the way they write these programs is run the game and monitor
which
variables (or memory locations?) change when you lose a life for example
and
then make their program continually write to these locations.

So presumably one way around this would be to somehow change the location
of
these variables each time the game is run, making it impossible for a
hacker to
know which memory locations to poke into.

Any ideas how to do this?

First, realize ther isn't anything you can do to stop a skilled
and determined cracker. All you can do is make thing a bit more
difficult. Having said that:

A) You might try encrypting the data.
B) Store the information in multiple places and,
1) perform checks against the extra data at random
intervals.
2) use another copy of the data to perform checks
at timed intervals - say every week or so, but not
during the first week after installation.
3) perform an immediate check against a different set of
data. This may temporarily fool the cracker into
thinking he has found your protection.
C) Visiting some of the cracker web-sites and studying the
techniques they use. Some crackers tend to be rather
open about their methods.

There are doubtless many other methods available.

Or you could simply decide not to care whether the players are
cheating. (That's my preferred solution.)

Yes I know I can't stop a determined cracker.

I already make checks to my EXE and protect everything with encryption, but its
the memory resident attack I want to make difficult.

When the game is running a cracker makes a program to run alongside in the
background continuously updating the number of lives, scores etc. That's the
attack I want to make difficult.




Back to top
Bruce Roberts
Guest





PostPosted: Fri Feb 11, 2005 5:00 pm    Post subject: Re: Preventing a game cheating program Reply with quote


"Andrew Wilks" <nomail (AT) nospam (DOT) net> wrote


Quote:
When the game is running a cracker makes a program to run alongside in the
background continuously updating the number of lives, scores etc. That's
the
attack I want to make difficult.

I'm not sure how feasible this type of crack is under current Windows o/s.
AFAIK memory allocated to a process is only available to that process unless
a specific request for shared memory is made. You might want to check out
the Win SDK documentation. At the very least you should be able to use the
Win API to allocate and lock a memory segment for the variables that you
want to protect.



Back to top
Andrew Wilks
Guest





PostPosted: Fri Feb 11, 2005 5:29 pm    Post subject: Re: Preventing a game cheating program Reply with quote

On Fri, 11 Feb 2005 12:00:30 -0500, "Bruce Roberts" <ber (AT) bounceitattcanada (DOT) xnet>
wrote:

Quote:

"Andrew Wilks" <nomail (AT) nospam (DOT) net> wrote in message
news:b2np011i79afor4qegto0hcvr3jcr8m4qb (AT) 4ax (DOT) com...

When the game is running a cracker makes a program to run alongside in the
background continuously updating the number of lives, scores etc. That's
the
attack I want to make difficult.

I'm not sure how feasible this type of crack is under current Windows o/s.
AFAIK memory allocated to a process is only available to that process unless
a specific request for shared memory is made. You might want to check out
the Win SDK documentation. At the very least you should be able to use the
Win API to allocate and lock a memory segment for the variables that you
want to protect.

It's definitely possible because I've seen an example last year for a game I
downloaded. I'm damned if I can remember the game now.

I'll try and find it.

Back to top
KnK
Guest





PostPosted: Fri Feb 11, 2005 8:24 pm    Post subject: Re: Preventing a game cheating program Reply with quote

To test your game use cheat engine (is free), everyone with a minimal
knowledge can use it..


Back to top
Brian Clausing
Guest





PostPosted: Sat Feb 12, 2005 6:13 am    Post subject: Re: Preventing a game cheating program Reply with quote

Andrew Wilks wrote:
Quote:

I'm looking for suggestions on how to prevent a hacker writing a game cheating
program.

You know the sort of thing, a program that you run before executing the game
which allows you to add number of lives, increase scores, prevent death etc.

I'm assuming the way they write these programs is run the game and monitor which
variables (or memory locations?) change when you lose a life for example and
then make their program continually write to these locations.

So presumably one way around this would be to somehow change the location of
these variables each time the game is run, making it impossible for a hacker to
know which memory locations to poke into.

Any ideas how to do this?

You can encode the locations of the variables and encrypt the values of
the variables. If it's sufficient to vary the locations at start up,
allocating the variables on the heap (say, in dynmaic arrays), varying
the order of allocation, might work.

Dynamic scrambling is possible: store variables in an array and generate
indices to them using a pseudo-random number generator. At random
times, shuffle the indices around. Or you might represent all these
variables as properties and swap their locations in a large storage area
containing many dummy variables every time a value is read or written.
I shouldn't care to debug this. Of course, a determined meddler willing
to wade through the code can defeat any of this.

There are many ways to encrypt values, but simply avoiding obvious
representations might prevent casual rape. Let the property functions
exor the values with a mask randomly chosen at some time.

How are these alterations made? Is it with some kind of debugging
program? Treating this as a problem of data integrity, you might keep a
timely checksum, such as CRC, of the variables to detect unauthorized
changes.

Back to top
Andrew Willks
Guest





PostPosted: Sat Feb 12, 2005 9:30 am    Post subject: Re: Preventing a game cheating program Reply with quote

On Fri, 11 Feb 2005 20:24:30 GMT, "KnK" <freddy(box)@aliceposta.it> wrote:

Quote:
To test your game use cheat engine (is free), everyone with a minimal
knowledge can use it..


Thanks for that. I've just downloaded it and I'm experimenting!

Back to top
chuayongquan@hotmail.com
Guest





PostPosted: Mon Feb 14, 2005 8:02 am    Post subject: Re: Preventing a game cheating program Reply with quote

It is very hard. Even most commercial games have some sort of trainer.

Back to top
Martin Harvey (Demon acco
Guest





PostPosted: Tue Feb 15, 2005 10:17 pm    Post subject: Re: Preventing a game cheating program Reply with quote

On Fri, 11 Feb 2005 12:00:30 -0500, "Bruce Roberts"
<ber (AT) bounceitattcanada (DOT) xnet> wrote:

Quote:

"Andrew Wilks" <nomail (AT) nospam (DOT) net> wrote in message
news:b2np011i79afor4qegto0hcvr3jcr8m4qb (AT) 4ax (DOT) com...

When the game is running a cracker makes a program to run alongside in the
background continuously updating the number of lives, scores etc. That's
the
attack I want to make difficult.

I'm not sure how feasible this type of crack is under current Windows o/s.
AFAIK memory allocated to a process is only available to that process unless
a specific request for shared memory is made.

There's nothing to stop the cracker using the Debug API's to run his
program as a debugger, at which point, he has full access.

MH.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.