SlideShare uma empresa Scribd logo
1 de 52
Baixar para ler offline
BREEDING SANDWORMS:
HOW TO FUZZ YOUR WAY OUT OF ADOBE READER X'S SANDBOX
Who we are
• Research and Analysis: Zhenhua(Eric) Liu
  Vulnerability Researcher
  zhliu@fortinet.com

• Contributor and Editor: Guillaume Lovet
  Sr Manager of Fortinet's EMEA Threat
  Research and Response Center
  glovet@fortinet.com
Huge number of vulnerabilities been found




Adobe vulnerabilities history in CVE.
http://www.cvedetails.com/vendor/53/Adobe.html
Huge number of vulnerabilities been found




Big Fan of you,
Mr. Ormandy
How many of them can compromise
             Adobe Reader X?


Since its launch in November
2010, we have not seen a
single successful exploit in the
wild against Adobe Reader X.
All because of Protected Mode
                       (SandBox)
Adobe Reader X Protected
Mode mitigations would
prevent an exploit of this kind
from executing.
How Hard Actually?




http://blogs.adobe.com/asset/files/2010/11/Win7-
Sandbox-Exploit-Steps.png
Agenda
• Introduce to the Adobe Reader X Protected
  Mode
• The SandBox implementation
• Fuzz Broker APIs
• Bypass the Challenge
• Demo
• Conclusions and Future Work
Documentation
• The most complete and authoritative
  documentation one can find about Adobe
  Reader Protect Mode is the series of blogs
  written by Kyle Randolph from ASSET.
Sandbox INTERNALS from ASSET’s blog




http://blogs.adobe.com/asset/files/2010/10/Sandbox-
Diagrams3.png
Blood and Sand: At the heart of
    Adobe Reader's sandbox




http://blogs.adobe.com/asset/files/2010/11/Sandbox-
and-Broker-Process-IPC.png
Possible Avenues to Achieve Attack
• Attacks From Kernel Land

• Attacks From User Land
-- Broker API Attack Surface
-- Policy Engine
-- IPC Frame Work
-- Named Object Squatting Attacks
-- Plug-in that not been sandboxed.
-- And more… which will be discovered by you.
Attacks From Kernel Land




           Can we subvert the token pointer?
Motivations and Questions
“An example is the dialog that confirms if the
 user really wants to disable Protected Mode”



                                Hello from our old
                                friend.
                                We start from `hello` for
                                respective.
Audit Target
• 1: Are there logic flaws, or weaknesses, that
  could be leveraged to circumvent restrictions?

• 2: Are there memory corruption
  vulnerabilities?
The strategy for reversing 1
• Find “thread_provider_->RegisterWait”
• Find function “ThreadPingEventReady” and
  the important parameter “service_context”.
• Find IPC message dispatch mechanism
  through ThreadPingEventReady, and then find
  the entire IPC handler functions.
Important data structures
RegisterWaitForSingleObject(&pool_object,
                waitable_object,
                callback,
                context,
                INFINITE,
                WT_EXECUTEDEFAULT
                )
Important data structures

service_context:
•   +0h Ping handle
•   +4h pong handle
•   +8h channel_size
•   +Ch channel_buffer
•   +10h shared_base
•   +14h channel
•   +18h dispatcher
•   +1Ch target_info
The result
The strategy for reversing 2
• find out the “HOOK” function first, then
  enumerate entire broker IPC by “xrefs”
  function of IDApro. (for Client API)
• Characteristic string like
  “AcroWinMainSandbox”. (for Client API)
• Serach pattern strings in .data section of file
  “AcroRd32.exe”. (for handler API)
You are so beautiful

               Following
               `AcroWinMainSandbox`,
               we find Adobe Service
               APIs list. (Client side)
Broker API tag 0x3E is to disable
Protected Mode.

if ( MessageBoxW(hWnd, "..", "..", 0x34) == 6 )
  {
    hKey = 0;
    ret = RegCreateKeyW
        (
         HKEY_CURRENT_USER,
         L"SoftwareAdobeAcrobat Reader
         10.0Privileged",
         &hKey);
    ...
Practice for fun




                 Tag field
          0x3E means to “disable
             Protected Mode”
Practice for fun




With a pop confirmation dialogs out
Another Practice For Fun
                                       Tag field
                              0x43 means to open http
                             link using default explorer
                                under High Integrity.




http://10.10.1.127/1.exe
Another Practice For Fun




                   1.exe is a POC file which
                    doing operation in file
                             system
Another Practice For Fun




                And another confirmation dialog
                           pop out
Fuzz Broker APIs
• The needs
• The existing idea that meets needs
The exits idea that meets needs
• In particular, the “in memory fuzz” concept
  introduced by Michael Sutton in a famous
  book“Fuzzing: Brute Force Vulnerability
  Discovery”fits our requirements.
Why we focused Broker Service APIs
• We guess APIs inherited from Google’s
  Chrome have been researched a lot by many
  researchers.

• Continuously increased Broker Service APIs by
  Adobe.
Why we focused Broker Service APIs
63 Broker Service Dispatchers were   72 Broker Service Dispatchers were
found in AcroRd32.exe 10.0.1.434     found in AcroRd32.exe 10.1.1.33
In Memory Fuzzer POC: How it works

    Step 1          Step 2          Step 3         Step 4          Step 5


    Take
snapshot for
                                               Wait for the      Restore
 sandboxed     Stuff fuzzing
                               Send the IPC   broker process   snapshot of
   process     data into the
                                 Message      to handle the    sandboxed
   before      IPC Message
                                               IPC message       process
 sending the
IPC message




                                                                             第 32 页
In Memory Fuzzer POC: How it works

    Step 1          Step 2          Step 3           Step 4        Step 5


    Take
snapshot for
                                               Wait for the      Restore
 sandboxed     Stuff fuzzing
                               Send the IPC   broker process   snapshot of
   process     data into the
                                 Message      to handle the    sandboxed
   before      IPC Message
                                               IPC message       process
 sending the
IPC message


                                     Repeat step 2 - 5 until
                                      fuzz data exhausted
Prepare the “Smarter ” Fuzz Data



Example: strings in policy
rules.
Pop Pop and Pop XD


Which means the relative
Broker API have been
achieved.
The Vulnerability CVE-2011-1353
• It was patched by Adobe in September 2011
  as a result of our responsible disclosure action

• World is small
  Mark Yason and Paul Sabanal of IBM X-Force
  have also found this vulnerability.
See the Problem?
• AddRule( SUBSYS_REGISTRY,
     REG_DENY,
     "HKEY_CURRENT_USERSoftwareAdobeAcrobat
  Reader10.0Privileged"
  );

• AddRule( SUBSYS_REGISTRY,
      REG_ALLOW_ANY,
      "HKEY_CURRENT_USERSoftwareAdobeAcrobat
  Reader10.0"
    );
See the Problem?
• AddRule( SUBSYS_REGISTRY,
     REG_DENY,
     "HKEY_CURRENT_USERSoftwareAdobeAcrobat
  Reader10.0Privileged"
  );

• AddRule( SUBSYS_REGISTRY,
      REG_ALLOW_ANY,
      "HKEY_CURRENT_USERSoftwareAdobeAcrobat
  Reader10.0"
    );
Magic String
• HKEY_CURRENT_USERSoftwareAdobeAcro
  bat Reader10.0PrivilegedbProtectedMode
CVE-2011-1353
                                   Policy Engine


          CreateRegKey
Sandbox      Request     Broker
Process                  Process




                           OS
CVE-2011-1353
                            Good   Policy Engine
                            Boy?

Sandbox           Broker
Process           Process




                    OS
CVE-2011-1353
                                  Policy Engine
                                  False Positive


Sandbox           Broker
Process           Process
                            Good Boy




                    OS
CVE-2011-1353
                                       Policy Engine



Sandbox           Broker
Process           Process



                            What Can I Do for you?




                    OS
CVE-2011-1353
                                        Policy Engine



Sandbox                       Broker
Process                       Process
          Return Duplicated
               Handle




                                OS
The patch and little bit more

New function “CanonPathName”
added to Strip off the extra
backslash.

while ( *Cp != '' );
 do
 {
          Cp++;
 }
Demo
Conclusions and Future Work
The Road To The Horizon
The Road To The Horizon
               APSAs
               Like CVE-2011-3232
               in the Demo.
The Road To The Horizon
               Heap Spray, ROP,
               Heap FengShui, JIT,
               Haifei Li’s Flash
               ActionScript
               Exploit…
The Road To The Horizon



                CVE-2011-1353
Free!

Mais conteúdo relacionado

Mais procurados

KrankyGeek 2015 - Mixing Data and Video - IBM Bluemix, Watson, and Twilio
KrankyGeek 2015 - Mixing Data and Video - IBM Bluemix, Watson, and TwilioKrankyGeek 2015 - Mixing Data and Video - IBM Bluemix, Watson, and Twilio
KrankyGeek 2015 - Mixing Data and Video - IBM Bluemix, Watson, and TwilioJeff Sloyer
 
Android media framework overview
Android media framework overviewAndroid media framework overview
Android media framework overviewJerrin George
 
Csaba fitzl - Mount(ain) of Bugs
Csaba fitzl - Mount(ain) of BugsCsaba fitzl - Mount(ain) of Bugs
Csaba fitzl - Mount(ain) of BugsCsaba Fitzl
 
DevOps and Microservice
DevOps and MicroserviceDevOps and Microservice
DevOps and MicroserviceInho Kang
 
Toorcon Seattle 2011 - Browser Exploit Packs
Toorcon Seattle 2011 - Browser Exploit PacksToorcon Seattle 2011 - Browser Exploit Packs
Toorcon Seattle 2011 - Browser Exploit PacksAditya K Sood
 
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Simplilearn
 
Integrating Splunk into your Spring Applications
Integrating Splunk into your Spring ApplicationsIntegrating Splunk into your Spring Applications
Integrating Splunk into your Spring ApplicationsDamien Dallimore
 
PuppetConf 2016: Delivering Premium Quality Modules: Using Beaker and VMpoole...
PuppetConf 2016: Delivering Premium Quality Modules: Using Beaker and VMpoole...PuppetConf 2016: Delivering Premium Quality Modules: Using Beaker and VMpoole...
PuppetConf 2016: Delivering Premium Quality Modules: Using Beaker and VMpoole...Puppet
 
Kautilya: Teensy beyond shell
Kautilya: Teensy beyond shellKautilya: Teensy beyond shell
Kautilya: Teensy beyond shellNikhil Mittal
 
Power on, Powershell
Power on, PowershellPower on, Powershell
Power on, PowershellRoo7break
 
Android : How Do I Code Thee?
Android : How Do I Code Thee?Android : How Do I Code Thee?
Android : How Do I Code Thee?Viswanath J
 
Exploiting XPC in AntiVirus
Exploiting XPC in AntiVirusExploiting XPC in AntiVirus
Exploiting XPC in AntiVirusCsaba Fitzl
 
The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009Viswanath J
 
Run your Java apps on Cloud Foundry
Run your Java apps on Cloud FoundryRun your Java apps on Cloud Foundry
Run your Java apps on Cloud FoundryAndy Piper
 
Update from android kk to android l
Update from android kk to android lUpdate from android kk to android l
Update from android kk to android lBin Yang
 
Jetty 9 – The Next Generation Servlet Container
Jetty 9 – The Next Generation Servlet ContainerJetty 9 – The Next Generation Servlet Container
Jetty 9 – The Next Generation Servlet ContainerCodemotion
 

Mais procurados (20)

KrankyGeek 2015 - Mixing Data and Video - IBM Bluemix, Watson, and Twilio
KrankyGeek 2015 - Mixing Data and Video - IBM Bluemix, Watson, and TwilioKrankyGeek 2015 - Mixing Data and Video - IBM Bluemix, Watson, and Twilio
KrankyGeek 2015 - Mixing Data and Video - IBM Bluemix, Watson, and Twilio
 
Android media framework overview
Android media framework overviewAndroid media framework overview
Android media framework overview
 
Csaba fitzl - Mount(ain) of Bugs
Csaba fitzl - Mount(ain) of BugsCsaba fitzl - Mount(ain) of Bugs
Csaba fitzl - Mount(ain) of Bugs
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
 
DevOps and Microservice
DevOps and MicroserviceDevOps and Microservice
DevOps and Microservice
 
Toorcon Seattle 2011 - Browser Exploit Packs
Toorcon Seattle 2011 - Browser Exploit PacksToorcon Seattle 2011 - Browser Exploit Packs
Toorcon Seattle 2011 - Browser Exploit Packs
 
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
 
Integrating Splunk into your Spring Applications
Integrating Splunk into your Spring ApplicationsIntegrating Splunk into your Spring Applications
Integrating Splunk into your Spring Applications
 
PuppetConf 2016: Delivering Premium Quality Modules: Using Beaker and VMpoole...
PuppetConf 2016: Delivering Premium Quality Modules: Using Beaker and VMpoole...PuppetConf 2016: Delivering Premium Quality Modules: Using Beaker and VMpoole...
PuppetConf 2016: Delivering Premium Quality Modules: Using Beaker and VMpoole...
 
Balancing Power & Performance Webinar
Balancing Power & Performance WebinarBalancing Power & Performance Webinar
Balancing Power & Performance Webinar
 
PaaSVSContainerization
PaaSVSContainerizationPaaSVSContainerization
PaaSVSContainerization
 
Kautilya: Teensy beyond shell
Kautilya: Teensy beyond shellKautilya: Teensy beyond shell
Kautilya: Teensy beyond shell
 
Power on, Powershell
Power on, PowershellPower on, Powershell
Power on, Powershell
 
Android : How Do I Code Thee?
Android : How Do I Code Thee?Android : How Do I Code Thee?
Android : How Do I Code Thee?
 
Exploiting XPC in AntiVirus
Exploiting XPC in AntiVirusExploiting XPC in AntiVirus
Exploiting XPC in AntiVirus
 
The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009
 
Run your Java apps on Cloud Foundry
Run your Java apps on Cloud FoundryRun your Java apps on Cloud Foundry
Run your Java apps on Cloud Foundry
 
Update from android kk to android l
Update from android kk to android lUpdate from android kk to android l
Update from android kk to android l
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Jetty 9 – The Next Generation Servlet Container
Jetty 9 – The Next Generation Servlet ContainerJetty 9 – The Next Generation Servlet Container
Jetty 9 – The Next Generation Servlet Container
 

Semelhante a BREEDING SANDWORMS: HOW TO FUZZ YOUR WAY OUT OF ADOBE READER X'S SANDBOX

FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"Volker Linz
 
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle EastSharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle EastAyman El-Hattab
 
Flash security past_present_future_final_en
Flash security past_present_future_final_enFlash security past_present_future_final_en
Flash security past_present_future_final_enSunghun Kim
 
OWASP Pune Chapter : Dive Into The Profound Web Attacks
OWASP Pune Chapter : Dive Into The Profound Web AttacksOWASP Pune Chapter : Dive Into The Profound Web Attacks
OWASP Pune Chapter : Dive Into The Profound Web AttacksNarendra Bhati
 
Automated infrastructure is on the menu
Automated infrastructure is on the menuAutomated infrastructure is on the menu
Automated infrastructure is on the menujtimberman
 
Creating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on HerokuCreating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on HerokuJoe Kutner
 
Using Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoUsing Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoDaniel Zivkovic
 
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 gloryPriyanka Aash
 
Codecoon - A technical Case Study
Codecoon - A technical Case StudyCodecoon - A technical Case Study
Codecoon - A technical Case StudyMichael Lihs
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java binOlve Hansen
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionHao Fan
 
Common primitives in Docker environments
Common primitives in Docker environmentsCommon primitives in Docker environments
Common primitives in Docker environmentsalexandru giurgiu
 
TIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by stepTIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by stepThe Incredible Automation Day
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microserviceGiulio De Donato
 
Rapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
Rapid Prototyping Chatter with a PHP/Hack Canvas App on HerokuRapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
Rapid Prototyping Chatter with a PHP/Hack Canvas App on HerokuSalesforce Developers
 
Log everything!
Log everything!Log everything!
Log everything!ICANS GmbH
 

Semelhante a BREEDING SANDWORMS: HOW TO FUZZ YOUR WAY OUT OF ADOBE READER X'S SANDBOX (20)

FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT Agents
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle EastSharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
 
Flash security past_present_future_final_en
Flash security past_present_future_final_enFlash security past_present_future_final_en
Flash security past_present_future_final_en
 
OWASP Pune Chapter : Dive Into The Profound Web Attacks
OWASP Pune Chapter : Dive Into The Profound Web AttacksOWASP Pune Chapter : Dive Into The Profound Web Attacks
OWASP Pune Chapter : Dive Into The Profound Web Attacks
 
Automated infrastructure is on the menu
Automated infrastructure is on the menuAutomated infrastructure is on the menu
Automated infrastructure is on the menu
 
Creating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on HerokuCreating Scalable JVM/Java Apps on Heroku
Creating Scalable JVM/Java Apps on Heroku
 
Using Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoUsing Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in Toronto
 
How to debug IoT Agents
How to debug IoT AgentsHow to debug IoT Agents
How to debug IoT Agents
 
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
 
Codecoon - A technical Case Study
Codecoon - A technical Case StudyCodecoon - A technical Case Study
Codecoon - A technical Case Study
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java bin
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Common primitives in Docker environments
Common primitives in Docker environmentsCommon primitives in Docker environments
Common primitives in Docker environments
 
TIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by stepTIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by step
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microservice
 
Rapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
Rapid Prototyping Chatter with a PHP/Hack Canvas App on HerokuRapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
Rapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
 
Log everything!
Log everything!Log everything!
Log everything!
 

Último

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 

Último (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 

BREEDING SANDWORMS: HOW TO FUZZ YOUR WAY OUT OF ADOBE READER X'S SANDBOX

  • 1. BREEDING SANDWORMS: HOW TO FUZZ YOUR WAY OUT OF ADOBE READER X'S SANDBOX
  • 2. Who we are • Research and Analysis: Zhenhua(Eric) Liu Vulnerability Researcher zhliu@fortinet.com • Contributor and Editor: Guillaume Lovet Sr Manager of Fortinet's EMEA Threat Research and Response Center glovet@fortinet.com
  • 3. Huge number of vulnerabilities been found Adobe vulnerabilities history in CVE. http://www.cvedetails.com/vendor/53/Adobe.html
  • 4. Huge number of vulnerabilities been found Big Fan of you, Mr. Ormandy
  • 5. How many of them can compromise Adobe Reader X? Since its launch in November 2010, we have not seen a single successful exploit in the wild against Adobe Reader X.
  • 6. All because of Protected Mode (SandBox) Adobe Reader X Protected Mode mitigations would prevent an exploit of this kind from executing.
  • 8. Agenda • Introduce to the Adobe Reader X Protected Mode • The SandBox implementation • Fuzz Broker APIs • Bypass the Challenge • Demo • Conclusions and Future Work
  • 9. Documentation • The most complete and authoritative documentation one can find about Adobe Reader Protect Mode is the series of blogs written by Kyle Randolph from ASSET.
  • 10. Sandbox INTERNALS from ASSET’s blog http://blogs.adobe.com/asset/files/2010/10/Sandbox- Diagrams3.png
  • 11. Blood and Sand: At the heart of Adobe Reader's sandbox http://blogs.adobe.com/asset/files/2010/11/Sandbox- and-Broker-Process-IPC.png
  • 12. Possible Avenues to Achieve Attack • Attacks From Kernel Land • Attacks From User Land -- Broker API Attack Surface -- Policy Engine -- IPC Frame Work -- Named Object Squatting Attacks -- Plug-in that not been sandboxed. -- And more… which will be discovered by you.
  • 13. Attacks From Kernel Land Can we subvert the token pointer?
  • 14. Motivations and Questions “An example is the dialog that confirms if the user really wants to disable Protected Mode” Hello from our old friend. We start from `hello` for respective.
  • 15. Audit Target • 1: Are there logic flaws, or weaknesses, that could be leveraged to circumvent restrictions? • 2: Are there memory corruption vulnerabilities?
  • 16. The strategy for reversing 1 • Find “thread_provider_->RegisterWait” • Find function “ThreadPingEventReady” and the important parameter “service_context”. • Find IPC message dispatch mechanism through ThreadPingEventReady, and then find the entire IPC handler functions.
  • 17. Important data structures RegisterWaitForSingleObject(&pool_object, waitable_object, callback, context, INFINITE, WT_EXECUTEDEFAULT )
  • 18. Important data structures service_context: • +0h Ping handle • +4h pong handle • +8h channel_size • +Ch channel_buffer • +10h shared_base • +14h channel • +18h dispatcher • +1Ch target_info
  • 20. The strategy for reversing 2 • find out the “HOOK” function first, then enumerate entire broker IPC by “xrefs” function of IDApro. (for Client API) • Characteristic string like “AcroWinMainSandbox”. (for Client API) • Serach pattern strings in .data section of file “AcroRd32.exe”. (for handler API)
  • 21. You are so beautiful Following `AcroWinMainSandbox`, we find Adobe Service APIs list. (Client side)
  • 22. Broker API tag 0x3E is to disable Protected Mode. if ( MessageBoxW(hWnd, "..", "..", 0x34) == 6 ) { hKey = 0; ret = RegCreateKeyW ( HKEY_CURRENT_USER, L"SoftwareAdobeAcrobat Reader 10.0Privileged", &hKey); ...
  • 23. Practice for fun Tag field 0x3E means to “disable Protected Mode”
  • 24. Practice for fun With a pop confirmation dialogs out
  • 25. Another Practice For Fun Tag field 0x43 means to open http link using default explorer under High Integrity. http://10.10.1.127/1.exe
  • 26. Another Practice For Fun 1.exe is a POC file which doing operation in file system
  • 27. Another Practice For Fun And another confirmation dialog pop out
  • 28. Fuzz Broker APIs • The needs • The existing idea that meets needs
  • 29. The exits idea that meets needs • In particular, the “in memory fuzz” concept introduced by Michael Sutton in a famous book“Fuzzing: Brute Force Vulnerability Discovery”fits our requirements.
  • 30. Why we focused Broker Service APIs • We guess APIs inherited from Google’s Chrome have been researched a lot by many researchers. • Continuously increased Broker Service APIs by Adobe.
  • 31. Why we focused Broker Service APIs 63 Broker Service Dispatchers were 72 Broker Service Dispatchers were found in AcroRd32.exe 10.0.1.434 found in AcroRd32.exe 10.1.1.33
  • 32. In Memory Fuzzer POC: How it works Step 1 Step 2 Step 3 Step 4 Step 5 Take snapshot for Wait for the Restore sandboxed Stuff fuzzing Send the IPC broker process snapshot of process data into the Message to handle the sandboxed before IPC Message IPC message process sending the IPC message 第 32 页
  • 33. In Memory Fuzzer POC: How it works Step 1 Step 2 Step 3 Step 4 Step 5 Take snapshot for Wait for the Restore sandboxed Stuff fuzzing Send the IPC broker process snapshot of process data into the Message to handle the sandboxed before IPC Message IPC message process sending the IPC message Repeat step 2 - 5 until fuzz data exhausted
  • 34. Prepare the “Smarter ” Fuzz Data Example: strings in policy rules.
  • 35. Pop Pop and Pop XD Which means the relative Broker API have been achieved.
  • 36. The Vulnerability CVE-2011-1353 • It was patched by Adobe in September 2011 as a result of our responsible disclosure action • World is small Mark Yason and Paul Sabanal of IBM X-Force have also found this vulnerability.
  • 37. See the Problem? • AddRule( SUBSYS_REGISTRY, REG_DENY, "HKEY_CURRENT_USERSoftwareAdobeAcrobat Reader10.0Privileged" ); • AddRule( SUBSYS_REGISTRY, REG_ALLOW_ANY, "HKEY_CURRENT_USERSoftwareAdobeAcrobat Reader10.0" );
  • 38. See the Problem? • AddRule( SUBSYS_REGISTRY, REG_DENY, "HKEY_CURRENT_USERSoftwareAdobeAcrobat Reader10.0Privileged" ); • AddRule( SUBSYS_REGISTRY, REG_ALLOW_ANY, "HKEY_CURRENT_USERSoftwareAdobeAcrobat Reader10.0" );
  • 39. Magic String • HKEY_CURRENT_USERSoftwareAdobeAcro bat Reader10.0PrivilegedbProtectedMode
  • 40. CVE-2011-1353 Policy Engine CreateRegKey Sandbox Request Broker Process Process OS
  • 41. CVE-2011-1353 Good Policy Engine Boy? Sandbox Broker Process Process OS
  • 42. CVE-2011-1353 Policy Engine False Positive Sandbox Broker Process Process Good Boy OS
  • 43. CVE-2011-1353 Policy Engine Sandbox Broker Process Process What Can I Do for you? OS
  • 44. CVE-2011-1353 Policy Engine Sandbox Broker Process Process Return Duplicated Handle OS
  • 45. The patch and little bit more New function “CanonPathName” added to Strip off the extra backslash. while ( *Cp != '' ); do { Cp++; }
  • 46. Demo
  • 48. The Road To The Horizon
  • 49. The Road To The Horizon APSAs Like CVE-2011-3232 in the Demo.
  • 50. The Road To The Horizon Heap Spray, ROP, Heap FengShui, JIT, Haifei Li’s Flash ActionScript Exploit…
  • 51. The Road To The Horizon CVE-2011-1353
  • 52. Free!