Quantcast
Channel: Hacker News 50
Viewing all articles
Browse latest Browse all 9433

SecurityTube.net Hack of the Day: My Code made it to a Hollywood Movie

$
0
0

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


One of the first things I do every morning is check the Twitter chatter about my website (@SecurityTube) . I was pleasantly surprised to see this:
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) :

http://code.securitytube.net/Programming-an-ARP-DoS-Tool.c http://code.securitytube.net/Generic-Packet-Injection-Program.c http://code.securitytube.net/Ethernet-Packet-Injection.c http://code.securitytube.net/TCP-Packet-Injection.c http://code.securitytube.net/IP-Packet-Injection.c I know most of code snippet in the image could have been pretty much from any low level networking tool, so I am just going to focus on the comments :)  which are almost like a programmer's signature.
/* 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.


Viewing all articles
Browse latest Browse all 9433

Trending Articles