Reverse-engineering

Status
Not open for further replies.

oSpIkEo

Seniorius Lurkius
33
Hi, i just need to know this information for future or later reasons
i know companys do reverse programming and want to know how it works
for example:

Lets say i decompiled a game executable which checks my cd drive when i want to play the game.

how do people take those off?

I understand they decompile it but how do they understand the jump , do , etc functions?

i read tutorials an tutorials but non seem to explain good.

thanks

[Mod edit: changed "Curiousity Click me" to "Reverse-engineering" since we don't like vague titles. -MrMills]

[This message was edited by MrMills on April 29, 2002 at 13:43.]
 

earl

Well-known member
3,066
Agh... there really isn't any such beast as a decompiler, except perhaps for Java. And even then they are still lossy WRT much information that the execution environment doesn't need but a programmer does.

As far as faking an executable into thinking a CD was in the drive, I would guess that the process would look something like this.

Most likely, what the software would be doing is reading a specific region of the CDROM and comparing it to the known value, which is stored in the executable. This will involved at least three steps:
1- remembering and loading which drive is the CD ROM -- normally stored in a config file or a registry key
2- reading a location on the CDROM
3- comparing the value read w/ a known value

Knowing the 3 steps makes it easier to hopefully find where in the code this occurs. Personally, I'd see if the CD ROM location was stored in the registry then start searching the executable for uses of the registry functions. This ought to allow you to find the function doing the checking and make it always return OK.

This is fairly far from trivial, and, at least for me, it's easier to just buy the software. As for locating and understanding function calls, that will all depend on how the function is being called. Assuming windows is the platform, you have several ways
1- call to a dll or other library implicitly loaded by the COFF loader
2- call to a dll or other library via an explicit function pointer on a library explicitly loaded w/ LoadLibrary
3- COM call

Of the three, the last would be a giant PITA to hack, espcially if the developers were using ATL smart pointers instead of manually creating the lib w/ CoCreateInstance, et al.

-earl-
 

oSpIkEo

Seniorius Lurkius
33
thanks, what im wondering is if i need programming knowledge to do this?

i just some vb ( in the winsock and some other areas)

would you or anyone other there know a good tutorial on doing this?

but see if i changed the cdroms value i registry then maybe the game might work. but then other programs wont autorun and wont know where the cdrom is located

so , its best to play with its main executable.

i understand the information in the decompiled program but the thing is that i dont understand the jump and do and other stuff.
and how to find where and how its functioning

i played with ez dummies that i found on the net but i forgot what i tutorial it was so im lost.

anyone out there experienced?
 

YakDaGringo

Ars Tribunus Militum
1,739
This is a fairly involved process, would only involve a registry hack if the programmers were exceedingly stupid, and would require you to learn assembly language, which is a hop, skip, and a 13 hour plane trip from VB. I'd recommend you look online for CD hacks instead of attempting one yourself, at least until you get a more solid programming background.

Learn C++; you'll earn enough money to actually pay for your software.
 

oSpIkEo

Seniorius Lurkius
33
oh, i had the wrong word, i meant Disassemble not decompile. heh i always get these mixed up.

thanks , but if i were to disassemble a file why would i need c/c++ to understand its coding?

all i need is a hexeditor and a Discrambler, where hackman in download.com can be found to have all the functions.

This is what it looks like:

I was wondering how to understand it?

Here is the image of how it looks like:
http://www.geocities.com/justsarmen/disass.jpg

hah, this image works, i just can seem to make it work when i click on it. just copy it into your browser

[This message was edited by oSpIkEo on April 28, 2002 at 20:11.]
 

YakDaGringo

Ars Tribunus Militum
1,739
That is assembly language. If you could understand what was going on there, then you could find the instruction that compares the value on the CD to the value in the executable and replace it with an unconditional jump to the address past the check. This information cannot be gleaned from the information you've provided, nor is it a simple process for which I could supply you an algorithm.

Stop trying to figure this one out; while you could succeed through sheer willpower, your efforts will be better spent learning a legitimate programming language. That's why I suggested learning C/C++, because your approach to this just isn't going to be effective.
 

jbode

Ars Legatus Legionis
11,752
Subscriptor
If you don't already have a deep understanding of machine code and the details of the platform you're running on, you're wasting your time with this. Learn assembler, spend the next couple of years writing programs in assembler, and then maybe you'll have the skills necessary to do this.

IANAL, but I would think that attempting to reverse-engineer a copyrighted executable for the purposes of making it bypass a licensing feature may open you up to legal action. Don't most TOS agreements have some verbiage about reverse-engineering being a Bad Thing?
 

AlphaMeridian

Ars Legatus Legionis
17,136
Moderator
IANAL, but I would think that attempting to reverse-engineer a copyrighted executable for the purposes of making it bypass a licensing feature may open you up to legal action. Don't most TOS agreements have some verbiage about reverse-engineering being a Bad Thing?

Yeah. IIRC, you also have to 'not know' about the contents of the orignal device....the way I understood it was via the IBM process where they had to reverse engineer some component, so they put a bunch of EE's inside a clean room and said "You are not allowed to learn about IBM's product". "You will design a thing to do 'these' things."

So in effect, they produced a similar component, but didn't 'copy' IBM, or some such.

I would think that reverse engineering would be very hard to do in today's day and age, at least legally.

-Alpha
 

earl

Well-known member
3,066
Alpha, that's "clean room" engineering a similar product.

What this person wants to do is reverse engineer and modify his executable, which has been against the license of every piece of software I've seen for the last 10 years. That isn't criminal liability because that is only a license. However, IANAL but it would seem like this has a decent chance of violating the DMCA as well -- and that is a criminal offense.

-earl-
 

dereferenced

Ars Scholae Palatinae
706
First off, the ubiquitous admonition: IANAL.

That said,
You can put any thing you want in your license, even if it contradicts the law. That doesn't mean it's enforceable. You and I have the right to reverse engineer the products we purchase. It's a grand American tradition.

Of course now we have the DMCA that, for the first time, prohibits certain kinds of reverse engineering. We also have companies framing their software licenses as contracts, so that muddies the water a bit.
 

yakyakly

Ars Tribunus Militum
2,320
You need to learn to use softice, you need a damn good disassembler like IDA, and you must be able to read and write asm, including being able to follow along program structure and figure out where the data you're watching is headed (by using a combination of softice and IDA).

Modern applications tend to use very sophisticated protection techniques which would totally baffle a newbie cracker.

Kyle
 

magic_p

Ars Tribunus Angusticlavius
9,027
oSpIkEo, from the other threads you've started I would recommend just reading for a while. It's obvious to me you are striving to be a "1337 h4x0r" and don't have any real interest in computing, however I could be wrong. If you are truly interested in learning how computers work, disassembly, CD cracks and the like aren't what you should be looking at right now. First start with buying or downloading a legal version of a C++ compiler and IDE and then find a tutorial online and learn the language. (I believe Borland's Turbo C++ Compiler and IDE are free.)

Then you might move onto assembly language once you are far enough along with C++ to understand objects, linked lists, trees and sockets. With that knowledge and a lot of practice you might be able to figure out some of the stuff you want to do.

As a general rule this forum doesn't treat people well who are trying to hack anything or do anything illegal like downloading warez. Many people here are IT professionals in the industry and others are programmers who get paid to program the stuff you are trying to get around. I've been reading here for almost two years now and I still feel like I have a lot to learn even though I am getting my Bachelor of Science in Computer Information Systems next weekend.

I am not trying to stifle your drive to learn, I just think your focus is misguided. Arsware.org has a large number of programs forum members have written in their spare time. Take a look and strive to do the things the are doing; most of the programs there have real value and are useful to many.
 
Status
Not open for further replies.