photo
Jordan Sissel
geek

Sun, 26 Mar 2006

xboxproxy - an xbox system link proxy

Background

In an effort to be able to play Halo 2 with some out of state friends, I wrote an xbox system link proxy that would essentially bridge only xbox network traffic across across layer 3 networks using UDP. Written in C and uses libpcap and libnet. A later update added multicast support so Apple's Rendezvous (mdns) protocol could span subnets and networks.

It's a very simple program that simple takes certain packets and forwards them to other known xbox proxies. The xbox system link bridge will let you essentially bridge the broadcast and multicast traffic across multiple networks using these proxy bridge-points.

How does it work?

The xbox system link uses ethernet addresses (Layer 2) to indicate destination address and UDP (Layer 4) to send data. If you aren't familiar with the OSI model, then the layer information won't help you here. Basically, the 3 layers we care about for this system link proxy are ethernet (layer 2) and udp (layer 4). There's a special mention for the ip layer (layer 3) but that will be explained shortly.

System link packets come in two flavors: broadcast and unicast. In Halo 2, when you go to look for system link games, your xbox will send ethernet broadcast packets probing for available games. Broadcast packets are received by every network device on your layer 2 segment, this usually means your subnet or immediate network. Other xbox systems who are hosting games will respond directly to your xbox using your xbox's ethernet address (MAC address) as the destination. This process is called "discovery." After the discovery process completes and your xbox knows about other xboxes hosting games on the network, it begins direct communication to the known xboxes. When you try to join a game, your xbox sends packets directly to the other xbox you are connecting to. Direct communication continues until you quit the game.

A special note needs to be made, becuase you can't simple skip over layer 3 (the ip layer). We know now that addressed communication uses ethernet addresses, and we also know that the payloads are inside UDP packets, but what about the IP layer? The IP layer has addresses of its own, among other kinds of flags. Xboxes use the IP of 0.0.0.1 to communicate. This is nothing *too* special, but if you want to sniff only your xbox's traffic, then you can simply filter for that ip and you'll get it.

The proxy works by listening for broadcast packets from any xboxes on the immediate network. Any broadcast packets are forwarded to any known proxies over UDP. The proxy also keeps track of ethernet addresses by proxy. So if a packet from "my" xbox wants to talk to another xbox, the proxy will know which proxy that target xbox is on, and only forward the packet to that proxy.

This is a very simple system, and I don't have to know anything about the system link protocol beyond what the underlying layers are used for communication.

I later did some investigating into iTunes music shares. iTunes uses mdns (Apple calls it Rendezvous) for "discovery" of other iTunes music shares. The discovery is done over a protocol called multicast. Adding mdns support to the proxy/bridge program was quite trivial, and I have tested that it does in-fact work. You can use it to listen to iTunes music shares which are not on your immediate network.

Where can I download it?

download xboxproxy

What OS's are known to work?

  • FreeBSD 4.x/5.x/-current
  • Fedora 3 Linux 64bit
  • RH9 (Requires Fedora 4 binaries of libpcap and libnet)
  • Solaris 10 SPARC

How do I use it?

Requirements:
  • libpcap
  • libnet 1.0 or 1.1.x (both are supported)
Build instructions:
  • Unpack it with tar -zxf proxy-2.1.tar.gz
  • cd proxy-2.1
  • ./configure
  • make
  • make install
Use instructions:
Usage: ./proxy [-bxm] [-u] [-s <server>] [-i <dev>] [-d <debuglevel>] [-p <port>] [-h]
-x              forward xbox system link packets
-b              forward broadcast traffic
-m              forward multicast packets
-u              use udp encapsulation instead of tcp (default)
-s <server>     specify another proxy to send packets to
-i <dev>        ethernet device to sniff packets on
-d <level>      specify debug level, (0-1000)
-p <port>       which port to send data on when talkin to other proxies
-f <bpf filter> an additional bpf filter string you wish to use
-h              this message!

Comments: 20 (view comments)

Permalink: /projects/xboxproxy/main
posted at: 04:29


20 responses to 'xboxproxy - an xbox system link proxy'

someguy posted at Mon Jul 17 10:08:52 2006...
ok i dont understand a word of that but if u  could put it in commens people how do i link me and my friends x boxs so i can join and bridge him as for some reason after using zonealarm and  to bridge him host and now i cant join him. i am liv9ng in australia and my friend has told me that my ip has turned into and american one do you have anyway of fixing it

Jordan Sissel posted at Mon Jul 17 10:23:08 2006...
The xboxproxy was written for unix-like systems, not Windows. It may work under windows with winpcap and such, but I'm not sure.

If you use windows and want to play xbox with friends online, look int xlink kai.

someguy posted at Mon Jul 17 10:56:09 2006...
thanx mate ur a life saver

Xbox360 posted at Fri Aug 25 00:00:42 2006...
I am not sure if the xboxproxy is working on Xbox360. If not, where can I get the similar tool.

RobQ posted at Mon Aug 28 13:15:09 2006...
Wow thanks! All the students on my campus will now love you.

null posted at Tue Sep 5 05:18:17 2006...
request proxy

John Brisbin posted at Wed Sep 13 20:44:32 2006...
An example invocation of the tool would be helpful. I will try, to see if I understand the command line parameters.

xboxproxy -x -s 162.12.1.1

This line would begin bridging both discovery and gameplay packets for an Xbox with an instance of this proxy at IP address 162.12.1.1 on the default port of 3434 over TCP using the default network interface of the host computer.

xboxproxy -x -m -s 162.12.1.1

This line adds mdns disconvery to the packets forwarded to the proxy instance at 162.12.1.1

The command line at the other end should be identical with the exception that the server IP should reflect that of the computer where the first instance is running.

The tool will continuously attempt to connect to the specified server, so they do not have to be started simultaneously.

John Brisbin posted at Wed Sep 13 21:05:04 2006...
An example invocation of the tool would be helpful. I will try, to see if I understand the command line parameters.

xboxproxy -x -s 162.12.1.1

This line would begin bridging both discovery and gameplay packets for an Xbox with an instance of this proxy at IP address 162.12.1.1 on the default port of 3434 over TCP using the default network interface of the host computer.

xboxproxy -x -m -s 162.12.1.1

This line adds mdns disconvery to the packets forwarded to the proxy instance at 162.12.1.1

The command line at the other end should be identical with the exception that the server IP should reflect that of the computer where the first instance is running.

The tool will continuously attempt to connect to the specified server, so they do not have to be started simultaneously.

meanses posted at Mon Oct 30 21:09:26 2006...
wow - this could be HUGE on a college network where each dorm is broken out into subnets - if one student from each dorm on campus was running this, all the xbox's on campus could see each other which would be amazing! However this would only be ideal if this program was windows native... any idea if it will run on a mac since osX has a unix like core?

null posted at Thu Dec 7 20:04:20 2006...
hey cody

meanses posted at Fri Jan 26 02:58:51 2007...
Hey,

Just an FYI, but due to a few limitations to your program, such as

1.) You can only run it on a few flavors of Linux (I had to tried so many, and only two worked).

2.) You can only link two subnets at a time, when I attempted joining 3 or more subnets at the same time I caused a broadcast packet storm on all three subnets!! Good thing I shut it down quick, as students in all the dorms suddenly were complaining "Why is my computer running so slow.. why is my xbox lagging! I'm not even playing with anybody else on the network!"

The concept of your program is HUGE for college campuses! Since my last post I was able to join two dorms on campus via the program and halo play began to thrive every single night. However, we really want all the guys dorm's to be connected, and easily (not with Linux boxes that have to be specially configured and then registered with IT to get an IP Address). Thus, a fellow Computer Science student and I are going to re-write the whole program from scratch in Java, so it can run on any platform with the Java runtime, and we're going to release it on sourceforge for all to enjoy - likely with the LGPL license.

If you have any pointers or suggestions or want to help us, it would be much appreciated!!

bobsupercow posted at Tue Feb 13 13:58:07 2007...
@meanses,

Are you still pursuing the project you were talking about? If so, if you don't mind email me when you're done. bobsupercow@hotmail.com  I would love to see this as a Windows executable. Thanks

Jordan Sissel posted at Tue Feb 13 14:03:44 2007...
bobsupercow and meanses,

There are a few xbox/ps2/etc game proxies out there for windows. Xlink Kai is one of them that seems to be quite popular. I've never used it, but feel free to try it out.

Then again, xlink kai is global, where as a campus-wide-only system would be pretty cool as far as the "you're playing with people in your area"-factor goes.

bobsupercow posted at Tue Feb 13 20:31:13 2007...
@Jordan

Yeah, both Kai and XBC don't work on my campus because their servers are blacklisted. But a program where you could create a campus-wide network would be fantastic. If Kai or XBC were to publish their source code it would be pretty simple to change it from trying to connect to a global server to connecting to a local server running on campus...but I don't see them doing that anytime soon. ;)

Ctrl Phreak posted at Tue Feb 27 17:34:47 2007...
I also have started a project in java similar to the above.  I have webhosting and am pending approval on SorceForge.  indented audience is primarily windows but java should let it be universal.

Currently I am laying out the framework classes, and requirements.  If anyone would like to join my team (currently only me) fire me an e-mail at xbox@whitehatblackhat.com.  I would love to help coordinate as many people that would like to help out such a program's development.

Ctrl Phreak posted at Tue Feb 27 17:38:48 2007...
Jordan,
Much like your program, I have no intent on creating a system where users can search for new games.  Rather, I would like to make a system that makes the boundaries between LAN's invisible to XBOX's.  Are you willing to share any information on your packet handling system?  I understand if you do not, but it would be much easier than trying from scratch, or dechipering C, as i am not very familiar with the language.

Thank-you for your time,
Ctrl Phreak

Inv posted at Sat Mar 3 05:07:18 2007...
Ctrl Phreak:  Look into openvpn.  You can setup a bridge with other VPNs, and with ebtable, you can make it so only xbox traffic for system link goes over the bridge (since it uses a specific IP and port).  Look into the broute option for ebtable, so that non-xbox traffic still goes to your normal ethernet port.

Ctrl Phreak posted at Sat Mar 3 14:23:22 2007...
Inv,
I have used openVPN before with little success.  That would be close to what i want with the execption that ebtable is linux only (no?) and openVPN would provide not Xbox specific stats, such as MAC, ping etc....or do you know if that kinda thing would be possible?

topprospect posted at Mon Dec 17 16:37:37 2007...
Jordan: Have you tried this with Halo 3?  I am able to see other System Link games, but I can't join them.  I'm running xboxproxy with -x -b -m.

TrueFranco posted at Sat Mar 8 15:19:44 2008...
I ported to windows and is working very good
Thanks to Jordan


Leave a reply

You need javascript enabled to use this form. Anti-spam efforts ongoing. Also, if the comment doesn't show up, it's because the form expired. Go back and copy your comment, reload the form, and resubmit. Apologies if this is a hassle, I'm just playing with antispam methods right now. If this insists on not working, please email me about it.

Name (required)
E-mail (optional, if you want me to be able to email you back)
URL (also optional)
Comment:


Search this site

Navigation

Metadata

Home About Resume My Code (SVN)

Articles

ARP Security Dynamic DNS with DHCP OpenLDAP+Kerberos+SASL PPP over SSH SSH Security: /bin/false Week of Unix Tools Work Efficiency

Projects

fex firefox tabsearch firefox urledit grok keynav liboverride newpsm (FreeBSD) nis2ldap pam_captcha poor man's backup Solaris audio utility xboxproxy xdotool xmlpresenter xpathtool misc scripts

Presentations

Yahoo! Hack Day '06 Unix Essentials Vi/Vim Essentials

Tag Cloud

Calendar

< March 2006 >
SuMoTuWeThFrSa
    1 2 3 4
5 6 7 8 91011
12131415161718
19202122232425
262728293031 

Friends

BarCamp Kent Brewster Tantek Çelik John Resig Wesley Shields Tyler Shields

Technorati