SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
Root via XSS



               Positive Technologies

                    November 2011
How To Get into Troubles

 Popular builds for web development:

      • Denwer;

      • XAMPP;

      • AppServ.
How to Use Them

 Peculiarities:

      • usually run automatically;

      • contain phpMyAdmin;

      • have weak passwords;

      • have full rights (for Windows systems);

      • contain vulnerabilities;

      • operate legitimately without alerting antiviruses.
Denwer

    Current versions have the following
    vulnerabilities:
     1) Service scripts: XSS and SQL Injection;
     2) PhpMyAdmin 3.2.3 (CVE 2011-2505, 2009-1151, and
        etc.);
     3) Default login/password for DB connection.
Denwer XSS

    Peculiarities:

     • is present in the BD creation script;

     • all parameters are vulnerable;

     • is convenient for bypassing browser protections.

    Examples:
     • Chrome -
       /index.php?eBadRootPass=<script>/*&eSqlError=*/alert('
       XSS');</script>

     • IE –
       /index.php?eBadRootPass=<img%0donerror=alert(1)%20s
       rc=s%20/>

     • FF -
       /index.php?eBadRootPass=<script>alert(/XSS/);</script>
Using XSS

 Implementation stages:

      • upload your JS file by means of XSS;

      • add the SCRIPT tag into the HEAD to upload the file
        dynamically;

      • the commands are passed over according to the reverse
        shell principle;

      • Use a standard AJAX to address the scripts on the localhost;

      • Use JSONP to address the script backconnect;

      • Hide it in the IFRAME tag of the site.
Operating PhpMyAdmin

 Peculiarities:

      • requires no authentication for the entrance;

      • uses a token transferred in the body of the HTML response;

      • you need just to pass over the token in the GET request to
        implement the SQL requests.
Access to the File System

     Access to DB with root rights:
      • granted rights on reading/writing files;

      • MySQL located at the victim’s home system.

     Convenient to use:
      • Use INTO OUTFILE to create a PHP web shell;

      • After executing each request from JavaScript, the shell
        automatically deletes itself;

      • No need to store the shell since, in general case, it is
        inaccessible from the outside (by default, Apache in Denwer
        processes only requests from localhost).
Implementing the Attack

     Approach:
      • user opens the attacker’s page;

      • the script is uploaded to IFRAME via XSS;

      • the script requests commands from JSONP, its control
        server;

      • when the command is received, the script addresses
        PhpMyAdmin to get a token, and then sends an SQL request
        for creating a web shell file;

      • the web shell executes the command and deletes itself.
Hard-Coded Commands

    The script allows hard-coding the following:

     • certain sites and an IP router to visit (CSS History Hack);

     • a list of hard disks to obtain:
        «echo list volume|diskpart»;

     • ipconfig /ALL;

     • values of the environment variables to obtain;

     • a list of sites on the local system;

     • the obtained data can be processed on a Client to bypass
       directories automatically and for other reasons.
Video
Protection Against Attacks


    Keep an eye on application updates, even on those used in
    builds

    Check the default configuration before using a program

    Use browser plugins analogous to «Noscript»

    For browser developers: use zone division
Questions?
Thank you for your
attention!


dbaranov@ptsecurity.ru

Weitere ähnliche Inhalte

Was ist angesagt?

Selenium StudyGroup
Selenium StudyGroupSelenium StudyGroup
Selenium StudyGroup
Marc Myers
 
INTRODUCTION TO IIS
INTRODUCTION TO IISINTRODUCTION TO IIS
INTRODUCTION TO IIS
sanya6900
 

Was ist angesagt? (20)

Selenium RC Overview
Selenium RC OverviewSelenium RC Overview
Selenium RC Overview
 
Ejabberd installation configuration
Ejabberd installation configurationEjabberd installation configuration
Ejabberd installation configuration
 
Introduction to Wildfly 8 - Marchioni
Introduction to Wildfly 8 -  MarchioniIntroduction to Wildfly 8 -  Marchioni
Introduction to Wildfly 8 - Marchioni
 
What's New in WildFly 9?
What's New in WildFly 9?What's New in WildFly 9?
What's New in WildFly 9?
 
Open Source Citrix Windows PV Drivers - Paul Durrant, Citrix
Open Source Citrix Windows PV Drivers - Paul Durrant, CitrixOpen Source Citrix Windows PV Drivers - Paul Durrant, Citrix
Open Source Citrix Windows PV Drivers - Paul Durrant, Citrix
 
Selenium StudyGroup
Selenium StudyGroupSelenium StudyGroup
Selenium StudyGroup
 
Managing Large Selenium Grid
Managing Large Selenium Grid�Managing Large Selenium Grid�
Managing Large Selenium Grid
 
Intro
IntroIntro
Intro
 
Asp.net core 1.0 (Peter Himschoot)
Asp.net core 1.0 (Peter Himschoot)Asp.net core 1.0 (Peter Himschoot)
Asp.net core 1.0 (Peter Himschoot)
 
Appache1
Appache1Appache1
Appache1
 
Ejabberd Session
Ejabberd SessionEjabberd Session
Ejabberd Session
 
Maven
MavenMaven
Maven
 
High performance java ee with j cache and cdi
High performance java ee with j cache and cdiHigh performance java ee with j cache and cdi
High performance java ee with j cache and cdi
 
Play Framework Tutorial
Play Framework Tutorial Play Framework Tutorial
Play Framework Tutorial
 
Boris Stoyanov - Troubleshooting the Virtual Router - Run and Get Diagnostics
Boris Stoyanov - Troubleshooting the Virtual Router - Run and Get DiagnosticsBoris Stoyanov - Troubleshooting the Virtual Router - Run and Get Diagnostics
Boris Stoyanov - Troubleshooting the Virtual Router - Run and Get Diagnostics
 
INTRODUCTION TO IIS
INTRODUCTION TO IISINTRODUCTION TO IIS
INTRODUCTION TO IIS
 
XMPP Academy #2
XMPP Academy #2XMPP Academy #2
XMPP Academy #2
 
How to Secure Your WordPress Site
How to Secure Your WordPress SiteHow to Secure Your WordPress Site
How to Secure Your WordPress Site
 
Introduction to Desired State Configuration (DSC)
Introduction to Desired State Configuration (DSC)Introduction to Desired State Configuration (DSC)
Introduction to Desired State Configuration (DSC)
 
Aem maintenance
Aem maintenanceAem maintenance
Aem maintenance
 

Andere mochten auch

Fast dynamic analysis, Kostya Serebryany
Fast dynamic analysis, Kostya SerebryanyFast dynamic analysis, Kostya Serebryany
Fast dynamic analysis, Kostya Serebryany
yaevents
 

Andere mochten auch (9)

Artyom Shishkin - Printing interception via modifying Windows GDI
Artyom Shishkin - Printing interception via modifying Windows GDIArtyom Shishkin - Printing interception via modifying Windows GDI
Artyom Shishkin - Printing interception via modifying Windows GDI
 
Alexey Krasnov - We all meandered through our schooling haphazardly
Alexey Krasnov - We all meandered through our schooling haphazardlyAlexey Krasnov - We all meandered through our schooling haphazardly
Alexey Krasnov - We all meandered through our schooling haphazardly
 
Alexey lukatsky - Boston cybercrime matrix or what is the business model of ...
Alexey lukatsky  - Boston cybercrime matrix or what is the business model of ...Alexey lukatsky  - Boston cybercrime matrix or what is the business model of ...
Alexey lukatsky - Boston cybercrime matrix or what is the business model of ...
 
Anton Karpov - Black and white world of information security
Anton Karpov - Black and white world of information securityAnton Karpov - Black and white world of information security
Anton Karpov - Black and white world of information security
 
Fyodor Yarochkin - Dissecting unlawful Internet activities
Fyodor Yarochkin - Dissecting unlawful Internet activitiesFyodor Yarochkin - Dissecting unlawful Internet activities
Fyodor Yarochkin - Dissecting unlawful Internet activities
 
Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...
Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...
Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...
 
Ivan Medvedev - Security Development Lifecycle Tools
Ivan Medvedev - Security Development Lifecycle ToolsIvan Medvedev - Security Development Lifecycle Tools
Ivan Medvedev - Security Development Lifecycle Tools
 
Fast dynamic analysis, Kostya Serebryany
Fast dynamic analysis, Kostya SerebryanyFast dynamic analysis, Kostya Serebryany
Fast dynamic analysis, Kostya Serebryany
 
Marcus Niemietz - UI Redressing and Clickjacking About click fraud and data t...
Marcus Niemietz - UI Redressing and Clickjacking About click fraud and data t...Marcus Niemietz - UI Redressing and Clickjacking About click fraud and data t...
Marcus Niemietz - UI Redressing and Clickjacking About click fraud and data t...
 

Ähnlich wie Denis Baranov - Root via XSS

Denis Baranov: Root via XSS
Denis Baranov: Root via XSSDenis Baranov: Root via XSS
Denis Baranov: Root via XSS
qqlan
 
Vulnerabilities on Various Data Processing Levels
Vulnerabilities on Various Data Processing LevelsVulnerabilities on Various Data Processing Levels
Vulnerabilities on Various Data Processing Levels
Positive Hack Days
 
Vulnerabilities in data processing levels
Vulnerabilities in data processing levelsVulnerabilities in data processing levels
Vulnerabilities in data processing levels
beched
 
Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016
Xavier Ashe
 
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilitiesVorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
DefconRussia
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
Bachkoutou Toutou
 

Ähnlich wie Denis Baranov - Root via XSS (20)

Denis Baranov: Root via XSS
Denis Baranov: Root via XSSDenis Baranov: Root via XSS
Denis Baranov: Root via XSS
 
Root via XSS
Root via XSSRoot via XSS
Root via XSS
 
Do you lose sleep at night?
Do you lose sleep at night?Do you lose sleep at night?
Do you lose sleep at night?
 
Building Client-Side Attacks with HTML5 Features
Building Client-Side Attacks with HTML5 FeaturesBuilding Client-Side Attacks with HTML5 Features
Building Client-Side Attacks with HTML5 Features
 
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
DEF CON 24 - workshop - Craig Young - brainwashing embedded systemsDEF CON 24 - workshop - Craig Young - brainwashing embedded systems
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
 
Owning computers without shell access dark
Owning computers without shell access darkOwning computers without shell access dark
Owning computers without shell access dark
 
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
 
Vulnerabilities on Various Data Processing Levels
Vulnerabilities on Various Data Processing LevelsVulnerabilities on Various Data Processing Levels
Vulnerabilities on Various Data Processing Levels
 
Vulnerabilities in data processing levels
Vulnerabilities in data processing levelsVulnerabilities in data processing levels
Vulnerabilities in data processing levels
 
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
 
Securing Your Webserver By Pradeep Sharma
Securing Your Webserver By Pradeep SharmaSecuring Your Webserver By Pradeep Sharma
Securing Your Webserver By Pradeep Sharma
 
Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your Network
 
Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016
 
AOEconf17: Application Security - Bastian Ike
AOEconf17: Application Security - Bastian IkeAOEconf17: Application Security - Bastian Ike
AOEconf17: Application Security - Bastian Ike
 
AOEconf17: Application Security
AOEconf17: Application SecurityAOEconf17: Application Security
AOEconf17: Application Security
 
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilitiesVorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
 
Uncloaking IP Addresses on IRC
Uncloaking IP Addresses on IRCUncloaking IP Addresses on IRC
Uncloaking IP Addresses on IRC
 
An introduction to php shells
An introduction to php shellsAn introduction to php shells
An introduction to php shells
 
Attacking HTML5
Attacking HTML5Attacking HTML5
Attacking HTML5
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 

Mehr von DefconRussia

[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC [DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
DefconRussia
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23
DefconRussia
 

Mehr von DefconRussia (20)

[Defcon Russia #29] Борис Савков - Bare-metal programming на примере Raspber...
[Defcon Russia #29] Борис Савков -  Bare-metal programming на примере Raspber...[Defcon Russia #29] Борис Савков -  Bare-metal programming на примере Raspber...
[Defcon Russia #29] Борис Савков - Bare-metal programming на примере Raspber...
 
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
 
[Defcon Russia #29] Алексей Тюрин - Spring autobinding
[Defcon Russia #29] Алексей Тюрин - Spring autobinding[Defcon Russia #29] Алексей Тюрин - Spring autobinding
[Defcon Russia #29] Алексей Тюрин - Spring autobinding
 
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
 
Георгий Зайцев - Reversing golang
Георгий Зайцев - Reversing golangГеоргий Зайцев - Reversing golang
Георгий Зайцев - Reversing golang
 
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC [DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-one
 
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
 
HTTP HOST header attacks
HTTP HOST header attacksHTTP HOST header attacks
HTTP HOST header attacks
 
Attacks on tacacs - Алексей Тюрин
Attacks on tacacs - Алексей ТюринAttacks on tacacs - Алексей Тюрин
Attacks on tacacs - Алексей Тюрин
 
Weakpass - defcon russia 23
Weakpass - defcon russia 23Weakpass - defcon russia 23
Weakpass - defcon russia 23
 
nosymbols - defcon russia 20
nosymbols - defcon russia 20nosymbols - defcon russia 20
nosymbols - defcon russia 20
 
static - defcon russia 20
static  - defcon russia 20static  - defcon russia 20
static - defcon russia 20
 
Zn task - defcon russia 20
Zn task  - defcon russia 20Zn task  - defcon russia 20
Zn task - defcon russia 20
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20
 
Nedospasov defcon russia 23
Nedospasov defcon russia 23Nedospasov defcon russia 23
Nedospasov defcon russia 23
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23
 
Miasm defcon russia 23
Miasm defcon russia 23Miasm defcon russia 23
Miasm defcon russia 23
 
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
 
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условияхSergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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...
 
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...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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 - 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...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Denis Baranov - Root via XSS

  • 1. Root via XSS Positive Technologies November 2011
  • 2. How To Get into Troubles Popular builds for web development: • Denwer; • XAMPP; • AppServ.
  • 3. How to Use Them Peculiarities: • usually run automatically; • contain phpMyAdmin; • have weak passwords; • have full rights (for Windows systems); • contain vulnerabilities; • operate legitimately without alerting antiviruses.
  • 4. Denwer Current versions have the following vulnerabilities: 1) Service scripts: XSS and SQL Injection; 2) PhpMyAdmin 3.2.3 (CVE 2011-2505, 2009-1151, and etc.); 3) Default login/password for DB connection.
  • 5. Denwer XSS Peculiarities: • is present in the BD creation script; • all parameters are vulnerable; • is convenient for bypassing browser protections. Examples: • Chrome - /index.php?eBadRootPass=<script>/*&eSqlError=*/alert(' XSS');</script> • IE – /index.php?eBadRootPass=<img%0donerror=alert(1)%20s rc=s%20/> • FF - /index.php?eBadRootPass=<script>alert(/XSS/);</script>
  • 6. Using XSS Implementation stages: • upload your JS file by means of XSS; • add the SCRIPT tag into the HEAD to upload the file dynamically; • the commands are passed over according to the reverse shell principle; • Use a standard AJAX to address the scripts on the localhost; • Use JSONP to address the script backconnect; • Hide it in the IFRAME tag of the site.
  • 7. Operating PhpMyAdmin Peculiarities: • requires no authentication for the entrance; • uses a token transferred in the body of the HTML response; • you need just to pass over the token in the GET request to implement the SQL requests.
  • 8. Access to the File System Access to DB with root rights: • granted rights on reading/writing files; • MySQL located at the victim’s home system. Convenient to use: • Use INTO OUTFILE to create a PHP web shell; • After executing each request from JavaScript, the shell automatically deletes itself; • No need to store the shell since, in general case, it is inaccessible from the outside (by default, Apache in Denwer processes only requests from localhost).
  • 9. Implementing the Attack Approach: • user opens the attacker’s page; • the script is uploaded to IFRAME via XSS; • the script requests commands from JSONP, its control server; • when the command is received, the script addresses PhpMyAdmin to get a token, and then sends an SQL request for creating a web shell file; • the web shell executes the command and deletes itself.
  • 10. Hard-Coded Commands The script allows hard-coding the following: • certain sites and an IP router to visit (CSS History Hack); • a list of hard disks to obtain: «echo list volume|diskpart»; • ipconfig /ALL; • values of the environment variables to obtain; • a list of sites on the local system; • the obtained data can be processed on a Client to bypass directories automatically and for other reasons.
  • 11. Video
  • 12. Protection Against Attacks Keep an eye on application updates, even on those used in builds Check the default configuration before using a program Use browser plugins analogous to «Noscript» For browser developers: use zone division
  • 14. Thank you for your attention! dbaranov@ptsecurity.ru