Donate Now Goal amount for this month: 95 USD, Received: 20 USD (21%)

+ Reply to Thread
Results 1 to 12 of 12

  Click here to go to the first staff post in this thread.   Thread: [HELP]Packet Editing For BF2

  1. #1
    Join Date
    Jan 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    [HELP]Packet Editing For BF2

    hi guys i just want to know how you hook the bf2 sendto function and edit some packets.

  2. #2
    Join Date
    Jan 2007
    Posts
    481
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    58
    The library you are looking for is winsock.

  3. #3
    Join Date
    Dec 2006
    Posts
    171
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    46
    you could also hook the battlefield send to server routine above winsock. If you hook winsock don't use proxy hooking
    ziggy play

  4. #4
    Join Date
    Jan 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by depietro View Post
    you could also hook the battlefield send to server routine above winsock.
    how do you do that ?

  5. #5
    Join Date
    Dec 2005
    Posts
    1,293
    Thanks
    1
    Thanked 10 Times in 3 Posts
    Rep Power
    100
    Quote Originally Posted by Blade2k7 View Post
    how do you do that ?
    I guess he just out where BF2 calls send / sendto ( by using ollydbg and some brains ) and hooked the function

  6. #6
    Join Date
    Dec 2006
    Posts
    171
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    46
    Well I'll say this generally for most games (and BF2 does this too), the general path data takes from client to server is through the GameVM to a generalized command packager and dispatcher. IDA or olly should properly label sendto and you can just look for the call to that routine. Barring the initial setup and teardown of a game, all game data packets are sent inband through the same send routine. However, I've seen rcon commands and text messages sent OOB on some games. (Q3?)
    ziggy play

  7. #7
    Join Date
    Jan 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    how do u change the readed bytes that came of the hooked function i cant seem to find an solution to change an couple of bytes in the char thats been readed

  8. #8
    Join Date
    Jul 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    60
    i had posted a send/recv hook on another forum hope it helps http://www.gamehacking.com/forums/sh...ghlight=socket

  9. #9
    Join Date
    Jan 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Thanks,

    ok i understand that but if the char is read how do i change the caractert thats in the char an not at the beginning but in the middle of the char chus the sendto function sends differend chars to the server but an couple off bytes stays the same wich i want to edit and the rest leave like orriginal.

  10. #10
    Join Date
    Jul 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    60
    you mean change the value of a certain offset?

    example:

    Code:
    char packet[20] =
                                   "\x42\x10\x00\xBA\x0B\x0C\x00\x0E\x02\x2E\x00\x09\x01\x0A\x00\x00\x00\x00\x00";
                     packet[15] = 0xff;//example of what i wanted to change
    sendto(s,packet,19,0,sockaddr*,tolen);
    
    or 
    
    buf[15] = 0xff;///example of what i wanted to change of the original buffer
    sendto(s,buf,len,0,sockaddr*,tolen);

  11. #11
    Join Date
    Mar 2003
    Location
    Around
    Posts
    475
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    98
    \x42\x11\x00\x2B\x23\x(Player).....

    Opening doors on people was always fun in Rogue Spear.
    (%[2ci`m]) Tetsuo` should always be blamed
    (%[2ci`m]) its like einsteins 18th law or something

  12. #12
    Join Date
    Jul 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    60
    lol yeah

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. VAC:2 Packet analysis
    By wav in forum Valve Anti-Cheat
    Replies: 4
    Last Post: 01-28-2010, 04:55 PM
  2. Packet Sniffers
    By enGage in forum Valve Anti-Cheat
    Replies: 5
    Last Post: 12-23-2009, 08:08 PM
  3. RO packet send
    By payerot in forum Beginner
    Replies: 4
    Last Post: 06-10-2007, 05:35 AM
  4. Small packet class
    By 2ci- in forum Miscellaneous
    Replies: 4
    Last Post: 04-03-2006, 02:01 PM
  5. Packet Sending...
    By BaGGy in forum Tutorial Requests
    Replies: 1
    Last Post: 02-19-2004, 02:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts