Open Source Xbox Live?

Discussion in 'Xbox (Original console)' started by AlexRMC92, Feb 19, 2013.

Tags:
  1. AlexRMC92

    AlexRMC92 Site Supporter 2013

    Joined:
    Feb 12, 2013
    Messages:
    336
    Likes Received:
    25
    This is really more speculation than anything, mostly because i have no experience in how xbox live works. Does anyone think i would be possible to build an open source xbox live server? This has been done for other online games that no longer have servers.

    I'm guessing all xbox live connection info is stored in the XBE itself and offered as a library in the XDK. The first place i can think of looking for information is by taking apart the XDK libraries.
     
    Xbox Loyalists likes this.
  2. kl0wn

    kl0wn <B>Site Supporter 2013</B><BR><B>Site Benefactor</

    Joined:
    Aug 31, 2006
    Messages:
    237
    Likes Received:
    8
    IIRC there was someone who was working on this years ago, I can't find the website anymore...I don't think it got anywhere though. I looked into it for about 5 minutes then decided I didn't want to deal with encrypted packets :p

    If I can find the site of the people working on it I'll link it here. I think it was a blog.
     
  3. AlexRMC92

    AlexRMC92 Site Supporter 2013

    Joined:
    Feb 12, 2013
    Messages:
    336
    Likes Received:
    25
    I'm thinking the XDK libraries will contain what information the xbox expects to see and what it sends out. Taking them apart will be a big challenge. you can't really sniff encrypted packets because live no longer exists for the xbox1. Although you could sniff the first packets the xbox sends out then figure out the rest sequentially.
     
    Xbox Loyalists likes this.
  4. kl0wn

    kl0wn <B>Site Supporter 2013</B><BR><B>Site Benefactor</

    Joined:
    Aug 31, 2006
    Messages:
    237
    Likes Received:
    8
    When I wanted to attempt this (for the 5 minutes I wanted to attempt this) I bridged a connection through my pc and did like you said, sniffed the first packets. I was hoping to be able fake some sort of authentication but I did not get anywhere near there. Maybe I'll return to this project, but I'm not sure the libraries alone will be enough. I'm sure someone can share more knowledge on this
     
    Xbox Loyalists likes this.
  5. AlexRMC92

    AlexRMC92 Site Supporter 2013

    Joined:
    Feb 12, 2013
    Messages:
    336
    Likes Received:
    25
    So here's some information i've found out. Xbox live uses kerberos authentication, but it skips the first half of standard kerberos. Normally the kerberos server will grant the client a ticket, but the xbox skips this. Xbox live games must either already have a ticket, or they generate a ticket themselves. I would doubt Microsoft would use a static ticket system, i would imagine the tickets are generated by hashing some other hardware values / software (bios, dashboard, fan voltages, etc). This is most likely how live would detect if you have a modded xbox, the hashes wouldn't match exactly and xbox live would ban your console id.

    Still doing research though.
     
    Xbox Loyalists likes this.
  6. gs37

    gs37 Robust Member

    Joined:
    May 22, 2012
    Messages:
    272
    Likes Received:
    3
    I admire you for truly attempting what I've merely pondered. I'm sure your Xbox Live wouldn't be as concerned with banning or billing people as the original Xbox Live was. To that end, you can skip the authentication stuff and use static tickets.
    I suppose there are just 2 main things to accomplish. Firstly, redirect the connection(s) from where they were designed to go to where you want them to go. Secondly, correctly reply to all requests and/or spoof MS data.
    The second part should be much harder than the first.
     
    Xbox Loyalists likes this.
  7. piratebox

    piratebox Spirited Member

    Joined:
    Mar 31, 2011
    Messages:
    134
    Likes Received:
    16
    I never got why they dont release the sdks for old systems and the information on them, i mean what is it going to hurt? i payed for something i should own..
     
    Anthony817 likes this.
  8. JayFoxRox

    JayFoxRox Spirited Member

    Joined:
    Dec 23, 2010
    Messages:
    176
    Likes Received:
    8
    Because the Xbox is not "old". Microsoft is still using the platform by releasing old games for Xbox 360. Its also possible that Microsoft will keep backwards compatibility in their next-gen console OR that they release an original xbox compatible handheld at some point.
    Releasing an XDK would probably be very expensive to them because of the work involved in polishing and releasing it.

    About Xbox Live:

    The xbox live API is documented in the leaked XDKs and there is also sample code to use it. Normally the windows network stack uses IPsec/ESP though. That means your server would have to use it too or the tunnel would have to decrypt the packages.
    I know that there are quite a few (non-ms) people around that know a lot about the xbox live software but unfortunaly they won't be able to speak freely.

    As far as I remember, some games needed its own Xbox Live Game-Server though because they were using dedicated servers and not games started by others.
    Those servers would then be hosted by Microsoft after the TCR were completed.
    That would mean that you would also have to individually add support for (some) games which would be nearly impossible.

    However, creating a simple Xbox Live Server which makes it possible for an Xbox to login (Let alone billing / playing) should be feasible for an experienced developer with lots of time.
     
    Xbox Loyalists likes this.
  9. AlexRMC92

    AlexRMC92 Site Supporter 2013

    Joined:
    Feb 12, 2013
    Messages:
    336
    Likes Received:
    25
    The first part is easy using a DNS and NAT server, you could probably implement dhcp as well if we use different subnets. MS rarely does anything proprietary. A lot of the xbox is based on win2k. Figuring out these (most likely modified) protocols shouldn't be too hard once the encryption is broken.

    I'm waiting on a DVT-4 kit to come in. It should help a lot trying to trace how the xbox generates keys. Your saying that xbox live uses a vpn?
     
    Xbox Loyalists likes this.
  10. AlexRMC92

    AlexRMC92 Site Supporter 2013

    Joined:
    Feb 12, 2013
    Messages:
    336
    Likes Received:
    25
    Heres some more information. The entire online connection system in contained in the XDK. All a game engine would do is pass the user id (after pulling from the hard disk or memory unit) and some other small information to a precompiled library. This library is Xoline.lib. Im working on disassembling it now, i want to find where this lib gets loaded into memory. I may write an application that only connects to xbox live. This way i can start playing with memory values and seeing how they affect the packet output. I just need my dvt-4 to get here faster lol.


    UPDATE:

    Disassembling done! I'm not the most proficient in assembly and i don't want to post anything here because this is Microsoft copyrighted material. Out of the lib file came a ton of .obj files, this is to be expected. From what i can tell each step of the process is in it's own .obj container. I found what appears to be a breakdown of the connection attempts (you have to love IDA graph view). I'm going to keep looking into it.

    If anyone here has any experience in assembly and might be able to help shoot me a pm. I can get you what you need.
     
    Last edited: Feb 21, 2013
    Xbox Loyalists likes this.
  11. DiGi

    DiGi Robust Member

    Joined:
    Nov 26, 2009
    Messages:
    261
    Likes Received:
    0
    Very interested to see what comes of this, an open source xbox live would be pretty awesome, get some crimson skies or halo 2 going ;)
     
  12. PSPdemon

    PSPdemon Peppy Member

    Joined:
    Dec 9, 2007
    Messages:
    308
    Likes Received:
    4
    It'll be a long time before we see something...

    ....xlink kai
     
    Last edited: Feb 22, 2013
  13. AlexRMC92

    AlexRMC92 Site Supporter 2013

    Joined:
    Feb 12, 2013
    Messages:
    336
    Likes Received:
    25

    getting the xbox to authenticate, not too long. from what information i have. but getting games tow work is whole other animal.
     
  14. DiGi

    DiGi Robust Member

    Joined:
    Nov 26, 2009
    Messages:
    261
    Likes Received:
    0
    Xlink is great to a point but overall it's laggy and unfortunate when you can't find games near you or with low enough pings. Nothing against xlink or xbconnect it's just not the same.
     
  15. justice99

    justice99 Spirited Member

    Joined:
    Nov 18, 2011
    Messages:
    120
    Likes Received:
    11
    And you think that your open source server will be faster ?
    Or that millions gamers will join this server when they will know about this project ?

    Xlink Kai is good.
     
  16. AlexRMC92

    AlexRMC92 Site Supporter 2013

    Joined:
    Feb 12, 2013
    Messages:
    336
    Likes Received:
    25
    The server will be an xbox live replacement. It will allow the use a xbox gamer tags, all game related xbox live features, voice chat on all games, DLC content, etc... xlink is just a LAN tunnels for system link. There are a lot of features xlink kai cannot accomplish.

    Speed is not of much concern. Xbox live does not host games, it determines which players xbox live console has the best connection and marks them as the host.

    It's going to be a while before this is in any way ready for personal use. Anyways my DVT-4 will be here tomorrow. Im going to put together a simple app that only connect to live. Ill see what happens in memory and try to trace backwards through xonline.lib

    UPDATE: I knew the xbox eeprom was supposedly mostly windows2k, but i can't believe how similar they really are. This makes thing much easier.

    For example, the xbox uses a bone stock winsock library. I've been able to track down where xonline.lib is creating packets and expecting them back. I know i've said it a million times, but when the dvt-4 gets here i should be able so actually view these memory locations and trace back to every bit of assembly code that goes into making these packets before it is sent out.
     
    Last edited: Feb 25, 2013
    Anthony817 and Xbox Loyalists like this.
  17. gabe_k

    gabe_k Rising Member

    Joined:
    Nov 30, 2008
    Messages:
    66
    Likes Received:
    1
    I actually started looking and working on something like this. I just recently got a modded Xbox again, so I may well pick it up. You seem to be on the right track though, AlexRMC92. Good luck, I'd love to help if you need it :)
     
  18. JayFoxRox

    JayFoxRox Spirited Member

    Joined:
    Dec 23, 2010
    Messages:
    176
    Likes Received:
    8
    No, I'm not.

    I'm saying that Xbox Live was not just forwarding players to other players who host games. Instead microsoft provides a master server which is different per game which allows browsing of games. As that server was written by the games developer you won't be able to create a generic xbox live master-server for games.
    In other words: You most likely won't be able to play games on your own server unless you create a special software per-game.

    I'm very sure about that because a. xbox live closed at a different time for different games, b. there are master server examples included in the XDK, c. there are special TCR for server software to be ran in microsoft datacentres and special TCR for software which provides further features for xbox live games at the publishers datacentre (dedicated gameserver, high-score list, ...).
    - Xbox live *can* host games
    (More specific: Xbox live did host non-auth. servers for games)


    Maybe you thought of a VPN when reading IPsec or something - but that just means that they use packet encryption which your operating system most likely won't support out of the box. So you can not just run the server because the higher level socket APIs are not able to create special packets which are required for this.


    - "making these packets" is not trivial. You will be working on it for years - the original code is hundred-thousands lines of high-level code. It involves a stack of multiple layers, various security measures etc. Especially handshakes will give you a lot of headaches probably.

    - "bone stock winsock". It's winsock, but it's not "bone stock". It's extended by IPsec and a lot of functions are missing. There should be a txt file around which documents the changes they made from win2k to xbox. On the lowest level, packets will be scrambled and encrypted, in some cases even beyond the IPsec encryption. Which means unless you compile your software (e.g. dashboard too!) with debug flags you won't be able to communicate with a normal PC. As libraries are staticly linked you won't be able to use any game or the dashboard with your server unless it supports IPsec and includes the private keys from Microsoft.

    - Voice chat "on all games" won't work because you probably won't be able to support games. To make matters worse, staticly linked code in the dashboard also renders the voice chat useless. Hence, you must compile your own voice chat.

    - DLC content was hosted on MS servers, you will most likely have a hard time tracking everything down (though, there are sites which shall not be named ;) ) and you can't share it legally either.


    You should disassemble the xonline.lib debug version by the way. I'd recommend cxbx sources to get started though to get familar with the signatures and how games use the API.



    Because all of that, I still think your (current) goal is rather unrealistic. You should try settling for less (Logins working - that's it, nothing game related etc).
    Best of luck with your project though.
     
    Xbox Loyalists and CodeAsm like this.
  19. AlexRMC92

    AlexRMC92 Site Supporter 2013

    Joined:
    Feb 12, 2013
    Messages:
    336
    Likes Received:
    25
    i appreciate all of the information, it gives me a lot more of a better understanding of how the live system works. You know i was trying ot find cxbx sources for this but sourceforge seems to only have a the compiled debug version, although i didn't look extensively.

    If live really operates in this manner then your right, getting every game to work is extremely unrealistic. Either way, logins are my primary goal as of now. I would like to get at least one game to work with this, maybe halo 2. That's most likely not the easiest game to work on, but it's the only game i have tons of experience with. Back when halo modding was big i did so much research into the engine and building completely new maps & content. I've forgotten so much of it by now since the community basically died, but i have a lot of stuff on backups that i could bring back.

    Anyways, i appreciate your help!
     
    Xbox Loyalists likes this.
  20. aden34

    aden34 Robust Member

    Joined:
    May 8, 2012
    Messages:
    226
    Likes Received:
    5
    this would be great if it can be done. i get so tired with xlink, espcially recently when i just cant connect to it, and things like missing the rank, or clans, ect.

    good luck!
     

Share This Page