27.06.2013 Views

Hack Security Pro.pdf - Index of

Hack Security Pro.pdf - Index of

Hack Security Pro.pdf - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

A CGI can also fall victim to a stack overflow. If we come back to the code part given as an example at<br />

the beginning <strong>of</strong> this chapter, we can see that the buffer whose role it is to receive the chain <strong>of</strong><br />

characters passed on to the program is limited to 49 characters. So, if more characters than is<br />

possible are passed on to one <strong>of</strong> the variables, a segmentation error is likely to happen during the<br />

execution <strong>of</strong> the CGI, in which case a stack overflow is to be feared.<br />

Finally, as has been said earlier on, CGIs are likely to interpret arguments that are sent to it without<br />

these being <strong>of</strong> the value1=value&... type, and that is <strong>of</strong> course the case for some <strong>of</strong> them.<br />

Let us take the example <strong>of</strong> the php.cgi CGI:<br />

The <strong>Hack</strong>ademy DMP -120/209- SYSDREAM

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

Saved successfully!

Ooh no, something went wrong!