PDA

View Full Version : VB helping module for writeing cave with single-command



mcMike
13th November 2004, 16:36
Greetings,

Payback time again. You get something from others - you give something back.

I wrote few functions with VB to make writing caves much easier. You can now just bypass all the boring stuff and consentrate for hacking itself.

This is not a trainer template. It's just a few functions which make it possible to write code(cave) like this:

PokeCave(ReadCodeCave("MyCave"))

That's it. Nothing more needed.
The actual code is in settings.ini which is directly pasted from Olly without any formatting. Example:

[cave-MyCave]
ln01=008C2B20 A3 40382C02 MOV DWORD PTR DS:[22C4440],EAX ; copy EAX to static DMA
ln02=008C2B25 ^8B0D AC1E9700 MOV ECX,DWORD PTR DS:[971EAC] ; recreate line that we overwrote for jumpgate
ln03=008C2B2B E9 F6A2DEFF JMP BF1942.006ACE26 ; jump back to one line after from where we jumped here

Actually the code looks nicer in notepad since MPC reformats (removes extra spaces) it.

Just copy and paste lines directly from Olly.(paint lines -> Copy->clipboard) add lnxx in the front of everyline to identicate the linenumber.

Only address in first line is used. All the code is written quickly in a single block with WriteProcessMemory().
There needs to be atleast 2 spaces between address and bytecode AND between bytecode and disassembled code which bydefault are in place from Olly's copy and paste. Example:

008C2B20 <2 spaces > A3 40382C02 <2 spaces > MOV DWORD PTR DS:[22C3840],EAX

Included .bas -module and .ini-file for example. No project included so you need to do something yourself also.

EDIT: I forgot one of the most important things. If you use this method where all injected code is in external ini-file you build your trainer once and compile it. If you need to change to codecave-code, location, jumpgate, etc. anything in the injected code you just change them in ini-file - no need to recompile anything!
Example. PB scanrange widens. Locate the new jumpgate, change in the ini and your hack is up and running without anything else. You don't ectually even have to restart your hack.
That feature can also be used for debugging and testing quickly.

-mcMike

Spontaneous
13th November 2004, 16:49
Not bad, not bad at all. It makes it mildly easier. Still have to have a format of having spaces and you kinda gotta copy the stuff to the ini file with proper ln# for each line but still does save some time for some people out there. Tho I think if people used a parser type system like chaotik released and heck, he even released a program that auto does the pokes for you, you can do your pokes a bit easier, but about the same time.

Overall nice release. File approved

mcMike
13th November 2004, 17:01
Not bad, not bad at all. It makes it mildly easier. Still have to have a format of having spaces and you kinda gotta copy the stuff to the ini file with proper ln# for each line but still does save some time for some people out there. Tho I think if people used a parser type system like chaotik released and heck, he even released a program that auto does the pokes for you, you can do your pokes a bit easier, but about the same time.

Overall nice release. File approved

Thanks.
But to be more clear. No. You don't have to format anything. Just copy and paste. It doesn't matter if there are spaces between opcodes or not.
Also it helps you to keep your assy-code better shape since you have the addresses, opcodes, disassy and comments in same line.

But yes. You need to add ln## in the front of lines which takes about 2 seconds :)


-mcMike

Spontaneous
13th November 2004, 17:07
Just wondering but have you checked out chaotiks parser and program? With the parser, all your opcodes, address, commented out asm code to show you whats being poked is all on 1 line. Tho his way does more then 1 WriteProcessMemory, but it is possible to just put all the OPcodes into 1 write to do 1 WriteProcessMemory. Check in the bfvietnam forums once and check it out. Like I said, your release is just as good as his.

mcMike
13th November 2004, 17:27
Just wondering but have you checked out chaotiks parser and program? With the parser, all your opcodes, address, commented out asm code to show you whats being poked is all on 1 line. Tho his way does more then 1 WriteProcessMemory, but it is possible to just put all the OPcodes into 1 write to do 1 WriteProcessMemory. Check in the bfvietnam forums once and check it out. Like I said, your release is just as good as his.

I saw some refs to it somewhere. Gotta take a look of it later.

btw, Is there any change to change my username? fooops->mcMike
I could't do it even with registering since e-mail would be same.

-mcMike

Spontaneous
13th November 2004, 17:33
Well we dont like changing names for people but you would have to contact an admin as mods can not do that. Since 1 more post and you can use the PM system, I would PM hebe and ask(ask nicely cause as I said, we normally dont change peoples usernames), http://www.mpcforum.com/private.php?do=newpm&u=112

mcMike
13th November 2004, 19:44
Well we dont like changing names for people but you would have to contact an admin as mods can not do that. Since 1 more post and you can use the PM system, I would PM hebe and ask(ask nicely cause as I said, we normally dont change peoples usernames), http://www.mpcforum.com/private.php?do=newpm&u=112

Thanks. Request sent.

btw, I edit the original message of this thread. There were one important thing I forgot to mention.