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<br />

16<br />

Attacking Native<br />

Compiled Applications<br />

Compiled software that runs in a native execution environment has historically<br />

been plagued by vulnerabilities such as buffer overflows and format string bugs.<br />

Most <strong>web</strong> <strong>application</strong>s are written using languages and platforms that run in a<br />

managed execution environment in which <strong>the</strong>se classic vulnerabilities do not<br />

arise. One of <strong>the</strong> most significant advantages of languages such as C# and Java<br />

is that programmers do not need to worry about <strong>the</strong> kind of buffer management<br />

and pointer arithmetic problems that have affected software developed<br />

in native languages such as C and C++ and that have given rise to <strong>the</strong> majority<br />

of critical bugs found in that software.<br />

Never<strong>the</strong>less, you may occasionally encounter <strong>web</strong> <strong>application</strong>s that are written<br />

in native code. Also, many <strong>application</strong>s written primarily using managed<br />

code contain portions of native code or call external components that run in<br />

an unmanaged context. Unless you know for certain that your target <strong>application</strong><br />

does not contain any native code, it is worth performing some basic tests<br />

designed to uncover any classic vulnerabilities that may exist.<br />

Web <strong>application</strong>s that run on hardware devices such as printers and switches<br />

often contain some native code. O<strong>the</strong>r likely targets include any page or script<br />

whose name includes possible indicators of native code, such as dll or exe, and<br />

any functionality known to call legacy external components, such as logging<br />

mechanisms. If you believe that <strong>the</strong> <strong>application</strong> you are attacking contains<br />

substantial amounts of native code, it may be desirable to test every piece of<br />

633

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

Saved successfully!

Ooh no, something went wrong!