SlideShare a Scribd company logo
Content Type Attack Dark Hole in the Secure Environment by Raman Gupta
Who I am
 I am working with TCS as Information Security
  Consultant.
 Work area includes vulnerability assessment ,
  Penetration Testing and secure environment setup.
 Interested in reverse engineering and exploit writing.
Title
 Content-Type Attack : Content-Type attack is related to the
  vulnerability in client side software that are use to read the content like adobe
  reader , Microsoft office , Image viewer. Attackers attempt to exploit programming
  flaws in that code to induce memory corruption issues, resulting in their own attack
  code being run on the victim computer that opened the PDF or DOC file.
 Dark Hole in a secure environment : This is due to following
  reasons.
  1) Un-detective Nature
  2) Ignorance
   3) False sense of security
Content
 Content-Type Attack process
 Malicious attack document structure
 Attack demo
 PDF File Structure
 Intro to the PDF file format
 PDF object type overview
 Demo : PDF analysis using scripts
 Content-Type Attack protection technique
Content-Type Attack process
Content-Type Attack process

 This attack document is sent by an attacker to a victim, perhaps using a compromised
  machine to relay the e-mail to help conceal the attacker’s identify.
 If the victim double-clicks the file attached to the e-mail, the application registered for
  the file type launches and starts parsing the file.
 In this malicious file, the attacker will have embedded malformed content that exploits a
  file-parsing vulnerability, causing the application to corrupt memory on the stack or
  heap.
 Successful exploits transfer control to the attacker’s shell code that has been loaded from
  the file into memory.
 The shell code often instructs the machine to write out an EXE file embedded at a fixed
  offset and run that executable. After the EXE file is written and run, the attacker’s code
  writes out a ”clean file” also contained in the attack document and opens the application
  with the content of that clean file.
 In the meantime, the malicious EXE file that has been written to the file system is run,
  carrying out whatever mission the attacker intended.
Malicious attack document structure
Attack Demo
PDF File Structure
PDF file format overview

 The language to describe a PDF file is based on the
 PostScript programming language.
 Stream objects may contain compressed, obfuscated binary data between the opening
  “stream” tag and closing “endstream” tag. Here is an example:

 5 0 bj<</Subtype/Type1C/Length=5416/Filter/FlateDecode>>stream
   H%|T}T#W#Ÿ!d&"FI#Å%NFW#åC
   ...
   endstream
   endobj

 In this example, the stream data is compressed using the /Flate Compressed stream
  data is a popular trick used by malware authors to evade detection.
PDF objects type overview
   /Page
   /Encrypt
   /ObjStm
   /JS
   /JavaScript
   /AA
   /OpenAction
   /JBIG2Decode
   /RichMedia
   /Launch
Demo:
PDF analysis using scripts
Content-Type Attack protection technique
 All security update must be available.
 Disable java script in adobe reader.
 Enable DEP for un-trusted application.
 Don’t open attach file in mail from unknown or un-
  trusted source.
 Implement white-list based proxy.
 Implement strong outbound firewall policy.
Credit
 Didier Stevens
 Nikhil Mittal
 ClubHack
Thank you




     Presented by : Raman Gupta
     ( Twitter : Raman_gupta1)

More Related Content

PPTX
Attack and Mitigation for Insecure Deserialization
PPTX
WEB APPLICATION SECURITY
PDF
An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)
PPT
Owasp Top 10 - Owasp Pune Chapter - January 2008
PPTX
DevSecCon Talk: An experiment in agile Threat Modelling
PPTX
Threat modelling with_sample_application
PPTX
DLL Preloading Attack
PPTX
Rapid Android Application Security Testing
Attack and Mitigation for Insecure Deserialization
WEB APPLICATION SECURITY
An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)
Owasp Top 10 - Owasp Pune Chapter - January 2008
DevSecCon Talk: An experiment in agile Threat Modelling
Threat modelling with_sample_application
DLL Preloading Attack
Rapid Android Application Security Testing

What's hot (10)

PPTX
Web application attacks
PDF
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
PPTX
Stealing Credentials Malware and more
PDF
RIA Cross Domain Policy
PPTX
WEB APPLICATION SECURITY
PPTX
Secure Code Warrior - CRLF injection
PDF
Routine Detection Of Web Application Defence Flaws
PDF
Log Analysis
PDF
Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)
PPTX
E-commerce- Security & Encryption
Web application attacks
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
Stealing Credentials Malware and more
RIA Cross Domain Policy
WEB APPLICATION SECURITY
Secure Code Warrior - CRLF injection
Routine Detection Of Web Application Defence Flaws
Log Analysis
Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)
E-commerce- Security & Encryption
Ad

Viewers also liked (20)

PDF
Attack modeling vs threat modelling
PPT
Unauthorized access, Men in the Middle (MITM)
PPTX
Lan internetworking devices
PPT
Troubleshooting basic networks
PPTX
Types of VPN
PPTX
Vulnerability Assessment
PPTX
Network sniffers & injection tools
PPT
Computer Networking: Subnetting and IP Addressing
PPT
Basic Network Concepts
PPTX
Sql injection
PDF
Hoover.2016 Texas Bankers CFO Conference
PPTX
Http Vs Https .
PDF
IP Addressing and Subnetting
PPT
CCNA Advanced Routing Protocols
PPTX
VPN, Its Types,VPN Protocols,Configuration and Benefits
PPT
CCNA Routing Protocols
PPTX
Ppt of routing protocols
PPTX
Subnetting
PPT
Ip address and subnetting
Attack modeling vs threat modelling
Unauthorized access, Men in the Middle (MITM)
Lan internetworking devices
Troubleshooting basic networks
Types of VPN
Vulnerability Assessment
Network sniffers & injection tools
Computer Networking: Subnetting and IP Addressing
Basic Network Concepts
Sql injection
Hoover.2016 Texas Bankers CFO Conference
Http Vs Https .
IP Addressing and Subnetting
CCNA Advanced Routing Protocols
VPN, Its Types,VPN Protocols,Configuration and Benefits
CCNA Routing Protocols
Ppt of routing protocols
Subnetting
Ip address and subnetting
Ad

Similar to Content Type Attack Dark Hole in the Secure Environment by Raman Gupta (20)

PDF
Zero day-malware-protection-brief-2607983
PDF
SOFTCAMP SHIELDEX INTRODUCTION
PDF
AI for Ransomware Detection & Prevention Insights from Patents
PDF
Overkill Security. Digest. 2024-05. Level#Pro.pdf
PDF
Toorcon - Purple Haze: The Spear Phishing Experience
PDF
Cyber attacks 101
PDF
Malware Detection Module using Machine Learning Algorithms to Assist in Centr...
PPT
Ne Course Part One
PPTX
File inflection techniques
PDF
Reversing & malware analysis training part 10 exploit development basics
PPTX
Methods Hackers Use
PDF
Asert threat-intelligence-brief-2014-07-illuminating-etumbot-apt
PDF
Secured Authorized Deduplication Based Hybrid Cloud
PDF
E031102034039
PPT
Computer viruses and anti viruses by sasikumar
PDF
Certificate bypass: Hiding and executing malware from a digitally signed exec...
PDF
us-16-Nipravsky-Certificate-Bypass-Hiding-And-Executing-Malware-From-A-Digita...
PPT
Analysis Of Adverarial Code - The Role of Malware Kits
PDF
Convolutional Neural Networks
PPT
Op Sy 03 Ch 61
Zero day-malware-protection-brief-2607983
SOFTCAMP SHIELDEX INTRODUCTION
AI for Ransomware Detection & Prevention Insights from Patents
Overkill Security. Digest. 2024-05. Level#Pro.pdf
Toorcon - Purple Haze: The Spear Phishing Experience
Cyber attacks 101
Malware Detection Module using Machine Learning Algorithms to Assist in Centr...
Ne Course Part One
File inflection techniques
Reversing & malware analysis training part 10 exploit development basics
Methods Hackers Use
Asert threat-intelligence-brief-2014-07-illuminating-etumbot-apt
Secured Authorized Deduplication Based Hybrid Cloud
E031102034039
Computer viruses and anti viruses by sasikumar
Certificate bypass: Hiding and executing malware from a digitally signed exec...
us-16-Nipravsky-Certificate-Bypass-Hiding-And-Executing-Malware-From-A-Digita...
Analysis Of Adverarial Code - The Role of Malware Kits
Convolutional Neural Networks
Op Sy 03 Ch 61

More from ClubHack (20)

PDF
India legal 31 october 2014
PPTX
Cyberlaw by Mr. Pavan Duggal at ClubHack Infosec KeyNote @ Bangalore
PPT
Cyber Insurance
PPTX
Summarising Snowden and Snowden as internal threat
PPTX
Fatcat Automatic Web SQL Injector by Sandeep Kamble
PDF
The Difference Between the Reality and Feeling of Security by Thomas Kurian
PDF
Stand Close to Me & You're pwned! Owning Smart Phones using NFC by Aditya Gup...
PPTX
Smart Grid Security by Falgun Rathod
PPTX
Legal Nuances to the Cloud by Ritambhara Agrawal
PPT
Infrastructure Security by Sivamurthy Hiremath
PDF
Hybrid Analyzer for Web Application Security (HAWAS) by Lavakumar Kuppan
PPTX
Hacking and Securing iOS Applications by Satish Bomisstty
PPTX
Critical Infrastructure Security by Subodh Belgi
PDF
XSS Shell by Vandan Joshi
PDF
Clubhack Magazine Issue February 2012
PDF
ClubHack Magazine issue 26 March 2012
PDF
ClubHack Magazine issue April 2012
PDF
ClubHack Magazine Issue May 2012
PDF
ClubHack Magazine – December 2011
PDF
One link Facebook (Anand Pandey)
India legal 31 october 2014
Cyberlaw by Mr. Pavan Duggal at ClubHack Infosec KeyNote @ Bangalore
Cyber Insurance
Summarising Snowden and Snowden as internal threat
Fatcat Automatic Web SQL Injector by Sandeep Kamble
The Difference Between the Reality and Feeling of Security by Thomas Kurian
Stand Close to Me & You're pwned! Owning Smart Phones using NFC by Aditya Gup...
Smart Grid Security by Falgun Rathod
Legal Nuances to the Cloud by Ritambhara Agrawal
Infrastructure Security by Sivamurthy Hiremath
Hybrid Analyzer for Web Application Security (HAWAS) by Lavakumar Kuppan
Hacking and Securing iOS Applications by Satish Bomisstty
Critical Infrastructure Security by Subodh Belgi
XSS Shell by Vandan Joshi
Clubhack Magazine Issue February 2012
ClubHack Magazine issue 26 March 2012
ClubHack Magazine issue April 2012
ClubHack Magazine Issue May 2012
ClubHack Magazine – December 2011
One link Facebook (Anand Pandey)

Content Type Attack Dark Hole in the Secure Environment by Raman Gupta

  • 2. Who I am  I am working with TCS as Information Security Consultant.  Work area includes vulnerability assessment , Penetration Testing and secure environment setup.  Interested in reverse engineering and exploit writing.
  • 3. Title  Content-Type Attack : Content-Type attack is related to the vulnerability in client side software that are use to read the content like adobe reader , Microsoft office , Image viewer. Attackers attempt to exploit programming flaws in that code to induce memory corruption issues, resulting in their own attack code being run on the victim computer that opened the PDF or DOC file.  Dark Hole in a secure environment : This is due to following reasons. 1) Un-detective Nature 2) Ignorance 3) False sense of security
  • 4. Content  Content-Type Attack process  Malicious attack document structure  Attack demo  PDF File Structure  Intro to the PDF file format  PDF object type overview  Demo : PDF analysis using scripts  Content-Type Attack protection technique
  • 6. Content-Type Attack process  This attack document is sent by an attacker to a victim, perhaps using a compromised machine to relay the e-mail to help conceal the attacker’s identify.  If the victim double-clicks the file attached to the e-mail, the application registered for the file type launches and starts parsing the file.  In this malicious file, the attacker will have embedded malformed content that exploits a file-parsing vulnerability, causing the application to corrupt memory on the stack or heap.  Successful exploits transfer control to the attacker’s shell code that has been loaded from the file into memory.  The shell code often instructs the machine to write out an EXE file embedded at a fixed offset and run that executable. After the EXE file is written and run, the attacker’s code writes out a ”clean file” also contained in the attack document and opens the application with the content of that clean file.  In the meantime, the malicious EXE file that has been written to the file system is run, carrying out whatever mission the attacker intended.
  • 10. PDF file format overview  The language to describe a PDF file is based on the PostScript programming language.
  • 11.  Stream objects may contain compressed, obfuscated binary data between the opening “stream” tag and closing “endstream” tag. Here is an example:  5 0 bj<</Subtype/Type1C/Length=5416/Filter/FlateDecode>>stream H%|T}T#W#Ÿ!d&"FI#Å%NFW#åC ... endstream endobj  In this example, the stream data is compressed using the /Flate Compressed stream data is a popular trick used by malware authors to evade detection.
  • 12. PDF objects type overview  /Page  /Encrypt  /ObjStm  /JS  /JavaScript  /AA  /OpenAction  /JBIG2Decode  /RichMedia  /Launch
  • 14. Content-Type Attack protection technique  All security update must be available.  Disable java script in adobe reader.  Enable DEP for un-trusted application.  Don’t open attach file in mail from unknown or un- trusted source.  Implement white-list based proxy.  Implement strong outbound firewall policy.
  • 15. Credit  Didier Stevens  Nikhil Mittal  ClubHack
  • 16. Thank you Presented by : Raman Gupta ( Twitter : Raman_gupta1)