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 10 n Attacking Back-End Components 403<br />

Questions<br />

Answers can be found at http://mdsec.net/wahh.<br />

1. A network device provides a <strong>web</strong>-based interface for performing device<br />

configuration. Why is this kind of functionality often vulnerable to OS<br />

command injection attacks?<br />

2. You are testing <strong>the</strong> following URL:<br />

http://wahh-app.com/home/statsmgr.aspx?country=US<br />

Changing <strong>the</strong> value of <strong>the</strong> country parameter to foo results in this error<br />

message:<br />

Could not open file: D:\app\default\home\logs\foo.log (invalid file).<br />

What steps could you take to attack <strong>the</strong> <strong>application</strong>?<br />

3. You are testing an AJAX <strong>application</strong> that sends data in XML format within<br />

POST requests. What kind of vulnerability might enable you to read<br />

arbitrary files from <strong>the</strong> server’s filesystem? What prerequisites must be<br />

in place for your attack to succeed?<br />

4. You make <strong>the</strong> following request to an <strong>application</strong> that is running on <strong>the</strong><br />

ASP.NET platform:<br />

POST /home.aspx?p=urlparam1&p=urlparam2 HTTP/1.1<br />

Host: wahh-app.com<br />

Cookie: p=cookieparam<br />

Content-Type: <strong>application</strong>/x-www-form-urlencoded<br />

Content-Length: 15<br />

p=bodyparam<br />

The <strong>application</strong> executes <strong>the</strong> following code:<br />

String param = Request.Params[“p”];<br />

What value does <strong>the</strong> param variable have?<br />

5. Is HPP a prerequisite for HPI, or vice versa?<br />

6. An <strong>application</strong> contains a function that proxies requests to external domains<br />

and returns <strong>the</strong> responses from those requests. To prevent server-side<br />

redirection attacks from retrieving protected resources on <strong>the</strong> <strong>application</strong>’s<br />

own <strong>web</strong> server, <strong>the</strong> <strong>application</strong> blocks requests targeting localhost or

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

Saved successfully!

Ooh no, something went wrong!