SlideShare une entreprise Scribd logo
1  sur  77
BY, ANKUR BHARGAVA (INFOSYS TECHNOLOGIES LIMITED) TAMAGHNA BASU (SECURITY RESEARCHER) Client Side Exploits using PDF C0C0N Security & Hacking Conference
Contents About  PDF Launch Action Exploits AcroJs  Exploits Road Ahead Tools  and References
About PDF ,[object Object],[object Object],[object Object],[object Object]
Potentially Dangerous File / Penetration Document Format ,[object Object],[object Object],[object Object]
Adobe PDF – As a programming language ,[object Object],[object Object],[object Object],[object Object]
Adobe PDF – Security Issues
2010: Still Continuing…
2010: Still Continuing… March April May June
Incidents in the wild ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Reign of Zeus: ,[object Object],[object Object],[object Object],[object Object]
The Reign of Zeus ,[object Object],CVE-2010-0188 exploits statistics 2010
Popular in malwaredomainlist.com
Apple iPhone / iPad / iPod Code Execution and Sandbox Bypass ,[object Object],[object Object],[object Object]
Why PDF ,[object Object],[object Object],[object Object],[object Object],[object Object]
PDF document structure ,[object Object]
PDF Document Structure PDF Header Objects Trailer Body Cross reference Table
Launch Action ,[object Object],[object Object],[object Object],[object Object]
Launch Action Vulnerability ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Launch Action Vulnerability ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Launch Action Vulnerability ,[object Object],Open website
Launch Action Vulnerability ,[object Object]
Launch Action Vulnerability
Launch Action Vulnerability ,[object Object]
Launch Action Vulnerability Confidential Data!! If You are Authorized Click on 'Open'. Check 'Do Not Show This Message Again' to avoid this dialog next time
Launch Action Vulnerability
Launch Action in 9.3.3
Launch Action Vulnerability
Evading Antivirus by Changing the format ,[object Object],[object Object],2 0 obj (Hello World) Endobj 3 0 obj << /Example 2 0 R  >> Endobj 3 0 obj << /Example (Hello World) >> endobj
Evading Antivirus ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Evading Antivirus ,[object Object],[object Object]
Evading Antivirus
POC: Launching an Embedded exe ,[object Object],[object Object],[object Object]
Step 1 : Embed the hex content of the exe in a vbscript ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Hex content of the exe as a character array
Step 2 : Embed the vbscript in the pdf file as comments ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Step 3 : Launch cmd.exe and create another script ,[object Object]
Generated VBScript ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
AcroJS ,[object Object],[object Object],[object Object],[object Object]
AcroJS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JavaScript Actions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Acrojs examples launchURL Alertbox
Acrojs examples
Acrojs examples
Vulnerable APIs ,[object Object],[object Object],[object Object],[object Object],[object Object]
Vulnerable APIs ,[object Object],[object Object],[object Object],[object Object]
Vulnerable APIs ,[object Object],[object Object],[object Object],[object Object]
Obfuscation Techniques ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Javascript Obfuscations : Unlearn Coding Ethics
Distorting format Normal Code Obfuscated Code function execute(data, time) {   Timelag=5000; if (time > Timelag) { // some code } } function overflow(hex, loop)  { for (i=0;i<loop;i++) { hex = hex + hex; } } function overflow(hex, loop){for (i=0;i<loop;i++){hex = hex + hex;}} function overflow(hex, loop) {for i=0;i<loop;i++){hex = hex + hex;} }
Obfuscating Identifiers Normal Code Obfuscated Code function execute(data, time) {   Timelag=5000; if (time > Timelag) { // some code } } function overflow(hex, loop)  { for (i=0;i<loop;i++) { hex = hex + hex; } } function aeiou(lIlIIlI, O0OOOO0OO000OO) { WWMWMMWMWMWMW=5000; if (O0OOOO0OO000OO > WWMWMWMWMWMW) { // some code } } function aimpq(xxwmnnx, pqrtxw) { for (dqweaa=0; dqweaa < pqrtxw; dqweaa ++) { xxwmnnx = xxwmnnx + xxwmnnx;; } }
Obfuscating Identifiers – Even Worse Differentiating with number of underscore characters function _____(____,__________) { ______________=5000; if (__________>______________) { // some code } } function ___(_______, ______) { for(________________=0; ________________<______; ________________ ++) { _______ = _______ + _______; } }
Obfuscating Identifiers – Even Worse Differentiating with number of underscore characters function _____(____,__________){______________=5000;if (__________>______________){// some code}}function ___(_______, ______){for(________________=0; ________________<______; ________________ ++){_______ = _______ + _______;}}
Chain of Eval Normal Code Obfuscated code app.alert(“c0c0n”) func=&quot;eval&quot;; one='app.alert(&quot;c0c0n&quot;)'; two=eval(one); three=eval(two); eval(func(three));
Splitting Javascript Normal code Obfuscated Code app.alert(“hello world”); Rt=“);”; Td=“ert(hel”; Ab=“ap”; Qw=“ld”; Kg=“p.al”; Gh=“lo wor”; Eval(“hh=Ab+Kg+Td+Gh+Qw+Rt”); Eval(hh);
Callee Trick Function accesses its own source and uses it as a key to decrypt code or data function decrypt(cypher) { var key = arguments.callee.toString(); for (var i = 0; i < cypher.length; i++) { plain = key.charCodeAt(i) ^ cypher.charCodeAt(i); } ... }
Pdf obfuscations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Case Study ,[object Object],[object Object],[object Object]
Virus total Reports 5/42(11.90%)
[object Object]
STEP-1 ,[object Object]
STEP-2 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
STEP-3 ,[object Object]
STEP-4 ,[object Object]
Word Editor
Decoded the script
Formatted using jsbeautifier.org
Replacing with meaningful identifiers and removing unnecessary comments
[object Object]
 
Shellcode Analysis Connecting to… http://bigiqwars.ru/ppp/exe.php?spl=PDF (newPlayer)&user=admin&exe_acces=on
Road Ahead ,[object Object],[object Object],[object Object]
How can we protect ourselves ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Road Ahead ,[object Object],[object Object],[object Object]
Tools And References
Tools used ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
References continued.. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Thank you ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Similaire à Client Side Exploits Using Pdf

C++ - UNIT_-_V.pptx which contains details about File Concepts
C++  - UNIT_-_V.pptx which contains details about File ConceptsC++  - UNIT_-_V.pptx which contains details about File Concepts
C++ - UNIT_-_V.pptx which contains details about File Concepts
ANUSUYA S
 
Firefox security (prasanna)
Firefox security (prasanna) Firefox security (prasanna)
Firefox security (prasanna)
ClubHack
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Development
phamvanvung
 

Similaire à Client Side Exploits Using Pdf (20)

Two-For-One Talk: Malware Analysis for Everyone
Two-For-One Talk: Malware Analysis for EveryoneTwo-For-One Talk: Malware Analysis for Everyone
Two-For-One Talk: Malware Analysis for Everyone
 
file_handling_in_c.ppt
file_handling_in_c.pptfile_handling_in_c.ppt
file_handling_in_c.ppt
 
nullcon 2011 - Fuzzing with Complexities
nullcon 2011 - Fuzzing with Complexitiesnullcon 2011 - Fuzzing with Complexities
nullcon 2011 - Fuzzing with Complexities
 
data file handling
data file handlingdata file handling
data file handling
 
7 Data File Handling
7 Data File Handling7 Data File Handling
7 Data File Handling
 
C++ - UNIT_-_V.pptx which contains details about File Concepts
C++  - UNIT_-_V.pptx which contains details about File ConceptsC++  - UNIT_-_V.pptx which contains details about File Concepts
C++ - UNIT_-_V.pptx which contains details about File Concepts
 
A First Look at Windows Presentation Foundation Everywhere (WPF/E): a Cross …
A First Look at Windows Presentation Foundation Everywhere (WPF/E): a Cross …A First Look at Windows Presentation Foundation Everywhere (WPF/E): a Cross …
A First Look at Windows Presentation Foundation Everywhere (WPF/E): a Cross …
 
Introduction of file handling
Introduction of file handlingIntroduction of file handling
Introduction of file handling
 
File Handling In C++
File Handling In C++File Handling In C++
File Handling In C++
 
Firefox security (prasanna)
Firefox security (prasanna) Firefox security (prasanna)
Firefox security (prasanna)
 
Php advance
Php advancePhp advance
Php advance
 
File Handling.pptx
File Handling.pptxFile Handling.pptx
File Handling.pptx
 
File management in C++
File management in C++File management in C++
File management in C++
 
Asert threat-intelligence-brief-2014-07-illuminating-etumbot-apt
Asert threat-intelligence-brief-2014-07-illuminating-etumbot-aptAsert threat-intelligence-brief-2014-07-illuminating-etumbot-apt
Asert threat-intelligence-brief-2014-07-illuminating-etumbot-apt
 
file_handling_in_c.ppt
file_handling_in_c.pptfile_handling_in_c.ppt
file_handling_in_c.ppt
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Development
 
Data file handling in c++
Data file handling in c++Data file handling in c++
Data file handling in c++
 
File handling C program
File handling C programFile handling C program
File handling C program
 
Bioinformatica 27-10-2011-p4-files
Bioinformatica 27-10-2011-p4-filesBioinformatica 27-10-2011-p4-files
Bioinformatica 27-10-2011-p4-files
 
iOS (Vulner)ability
iOS (Vulner)abilityiOS (Vulner)ability
iOS (Vulner)ability
 

Dernier

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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

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
 
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
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
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
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 

Client Side Exploits Using Pdf

Notes de l'éditeur

  1. THE ADOBE PORTABLE DOCUMENT FORMAT (PDF) is a file format for rep- resenting documents in a manner independent of the application software, hard- ware, and operating system used to create them and of the output device on which they are to be displayed or printed. A document’s pages (and other visual elements) may contain any combination of text, graphics, and images. A page’s appearance is described by a PDF content stream, which contains a sequence of graphics objects to be painted on the page. This appearance is fully specified; all layout and formatting decisions have al- ready been made by the application generating the content stream. In addition to describing the static appearance of pages, a PDF document may contain interactive elements that are possible only in an electronic representa- tion. PDF supports annotations of many kinds for such things as text notes, hypertext links, markup, file attachments, sounds, and movies. A document can define its own user interface; keyboard and mouse input can trigger actions that are specified by PDF objects. The document can contain interactive form fields to be filled in by the user, and can export the values of these fields to or import them from other applications.
  2. Distorting format – Removing newlines and spaces - Not much of pain to deobfuscate (ex-jsbeautifier.org)
  3. Name obfuscation – variable name and function name are renamed Most common obfuscation techniques
  4. JavaScript code can execute JavaScript code in strings through eval • Often used to hide later code stages which are decrypted on the fly • Common way to extract argument: replace eval with a printing function
  5. Not specific to Adobe Reader • Frequently used by JavaScript code in other contexts • Function accesses its own source and uses it as a key to decrypt code or data • Add a single whitespace and decryption fails
  6. Online decoders available to decode them….
  7. We can not hit the pdf file link directly,So we chose WGET to download that file contents
  8. Javascript Found on object 11 0.. Encoded with ascii85Encoding.. First obfuscation – filters…
  9. Second Obfucation – Distorted formatting.
  10. Third Obfuscation – Obfuscated identifiers and unnecessary comments
  11. Fourth obfucation – eval chains
  12. Fifth obfuscation – javascript splitting