51
FOR FUN AND PROFIT! EVIL DATA MINING

Hyper Island - 2012

Embed Size (px)

DESCRIPTION

The slides presented at the Hyper Island - October 18, 2012 for the DDS13 class regarding malicious datamining.

Citation preview

Page 1: Hyper Island - 2012

FOR FUN AND PROFIT!

EVIL DATA MINING

Page 2: Hyper Island - 2012

Contents

● Web Scraping

● Quick and Dirty SQL Injections

● iPhones, WiFi and Evil Twins

● Hacking Neighbours

● Port scanning on Steroids

Page 3: Hyper Island - 2012

Introduction

● Fredrik Nordberg Almroth (@Almroot)Head application engineer and co-founder @ detectify.comIT-security guyHacked Google. Twice.

● Johan Edholm (@norrskal)Server administrator and co-founder @ detectify.comWorked with IT security analytics and anti-scrapingStudied system and network management in Linux

Page 4: Hyper Island - 2012

What is Detectify?

Detectify is an automated vulnerability scanner.

Page 5: Hyper Island - 2012

● You sign up using beta code.

Page 6: Hyper Island - 2012

● You press start!

● Detectify emulates a hacking attack.

Page 7: Hyper Island - 2012

● You get a report regarding your vulnerabilities.

Page 8: Hyper Island - 2012

● Detectify is currently in closed beta!

● You may try it for free using the beta code: HyperMine

● http://detectify.com/

● We love feedback! :)

Page 9: Hyper Island - 2012

What is data mining?● Data mining is mostly associated with statistics and machine learning.

● ...or discovery of patterns (intelligence) in large datasets...

● No fancy algorithms! Just real life examples.

Page 10: Hyper Island - 2012

Web scraping

● Grab content from websites

● Host somewhere else

● Study the data

● Sell the data

Page 11: Hyper Island - 2012

Web scraping

● Manual copy-paste

Page 12: Hyper Island - 2012

Web scraping

Page 13: Hyper Island - 2012

Web scraping

● Googlebot

Page 14: Hyper Island - 2012

Web scraping

● Bad scrapers○ Downloadable or online tools

○ Homemade scripts

○ HTTP rewriters

Page 15: Hyper Island - 2012

Web scraping

● Homemade scripts○ Made for one site/purpose○ No hacking○ May be against ToS○ Probably legal

Page 16: Hyper Island - 2012

Web scraping

● Sosseblaskan.se○ Copy of aftonbladet (rewrite)○ A joke○ Not ads for aftonbladet○ Not phishing○ Illegal

Page 17: Hyper Island - 2012

SQL

● Structured Query Language

● Used to talk with databases. MySQL, PostgreSQL, etc...

Page 18: Hyper Island - 2012

How it's used

● Websites use databases to maintain data.

● The SQL queries often contain user-data.

● You search on a website for a few keywords.

● The odds of it being done by some SQL dialect is huge.

Page 19: Hyper Island - 2012

What could possibly go wrong?

● User supplied data may alter the SQL query.

● Example:SELECT title FROM blog WHERE title = '$search_keywords';

● If the searched data contain a quote, the SQL query will break.

● Attackers may gain other data than just the "blog title".

● Usernames, passwords, emails, credit-cards...

Page 20: Hyper Island - 2012

SQL Injections

Page 21: Hyper Island - 2012

● Devastating attack.

● Worst part. It's really common.

● Remember Sony last year?

Page 22: Hyper Island - 2012

● Victims 2012.○ eHarmony○ last.fm○ Yahoo!○ Android Forums○ Billabong○ Formspring○ nVidia○ Gamigo○ ...List goes on...

Page 23: Hyper Island - 2012

● Thousands of sites attacked daily.

● Incredibly easy to get going.

● Loads of guides and tools on the internet.

● Devastating for the vulnerable organizations.

Page 24: Hyper Island - 2012

(This is the time we'll stand here and struggle with the equipment.)

LIVE DEMO!

Page 25: Hyper Island - 2012

Fun with WLAN

● Create an evil twin

● Jasager

Page 26: Hyper Island - 2012

Evil twin

● You connect to eg. "espresso house free"● iPhone will save and remember that network● When you come back it will automatically

connect

Page 27: Hyper Island - 2012

Evil twin

● Someone creates a network called "espresso house free"

● Your phone will automatically connect

Page 28: Hyper Island - 2012

What if the attacker don't know which networks you've been connected to?

Page 29: Hyper Island - 2012
Page 30: Hyper Island - 2012

Jasager

Page 31: Hyper Island - 2012

Fun with WLAN

● Works on everything○ Windows, linux, Mac, Android, iPhone etc

● Can be monitored○ See which networks you are looking for and in which

order

Page 32: Hyper Island - 2012

Fun with WLAN

WiGLE.net

Page 33: Hyper Island - 2012

IT-Security @ Home

● Devices on local networks.○ Routers○ Printers○ Heat Pumps○ Laptops○ PC's○ Tablets○ Cellphones○ XBOX'es○ ...etc...

Page 34: Hyper Island - 2012

Telecom operator ComHem provide "Tre-hål-i-väggen"

Page 35: Hyper Island - 2012

● Routers may act as switches

● IP Forwarding

● You can see your neighbours devices

Page 36: Hyper Island - 2012
Page 37: Hyper Island - 2012

● Portscan!

● A port scanner finds open services on IP-addresses.

● nmap

Page 38: Hyper Island - 2012
Page 39: Hyper Island - 2012

● Find vulnerabilityor

● Weak (default) passwordor

● No password!

Protip:http://www.routerpasswords.com/

Page 40: Hyper Island - 2012

GAME OVER

Page 41: Hyper Island - 2012

Conclusion

You can with ease gain access to your neighbours data.

Page 42: Hyper Island - 2012

Speaking of portscanning...

● Spring 2010, the "spoon" project.

● Got interested in packet crafting.

● 3000 packets/second

Page 43: Hyper Island - 2012

● Sweden got 25.000.000 allocated IPv4-addresses.

● ...Results in a timeframe of 2 hours and 20 min to scan.

● Resolve all servers on a given port in a Sweden.

● Could of course be applied to any country.

Page 44: Hyper Island - 2012

● Early 2011, "spoon2".

● 30000 packets/second. Ten times as fast!

● From 2½ hour, to approximate 15 minutes.

● Same result.

Page 45: Hyper Island - 2012

● Imagine a company. Like ACME Corp.

● 10 servers running "spoon2".

● Get a fresh map of Sweden every 90 second.

● 100 servers, every 9'th second second.

Page 46: Hyper Island - 2012

● ACME Corp got potential to become a global "pingdom".

● Results in large scale data mining.

● Would require loads of clever algorithms and infrastructure to maintain it all though.

Page 47: Hyper Island - 2012

shodanhq.com

● The firm shodanhq already crawls countries for open services.

● Identified ~438.000 web servers in Sweden alone.

● Mostly devices found on local networks.(routers / printers).

● No security. Loads of vulnerable devices.

Page 48: Hyper Island - 2012

● Eavesdrop your neighbour? No problem.

● Why bother?

● Can be applied to a whole country.

Page 49: Hyper Island - 2012

Summary

● Web Scraping

● Quick and Dirty SQL Injections

● iPhones, WiFi and Evil Twins

● Hacking Neighbours

● Port scanning on Steroids

Page 50: Hyper Island - 2012

Q & A

http://detectify.com/

Hack the planet!

Page 51: Hyper Island - 2012

References● http://www.theta44.org/karma/aawns.pdf

● http://timtux.net/posts/10-Vad-delar-du-ut-IT-skerhet-i-hemmet

● http://krebsonsecurity.com/2010/06/wi-fi-street-smarts-iphone-edition/

● http://nmap.org/6/

● http://www.ietf.org/rfc/rfc793.txt

● http://www.ietf.org/rfc/rfc791.txt

● http://www.ietf.org/rfc/rfc1323.txt

● http://www.zdnet.com/sql-injection-attacks-up-69-7000001742/