This guy is famous!

DfgDfg Admin
edited April 2013 in Tech & Games
Well, not really but his code is.

http://hackoftheday.securitytube.net/2013/04/my-code-made-it-to-hollywood-movie.html

^That's the video.

And here is the copy pasta.


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) :

  1. http://code.securitytube.net/Programming-an-ARP-DoS-Tool.c
  2. http://code.securitytube.net/Generic-Packet-Injection-Program.c
  3. http://code.securitytube.net/Ethernet-Packet-Injection.c
  4. http://code.securitytube.net/TCP-Packet-Injection.c
  5. 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.
Screen+Shot+2013-04-06+at+11.11.17+AM.png

/* First Get the Interface Index */ followed by the code is there in all the files:
Screen+Shot+2013-04-06+at+11.13.12+AM.png
Here is the next couple of lines in the screenshot:
Screen+Shot+2013-04-06+at+11.14.21+AM.png

Most of the files listed above, contain the "Bind our raw socket to this interface */" as well followed by the sockaddr_ll structure fill:
Screen+Shot+2013-04-06+at+11.15.50+AM.png
The next part of the screenshot is partially cut:
Screen+Shot+2013-04-06+at+11.18.09+AM.png

So, I used the YouTube video to take a better shot:
Screen+Shot+2013-04-06+at+11.19.23+AM.png

"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:
Screen+Shot+2013-04-06+at+11.21.58+AM.png

The last part of the screenshot is below:
Screen+Shot+2013-04-06+at+11.25.31+AM.png


Looks like this was from the Generic Packet Injection program, if you look closely:
Screen+Shot+2013-04-06+at+11.27.35+AM.png

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 :)

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 :)

Unlike others I do acknowledge that I copy pasted this from his website and I did add a link on top.
Sign In or Register to comment.