Reverse Engineering a Missile Launcher Toy's Interface
nitro writes "A fairly in-depth technical report by the security researchers at TippingPoint was released on how to reverse engineer the proprietary protocol for controlling a USB missile-launching toy system. They develop an iPhone application to control the device. 'The hardware is coupled with a simple GUI controller written in Delphi (MissileLauncher.exe) and a USB Human Interface Device (HID) interface written in C++ (USBHID.dll). The toys lost their allure within minutes of harassing my team with a barrage of soft missile shots. That same night I thought I would be able to extend the fun factor by coding up a programmatic interface to the launchers in Python. ... One interesting thing is that we have a lot more granular control of the turret movement now than we did with the original GUI. I wrote two simple loops to count the number of possible horizontal and vertical ticks and the results were 947 horizontal and 91 vertical versus 54 and 10 from the original GUI respectively. Granular control allows you to slowly and quietly reposition the turret for stealthy attacks.'"
Just as Phil Zimmermann famously had to distribute PGP internationally in print form to avoid violating munitions laws, wouldn't these guys have to be really careful about their elite missle launching software? If this code makes it to Syria or Iran, we're in for a mildly annoying attack with state of the art styrofoam weaponry.
Comment removed based on user account deletion
Now you need to incorporate webcam target recognition and create an automated firing application.
You could call it "Skynet".
Seriously, what kid wants to play a cop when they can play Leader of a Rouge nation bent on sending missiles against their uh, playmates? Attach a diaper to it and you have a playful way to play "Biological Warfare"
The musings of just another geek and his junk.
Nigan: He does fit the profile perfectly. He's intelligent, but an under-achiever; alienated from his parents; has few friends. Classic case for recruitment by the Soviets.
Arthur Cabot: Now what does this say about the state of our country, hmm? I mean have you got any insight as to why a bright boy like this would jeopardize the lives of millions.
[the General rolls his eyes]
Nigan: No sir. He says he does this sort of thing for fun.
Arthur Cabot: What!
No wireless. Less ammunition than an AH-64. Lame.
His python code is here. It implements a HTTP web server (as well as a command line and direct socket server mode) that directly invokes a DLL to control the unit. And so in the video he can control the thing using the web browser in his cellphone.
All the code is only 283 lines and easy to understand. I don't see anything awkward about it.
In what way exactly would Lua be better at doing that?
Oh wow. I was one of the enthusiastic fans of Muse Software's Robot Wars for the Apple ][. It sounds to me like Soulskill has invented a way to re-create Robot Wars in a more real and more fun way.
Here's a description of the original game.
Create code for a robot using the provided programing language, limited to 256 lines of code. Test your robot on the test bench by examining the code line by line and determining whether the bot performs as intended. Then put your finished robot in the arena with up to four other bots, set the number of battles, and watch them fight it out in a top-down view. Computer Gaming world had annual contests for several years in which readers could send their bots on disk to participate in the match, with results and prizes reported in the magazine.
I don't Phone anyone so I stopped reading at "iPhone"
I watch Woot on pretty much a daily basis and as a result I frequently end up purchasing toys that I really don't need. Most recently I picked up this silly pair of USB Missile Launchers for just under 40$ shipped.
Presumably this is how the guy ended up with an iPhone.
The code. Put up or shut up, AC.
It must be fun to reverse engineer toys at a computer security company and get paid.
283 lines for a web-based missile control system? I wonder how that compares to the average defense project.
Yeah, but this is Python. I'm sure they could cut at least 280 lines if they only used perl. As for the defense projects, I'm convinced they're all just a bunch of shell scripts.
If we're going to argue about the meaning of the word...
When something is granular, it is made up of chunks.
When something is granular it is made of granules, or 'grains'. Typically something granular is made of numerous grains that form a larger unit.
When something is more granular, the chunks are larger, it has more of the characteristics of being grainy.
That doesn't really follow. The characteristic of being granular is that it has granules or grains. "More granular" is actually ambiguous.
It could mean: more granules or grains -- ie more of the actual characteristic that makes it granular.
Or it could mean, as you say, larger granules or grains -- ie more pronounced characteristics
Granular and continuous are antonyms.
So? More grains doesn't make it 'more opposite', in fact, the fundamental theorem of calculus is that you can approximate continuity with lots of small discontunities... and if you let the number of discontinuites rise to infinity, their size goes zero and it becomes continuous.
What the OP meant is that he achieved more fine grained control.
Correct. And fine grained is a better way of putting it because its not ambiguous.
Not more granular control; more granular control would be worse control than the original resolution.
More granular control is ambiguous. Although easily understood from the context.
Hak5 did this a while back. They also did a few videos about it. The code has been around for a while.
You can even control it yourself from the web, if it's not Slashdotted, over at the Hak House.
Not such a joke. Look up DIADS, Digital integrated Air Defense (amazingly, not in Wikipedia!). This guy has just hacked the rudiments of Fire Control system. Which is approximately half of a DIADS. The other half being the radar and sensor integration. Which is handled by the many Open projects on sonar and video camera applications. Put them all together, and Our Sandbox Conquering Overlords will have all the tools they need to take them to Playground Domination.
Behold, this dreamer cometh. Come now, and let us slay him... and we shall see what will become of his dreams.
It's true. http://code.google.com/p/pyrocket/wiki/RelatedWork I hacked the thing about a year ago and started this google code project. You will be able to apt-get this package in Ubuntu Jaunty.
Nah. Haskell for high level stuff, Python for scripting, and Assembler instead of C.
Of course, written to disk with the butterfly-effect technique.
Any sufficiently advanced intelligence is indistinguishable from stupidity.
Oblig.
It also depends on how hungry a deer is and the relative quality of the food. A stuffed deer can afford to be very, very skittish. One that hasn't eaten it's fill in a couple days/weeks is going to start taking chances - including eating the plants off your back porch, especially if they're tasty to the deer.
That's why we need hunters to actually reduce the deer population. If all everybody does is scare them off, eventually there will be so many deer that the non-scary food sources are exhausted and the deer overcome their fear of the scary things. That or start starving over the winter, which isn't a nice way to go either.
Yes, I do have venison in my freezer...
I don't read AC A human right
Get a 'Striker' laser-target-enabled missile launcher ($40, I think). Then get a webcam or IP-enabled camera (I got one of these from Ebay for ~$70).
Use the camera to detect motion and generate a centroid of motion; use the (high-intensity of red) laser-spot to detect where the missile is pointed (again from the camera image), and move the missile to make the centroid and laser-spot coincident.
It's actually pretty trivial, but it looks pretty cool to have people walk into the office and have two missile-launchers automatically track them.
I also have the think-geek big-red-button box, which I modified to allow the button to control a USB port. Now I can fire the (auto-targetting :) missiles by hitting the big-red-button :)
It's actually only slightly harder to get the system to track two independent targets... The next step is to build in target-recognition by accessing the company's person-directory (we all have pictures)... Don't shoot the VP. Only directors and below are valid targets :)
Simon
Physicists get Hadrons!
You are just an alarmist. Counting ticks on microcontrollers is a basic part of any modern CNC(computer numerical control) manufacturing system. Are you saying this software is a modified air defense software platform?
Every mans' island needs an ocean; choose your ocean carefully.
283 lines... plus the Python runtime, including modules to implement the HTTP server.
...plus the various C libraries, video drivers, operating system, etc. Wtf? The point is that 283 lines of new code makes for a web controlled nerfgun where previously there was none.
You can't neglect the overhead of the runtime when you deploy something like this.
Yes, you can.
It's running on his desktop PC, which already has python on it. Just like my PC, which also has java, perl and various other languages sitting around. As far as he's concerned, an extra 9k of python script is all it took to make his pet project happen. And if I had one of those USB nerfguns, that same extra 9k of python would trivially do it for me too: right-click, save, "python ped_missile.py".
although I'd probably go with straight C.
I've been coding in C continuously for 25 years now, from apps to embedded systems. It's a great language for many things, but for this purpose it would be an absolutely idiotic choice. C is good for size and speed, neither of which is an issue for this task.
And drop a few features--do you really need to put the HTTP server into the Python code?
Yes, he does. He wants to be able to control it via a web browser. It's a requirement.
Are you suggesting he install apache and write a CGI script to do it? I thought you were the one worried about deployment costs.
Tell you what, go and implement what he did in probably an afternoon (including the web server interface) using pure Lua instead and then show us how much easier and better it is than the way he did it.
timestamp:Feb. 14 2009 14:47:32
sender:DOD
return: false
THIS THREAD HAS BEEN LOCKED BY THE UNITED STATES DEPARTMENT OF DEFENSE.stop
UNITED STATES LAW DOES NOT REQUIRE DISCLOSURE FOR THIS ACTION, AS SAID DISCLOSURE MAY BE A THREAT TO NATIONAL SECURITY.stop
REFER ALL ENQUIRIES REGARDING THIS ACTION TO:stop
http://www.defenselinks.mil/faq/comment.html stop
end
No, it is not. It means that the quanta of control are larger.
That's one meaning. Its not the only one.
More granular means more grain like (not more grains)
No. "granular" doesn't mean "grain like". So "more granular" doesn't mean "more 'grain like'"
Granular means "made up of grains"; so "more granular" means "more 'made up of grains'" and that's ambiguous. The more could refer to the number of grains, or it could refer to to more pronounced grains.
Same goes for "spikey". If I tell my stylist I want my hair to be "more spikey" that's ambiguous -- do I want more spikes (more in number), more pointy spikes (more spike pointiness)? or bigger spikes (more spike size)? Any interpretation is reasonable.
More granular means more grain like (not more grains), which means the grains are more evident. Because they are ... LARGER.
Still ambiguous. If I wanted wood with 'more grain', that means more stripes, not fewer larger ones. Or it might mean that I want the same number of stripes but with greater contrast between them. In any case I can't recall ever hearing someone say they want 'more grain' in connection with 'LARGER' stripes.
For a fixed parameter range more granular means the quanta are larger,
No. Its ambiguous. I don't know if you want more grains, or larger grains, or in fact whether you want the same number of grains the same size but with more definition between them.
and higher resolution means they are smaller.
That's correct. "Higher resolution" is unambiguous. "more granular" isn't.
If you really wanted to be slick, you'd use the webcam to capture where the projectile landed. Then create an algorithm to adjust the targeting system based on previous attacks.
Oh yeah how do you like Haskell? I know some ML and OCaml, and I've been looking for a functional language to switch to from C/C++. I can't bring myself to switch to a programming language named after a cigarette brand. How is the Haskell support? Is there a decent compiler?
You can just download the developers guide from the manufacturer: http://www.dreamcheeky.com/dream/forum/viewtopic.php?f=13&t=102
lots of reinventing the wheel I see. http://web.archive.org/web/20060820072349/http://scott.weston.id.au/software/pymissile-20060126/ http://code.google.com/p/pyrocket/ and now this article.
I am seriously considering to hook up one of these USB Missile Launchers to our continuos integration server at work. When someone checks in code that doesn't compile or breaks tests the launcher targets the offending developer (using pre-determined login aiming mapping) and fires a couple of rounds at him. That'll certainly increase code quality!
Reverse engineering is fun and all, but I can't help think that it's a bit more of a challenge when you aren't reverse engineering something which has a well-understood and documented interface...
I am TheRaven on Soylent News
283 lines seems a bit too much. The pymissile package, which provides a Python interface to this kind of missile launcher, was released back in 2006. Connecting this up to a web interface shouldn't be more than a dozen lines. Unless you're going to 'reverse engineer' it by using a random proprietary DLL to interface with the missile launcher instead of the well-documented USB control interface...
I am TheRaven on Soylent News
Reimplementing a BSD licensed package (pymissile) with a more restrictive license (GPLv3)? The Free Software Foundation must be so proud of you...
I am TheRaven on Soylent News
They're complimentary packages, actually, in the hardware that they support. Besides, where does the FSF endorse BSD over GPL?
Hmm.. maybe I deserve a *whoosh*
Wouldn't it be so awesome if Iran developed an Intercontinental Ballistic Nerf Missile?
One day the US gets an ICBM alert and they're going oh shit oh shit oh shit! Then it lands on the White House lawn and smashes a garden gnome or something. And then President Amjsnfsjfmed from Iran calls up Obama and tells him to look outside onto the front lawn, giggling, so Obama looks out, sees the nerf missile, replies with "ahhhhh you little terrorists!" with a big smile and maybe pointing a finger fonz-style.
Then we all live happily ever after.
Fool me once, shame on you. Fool me twice, watch it -- I'm huge!
That was my thought exactly.
New things are always on the horizon