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.

132 Chapter 5 n Bypassing Client-Side Controls<br />

<br />

Quantity: (Maximum quantity is 50)<br />

<br />

<br />

<br />

This includes <strong>the</strong> price of <strong>the</strong> product as a disabled text field and appears<br />

on-screen as shown in Figure 5-4.<br />

Figure 5-4: A form containing a disabled input field<br />

When this form is submitted, only <strong>the</strong> quantity parameter is sent to <strong>the</strong><br />

server. However, <strong>the</strong> presence of a disabled field suggests that a price parameter<br />

may originally have been used by <strong>the</strong> <strong>application</strong>, perhaps for testing purposes<br />

during development. This parameter would have been submitted to <strong>the</strong> server<br />

and may have been processed by <strong>the</strong> <strong>application</strong>. In this situation, you should<br />

definitely test whe<strong>the</strong>r <strong>the</strong> server-side <strong>application</strong> still processes this parameter.<br />

If it does, seek to exploit this fact.<br />

TRY IT!<br />

http://mdsec.net/shop/104/<br />

HACK STEPS<br />

1. Look for disabled elements within each form of <strong>the</strong> <strong>application</strong>. Whenever<br />

you find one, try submitting it to <strong>the</strong> server along with <strong>the</strong> form’s o<strong>the</strong>r<br />

parameters to determine whe<strong>the</strong>r it has any effect.<br />

2. Often, submit elements are flagged as disabled so that buttons appear<br />

as grayed out in contexts when <strong>the</strong> relevant action is unavailable. You<br />

should always try to submit <strong>the</strong> names of <strong>the</strong>se elements to determine<br />

whe<strong>the</strong>r <strong>the</strong> <strong>application</strong> performs a server-side check before attempting<br />

to carry out <strong>the</strong> requested action.

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

Saved successfully!

Ooh no, something went wrong!