Presentation is loading. Please wait.

Presentation is loading. Please wait.

The “FREE” WiFi by Chandan.

Similar presentations


Presentation on theme: "The “FREE” WiFi by Chandan."— Presentation transcript:

1 The “FREE” WiFi by Chandan

2 What happens? We: “Free Internet”... Yepyyy... Let’s connect to it  .
after few hours... Our Cell Phone: “Free Internet”... I know that network... Let’s connect to it  Internet WiFi LAN Client RPi Router IPTables hostapd udhcpd MITMProxy

3 The Tools Hardware Raspberry Pi 2 (RPi)
EDIMAX EW-7811Un (or any device with AP mode) How to check if the device supports AP mode? Image: wikimedia.org

4 The Tools Software Raspbian : the OS hostapd : the connection provider
udhcpd : the address provider IPTables : the traffic controller MITMProxy : the MITM How to check if the device supports AP mode?

5 Setup the RPi Download and write the Raspbian into a SSD memory card
Connect the Edimax USB WiFi dongle to the RPi Boot the RPi Logon to the RPi using SSH or any preferred method

6 Packet Forwarding & IPTables
Enable packet forwarding Temporary echo “1” > /proc/sys/net/ipv4/ip_forward For permanent, edit /etc/sysctl.conf net.ipv4.ip_forward=1 Setup IPTables to forward traffic $ iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT $ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE $ iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT

7 Setup udhcpd Install udhcpd Update config file
apt-get install udhcpd Update config file /etc/udhcpd.conf Enable udhcpd in defaults /etc/defaults/udhcpd Start the udhcpd service service udhcpd start What does a udhcpd.conf looks like?

8 Setup hostapd Install hostapd
apt-get install hostapd Download the compatible hostapd for Edimax Alternatively, (if you are really feeling adventurous) download the source code and compile

9 Configure hostapd Create /etc/hostapd/hostapd.conf Check configuration
interface=wlan0 driver=rtl871xdrv ssid=KSU Guests channel=2 Check configuration hostapd --dd /etc/hostapd/hostapd.conf Start the hostapd service service hostapd start

10 See if you are able to connect to the “free” WiFi?
does it actually works? See if you are able to connect to the “free” WiFi?

11 Time to bring out the evil stuff

12 MITMProxy Install MITMProxy Create firewall rule to forward traffic
Create firewall rule to forward traffic $ iptables -t nat -A PREROUTING –i wlan0 -p tcp --dport 80 -j REDIRECT --to-port 8080 $ iptables -t nat -A PREROUTING –i wlan0 -p tcp --dport 443 -j REDIRECT --to-port 8080 Start in Transparent mode $ mitmproxy -T --host

13 How Transparent Proxy works?
Ref:

14 Sounds technical... but what all these things do?

15 Ohh god... the world is ending?

16 Preventions Do not connect to “free” wifi
Use VPN, K-State gives you for free Always use HTTPS Browser extensions – HTTPS Everywhere Do NOT ignore browser warnings Do NOT access sensitive information Bank account SSN

17 That’s all folks... thanks for being patient 
Questions? That’s all folks... thanks for being patient 

18 References


Download ppt "The “FREE” WiFi by Chandan."

Similar presentations


Ads by Google