PHP Security Programming: Session Data injection
A similar problem with a session exposure is conversation injection. This type of attack is based on your Web server's write permissions in addition to the Read permission to the session store directory. Therefore, there is a possibility to write a script that allows other users to add, edit, or delete sessions. The following example shows an HTML form that allows users to easily edit existing session data:
The script inject.php executes the modifications specified by the form:
$sess _data) { $_session = $sess _data; $sess _data = Session_encode; File_put_contents ($path/$sess _name, $sess _data);} $_session = Array ();? >
This type of attack is very dangerous. Not only can an attacker edit your user's data, but it can also edit his or her own session data. It is more powerful than session hijacking because attackers can select all session data for modification, which makes it possible to bypass access restrictions and other security measures.
The best solution for this problem is to keep session data in the database. See the section on the front of the topic.
Extended Reading
http://www.bkjia.com/PHPjc/876631.html www.bkjia.com true http://www.bkjia.com/PHPjc/876631.html techarticle PHP Security Programming: Session data injection A similar problem is exposed to session injection. This type of attack is based on your Web server in addition to the session storage directory has Read permissions, there are ...