文章分类 - 代码审计
摘要:java注入三种情况 1.jdbc原声代码拼接(+或者StringBUilder append())没有经过预编译 2.mybaits注入${}(四种情况无法预编译,like模糊查询,order by排序,范围查询in,动态表明列明) 3.hiberate\JPA是预编译的,使用自己开发语句类似于j
阅读全文
摘要:关键字: extract() parse_str() importrequestvariables() $$ 等 问题: 在../include/module.php会判断$fmodule是否等于7,等于7时$module是写死的,不等于7时$module可以赋值。 $filpy = basenam
阅读全文
摘要:问题: 未经验证直接访问后台页面 代码分析: 访问后台页面时判断cookie是否存在user,为空才会跳转到login <?php $user=$_COOKIE['user']; if ($user==""){ header("Location: ?r=login"); exit; } ?> 代码调
阅读全文
摘要:关键字: eval assert preg_replace call_user_func call_user_func_array等 代码分析: 搜索eval关键字inc/zzz_template.php中 class ParserTemplate { $zcontent = $this->pars
阅读全文
摘要:命令执行: system exec shell_exec `` passthru pcntl_exec popen proc_open 1.查找system()函数在路径includes/baijiacms/common.inc.php,$quality_command由intval()控制,无法利
阅读全文
摘要:下载点/template/default/source/audio.php?id=1 源码段 $id = intval(SafeRequest("id","get"));if($row = $db->getrow("select * from ".tname('music')." where i
阅读全文
摘要:方法 file_put_contents() 函数把一个字符串写入文件中。 思路 public function editfile(){ $dir = $_GET['dir']; //保存修改 if(isset($_POST['settemcontent'])){ if($this->config[
阅读全文
摘要:方法 string file_get_contents ( string $filename [, bool $use_include_path [, resource $context [, int $offset [, int $maxlen ]]]] ) 将文件读入一个字符串。第三个参数$co
阅读全文
摘要:方法 php删除文件的代码是“unlink($file,$cont)”。unlink()函数用于删除指定的文件,接受一个不可省略的参数“$file”,规定要删除的文件路径,一个可省参数“$cont”,规定文件句柄环境,是可修改流的行为的一套选项。 思路 后台文件删除,根据unlink函数定位到Bac
阅读全文