lord of the bing - black hat usa 2010

47
d fh Lord of the Bing Taking Back Search Engine Hacking From Google and Bing Taking Back Search Engine Hacking From Google and Bing 29 July 2010 Presented by: Presented by: Francis Brown and Rob Ragan Stach & Liu, LLC www.stachliu.com

Upload: rob-ragan

Post on 16-May-2015

15.300 views

Category:

Technology


0 download

DESCRIPTION

During World War II the CIA created a special information intelligence unit to exploit information gathered from openly available sources. One classic example of the team’s resourcefulness was the ability to determine whether Allied forces had successfully bombed bridges leading into Paris based on increasing orange prices. Since then OSINT sources have surged in number and diversity, but none can compare to the wealth of information provided by the Internet. Attackers have been clever enough in the past to take advantage of search engines to filter this information to identify vulnerabilities. However, current search hacking techniques have been stymied by search provider efforts to curb this type of behavior. Not anymore - our demonstration-heavy presentation picks up the subtle art of search engine hacking at the current state and discusses why these techniques fail. We will then reveal several new search engine hacking techniques that have resulted in remarkable breakthroughs against both Google and Bing. Come ready to engage with us as we release two new tools, GoogleDiggity and BingDiggity, which take full advantage of the new hacking techniques. We’ll also be releasing the first ever “live vulnerability feed”, which will quickly become the new standard on how to detect and protect yourself against these types of attacks. This presentation will change the way you've previously thought about search engine hacking, so put on your helmets. We don't want a mess when we blow your minds.

TRANSCRIPT

Page 1: Lord of the Bing - Black Hat USA 2010

d f hLord of the BingTaking Back Search Engine Hacking From Google and BingTaking Back Search Engine Hacking From Google and Bing 29 July 2010

Presented by:Presented by: Francis Brown and Rob RaganStach & Liu, LLCwww.stachliu.com

Page 2: Lord of the Bing - Black Hat USA 2010
Page 3: Lord of the Bing - Black Hat USA 2010

G lGoalsD E S I R E D O U T C O M E

• To improve Google Hacking• Attacks and defenses• Advanced tools and techniques

• To think differently about exposures in publicly available sources

• To blow your mind!

3

Page 4: Lord of the Bing - Black Hat USA 2010

G l /Bi H kiGoogle/Bing HackingS E A R C H E N G I N E A T T A C K S

4

Page 5: Lord of the Bing - Black Hat USA 2010

Att k T tAttack TargetsG O O G L E H A C K I N G D A T A B A S E

• Advisories and Vulnerabilities (215)• Error Messages (58)

• Pages containing network or vulnerability data (59)Error Messages (58)

• Files containing juicy info (230)• Files containing passwords (135)• Files containing usernames (15)

y• Sensitive Directories (61)• Sensitive Online Shopping Info (9)• Various Online Devices (201)• Files containing usernames (15)

• Footholds (21)• Pages containing login portals (232)

Various Online Devices (201)• Vulnerable Files (57)• Vulnerable Servers (48)• Web Server Detection (72)• Web Server Detection (72)

5

Page 6: Lord of the Bing - Black Hat USA 2010

Att k T tAttack TargetsG O O G L E H A C K I N G D A T A B A S E

Old School ExamplesE M• Error Messages

• filetype:asp + "[ODBC SQL“

• "Warning: mysql_query()" "invalid query“

• Files containing passwords• inurl:passlist.txt

6

Page 7: Lord of the Bing - Black Hat USA 2010

N T lkitNew ToolkitS T A C H & L I U T O O L S

Google Diggity• Uses Google AJAX APIg J

• Not blocked by Google bot detection• Does not violate Terms of Service

• Can leverage

Bing Diggity• Uses Bing SOAP API• Company/Webapp Profiling

• Enumerate: URLs, IP-to-virtual hosts, etc.• Bing Hacking Database (BHDB)

V l bilit h i i Bi f t

7

• Vulnerability search queries in Bing format

Page 8: Lord of the Bing - Black Hat USA 2010

N T lkitNew ToolkitS T A C H & L I U T O O L S

GoogleScrape Diggity• Uses Google mobile• Uses Google mobile

interface• Light-weight, no

advertisements or extrasV l T f S• Violates Terms of Service

• Automatically leverages valid open proxies

• Spoofs User-agent and• Spoofs User agent and Referer headers

• Random &userip= value

8

Page 9: Lord of the Bing - Black Hat USA 2010

N H k D t bNew Hack DatabasesA T T A C K Q U E R I E S

BHDB – Bing Hacking Data Base• First ever Bing Hacking database

Example - Bing vulnerability search:• GHDB query

• "allintitle:Netscape FastTrack Server Home Page"

• Bing has limitations that make it difficult to create vuln search queries

• Bing disabled the link: and linkdomain: directives to combat

allintitle:Netscape FastTrack Server Home Page

• BHDB version• "intitle:Netscape FastTrack Server Home Page"

abuse in March 2007• Does not support ext: or inurl:• The filetype: functionality is limited

9

Page 10: Lord of the Bing - Black Hat USA 2010

N H k D t bNew Hack DatabasesA T T A C K Q U E R I E S

SLDB - Stach & Liu Data Base• New Google/Bing hacking searches in active development by the

S&LS&L team

SLDB Examples• ext:(doc | pdf | xls | txt | ps | rtf | odt | sxw | psw | ppt | pps |

xml) (intext:confidential salary | intext:"budget approved")xml) (intext:confidential salary | intext:"budget approved") inurl:confidential

• ( filetype:mail | filetype:eml | filetype:mbox | filetype:mbx ) intext:password|subject

• filetype:sql "insert into" (pass|passwd|password)

• !Host=*.* intext:enc_UserPassword=* ext:pcf

• "your password is" filetype:log

10

Page 11: Lord of the Bing - Black Hat USA 2010

DEMON E W G O O G L E H A C K I N G T O O L S

DEMO

11

Page 12: Lord of the Bing - Black Hat USA 2010

T diti l D fTraditional DefensesG O O G L E H A C K I N G D E F E N S E S

• “Google Hack yourself” organization• Employ tools and techniques used by hackersp y q y• Remove info leaks from Google cache

• Using Google Webmaster Tools

• Regularly update your robots.txt.Regularly update your robots.txt.• Or robots meta tags for individual page exclusion

• Data Loss Prevention/Extrusion Prevention Systems• Free Tools: OpenDLP Senf• Free Tools: OpenDLP, Senf

• Policy and Legal Restrictions

12

Page 13: Lord of the Bing - Black Hat USA 2010

T diti l D fTraditional DefensesG O O G L E H A C K I N G D E F E N S E S

• “Google Hack yourself” organization• Employ tools and techniques used by hackersp y q y• Remove info leaks from Google cache

• Using Google Webmaster Tools

• Regularly update your robots.txt.Regularly update your robots.txt.• Or robots meta tags for individual page exclusion

• Data Loss Prevention/Extrusion Prevention Systems• Free Tools: OpenDLP Senf• Free Tools: OpenDLP, Senf

• Policy and Legal Restrictions

13

Page 14: Lord of the Bing - Black Hat USA 2010

Ad d D fAdvanced DefensesP R O T E C T Y O N E C K

14

Page 15: Lord of the Bing - Black Hat USA 2010

E i ti D fExisting Defenses“H A C K Y O U R S E L F”

Tools exist

Real-time updates

Convenient

Multi-engine results

Real time updates

Historical archived data Multi-domain searching

15

g

Page 16: Lord of the Bing - Black Hat USA 2010

Ad d D fAdvanced DefensesN E W H O T S I Z Z L E

Stach & Liu now proudly presents:p y p• Google Hacking Alerts• Bing Hacking Alerts

16

Page 17: Lord of the Bing - Black Hat USA 2010

G l H ki Al tGoogle Hacking AlertsA D V A N C E D D E F E N S E S

Google Hacking Alerts• All hacking database queries using • Real-time vuln updates to >2400 hack queries via RSS• Organized and available via importable file

17

Page 18: Lord of the Bing - Black Hat USA 2010

G l H ki Al tGoogle Hacking AlertsA D V A N C E D D E F E N S E S

18

Page 19: Lord of the Bing - Black Hat USA 2010

Bi H ki Al tBing Hacking AlertsA D V A N C E D D E F E N S E S

Bing Hacking Alerts• Bing searches with regexs from BHDB• Leverage &format rss directive to turn into update feeds• Leverage &format=rss directive to turn into update feeds

19

Page 20: Lord of the Bing - Black Hat USA 2010

Al t Cli t T lAlert Client ToolsG O O G L E / B I N G A L E R T C L I E N T S

Google/Bing Hacking Alert Thick Clients• Take in Google/Bing Alert RSS feeds as input

• Allow user to set one or more filters to generate alerts when one of the RSS alert entries matches something they are interested in (e.g. “yourcompany.com” in the URL)

• Several thick clients being released by Stach & Liu:• Windows app

• iPhone app (coming soon)

• Droid app (coming soon)• Droid app (coming soon)

20

Page 21: Lord of the Bing - Black Hat USA 2010

DEMOA D V A N C E D D E F E N S E T O O L S

DEMO

21

Page 22: Lord of the Bing - Black Hat USA 2010

N D fNew Defenses“G O O G L E / B I N G H A C K A L E R T S”

Tools exist

Real-time updates

Convenient

Multi-engine results

Real time updates

Historical archived data Multi-domain searching

22

g

Page 23: Lord of the Bing - Black Hat USA 2010

G l A E l iGoogle Apps ExplosionS O M A N Y A P P L I C A T I O N S T O A B U S E

23

Page 24: Lord of the Bing - Black Hat USA 2010

G l Ph B kGoogle PhoneBookS P E A R P H I S H I N G

24

Page 25: Lord of the Bing - Black Hat USA 2010

G l C d S hGoogle Code SearchV U L N S I N O P E N S O U R C E C O D E

• Regex search for vulnerabilities in public code• Example: SQL Injection in ASP querystringExample: SQL Injection in ASP querystring

• select.*from.*request\.QUERYSTRING

25

Page 26: Lord of the Bing - Black Hat USA 2010

DEMOG O O G L E C O D E S E A R C H H A C K I N G

DEMO

26

Page 27: Lord of the Bing - Black Hat USA 2010

G l C d S hGoogle Code SearchV U L N S I N O P E N S O U R C E C O D E

27

Page 28: Lord of the Bing - Black Hat USA 2010

G l C d S hGoogle Code SearchV U L N S I N O P E N S O U R C E C O D E

28

Page 29: Lord of the Bing - Black Hat USA 2010

Black Hat SEOBlack Hat SEOS E A R C H E N G I N E O P T I M I Z A T I O N

• Use popular search dtopics du jour

• Pollute results with links to badwareto badware

• Increase chances of a successful attack

29

Page 30: Lord of the Bing - Black Hat USA 2010

Google TrendsGoogle TrendsB L A C K H A T S E O R E C O N

30

Page 31: Lord of the Bing - Black Hat USA 2010
Page 32: Lord of the Bing - Black Hat USA 2010

D fDefensesB L A C K H A T S E O D E F E N S E S

• Malware Warning Filters• Google Safe Browsingg g• Microsoft SmartScreen Filter• Yahoo Search Scan

• Sandbox SoftwareSandbox Software• Sandboxie (sandboxie.com)• Dell KACE - Secure Browser• Adobe Reader Sandbox (Protected Mode)

• No-script and Ad-block browser plugins

32

Page 33: Lord of the Bing - Black Hat USA 2010

M I j ti Att kMass Injection AttacksM A L W A R E G O N E W I L D

Malware Distribution Woes• Popular websites victimized, become malware distribution sites to their own

customerscustomers

33

Page 34: Lord of the Bing - Black Hat USA 2010

M l B FilMalware Browser FiltersU R L B L A C K L I S T

Protecting users from known threats• Joint effort to protect customers from known malware and phishing links

34

Page 35: Lord of the Bing - Black Hat USA 2010

I i t T thInconvenient Truth D I C K H E A D A L E R T S

Malware Black List Woes• Average web administrator has no idea when their site gets black listed

35

Page 36: Lord of the Bing - Black Hat USA 2010

Ad d D fAdvanced DefensesP R O T E C T Y O N E C K

36

Page 37: Lord of the Bing - Black Hat USA 2010

M l Di itMalware DiggityA D V A N C E D D E F E N S E S

Malware Diggity• Uses Bing’s linkfromdomain: directive to identify off-site links of the domain(s) g y ( )

you wish to monitor

• Compares to known malware sites/domains • Alerts if site is compromised and now distributing malware• Monitors new Google Trends links

Malware Diggity AlertsL h B ‘&f ’ d l ff• Leverages the Bing ‘&format=rss’ directive, to actively monitor new off-site links of your site as they appear

• Immediately lets you know if you have been compromised by one of these mass injection attacks or if your site has been black listed

37

mass injection attacks or if your site has been black listed

Page 38: Lord of the Bing - Black Hat USA 2010

M l Di itMalware DiggityA D V A N C E D D E F E N S E S

38

Page 39: Lord of the Bing - Black Hat USA 2010

M l Di itMalware DiggityA D V A N C E D D E F E N S E S

39

Page 40: Lord of the Bing - Black Hat USA 2010

40

Page 41: Lord of the Bing - Black Hat USA 2010

M l M i iMalware MonitoringI N F E C T I O N D E T E C T I O N

Identify External Links

Identify External Links

Identify Identify AlertAlert Incoming LinksIncoming LinksAlertAlert

Compare to Compare to Detect Detect Black ListBlack ListInfected LinksInfected Links

41

Page 42: Lord of the Bing - Black Hat USA 2010

Search Engine deOptimizationB L A C K L I S T Y O U R F O E S

Identify Malware Links

Identify Malware Links

Mass Inject Mass Inject ProfitProfit CompetitionCompetitionProfitProfit

Competition Competition Competition Competition Black ListedBlack ListedPageRank is 0PageRank is 0

42

Page 43: Lord of the Bing - Black Hat USA 2010

F Di iFuture DirectionP R E D I C T I O N S

43

Page 44: Lord of the Bing - Black Hat USA 2010

P di tiPredictionsF U T U R E D I R E C T I O N S

Data Explosion Renewed Tool Dev• More data indexed,

searchable• Real-time, streaming updates• Faster more robust search

• Google Ajax API based• Bing/Yahoo/other engines

• Search engine aggregators

G l C d d Oth O• Faster, more robust search interfaces

Google Involvement

• Google Code and Other Open Source Repositories

• MS CodePlex, SourceForge, …

• More automation in toolsg• Filtering of search results• Better GH detection and

tool blocking

Mo e au o a o oo s• Real-time detection and

exploitation

• Google worms

44

Page 45: Lord of the Bing - Black Hat USA 2010

R l ti U d tReal-time UpdatesF U T U R E D I R E C T I O N S

45

Page 46: Lord of the Bing - Black Hat USA 2010

Questions?Questions?Ask us somethingAsk us somethingWe’ll try to answer it.W y w

For more info: Email: [email protected]: [email protected] h & Li LLCStach & Liu, LLCwww.stachliu.com

Page 47: Lord of the Bing - Black Hat USA 2010

Thank YoThank You

Stach & Liu Project info: htt //www t hli /i d h / /t l / l h ki di it j t/

47

http://www.stachliu.com/index.php/resources/tools/google-hacking-diggity-project/