• Welcome to Valhalla Legends Archive.
 

in an RTS game, with packets flying all the time...

Started by thetempest, December 06, 2003, 07:43 PM

Previous topic - Next topic

thetempest

ok, with SC, i'm trying to find the mineral update packet...i'm not sure where to start.

any help would be great, thanks

Arta

Find calls to send(). Isolate those that send game packets. Write a hook to log those packets, or display them ingame. Add functionality to that function that checks the memory address used to store the current amount of minerals, and compare that number to the data in outgoing packets. Record the unique identifiers of those packets. Experiment to eliminate false positives.

Adron

Alternatively, you might also want to just note that there isn't any mineral update packet :P

Arta


Adron

Well, I just figured that even though your post was very nice, and would've sent him out on a long chase, perhaps it'd be more constructive to just realize and move on.

thetempest

ok,

well if that is true, than please explaint this:

1) if i change my minerals via writeprocmem() sc IMEDIENTLY desyncs...so if there is no (mineral update) packet, then how does it know to desync imediently, instead of when i build buildings or spend the $$??

I mean no disresect, just curious

Thanks

Yoni

Having never taken a serious look at it, I don't know anything about how Starcraft netcode works, but I would guess that the synchronization is done by sending the other player(s) a checksum of your current "statistics" (which would include your minerals and gas...) every few twinklings, and the other players compare it with the checksum they think you should have, and desync you in case of forgery. When you spend your minerals, you send a message that says what you did, and the other players calculate how many minerals you spent and deduct that from what they think you have.

iago

I haven't looked at this since 1.09, but, at least in 1.09, minerals weren't checksummed, and I find it doubtful that they are now.  

But if you did something that you shouldn't be able to do, like buy an scv with 0 minerals, you would desync.  

And I think Yoni is right about the checksums.

Note that mineral hacks are impossible.  Don't worry yourself with trying.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Kp

Quote from: iago on December 10, 2003, 05:44 AM
Note that mineral hacks are impossible.  Don't worry yourself with trying.

Untrue!  They work just fine if everyone runs them. ;)
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

thetempest

lol  :D,

everyone thinks i'm trying to write a mineral hack...haha...

i know a hell alot better than thatone.  here is what i want to do:

i want to find the routine that compiles the "stats" packet you guys are reffering too...and send it to all the other players in the game using the SC algo that does this 0x190869...i think...but here is my catch....

i have the sendto() function hooked, and it scans outgoing packets for this update packet ID, and if it's there...i dont send using the SC sendto() i call my own and spoof a different players IP, therefore all players in game would get my minerals/gas but associate it with another person, and if they dont have MY stats, they would be droped for hacking...

make better since now?

iago

There's better ways to do that.

It would be difficult to do that,since you wouldn't have the right seq/ack (or Blizzard's equivolant)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


thetempest

#11
yes, your right, SC uses seq#'s...
but i dont see that as a problem because if the client recv's a packet with a bad seq#, wont it just drop the client that sent that packet...or at least caues some problem to desync them?  You're right, thats' a big hassle...

so you've got my attention, what's the easier method?  PM me if you want, i'd be quite intrested in listening to what you have to say

EDIT:

acually, now that i think about it.  there is a way to over come that problem...

hook recvfrom() and scan for the update packet id.  If found, goto offset in packet and change his resource # to someting different (experiment ither up or down) and then send that packet to everyone via the starcraft algo that sends to all players...

Kp

... but I don't approve of people randomly dropping others in game, so I won't say what to do (it's quite easy though, and much less trouble than the scheme you're proposing).
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

TheMinistered

#13
IIAC, I believe each starcraft instance keeps track of a linked list of unit structures.  The unit structure has a flag to signal if a scv is mining, building, has minerals ready to dump etc.  When the scv brings the minerals back to the cc their instance updates how many minerals you have.  Please correct me if I am wrong.

iago

Quote from: Kp on December 10, 2003, 06:30 PM
... but I don't approve of people randomly dropping others in game, so I won't say what to do (it's quite easy though, and much less trouble than the scheme you're proposing).

Agreed.  You're just going to have to figure it out :P
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*