Need For Speed Zone

Need For Speed Zone Forum

 nfszone.com Forum IndexIndex   FAQFAQ   SearchSearch   RegisterRegister   RSSRSS   Log inLog in 

NFS Carbon over LAN possible? (Client/Server)
Goto page Previous  1, 2, 3, ... 9, 10, 11  Next
 
Post new topic   Reply to topic       nfszone.com Forum Index -> NFS Carbon
Author Message
covo2k




Joined: 19 Nov 2006
Posts: 9

PostPosted: Mon Nov 20, 2006 1:45 pm    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

Hey all.

Hamachi and NFS:C won't work because the game will always connect to EA:Nations server. I sniffed the packets. And this isn't the right way to play NFS:C.
I tried so many ways but Carbon connect always to the EA Nations server's.
Even when you remove the servers.cfg completely the game connect to EA Nations servers. So Hamachi won't work together with Carbon.

BUT.

I work still hard on the Client/Server Patch for Carbon and i hope i'll get it this week.

And it only works in this way :

We have a LAN-Network with 3 PC's for example.

You create the nfsc_server_0_0_1 on pc #1 and start the client also there and connect to the server.

You start the client-tool on pc #2 and on pc #3.

On PC #1 you start NFSC:Carbon open a game like canyon-race or something like else and wait for the other two pc's.

Now you start on PC #2 and on PC #3 NFSC and in the game you click on the "search for players".

Now he search in the network for open games. And there is just one open server so he will connect to the server on pc#1.

When i'm ready with the modification of the server-client-tool from nfsu it will possible run over hamachi.

The only problem is the ssl-certificate-system. but i'll try my best ^^

@edasx when i have a runnable version i'll tell you. and then you can host it here at this site ;D

so far coVo2k

btw: please excuse my english. i'm german ^^
Back to top
edasx
Site Admin



Joined: 16 Nov 2005
Posts: 65

PostPosted: Mon Nov 20, 2006 3:49 pm    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

Your English is good =). You are probably aware that you can add

Code:

192.168.1.1       nfs-pc.fesl.ea.com


to the windows/system32/drivers/etc/hosts file

that will redirect to some "dummy server" that will just throw away everything the game sends and responds with what the game requires.

i am almost sure you are aware of this, but in case you missed something =)
Back to top
Guest

84.163.125.x





PostPosted: Wed Nov 22, 2006 2:04 pm    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

make the pacth please^^
Back to top
guest
Guest
80.221.55.x





PostPosted: Wed Nov 22, 2006 7:14 pm    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

Any progress on the patch? This 1.3 is requiring online registration and all that so pure lan mode would really be great as fast as possible - even though it wouldn't be all fine and dandy.
Back to top
edasx
Site Admin



Joined: 16 Nov 2005
Posts: 65

PostPosted: Fri Nov 24, 2006 1:08 am    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

this may help - thanx to aruaru

carbon in window

http://www.nfszone.com/forum/viewtopic.php?p=3392#3392
Back to top
guest
Guest
80.221.55.x





PostPosted: Fri Nov 24, 2006 4:06 am    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

edasx: How is that supposed to help in a LAN game? I tried it, but all it did was crash the game in startup. I was able to see for a while carbon in a window.
Back to top
Guest

84.185.111.x





PostPosted: Fri Nov 24, 2006 4:25 pm    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

If it works it will help you to see debugprograms or such that analyse networktraffic while playing.
Back to top
XyA DeathKnight
Guest
66.175.203.x





PostPosted: Fri Nov 24, 2006 5:40 pm    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

Alright guys, if this is going to be possible, it's going to come from us as a result of collaborative efforts from this thread. EA has slighted us from LAN play in every single NFS game they have produced in the last like 4 or 5 years, and I don't know about you, but I'm mad enough to drive to EA and punch the guy that purposely left it out, AGAIN. Evil or Very Mad

So lets get this working and get it out to everyone to stick it to EA for their failure to recognize what the community wants. I think I can help a little bit, if, when we get the necessary file changes made, someone wanted to send them to me, I can create an .msi installer from a clean version of Windows XP for it.

PS. As a testament to the "EA screws up everything they touch" rule: For those of you who don't know, EA has the exclusive rights to create NFL football games; which is why they took the best football game ever, Madden '04 or '05 for the XBOX (I can't remember which) and seriously screwed it up, by removing over half the features it used to have, for the release of the 360, and STILL HAVE NOT FIXED IT to this day, because they just don't care. Man, they piss me off.
Back to top
edasx
Site Admin



Joined: 16 Nov 2005
Posts: 65

PostPosted: Sat Nov 25, 2006 2:43 am    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

guest wrote:
edasx: How is that supposed to help in a LAN game? I tried it, but all it did was crash the game in startup. I was able to see for a while carbon in a window.


it's just hack for the developers of the server so they can debug the client/server stuff easier.
Back to top
arushan
Guest
68.144.78.x





PostPosted: Sat Nov 25, 2006 6:54 am    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

1. Not sure if this would help anyone with Carbon, but for NFSU2/MW I used to launch a local LAN server on a dedicated machine using the following bit of code compiled as an .exe and placed into the game directory. I think the Carbon version also has a server.dll, so you could try it...

Code:

#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "windows.h"

typedef bool (*StartServer_t)(char* ServerName, int RegionID, int Zero1, int Zero2);
typedef void (*StopServer_t)();
typedef bool (*IsServerRunning_t)();

char ServerName[256];

StartServer_t StartServer;
StopServer_t StopServer;
IsServerRunning_t IsServerRunning;

int main(int argc, char** argv) {

   HMODULE hMod = LoadLibrary("server.dll");
   if (!hMod) {
      printf("Error: Could not find server.dll\n");
   } else {

      StartServer = (StartServer_t)GetProcAddress(hMod, "StartServer");
      StopServer = (StopServer_t)GetProcAddress(hMod, "StopServer");
      IsServerRunning = (IsServerRunning_t)GetProcAddress(hMod, "IsServerRunning");

      if (argc > 1)
         strncpy(ServerName, argv[1], 12);
      else
         strcpy(ServerName, "UNNAMED");

      printf("Checking status of server...");

      if (IsServerRunning()) {
         printf(" Online.\n");
      } else {
         printf(" Offline.\n");
         printf("Starting Server with name \"%s\"...\nPress enter to stop.\n", ServerName);
         StartServer(ServerName, 0x0, 0, 0);
         while(true) {
            if (!IsServerRunning()) {
               printf("Server was stopped.\n");
               break;
            }
            if ((GetAsyncKeyState(VK_RETURN) & 0x8000) != 0) {
               int lastChar = getchar();
               if (lastChar == 0xa) {
                  printf("Stopping server...\n");
                  StopServer();
                  break;
               }
            }
            Sleep(100);
         }   
      }
   }

   printf("Press any key to exit.\n");
   getchar();
}


2. From what I know about MW's system... the packets are encrypted. I would guess they are using a standard RSA scheme to acquire a RC4 key and then all subsequent packets are encrypted using the RC4, but I am not sure about this. You can not really capture packets if they use a RSA certificate system... because, you can't decrypt the data sent by the game, only the server can... Thus, you will never know the RC4 key.

However, you can "hook" into the game exe and capture the unencrypted packets before they are sent to the server and after they are received and decrypted. I haven't done this for Carbon, but for MW I did and captured some stuff. The following code should give an idea about how to go about doing this... but note that this is just sample code to work with the MW Mod Loader system.. you'd need to make major changes to it and write your own injector if you want to use it.

Code:

#include "mempatcher.h"
#include "stdio.h"
#include "string.h"
#include "windows.h"

FILE* file = NULL;

void DumpPacketIn(int cls, int cmd1, int cmd2, char* data) {
   char cmdbuffer[4];
   char command1[5];
   char command2[5];

   *(int*)cmdbuffer = cmd1;
   command1[0]=cmdbuffer[3];
   command1[1]=cmdbuffer[2];
   command1[2]=cmdbuffer[1];
   command1[3]=cmdbuffer[0];
   command1[4]=0;

   *(int*)cmdbuffer = cmd2;
   command2[0]=cmdbuffer[3];
   command2[1]=cmdbuffer[2];
   command2[2]=cmdbuffer[1];
   command2[3]=cmdbuffer[0];
   command2[4]=0;

   fprintf(file, "<-- IN 0x%x [%s (%s)]\n%s\n\n", cls, command1, command2, data);

}


void DumpPacketOut(int cls, int cmd1, int cmd2, char* data) {
   char cmdbuffer[4];
   char command1[5];
   char command2[5];

   *(int*)cmdbuffer = cmd1;
   command1[0]=cmdbuffer[3];
   command1[1]=cmdbuffer[2];
   command1[2]=cmdbuffer[1];
   command1[3]=cmdbuffer[0];
   command1[4]=0;

   *(int*)cmdbuffer = cmd2;
   command2[0]=cmdbuffer[3];
   command2[1]=cmdbuffer[2];
   command2[2]=cmdbuffer[1];
   command2[3]=cmdbuffer[0];
   command2[4]=0;

   fprintf(file, "--> OUT 0x%x [%s (%s)]\n%s\n\n", cls, command1, command2, data);
}


// 0x008521B0
void __declspec(naked) SendPacket_Jmp() {

   __asm {
      mov eax, [esp+0x10];
      push eax;
      mov eax, [esp+0x4+0xC];
      push eax;
      mov eax, [esp+0x8+0x8];
      push eax;
      mov eax, [esp+0xC+0x4];
      push eax;
      call DumpPacketOut;
      add esp, 0x10;

      push ebx;
      push esi;
      push edi;
      mov edi, [esp+0x10];
      push 0x008521B7;
      ret;
   }

}

int __declspec(naked) RecvPacket_Jmp(int cls, int* command1, int* command2, char** data) {

   __asm {
      push ebx;
      mov ebx, [esp+0x14];
      push 0x008522D5;
      ret;
   }

}

int RecvPacket_Intercept_Call(int cls, int* command1, int* command2, char** data) {

   int ret = RecvPacket_Jmp(cls, command1, command2, data);

   if (ret >= 0) {


      int cmd1 = 0;
      int cmd2 = 0;
      char* mydata = "";

      if (command1 != 0 && *command1 != -1) {
         cmd1 = *command1;
         if (command2 != 0) {
            if (*command2 == -1)
               cmd2 = 0x31313131;
            else
               cmd2 = *command2;
         }
         if (data != 0)
            mydata = *data;

         DumpPacketIn(cls, cmd1, cmd2, mydata);


      }

   }


   return ret;

}

int __declspec(naked) RecvPacket_Intercept() {

   __asm {
      jmp RecvPacket_Intercept_Call;
   }

}


// Exported Entries

int Supports() {
   return 0x0030 | 0x10000;
}

void DynamicLoad() {

   SYSTEMTIME time;

   GetSystemTime(&time);

   file = fopen("ADDONS\\DYNAMIC\\capture.txt", "wt");
   fprintf(file, "[ NFSMW Online Packet Capture ]\nCapture started on: %4d-%2d-%2d %2d:%2d\n\n",
      time.wYear, time.wMonth, time.wDay, time.wHour, time.wMinute);

   // Capture Stuff
   WriteJmp(0x008521B0, SendPacket_Jmp);
   WriteNop(0x008521B6, 1);
   WriteJmp(0x008522D0, RecvPacket_Intercept);
   
   // Redirect to Local Host stuff
   //WriteString(0x008F42C8, "PYTHON");
   //WriteInt32(0x008F42E8, 9900);

}

void DynamicUnload() {

   // Not needed, Heap is cleaned up for us already
   /*
   if (file)
      fclose(file);
   */
   
}


3. Some packet captures from MW using the above code... I edited some "private" info out.. but I'm sure you can guess what it is. Note that I also changed the object "addresses" into meaningful names such as "_lobby_" and "_msg_".

Initial connect sequence:
I think that the @tic and ?tic are the key negotiation system...

Code:

[ NFSMW Online Packet Capture ]
Capture started on: 2006- 8-10  3:49

--> OUT _lobby_ [@tic ()]
RC4+MD5-V2

--> OUT _lobby_ [@dir ()]
REGN=NA
CLST=194010
NETV=20
FROM=CA
LANG=EN
MID=$000abcdefaaa
PROD=nfs-pc-2006
VERS="pc/1.3-Nov 21 2005"
SLUS=SLUS_21351
SKU=14705
SDKVERS=3.9.3.0
BUILDDATE="Oct 19 2005"


<-- IN _lobby_ [@tic ()]
Dv_Y*UL؛щ\LDŽϵ UaG'O4o6gۚ5[ِNwÔ8

<-- IN _lobby_ [@dir ()]
ADDR=159.153.229.204   PORT=30922   SESS=1155066582   MASK=e12f8b9c64257ab979c7f4beb4b471ab

--> OUT _lobby_ [?tic ()]
ϵ UaG'O4o6gۚ5[ِNwÔ83?nr

--> OUT _lobby_ [addr ()]
ADDR=192.168.2.98
PORT=1496


--> OUT _lobby_ [skey ()]
SKEY=$5075626c6963204b6579


--> OUT _lobby_ [news ()]
NAME=7

<-- IN _lobby_ [~png ()]
REF=2006.8.10-3:50:01

--> OUT _lobby_ [~png ()]
REF=2006.8.10-3:50:01
TIME=47


<-- IN _lobby_ [skey ()]
SKEY=$e360d604069f4b844ffeaeedaaf6c2d1   DP=PC/NFS-2006/na   GFID=2370   PSID=PS-REG-NFS2006   PLATFORM=pc

<-- IN _lobby_ [news (new7)]
 XBOX_REMAP=10.40.0.0%20255.255.0.0%2045410000,159.153.224.0%20255.255.224.0%2045410000

BUDDY_SERVER=159.153.235.38
BUDDY_PORT=13505

PEERTIMEOUT=10000

NEWS_URL="http://easo.ea.com/easo/editorial/common/2006/news/news.jsp?lang=$LANG$&from=$FROM$&game=NFS&platform=pc"
TOS_URL= "http://easo.ea.com/easo/editorial/common/2006/tos/tos.jsp?style=view&lang=$LANG$&from=$FROM$&platform=pc"
TOSA_URL="http://easo.ea.com/easo/editorial/common/2006/tos/tos.jsp?style=view&lang=$LANG$&from=$FROM$&platform=pc"
TOSAC_URL="http://easo.ea.com/easo/editorial/common/2006/tos/tos.jsp?style=accept&lang=$LANG$&from=$FROM$&platform=pc"

CIRCUIT_TIER_POINTS=0,20,55,100,170,280,440,660,960,1400
SPRINT_TIER_POINTS=0,20,55,100,170,280,440,660,960,1400
DRIFT_TIER_POINTS=0,20,55,100,170,280,440,660,960,1400
DRAG_TIER_POINTS=0,100,275,500,850,1400,2200,3300,4800,7000
STREET_CROSS_TIER_POINTS=0,40,110,200,340,560,880,1320,1920,2800
URL_TIER_POINTS=0,40,110,200,340,560,880,1320,1920,2800



And then the login:

Code:

--> OUT _lobby_ [auth ()]
REGN=NA
CLST=194010
NETV=20
FROM=CA
LANG=EN
MID=$000abcdefaaa
PROD=nfs-pc-2006
VERS="pc/1.3-Nov 21 2005"
SLUS=SLUS_21351
SKU=14705
SDKVERS=3.9.3.0
BUILDDATE="Oct 19 2005"
NAME=xxxxxxxx
REGKEY=
MAC=$000abcdefaaa
PASS=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


<-- IN _lobby_ [auth ()]
SHARE=1   TOS=1   _LUID=$00000000233e736c   NAME=xxxxxxxx   PERSONAS=XXXxxxx   MAIL=xxxxxxxx@hotmail.com   BORN=xxxx0711   GEND=M   FROM=CA   LOC=enCA   SPAM=NN   LAST=2006.8.10-03:00:38   SINCE=2003.2.2-23:11:18   ADDR=xx.xxx.xxx.251

--> OUT _lobby_ [pers ()]
PERS=XXXxxxx
MAC=$000abcdefaaa
CDEV=


<-- IN _lobby_ [pers ()]
NAME=xxxxxxxx   PERS=XXXxxxx   LAST=2006.8.10-03:36:12   PLAST=2006.8.10-03:19:19   SINCE=2003.11.15-05:42:31   PSINCE=2003.11.15-05:42:31   LKEY=RNhfxAkVYpLcaw70CmaMFgAAKDw.   LOC=enCA   MA=$000abcdefaaa   A=xx.xxx.xxx.251   LA=192.168.2.98

--> OUT _lobby_ [sele ()]
MYGAME=1
STATS=5000
ASYNC=1
MESGS=1
ROOMS=1
USERSETS=1


<-- IN _lobby_ [+who ()]
I=9766   N=XXXxxxx   M=xxxxxxxx   F=U   A=xx.xxx.xxx.251   P=47   S=   G=0   AT=   CL=511   LV=1049601   MD=0   LA=192.168.2.98   HW=0   RP=0   MA=$000abcdefaaa   LO=enCA   X=   US=   C=



And the connection to the EA Messenger server:

Code:


--> OUT _msg_ [DISC ()]

--> OUT _msg_ [AUTH ()]
PROD=NFS-2006
VERS=0.1
PRES=30920
USER=/PC/NFS-2006
LKEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx

<-- IN _msg_ [AUTH ()]
TITL="Need for Speed Most Wanted"
USER=XXXxxxx@messaging.ea.com/pc/NFS-2006
TIID=0
ID=

--> OUT _msg_ [EPGT ()]
LRSC=PC
ID=4


--> OUT _msg_ [RGET ()]
LRSC=PC
LIST=B
PRES=Y
PEND=Y
ID=1


--> OUT _msg_ [RGET ()]
LRSC=PC
LIST=I
PRES=Y
PEND=Y
ID=2


--> OUT _msg_ [PSET ()]
SHOW=CHAT
STAT=EX%3d0%0a
PROD=E%3d0%0aS%3d%0aP%3d0%0aW%3d%0aV%3d0%0aR%3d0%0a


<-- IN _msg_ [EPGT ()]
ADDR=xxxxxxxx@hotmail.com
ENAB=F
ID=4

<-- IN _msg_ [RGET ()]
SIZE=0
ID=1



Hopefully some of this research in Most Wanted will help those who are interested in Carbon. I'm probably too busy to help out, but good luck guys!
Back to top
covo2k.
Guest
217.81.19.x





PostPosted: Sat Nov 25, 2006 10:22 am    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

Hey all

Sorry that i couldn't write something for the last time but i had to do much on my work.

But know i have a little bit time to go on.

The communication from the server to the client works already in a good way. But the big problem is that EA encrypted their data like arushan already
said. In Need for Speed Underground it was no problem to pick out the keywords there you have keywords like : addr, skey, ~png and so on to communicate and register the commands to the client but this won't work on Carbon. Another idea i have is that you capture the whole datapackets which EA send from their server to the client. And simulate it on my Server-Client patch because in wireshark you can make char_arrys which look out like this

Code:

char peer0_0[] = {

0x16, 0x03, 0x00, 0x00, 0x2f, 0x01, 0x00, 0x00,

0x2b, 0x03, 0x00, 0x53, 0x9f, 0x01, 0x76, 0xd9,

0xc2, 0xd0, 0x0d, 0xe7, 0xcd, 0x02, 0x2c, 0xd5,

0x2b, 0x1d, 0xa6, 0x92, 0x6d, 0x03, 0x7a, 0x77,

0x0a, 0xad, 0x73, 0x9a, 0xfa, 0x92, 0x2c, 0x5f,

0x32, 0x83, 0xc6, 0x00, 0x00, 0x04, 0x00, 0x05,

0x00, 0x04, 0x01, 0x00 };


In this chararrys stands all the information encrypted. Maybe it works in this way.

BUT big thanks to arushan with his information. Maybe it will work when you hack directly in the server.dll to encrypt the data their.

I'm developing my server-client patch and i try to modificate the idea from arushan to carbon. Maybe this is the final possible idea.

Also i hope some other guys developing on such tools. When there is one please tell me. I would give him my source-code and my state of all.

So that we are faster and bring out a tool quickly. Because we all waiting for a tool and want to play Carbon over LAN. ;D

I tell you when i have made a big advance.

So far coVo2k Wink[/code]
Back to top
covo2k




Joined: 19 Nov 2006
Posts: 9

PostPosted: Sat Nov 25, 2006 10:32 am    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

Oh schitt sorry. I forgot to login ^^ Silly Browser.

The post over here is from me Wink


I wanted to say big thanks to arushan for the windowmode this makes it very
comfortable to developing and debugging Carbon ;D

mfg coVo2k Wink
Back to top
edasx
Site Admin



Joined: 16 Nov 2005
Posts: 65

PostPosted: Sat Nov 25, 2006 10:56 am    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

thanx to all for your efforts. all i can do in this is bringing you guys together - i can imagine how hard it could be to reverse engineer this, but i am not much into IP stuff =( - Thanx again!
Back to top
Holmen
Guest
213.113.109.x





PostPosted: Sun Nov 26, 2006 12:34 am    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

I just have to say that I think you guys (or guy) do a wounderful thing! I'm looking forward to the patch Wink

Keep up the great work.

Sorry that I can't help with something.
Back to top
Teh Ek Ho
Guest
58.108.85.x





PostPosted: Sun Nov 26, 2006 11:22 am    Post subject: Re: NFS Carbon over LAN possible? (Client/Server) Reply with quote

Hey fellahs...n chicks?
anyways - i havnt had a great deal with making things to do stuff they werent designed to do, but i have done it before :p...if yous need any help with it, jump onto teamspeak server dragz0r.no-ip.org password "ms6" and look for/ask for Teh Ek Ho....
anyways...later
Back to top
Display posts from previous:   
Post new topic   Reply to topic       nfszone.com Forum Index -> NFS Carbon All times are GMT
Goto page Previous  1, 2, 3, ... 9, 10, 11  Next
Page 2 of 11

 

Powered by Skeletonz | Powered by phpBB | Privacy Policy