What is File Inclusion

File Inclusion in php

...
<?php include($server_root . '/myapp_header.php'); ?$gt;
...
...
<?php include($_GET['headername']); ?$gt;
...

Explanation :

Image for post
Image for post

Recommendation

register_globals = 'off'
<?php
$templates = array('main.php' => 1, 'blue.php' => 2, 'red.php' => 3);
?$gt;
...
<?php include($templates[$_GET['headername']]); ?$gt;
...

Tips

Written by

Blogger | Security Researcher | Digital forensic analyst | Twitter — @mrunal110

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store