19.09.2017 Views

the-web-application-hackers-handbook

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

804 Chapter 21 n A Web Application Hacker’s Methodology<br />

encountering numerous errors. For <strong>the</strong>se <strong>application</strong>s it is generally<br />

quicker to attach a runtime debugger to <strong>the</strong> process. JavaSnoop does this<br />

very well for Java. Silverlight Spy is a freely available tool that allows<br />

runtime monitoring of Silverlight clients.<br />

3.3.3.2 Locate <strong>the</strong> key functions and values <strong>the</strong> <strong>application</strong> employs to drive<br />

security-related business logic, and place breakpoints when <strong>the</strong> targeted<br />

function is called. Modify <strong>the</strong> arguments or return value as needed to<br />

affect <strong>the</strong> security bypass.<br />

3.3.4 Test ActiveX controls<br />

3.3.4.1 Identify any ActiveX controls employed by <strong>the</strong> <strong>application</strong>. Look for<br />

any .cab file types being requested via your intercepting proxy, or look<br />

for object tags within <strong>the</strong> HTML source code of <strong>application</strong> pages. For<br />

example:<br />

<br />

<br />

3.3.4.2 It is usually possible to subvert any input validation performed within<br />

an ActiveX control by attaching a debugger to <strong>the</strong> process and directly<br />

modifying data being processed or altering <strong>the</strong> program’s execution<br />

path. See Chapter 5 for more details about this kind of attack.<br />

3.3.4.3 It is often possible to guess <strong>the</strong> purpose of different methods that an<br />

ActiveX control exports based on <strong>the</strong>ir names and <strong>the</strong> parameters<br />

passed to <strong>the</strong>m. Use <strong>the</strong> COMRaider tool to enumerate <strong>the</strong> methods<br />

exported by <strong>the</strong> control. Test whe<strong>the</strong>r any of <strong>the</strong>se can be manipulated<br />

to affect <strong>the</strong> control’s behavior and defeat any validation tests<br />

it implements.<br />

3.3.4.4 If <strong>the</strong> control’s purpose is to ga<strong>the</strong>r or verify certain information about<br />

<strong>the</strong> client computer, use <strong>the</strong> Filemon and Regmon tools to monitor <strong>the</strong><br />

information <strong>the</strong> control ga<strong>the</strong>rs. It is often possible to create suitable<br />

items within <strong>the</strong> system registry and filesystem to fix <strong>the</strong> inputs used<br />

by <strong>the</strong> control and <strong>the</strong>refore affect its behavior.<br />

3.3.4.5 Test any ActiveX controls for vulnerabilities that could be exploited to<br />

attack o<strong>the</strong>r users of <strong>the</strong> <strong>application</strong>. You can modify <strong>the</strong> HTML used<br />

to invoke a control to pass arbitrary data to its methods and monitor<br />

<strong>the</strong> results. Look for methods with dangerous-sounding names, such<br />

as LaunchExe. You can also use COMRaider to perform some basic fuzz<br />

testing of ActiveX controls to identify flaws such as buffer overflows.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!