Computer Security and Penetration Testing: Programming Exploits
Computer Security and Penetration Testing: Programming Exploits
Testing
Chapter 13
Programming Exploits
Objectives
• Describe the evolution of programming exploits
• Recognize vulnerabilities in ActiveX controls
• Identify steps to counter vulnerabilities in ActiveX
controls
• Recognize vulnerabilities in VBScript
• Identify steps to counter vulnerabilities in VBScript
• Programming exploits
– Defects in various programming languages
• Used to develop server-side and client-side
applications
• Difference between a script and a programming
language
– For an application to be used, it needs to be compiled
for the environment in which it is running
– Script runs uncompiled
• ActiveX controls
– Component Object Model (COM) objects that can be
embedded in a variety of applications
– Stand-alone compiled applications
– Designed to make it possible to link and allow
interactions between variously developed applications
• Controls can be obtained on the Internet that
perform almost any functionality
– Wide range of functionality makes ActiveX controls
interesting to attackers
Computer Security and Penetration Testing 6
ActiveX Controls (continued)
• VBScript
– Microsoft’s answer to Netscape’s JavaScript language
– Loosely based on the Visual Basic programming
language, but is much simpler
• Supported by Internet Explorer
– Enables Web authors to add interactive controls such
as buttons and scrollbars to their Web pages
• Buffer Overflow
– Exploits an unchecked buffer in Internet Explorer
processing HTML elements
• Such as FRAME and IFRAME elements
– Used by Internet Explorer, Outlook Express, and
Windows Explorer
– Performed using the res:// local resource protocol
– Allows the attacker to run arbitrary code at the level of
privilege enjoyed by the user on the victim machine
• HTML E-Mail
– In 2001 scripts within the pretty HTML e-mails were
run silently and automatically
– Attackers can craft HTML e-mails to take advantage
• Remote Access
– In 2005, a vulnerability was found within Microsoft’s
HTML Help system
– The window.showHelp() function in Internet
Explorer 5.x does not restrict HTML Help files (.chm)
• From being executed from the local host
• Vulnerabilities of Java:
– Client-side malevolent applets
– Server-side cross-scripting
– Server-side address spoofing
• A substantial percentage of vulnerabilities are
related to vulnerabilities in the JRE
– Which can result in applets arbitrarily giving
themselves elevated privileges