19.09.2017 Views

the-web-application-hackers-handbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 20 n A Web Application Hacker’s Toolkit 777<br />

submitted. It doesn’t know that one of <strong>the</strong>se parameters signifies a quantity<br />

and ano<strong>the</strong>r signifies a price. Fur<strong>the</strong>rmore, it doesn’t know that being able to<br />

modify an order’s quantity is inconsequential, whereas being able to modify<br />

its price represents a security flaw.<br />

Scanners Do Not Improvise<br />

Many <strong>web</strong> <strong>application</strong>s use nonstandard mechanisms to handle sessions and<br />

navigation and to transmit and handle data, such as in <strong>the</strong> structure of <strong>the</strong><br />

query string, cookies, or o<strong>the</strong>r parameters. A human being may quickly notice<br />

and deconstruct <strong>the</strong> unusual mechanism, but a computer will continue following<br />

<strong>the</strong> standard rules it has been given. Fur<strong>the</strong>rmore, many attacks against<br />

<strong>web</strong> <strong>application</strong>s require some improvisation, such as to circumvent partially<br />

effective input filters or to exploit several different aspects of <strong>the</strong> <strong>application</strong>’s<br />

behavior that collectively leave it open to attack. Scanners typically miss <strong>the</strong>se<br />

kinds of attacks.<br />

Scanners Are Not Intuitive<br />

Computers do not have intuition about how best to proceed. The approach of<br />

today’s scanners is largely to attempt every attack against every function. This<br />

imposes a practical limit on <strong>the</strong> variety of checks that can be performed and <strong>the</strong><br />

ways in which <strong>the</strong>se can be combined. This approach overlooks vulnerabilities<br />

in many cases:<br />

n Some attacks involve submitting crafted input at one or more steps of a<br />

multistage process and walking through <strong>the</strong> rest of <strong>the</strong> process to observe<br />

<strong>the</strong> results.<br />

n Some attacks involve changing <strong>the</strong> sequence of steps in which <strong>the</strong> <strong>application</strong><br />

expects a process to be performed.<br />

n Some attacks involve changing <strong>the</strong> value of multiple parameters in crafted<br />

ways. For example, an XSS attack may require a specific value to be placed<br />

into one parameter to cause an error message, and an XSS payload to be<br />

placed into ano<strong>the</strong>r parameter, which is copied into <strong>the</strong> error message.<br />

Because of <strong>the</strong> practical constraints imposed on scanners’ brute-force approach<br />

to vulnerability detection, <strong>the</strong>y cannot work through every permutation of<br />

attack string in different parameters, or every permutation of functional steps.<br />

Of course, no human being can do this practically ei<strong>the</strong>r. However, a human<br />

frequently has a feel for where <strong>the</strong> bugs are located, where <strong>the</strong> developer made<br />

assumptions, and where something doesn’t “look right.” Hence, a human tester<br />

will select a tiny proportion of <strong>the</strong> total possible attacks for actual investigation<br />

and <strong>the</strong>reby will often achieve success.

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

Saved successfully!

Ooh no, something went wrong!