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

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

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

Here is the result that for example enables one to recover the connection login/password to the Mysql<br />

database:<br />

<strong>Security</strong><br />

To avoid this kind <strong>of</strong> attack, we can use the PHP function which will check that the file has been<br />

uploaded using the POST method, as this prevents files on your server from being copied. Here<br />

is the code using the function “move_uploaded_file()” enabling us to make our script is secure:<br />

<br />

Include() Function<br />

There are several functions that have to be used carefully when coding in PHP. Let us start with the<br />

include() function, which is very <strong>of</strong>ten used by the hacker to have malicious code executed by the<br />

HTTP server. The include() function can include another file's PHP code into a main PHP script.<br />

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

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

Saved successfully!

Ooh no, something went wrong!