Comments:"SecurityTube.net Hack of the Day: My Code made it to a Hollywood Movie"
URL:http://hackoftheday.securitytube.net/2013/04/my-code-made-it-to-hollywood-movie.html
I've embedded the image from the tweet:
Source: http://oi49.tinypic.com/2vnrkw8.jpg
I've verified that this really is from the movie White House Down due for release in 2013 from their YouTube trailer at 1:39
The code is question seems to be from multiple programs which I had written way back in 2007-2008 to demonstrate the use of Raw Sockets in writing Packet Injection programs. Here is a list of the code files (GIST embeds at the end of the post) :
/* First Get the Interface Index */ and "Error getting Interface index !\n" code is there in all the files: Here is the next couple of lines in the screenshot:
Most of the files listed above, contain the "Bind our raw socket to this interface */" as well followed by the sockaddr_ll structure fill: The next part of the screenshot is partially cut:
So, I used the YouTube video to take a better shot:
"A simple write on the socket ..thats all it takes ! */" is the partial comment, which many of you may agree is an unconventional comment :) There is there in almost all the code files as well:
The last part of the screenshot is below:
Looks like this was from the Generic Packet Injection program, if you look closely:
The special effects guys seem to have removed most of the whitespace, so you see longer lines but it is clear to identify the code if you look close enough.
How do I feel about this? Great :) If not me, at least my code made it to a 3 second clip in a Hollywood Movie :) Also, the character in front of the computer seems quite excited (hands raised) as he is downloading / viewing / running my code :) What could make a developer more happy than to see his code inciting such thrill! :)
Quirks:
- I hope the code would be compiled before use! :)
- The source / destination MAC, IP, etc. are hardcoded in most of the scripts so hopefully the hacker in the movie changed them before using :)
- The Generic Packet Injection program just sends "A"* 1024 times onto the wire. This was just to demonstrate it's possible to send arbitrary data on the wire with raw sockets, even total garbage :)
The only thing I felt a bit dissapointed about was to see a couple of open source projects use snippets of my code without any form of acknowledgement.
OK, finally here are all the Code Snippets if you want to play with them. They are pretty old so some of the #includes may have to be changed based on the platform you are using. Note that the original links on the Internet have been posted above, the Gists were created today to embed them here.