google dorks: analysis, creation, and new defenses

26
Google Dorks: Analysis, Creation, and new Defenses Flavio Toffalini, University of Verona, IT, [email protected] Maurizio Abbà, LastLine, UK, [email protected] Damiano Carra, University of Verona, IT, [email protected] Davide Balzarotti, Eurecom, FR, [email protected]

Upload: flavio-toffalini

Post on 13-Apr-2017

128 views

Category:

Internet


5 download

TRANSCRIPT

Page 1: Google Dorks: Analysis, Creation, and new Defenses

Google Dorks: Analysis, Creation, and new Defenses

Flavio Toffalini, University of Verona, IT, [email protected]

Maurizio Abbà, LastLine, UK, [email protected]

Damiano Carra, University of Verona, IT, [email protected]

Davide Balzarotti, Eurecom, FR, [email protected]

Page 2: Google Dorks: Analysis, Creation, and new Defenses

2

GOOGLE DORKS

Page 3: Google Dorks: Analysis, Creation, and new Defenses

3

MOTIVATION

● Attackers use Dorks to quickly locate targets● After a new vulnerability is disclosed, one Google query is

sufficient to identify a large amount of vulnerable installations

● No time for sysadmins to apply patches !!

Page 4: Google Dorks: Analysis, Creation, and new Defenses

4

MOTIVATION

● Attackers use Dorks to quickly locate targets● After a new vulnerability is disclosed, one Google query is

sufficient to identify a large amount of vulnerable installations

● No time for sysadmins to apply patches !!

● If we could prevent dorks, attackers would need to resort to Internet scanning … which is several orders of magnitude slower

Page 5: Google Dorks: Analysis, Creation, and new Defenses

5

GOALS

● Current practices● Understand which information is used by existing dorks

● Design simple solutions to defeat those dorks

● Future threats● Test if attackers could move towards new styles of dorks

● Design simple solutions to prevent it

Page 6: Google Dorks: Analysis, Creation, and new Defenses

6

GOOGLE DORKS

Page 7: Google Dorks: Analysis, Creation, and new Defenses

7

TAXONOMY

● The Exploit-DB database contains over 5143 dorks● Automated/manual analysis

URL Patterns (44%)

File Extensions (6%)

Content-Based (74%)

Page 8: Google Dorks: Analysis, Creation, and new Defenses

8

● The Exploit-DB database contains over 5143 dorks● Automated/manual analysis

URL Patterns (44%)

File Extensions (6%)

Content-Based

Banners (54%)

Misconfigurations (8%)

Error messages (1%)

Common words (11%)

TAXONOMY

Page 9: Google Dorks: Analysis, Creation, and new Defenses

10

DORKS EVOLUTION BY CATEGORY

URL Patterns

Banner

Common words

Misconfiguration

Page 10: Google Dorks: Analysis, Creation, and new Defenses

11

KNOWN DEFENSES

URL Patterns

File Extensions

Content-Based

Banners remove banners

Misconfigurations improve system configuration

Error messages proper error handling

Common words

Page 11: Google Dorks: Analysis, Creation, and new Defenses

12

CONTRIBUTION

URL Patterns ??

File Extensions

Content-Based

Banners remove banners

Misconfigurations improve system configuration

Error messages proper error handling

Common words

??

Page 12: Google Dorks: Analysis, Creation, and new Defenses

13

● Force search engines to index “randomized” URLs● Let the users navigate and share using cleartext URLs

http://www.web-site.com/wp-content/dimva.html

http://www.web-site.com/HD12DAF35TR/dimva.html

URL-DORKS

Page 13: Google Dorks: Analysis, Creation, and new Defenses

14

● XOR (part of) URLs with random seed kept in the server a = resource a O(a) = obfuscated resource a

● Redirect 301 to inform search engine that the page is moved

● Canonical URL Tag to delete plain URLs in the results

● Intercept and replace SiteMap

URL-DORKS

Page 14: Google Dorks: Analysis, Creation, and new Defenses

15

OBFUSCATION PROTOCOL - CRAWLERS

Crawler URL Obfuscator Web Site

a

a

resp. of a

Redir. 301 to O(a)

O(a)

resp. of a + canonical tag

Page 15: Google Dorks: Analysis, Creation, and new Defenses

16

OBFUSCATION PROTOCOL - BROWSER

Browser URL Obfuscator Web Site

O(a)a

resp. of aresp. of a

b

resp. of b resp. of b

b

Page 16: Google Dorks: Analysis, Creation, and new Defenses

17

URL Patterns

File Extensions

Content-Based

Banners remove banners

Misconfigurations improve system configuration

Error messages proper error handling

Common words

??

Page 17: Google Dorks: Analysis, Creation, and new Defenses

18

WORD-BASED DORKS

● Goal● Using words left by CMSs to create a Google Dork

● Greedy search algorithm to maximizes ● Hit-rank: percentage of web site made by a target technology

● Coverage: number of entries extracted by the Dork

Page 18: Google Dorks: Analysis, Creation, and new Defenses

19

WORD-BASED DORKS: CREATION

Joomla!

Page 19: Google Dorks: Analysis, Creation, and new Defenses

20

“Category” + “Submit” +

“....”

Vanillainstallation

WORD-BASED DORKS: CREATION

Categories

SubmitRegister

Contact

BuyRecent

UsersList

Registration

Compute hit rank & coverage

Page 20: Google Dorks: Analysis, Creation, and new Defenses

22

WORD-BASED DORKS: CREATION

● Gradient Ascent algorithm● How to add a new word?

● At each step, we add the word that provides the highest hit rank between the ones that have a coverage above the median of all candidate words (more details in the paper)

Page 21: Google Dorks: Analysis, Creation, and new Defenses

24

Common Words Ground Truth

WordPress 938/1000 967/1000 Hit rank

47.1 M 83.6 M Coverage

Joomla! 878/1000 887/1000 Hit rank

7.24 M 3.73 M Coverage

Drupal 827/1000 997/1000 Hit rank

7.87 M 3.27 M Coverage

Magento 871/1000 852/1000 Hit rank

0.39 M 0.68 M Coverage

OpenCart 891/1000 998/1000 Hit rank

0.59 M 1.42 M Coverage

WORD-BASED DORKS:

Page 22: Google Dorks: Analysis, Creation, and new Defenses

25

Common Words Ground Truth

WordPress 938/1000 967/1000 Hit rank

47.1 M 83.6 M Coverage

Joomla! 878/1000 887/1000 Hit rank

7.24 M 3.73 M Coverage

Drupal 827/1000 997/1000 Hit rank

7.87 M 3.27 M Coverage

Magento 871/1000 852/1000 Hit rank

0.39 M 0.68 M Coverage

OpenCart 891/1000 998/1000 Hit rank

0.59 M 1.42 M Coverage

WORD-BASED DORKS:

Page 23: Google Dorks: Analysis, Creation, and new Defenses

26

Common Words Ground Truth

WordPress 938/1000 967/1000 Hit rank

47.1 M 83.6 M Coverage

Joomla! 878/1000 887/1000 Hit rank

7.24 M 3.73 M Coverage

Drupal 827/1000 997/1000 Hit rank

7.87 M 3.27 M Coverage

Magento 871/1000 852/1000 Hit rank

0.39 M 0.68 M Coverage

OpenCart 891/1000 998/1000 Hit rank

0.59 M 1.42 M Coverage

WORD-BASED DORKS:

Page 24: Google Dorks: Analysis, Creation, and new Defenses

29

Idea: add invisible characters to break words and prevent them to be indexed.

WORD-BASED DORKS: DEFENSES

Powered by WordPress

Power⁣ed b⁣y Wor⁣dPress

Page 25: Google Dorks: Analysis, Creation, and new Defenses

30

DORKS DEFENSES

URL Patterns

File Extensions

Content-Based

Banners remove banners

Misconfigurations improve system configuration

Error messages proper error handling

Common words

Page 26: Google Dorks: Analysis, Creation, and new Defenses

31

CONCLUSION

1) Dork classification

2) URL Pattern Dork Defense

3) New type of Dork using common words

4) Defense against common word dorks