BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

36
BlackHat BlackHat SEO: Abusing Google Trends to SEO: Abusing Google Trends to BlackHat BlackHat SEO: Abusing Google Trends to SEO: Abusing Google Trends to Serve Malware Serve Malware 29 September 2010 Don DeBolt and Kiran Bandla Copyright © 2009 CA. All rights reserved. Copyright © 2009 CA. All rights reserved.

Transcript of BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Page 1: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

BlackHatBlackHat SEO: Abusing Google Trends toSEO: Abusing Google Trends toBlackHatBlackHat SEO: Abusing Google Trends to SEO: Abusing Google Trends to Serve MalwareServe Malware

29 September 2010Don DeBolt and Kiran Bandla

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

Page 2: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Agenda

BlackHat SEO Logic and Components

BackgroundBackground

Research Methodology

Findings

Conclusion

Copyright © 2009 CA. All rights reserved.

Page 3: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Logic flow of a BlackHat SEO Attack

•Infiltrate host/siteInfiltrate host/site

•Inject malicious code

•Query Google for key words•Query Google for key words

•Query Google for key word content

G i d d b G l•Get indexed by Google

•Redirect visitor

•Tally user via multiple hops/redirectors

•Serve malware at landing site

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

2

Page 4: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Components of the Attack

VictimLegitimate Website – compromisedScripting LanguageC&C Website managing queriesC&C Website managing queries Search EngineBad Actor

NEED Images here

Copyright © 2009 CA. All rights reserved. 3

Page 5: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Demo Video

Copyright © 2009 CA. All rights reserved. 4

Page 6: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

BackgroundBackgroundBackgroundBackground

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

5

Page 7: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Search Engine Optimization

Creating Relevance Organically• Structured content

• Unique Keywords

• Interesting Contentg

• Trust

• Backlinks (Inbound Links)

Source: SEO Warrior

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

6

Page 8: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Google Market Share

USUS UKUK

Source: Hitwise.com

Copyright © 2009 CA. All rights reserved.

Page 9: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Google Trends

Copyright © 2009 CA. All rights reserved.

Page 10: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

BlackHat SEO Techniques

•Keyword Stuffing

•Doorway Pages

•Duplicate Web Pages

•Link Farms

•Reciprocal Links

•Hidden Content

•Cloaking

Source: http://www.seosearchengineoptimizationseattle.com/index.html

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

9

Page 11: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Types of BlackHat SEO

E t D i M K dEvent-Driven

Need bullets here

Mass Keyword

Need bullets here

Copyright © 2009 CA. All rights reserved.

10

Page 12: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Research MethodologyResearch MethodologyResearch MethodologyResearch Methodology

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

11

Page 13: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Research Methodology

Google APIOne of the tools we needed was a Google search API for collecting the hourly trend keywords in an automated way. For this, we used the pygoogle[8] API.

l i th f G l h It th G l AJAX API b f hi h it i li it d t l 64 lt W l d t d [9] t tpygoogle is a python wrapper for Google search. It uses the Google AJAX API, because of which, it is limited to only 64 results. We also used pytrends[9] to get Google’s Hot trends. pytrends is a python wrapper for fetcing Google trends. PythonPython was the language of choice most of the automation. As a lot of our internal codebase already uses python, it was easy to integrate and build on top on that. We used python modules for Google search and Google Trends, to collect hourly stats. HoneyClientOne of the most useful tools for analysis was the pure python Honeyclient that we developed. It emulates Internet Explorer 7, understands Javascript and many ActiveX exploits. We feed URLs to the honeyclient to quickly analyze the attack from source to the final landing site. This has been a very useful and handy tool. It supports a huge list of User-Agents, including search bots. Owned domain DataUsing these tools, we started collecting poisoned domains, keywords and other details in an automated way, which are discussed in the following sections. The data is available for public consumption at seo-research appspot com and www maltrax com:8080is available for public consumption at seo-research.appspot.com and www.maltrax.com:8080. Analysis techniques To analyze the SEO poisoning, we took two different approaches. The First one is enumerating poisoned domains and URLs based on trending Google keywords. The Second is to infiltrate the Blackhat SEO cycle to collect information directly. The two approaches are discussed below. Trend Keyword acquisitionThe earliest searching engine poisoning that we observed was almost completely based on Google Trends. The attackers would enumerate trending Google search k d d h b ild h ld ll b i d d b G l F hi k d i d 10 ikeywords and use them to build new pages that would eventually be indexed by Google. Fetching new keywords is done once every 10 minutes. Using the same approach, we started enumerating trending Google search keywords every hour, using pytrends. We would then use pygoogle to search Google for these keywords, collecting the top 64 results. We also searched for the previous day’s trending keywords and saved those results as well. This data was very useful in determining the time to poison (TTP). Blackhat SEO reconnaissanceOver time, we started to notice that the attackers gradually started to use more keywords for poisoning URLs than those available from Google trends. To collect all , g y y p g gsuch keywords, we took a different approach. We acted as a search engine.

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

12

Page 14: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Anatomy of an AttackAnatomy of an AttackAnatomy of an AttackAnatomy of an Attack

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

13

Page 15: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Injected PHP Logic Flow

Copyright © 2009 CA. All rights reserved.

Page 16: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Who are you and where did you come from?

U A t Ch k 1User Agent Check 1

User Agent Check 2

Source IP Check

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

15

Page 17: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Google Screen Scrape

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

16

Page 18: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Dynamic Content Generation

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

17

Page 19: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Generated Content

Copyright © 2009 CA. All rights reserved.

Page 20: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Google Trends BlackHat SEO URLs

http://goodnewsbiblekids com/nthei php?ad=earthquake baja california 2010http://goodnewsbiblekids.com/nthei.php?ad earthquake baja california 2010

nthei.php?ad

earthquake baja california 2010

Copyright © 2009 CA. All rights reserved. 19

Page 21: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Choosing a landing site

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

20

Page 22: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Landing Site Payload

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

21

Page 23: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Obfuscation Techniques

•Base64 Encoding for compromised contentcompromised content•AES Encryption for FakeAVscan pagesp g

Copyright © 2009 CA. All rights reserved. 22

Page 24: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

From the Users Vantage Point

•Keyword SearchKeyword Search

•SERPs Returned

•SERP Selected•SERP Selected

•Redirect

B Mi i i•Browser Minimizes

•Pop-up Warning

•Fake Scan Page

•Download

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

23

Page 25: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

FindingsFindingsFindingsFindings

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

24

Page 26: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

TTP – Haiti Earthquake

•Google Trend volume peaks on January 15, 2010.•First poisoned URL identified via Google Search was January 14, 2010•Event transpired on January 12, 2010.Event transpired on January 12, 2010. •TTP = 48hrs

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

25

Page 27: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

TTP – Masters Golf Tournament

•Google Trend volume peaks on April 8, 2010.•First poisoned URL identified via Google Search was April 7th at 23:00hrs ET.•Event transpired on April 7, 2010. (Par 3 tournament initiated event)Event transpired on April 7, 2010. (Par 3 tournament initiated event)•TTP = 11hrs

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

26

Page 28: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

TTP – Kendra Exposed

•Google Trend volume peaks on May 28, 2010.•First poisoned URL identified via Google Search was May 26th at 15:00hrs ET.•Event(news broke) transpired on May 3, 2010. Story resurfaced on May 26, 2010.•TTP = 23 days (from original event)•TTP = 15 hrs (from secondary event)

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

27

Page 29: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

TTP – Yeardley Love

•Google Trend volume peaks on May 4, 2010.•First poisoned URL identified via Google Search was May 4th at 21:00hrs ET.•Event(news broke) transpired on May 3, 2010.Event(news broke) transpired on May 3, 2010.•TTP = 31 hrs

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

28

Page 30: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

TTP – Adam Wheeler

•Google Trend volume peaks on May 19, 2010.•First poisoned URL identified via Google Search was May 18th at 16:00 hrs ET.•Event (news broke) transpired on May 17, 2010.Event (news broke) transpired on May 17, 2010.•TTP = 24 hrs

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

29

Page 31: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Google Trend SEO Stats

Poisoned URLs ‐ TotalApril 157612May 19904

Poisoned URLs ‐ UniqueApril 22669May 2131

Poisoned Domains ‐ UniqueApril 2682May 848

Poisoned Keywords ‐ UniqueApril 3174May 1168

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

30

Page 32: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Image Poisoning

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

31

Page 33: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Attack Vectors

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

32

Page 34: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Contributing Factors

Google Type-ahead nowGoogle Type ahead… now “Google Instant”

− Possibly “leading the jury”

L li ti f T dLocalization of Trends− Bad Actors don’t have to

localize content

Copyright © 2009 CA. All rights reserved.

Page 35: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

Conclusion

Use of Google Trends Keywords can produce low TTP and high victim countNo bias shown towards the use of Google Trends KeywordsMass-Keyword SEO equally capable and in greater use than Event-Driven SEOSignificant drop off identified in the volume of poisoned Google Trend SERPs since April

Copyright © 2009 CA. All rights reserved. 34

Page 36: BlackHat SEO: Abusing Google Trends to SEO: Abusing Google ...

QuestionsQuestionsQuestionsQuestions

Copyright © 2009 CA. All rights reserved.

Copyright © 2009 CA. All rights reserved.

35