What's new

C/C++ Test Drive Unlimited 2 Private Server

  • Thread starter xXBeefyDjXx
  • Start date
  • Views 16,064
Status
Not open for further replies.
xXBeefyDjXx

xXBeefyDjXx

Long time Sinner
Administrator
Hidden Devils
MotM 10th Anniversary Mr. Nice Guy
Messages
1,963
Solutions
6
Reaction score
721
Points
1,135
Sin$
-7
Edit:

This project spawned TDU World.
For those interested, you can visit https://tduworld.com for details and download.
 
Operating System
  1. Windows
Last edited:
Xolitude

Xolitude

Enthusiast
Messages
108
Reaction score
21
Points
95
Sin$
0
Depending on the game, debugging to create an emulator is/can be a relatively simple process. I did it for Minecraft for both an authentication server and an attempt to create a bot. You need to debug both sides, client>server and client<server. C>S will obviously show you what the server (if sent from a vanilla client) expects from the client. You may run into encryption issues as I did while attempting to create a WoW emulator. You'll either need to debug using IDA or do some general research on the game's specifications.

For example; Older versions of WoW use SRP-6 encryption which is very tricky to dabble in but also very secure, which is why they use it. Older versions of Minecraft, however, use plain-text for the most part so packets like their ping packet are very simple to dissect and take <5 minutes to re-create.

That being said, console applications are perfectly fine to use/debug packet data as you can view the bytes and their data easily with (usually) simple conversion. Emulation can be a very tricky thing, though. I'd recommend either doing research on the game or just start poking around as you've done. I've no experience with TDU 2, but if you already know what is being sent at least one way, you're off to a very good start.

In regards to the server being down while dissecting packet data, I'd recommend attempting to poke around in the client itself to see if you can find when and where the client returns recvd information.

One final thing to note; copy-pasting is not good enough if you do not understand what is going on behind that logic. I learnt everything I know (which is only about 1% of the entire "book" of programming so-to-speak) by going on ~10's of forums, images, stackoverflow (people over here are very friendly FYI), etc,. It can be an... o.k, dodgy start to any project, but will not help you in the long run whatsoever. I've learned this while developing games, the hard way.
 
xXBeefyDjXx

xXBeefyDjXx

Long time Sinner
Administrator
Hidden Devils
MotM 10th Anniversary Mr. Nice Guy
Messages
1,963
Solutions
6
Reaction score
721
Points
1,135
Sin$
-7
Depending on the game, debugging to create an emulator is/can be a relatively simple process. I did it for Minecraft for both an authentication server and an attempt to create a bot. You need to debug both sides, client>server and client<server. C>S will obviously show you what the server (if sent from a vanilla client) expects from the client. You may run into encryption issues as I did while attempting to create a WoW emulator. You'll either need to debug using IDA or do some general research on the game's specifications.

For example; Older versions of WoW use SRP-6 encryption which is very tricky to dabble in but also very secure, which is why they use it. Older versions of Minecraft, however, use plain-text for the most part so packets like their ping packet are very simple to dissect and take <5 minutes to re-create.

That being said, console applications are perfectly fine to use/debug packet data as you can view the bytes and their data easily with (usually) simple conversion. Emulation can be a very tricky thing, though. I'd recommend either doing research on the game or just start poking around as you've done. I've no experience with TDU 2, but if you already know what is being sent at least one way, you're off to a very good start.

In regards to the server being down while dissecting packet data, I'd recommend attempting to poke around in the client itself to see if you can find when and where the client returns recvd information.

One final thing to note; copy-pasting is not good enough if you do not understand what is going on behind that logic. I learnt everything I know (which is only about 1% of the entire "book" of programming so-to-speak) by going on ~10's of forums, images, stackoverflow (people over here are very friendly FYI), etc,. It can be an... o.k, dodgy start to any project, but will not help you in the long run whatsoever. I've learned this while developing games, the hard way.
Very good information.

From what I have sniffed out using Wireshark (Very good for sniffing packets without doing a ton of proxy work, and also good at dissecting packets) The game is using TCP to send ALL packets so it would need to be a TCP server, It sends the basic handshake using just pure unencrypted data till it sends the login details off, then I presume it is using SSL encryption to send off that data.

The servers came back online and I sniffed an absolute flood of data from after the initial handshake, Data I presume includes the Co ordinates of the player, what vehicle they are driving, and then data such as player statistics, players around you (Again, Co Ordinate packets) and friends list data. I have yet to go through the data to see what is what as it is all in unencrypted binary but I have not RE'd the game to see what it sends first, and what it retrieves. All I know is it sends a good 6-10 packets and receives a further 4 or so back from the server. there is no encryption on the packets themselves, as Wireshark can make out exactly what is in the packets, but because it doesn't know the game language, it just reads a bunch of characters jumbled up in binary form.
 
Xolitude

Xolitude

Enthusiast
Messages
108
Reaction score
21
Points
95
Sin$
0
The game is using TCP to send ALL packets so it would need to be a TCP server, It sends the basic handshake using just pure unencrypted data till it sends the login details off, then I presume it is using SSL encryption to send off that data.

TCP is typical for those types of packets. However, position packets and other things within the actual game when you're playing may be sent in UDP from what I've seen from other games so keep that in mind. You can build a UDP layer on top of a TCP server and vice-versa if this is the case but this is quite difficult to achieve, however, more reliable then having just TCP and/or UDP. As for data being encrypted with SSL, I don't know how common this is as I don't believe SSL encryption is very common for typical game><server communication but more so for web traffic. Anyone correct me if I'm wrong. Anyhow, you'll know if data is encrypted with SSL from Wireshark. For example; WoW uses their own encryption methods that Wireshark actually picks up on called, "WOW," rather than the usual TCP, UDP or SSL.

I have yet to go through the data to see what is what as it is all in unencrypted binary but I have not RE'd the game to see what it sends first, and what it retrieves. All I know is it sends a good 6-10 packets and receives a further 4 or so back from the server. there is no encryption on the packets themselves, as Wireshark can make out exactly what is in the packets, but because it doesn't know the game language, it just reads a bunch of characters jumbled up in binary form.

For the game to send data to your server, you'll have to change the Destination IP/Port to your own. I do not have much experience in this as I haven't gotten that far into emulation as of yet (i.e. using IDA to edit the games structure and functionality). WoW luckily uses a realmlist.wtf file so all you'd have to do is change the IP to yours and bam. Minecraft is Java which is easy enough to break into and modify, not to mention tools exist to decompile Minecraft. TDU2 may have a file that contains the IP but that's doubtful as the game is on steam. You'd have to edit the steam_api extension file I believe. Like I said, I have no experience with TDU2 (although I have played the first one on Xbox 360 and loved it <3). That said, I'll provide as much support as I can in terms of packet structures but once you get the general idea, they're easy enough to replicate.
 
xXBeefyDjXx

xXBeefyDjXx

Long time Sinner
Administrator
Hidden Devils
MotM 10th Anniversary Mr. Nice Guy
Messages
1,963
Solutions
6
Reaction score
721
Points
1,135
Sin$
-7
TCP is typical for those types of packets. However, position packets and other things within the actual game when you're playing may be sent in UDP from what I've seen from other games so keep that in mind. You can build a UDP layer on top of a TCP server and vice-versa if this is the case but this is quite difficult to achieve, however, more reliable then having just TCP and/or UDP. As for data being encrypted with SSL, I don't know how common this is as I don't believe SSL encryption is very common for typical game><server communication but more so for web traffic. Anyone correct me if I'm wrong. Anyhow, you'll know if data is encrypted with SSL from Wireshark. For example; WoW uses their own encryption methods that Wireshark actually picks up on called, "WOW," rather than the usual TCP, UDP or SSL.



For the game to send data to your server, you'll have to change the Destination IP/Port to your own. I do not have much experience in this as I haven't gotten that far into emulation as of yet (i.e. using IDA to edit the games structure and functionality). WoW luckily uses a realmlist.wtf file so all you'd have to do is change the IP to yours and bam. Minecraft is Java which is easy enough to break into and modify, not to mention tools exist to decompile Minecraft. TDU2 may have a file that contains the IP but that's doubtful as the game is on steam. You'd have to edit the steam_api extension file I believe. Like I said, I have no experience with TDU2 (although I have played the first one on Xbox 360 and loved it <3). That said, I'll provide as much support as I can in terms of packet structures but once you get the general idea, they're easy enough to replicate.
TDU2 does not rely on Steam at all. All it does is load the TDU2 Launcher made by atari and launches the activator if it detects the game is not activated.
You can use the Universal Launcher in replacement of the atari one and steam will still load the game as if it was untouched...

In terms of getting the game to connect to a custom server, its a case of redirecting the IP to your localhost or ip of the custom server within the HOSTS File of windows for now, until you get a working server then you can look into streamlining the DLLS (I believe thats where the config for this game is) so they point to your game instead.
 
Xolitude

Xolitude

Enthusiast
Messages
108
Reaction score
21
Points
95
Sin$
0
TDU2 does not rely on Steam at all. All it does is load the TDU2 Launcher made by atari and launches the activator if it detects the game is not activated.
You can use the Universal Launcher in replacement of the atari one and steam will still load the game as if it was untouched...

In terms of getting the game to connect to a custom server, its a case of redirecting the IP to your localhost or ip of the custom server within the HOSTS File of windows for now, until you get a working server then you can look into streamlining the DLLS (I believe thats where the config for this game is) so they point to your game instead.

Oop. I only figured since TDU2 was also on Steam that it relied on Steam servers as most online games on Steam are like that; most use Steams backend for networking. You should be able to make easy work of it if redirecting the IP is that easy at the moment. I'll do as much as I can in terms of packet data, if you have questions.
 
xXBeefyDjXx

xXBeefyDjXx

Long time Sinner
Administrator
Hidden Devils
MotM 10th Anniversary Mr. Nice Guy
Messages
1,963
Solutions
6
Reaction score
721
Points
1,135
Sin$
-7
Oop. I only figured since TDU2 was also on Steam that it relied on Steam servers as most online games on Steam are like that; most use Steams backend for networking. You should be able to make easy work of it if redirecting the IP is that easy at the moment. I'll do as much as I can in terms of packet data, if you have questions.
Yep, the game relies entirely on atari servers, making this easy peasy if you know what to do lmao
I just do not have the time to sit down and work on learning the code now
 
xXBeefyDjXx

xXBeefyDjXx

Long time Sinner
Administrator
Hidden Devils
MotM 10th Anniversary Mr. Nice Guy
Messages
1,963
Solutions
6
Reaction score
721
Points
1,135
Sin$
-7
I have updated the original post with the current scenario and what I have or have not done.

Anyone who can help, please get in touch!
 
Vegeta

Vegeta

宇宙のマスター
Super Moderators
VIP
MotM Trifecta Diamonds Are Forever
Messages
12,472
Solutions
2
Reaction score
11,444
Points
3,490
Sin$
0
I ****ing love this game, I hope you guys manage to do this because I would love to come back and play.
 
xXBeefyDjXx

xXBeefyDjXx

Long time Sinner
Administrator
Hidden Devils
MotM 10th Anniversary Mr. Nice Guy
Messages
1,963
Solutions
6
Reaction score
721
Points
1,135
Sin$
-7
I ****ing love this game, I hope you guys manage to do this because I would love to come back and play.
Glad to see someone else here sharing the love for the game.

When I feel a little more motivated I will strive to make this one man project come on in leaps and bounds. For now it's baby steps since it's just me trying on this project :smile:
 
P

PASAf

Newbie
Messages
1
Reaction score
0
Points
20
Sin$
7
So you know nothing and want to make something? You don't want to 'make', you just want to 'get'.
It's easier to hack buggy tdu2 website server and look if it has connection to game server to download server from there.

Look at your thread from side "I've installed VS and Wireshark, how to make server emu?" Seriously?
x64-dbg / IDA Pro / Ollydbg - that what you need to debug compiled exe's, not VS debugger.
And you will not see the source code, just ASM instructions, so you need to learn it. So start with "Introduction to Cracking with OllyDbg from Scratch" by Ricardo Narvaja. That is really basic minimum you need to understand of reverse third-party exe.
Of course you need to understand PE format, DLL import, know hexadecimal. It'll be useful to be good at programming (really good, I mean, you must be at level where you understand which high-level language construction translated in what asm instructions by compiler).
Win32APIOverride might be useful to easy determine from which functions game making call to send packets.

And there is no working TDU2 server at the moment, so nothing to debug in traffic for now.
 
Modder v7

Modder v7

Getting There
Messages
2,060
Reaction score
494
Points
220
Sin$
0
xXBeefyDjXx xXBeefyDjXx , this sounds like an interesting project. Given that I absolutely love this game too, and have dabbled in both programming and RE, why don't we discuss this more via PM?

I currently have a lot of free time these days and am looking for a "project" to practice more in this field.
 
xXBeefyDjXx

xXBeefyDjXx

Long time Sinner
Administrator
Hidden Devils
MotM 10th Anniversary Mr. Nice Guy
Messages
1,963
Solutions
6
Reaction score
721
Points
1,135
Sin$
-7
So you know nothing and want to make something? You don't want to 'make', you just want to 'get'.
It's easier to hack buggy tdu2 website server and look if it has connection to game server to download server from there.

Look at your thread from side "I've installed VS and Wireshark, how to make server emu?" Seriously?
x64-dbg / IDA Pro / Ollydbg - that what you need to debug compiled exe's, not VS debugger.
And you will not see the source code, just ASM instructions, so you need to learn it. So start with "Introduction to Cracking with OllyDbg from Scratch" by Ricardo Narvaja. That is really basic minimum you need to understand of reverse third-party exe.
Of course you need to understand PE format, DLL import, know hexadecimal. It'll be useful to be good at programming (really good, I mean, you must be at level where you understand which high-level language construction translated in what asm instructions by compiler).
Win32APIOverride might be useful to easy determine from which functions game making call to send packets.

And there is no working TDU2 server at the moment, so nothing to debug in traffic for now.
First, I'd like to say welcome to Se7ensins.
Second: I have dumps of the network traffic when the servers were up.
Third: At least I am trying and willing to learn.

xXBeefyDjXx xXBeefyDjXx , this sounds like an interesting project. Given that I absolutely love this game too, and have dabbled in both programming and RE, why don't we discuss this more via PM?

I currently have a lot of free time these days and am looking for a "project" to practice more in this field.
You've got 2 choices of projects my friend, drop me a PM and I will happily drop the details on both.
 
F

forcefaction

Newbie
Messages
1
Reaction score
0
Points
10
Sin$
0
I'd also like to help in this project. Pls let me know how I can contribute :biggrin:.
 
Anthony817

Anthony817

Newbie
Messages
6
Reaction score
1
Points
45
Sin$
7
I just want to say you have my support! I have thousands of hours put into playing both games on Xbox 360 and on PC. I would absolutely LOVE to see this game brought back online on PC! I am seriously starting to miss it greatly.

And what is this TDU2 Zone community that you speak of? Not seeing anything about it online with a quick Goggle search.
 
R

Rhoan

Newbie
Messages
1
Reaction score
0
Points
10
Sin$
0
BeefyDj this is not a bad idea. If the servers could be resurrected people would come back to the game.
 
Status
Not open for further replies.
Top Bottom
Login
Register