[debug, memory, asm] Getting The Feet Wet

All languages welcome !

Re: [debug, memory, asm] Getting The Feet Wet

Postby zoohnoes » Fri Apr 16, 2010 6:28 pm

Instead of modifying the exe, modify the memory. Just a bit of an advice.
Unless ofcourse, you're making a "crack" of some sorts.
If you cheat and get banned, it's your fault. Not ours, not blizzard's.
It's you who breaks the rules.

kuntakinte wrote:Nice cd-key and account stealing method from naive user, good job !!! It't not only a bot its a thieving system too,this is super !!!
zoohnoes
Site Admin
Site Admin
 
Posts: 1806
Joined: Sun Sep 28, 2008 1:03 am
Karma: 243

Re: [debug, memory, asm] Getting The Feet Wet

Postby murder567 » Tue Apr 20, 2010 3:08 pm

Wow I actually feel so stupid for not realizing what I was doing wrong earlier. I wasn't able to read from the structs for (x,y) coords and so on because I was putting the pointer as an address and trying to read it :P

So in case anyone is watching this thread and actually wants to understand this I'll explain it.
Ok so you start with the base address of D2Client.dll, and find the offset for the struct you want to read (in this case Act)
Code: Select all
D2Client.dll = 0x6FAB0000
VARPTR(D2CLIENT, pAct, Act*, 0x11C3B8) //Updated 1.13c


Ok so you add the D2Client base with the Act offset to get the pointer value to the Act struct.
Add them together on Calc in the Hex format and you get 0x6FBCC3B8.
I'm using CE for all of this so I'll just explain what I did in it.
Then go to Add Address Manually and select the Pointer CheckBox (where I went wrong :P).
Enter 6FBCC3B8 as the pointer and then look to the Act struct.
Code: Select all
//1.13c - Act - McGod   
struct Act {
   DWORD _1[3];         //0x00
   DWORD dwMapSeed;      //0x0C
   Room1* pRoom1;         //0x10
   DWORD dwAct;         //0x14
   DWORD _2[12];         //0x18
   ActMisc* pMisc;         //0x48
};

If you want to find the act your in the put 14 as the offset and voila, it will give you the address (P->0456DEA) and show you the value.
(FYI for the Act you need to add 1 to the value it gives i.e. 0 = act 1, 1 = act 2 etc...)

Now say you want to read your coords? Then you put 10 as the offset instead of 14 and if points you to the Room1 struct.
In CE when you enter that you'll see something like P->01D3BAEF. That Hex number that is shown will change everytime you try this so you need to go through all of these steps everytime.
Now take that adress shown (in this case 01D3BAEF) and open the Add Address Manually window again. Select the pointer Checkbox and then refer to the Room1 struct.

Code: Select all
//1.13c - Room1 - McGod   
struct Room1 {
   Room1** pRoomsNear;    //0x00
   DWORD _1[3];         //0x04
   Room2* pRoom2;         //0x10
   DWORD _2[3];         //0x14
   CollMap* Coll;         //0x20
   DWORD dwRoomsNear;      //0x24
   DWORD _3[9];         //0x28
   DWORD dwPosX;         //0x4C
   DWORD dwPosY;         //0x50
   DWORD dwSizeX;         //0x54
   DWORD dwSizeY;         //0x58
   DWORD _4[6];         //0x5C
   UnitAny* pUnitFirst;   //0x74
   DWORD _5;            //0x78
   Room1* pRoomNext;      //0x7C
};


The dwPosX is the X coord that your looking for. So in the offset box enter 4C and it will give u the address and value for it. I hope that this is understandable to people and not just a rant lol. I'll keep this updated as I delve deeper in and start to do more hacking-type things.
Beta 3 Pickit Editor viewtopic.php?f=153&t=16898
Image
User avatar
murder567
 
Posts: 879
Joined: Sun Oct 12, 2008 2:37 pm
Location: Massachusetts, USA
Karma: 38

Re: [debug, memory, asm] Getting The Feet Wet

Postby CTS » Fri Apr 23, 2010 6:37 am

awesom man good job
makes sense : )
Image
You take and you learn, give and teach back.
For we will give and teach what we have taken and learned.
- CTS_AE -
User avatar
CTS
Global Moderator
Global Moderator
 
Posts: 2368
Joined: Sat Aug 02, 2008 8:25 am
Location: USA West Side! OR, Central
Karma: 99

Re: [debug, memory, asm] Getting The Feet Wet

Postby CTS » Thu Jul 15, 2010 5:12 am

Finished up on Section 1.4

I've had this tab open way to long on my browser, for about a week or two it seems like, because I told myself I wouldn't close it until I finished up that section ;)

I guess section 1.5 would be multi pointers/structs
maybe have a diagram for it showing how the data is laid out

Then after that I guess it would be section 2.0 showing some examples in C#

Then 3.0 would be triggering functions if I knew how to, but I'll figure it out when I get there...

It took me this long to update section 1.4, so who knows how much longer if I'll ever even get to 2.0/3.0
Image
You take and you learn, give and teach back.
For we will give and teach what we have taken and learned.
- CTS_AE -
User avatar
CTS
Global Moderator
Global Moderator
 
Posts: 2368
Joined: Sat Aug 02, 2008 8:25 am
Location: USA West Side! OR, Central
Karma: 99

Re: [debug, memory, asm] Getting The Feet Wet

Postby polite » Thu Jul 15, 2010 10:28 pm

Stop talking and start working. You need to put that topic nr 1 thing in your life if you ever want teach ppl like me (in other words pointers and structs must be noob friendly). And don't forget to make pointer/struct find tutorial more noob idiot friendly.
Genius over there is trying to call the telephone repairman because the phones don't work.
If I helped you feel free to increase my karma.
Image
User avatar
polite
 
Posts: 997
Joined: Thu Aug 14, 2008 9:17 am
Location: Estonia
Karma: 65

Re: [debug, memory, asm] Getting The Feet Wet

Postby murder567 » Tue Aug 31, 2010 5:14 pm

I've gotten a lot farther with this and when I get some free time within the next few days hopefully I'll post up some more walkthroughs and examples in memory. Hopefully I'll be able to show examples for calling functions in memory too. (Using au3 w/o injecting a DLL)
Beta 3 Pickit Editor viewtopic.php?f=153&t=16898
Image
User avatar
murder567
 
Posts: 879
Joined: Sun Oct 12, 2008 2:37 pm
Location: Massachusetts, USA
Karma: 38

Previous

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest