tryhackme:sqlmap

github:https://github.com/sqlmapproject/sqlmap

kali集成

参数介绍

sqlmap -h

        ___
__H__
___ ___[(]_____ ___ ___ {1.7.2#stable}
|_ -| . ["] | .'| . |
|___|_ [']_|_|_|__,| _|
|_|V... |_| https://sqlmap.org Usage: python3 sqlmap [options] Options:
-h, --help Show basic help message and exit
-hh Show advanced help message and exit
--version Show program's version number and exit
-v VERBOSE Verbosity level: 0-6 (default 1) Target:
At least one of these options has to be provided to define the
target(s) -u URL, --url=URL Target URL (e.g. "http://www.site.com/vuln.php?id=1")
-g GOOGLEDORK Process Google dork results as target URLs Request:
These options can be used to specify how to connect to the target URL --data=DATA Data string to be sent through POST (e.g. "id=1")
--cookie=COOKIE HTTP Cookie header value (e.g. "PHPSESSID=a8d127e..")
--random-agent Use randomly selected HTTP User-Agent header value
--proxy=PROXY Use a proxy to connect to the target URL
--tor Use Tor anonymity network
--check-tor Check to see if Tor is used properly Injection:
These options can be used to specify which parameters to test for,
provide custom injection payloads and optional tampering scripts -p TESTPARAMETER Testable parameter(s)
--dbms=DBMS Force back-end DBMS to provided value Detection:
These options can be used to customize the detection phase --level=LEVEL Level of tests to perform (1-5, default 1)
--risk=RISK Risk of tests to perform (1-3, default 1) Techniques:
These options can be used to tweak testing of specific SQL injection
techniques --technique=TECH.. SQL injection techniques to use (default "BEUSTQ") Enumeration:
These options can be used to enumerate the back-end database
management system information, structure and data contained in the
tables -a, --all Retrieve everything
-b, --banner Retrieve DBMS banner
--current-user Retrieve DBMS current user
--current-db Retrieve DBMS current database
--passwords Enumerate DBMS users password hashes
--dbs Enumerate DBMS databases
--tables Enumerate DBMS database tables
--columns Enumerate DBMS database table columns
--schema Enumerate DBMS schema
--dump Dump DBMS database table entries
--dump-all Dump all DBMS databases tables entries
-D DB DBMS database to enumerate
-T TBL DBMS database table(s) to enumerate
-C COL DBMS database table column(s) to enumerate Operating system access:
These options can be used to access the back-end database management
system underlying operating system --os-shell Prompt for an interactive operating system shell
--os-pwn Prompt for an OOB shell, Meterpreter or VNC General:
These options can be used to set some general working parameters --batch Never ask for user input, use the default behavior
--flush-session Flush session files for current target Miscellaneous:
These options do not fit into any other category --wizard Simple wizard interface for beginner users [!] to see full list of options run with '-hh'

基础命令

-u URL, --url=URL          目标URL,比如 "http://www.site.com/vuln.php?id=1"

--data=DATA                通过 POST 发送的数据字符串,比如 "id=1"

--random-agent             使用随机选择的 HTTP User-Agent 标头值

-p TESTPARAMETER           可测试参数(parameter)

--level=LEVEL              要执行的测试级别(1-5,默认 1)

--risk=RISK                执行测试的风险等级(1-3,默认 1)

枚举命令

-a, --all                  检索所有内容

-b, --banner               检索DBMS(数据库管理系统,常见的有MySql等)的banner(横幅)

--current-user             检索DBMS当前用户

--current-db               检索DBMS当前数据库

--passwords                枚举DBMS的用户密码哈希

--dbs                      枚举DBMS所有数据库

--tables                   枚举DBMS数据库中的表

--columns                  枚举DBMS数据库中表的列

--schema                   枚举DBMS的schema(模式、架构)

--dump                     转储DBMS的数据库中的表的条目

--dump-all                 转储DBMS的数据库中所有表的条目

--is-dba                   检测DBMS的当前用户是否为DBA(数据库管理员)

-D <DB NAME>               指定要枚举的DBMS数据库——指定数据库

-T <TABLE NAME>            指定要枚举的DBMS数据库中的表——指定表名

-C COL                     指定要枚举的DBMS数据库中的表的列——指定列名

用于操作系统

--os-shell                 获取交互式的操作系统shell

--os-pwn                   获取一个OOB shell:Meterpreter会话 或者 VNC(Virtual Network Console); OOB是指 out-of-band,带外数据

--os-cmd=OSCMD             执行操作系统命令

--priv-esc                 数据库进程用户提权

--os-smbrelay              一键获取一个OOB shell、Meterpreter会话 或者 VNC(Virtual Network Console)

请求方式

get

sqlmap -u https://testsite.com/page.php?id=7 --dbs

直接修改想要请求的参数即可

post

只要修改参数部分即可

1. sqlmap -u https://testsite.com/page.php? --data "id=1" --dbs

2.使用bp抓包,保存到文件中,假设保存文件中post参数为id,文件为sql.txt
sqlmap -r sql.txt -p id --dbs

通用

--current-db   //爆破当前正在使用数据库,假设为database
-D database --tables //爆破当前数据库中的表 假设有table -D database -T table --columns //爆破表的列名 假设为column
-D database -T table -C column --dump //获取当前字段的值 -D database --dump-all //转储DBMS的数据库中所有表的条目

sqlmap工具学习的更多相关文章

  1. Git版本控制工具学习

    Git代码管理工具学习 分布式管理工具:git 相比较svn它更加的方便,基本上我们的操作都是在本地进行的. Git文件的三种状态:已提交,已修改,以暂存. 已提交:表示文件已经被保存到本地数据库. ...

  2. sql server 内置ETL工具学习(一) BCP篇

    sql server 内置ETL工具学习 常用的导入方式:bcp, BULK INSERT,OPENROWSET和 SSIS. BCP BCP全称BULK COPY PROGRAM 有以下特点: 命令 ...

  3. linux 工具学习网站

    推荐一个很不错的linux工具学习网站; 对于一个开发人员来说,我觉得掌握这些工具对于基于linux的应用开发来说事半功倍. http://linuxtools-rst.readthedocs.io/ ...

  4. SQLMap工具的安装使用

    SQLMap工具介绍: sqlmap是一个开源软件,用于检测和利用数据库漏洞,并提供将恶意代码注入其中的选项. 它是一种渗透测试工具,可自动检测和利用SQL注入漏洞,在终端中提供其用户界面.该软件在命 ...

  5. [原创]Jmeter工具学习思维导图

    [原创]Jmeter工具学习思维导图

  6. [转] 用协议分析工具学习TCP/IP

    一.前言 目前,网络的速度发展非常快,学习网络的人也越来越多,稍有网络常识的人都知道TCP/IP协议是网络的基础,是Internet的语言,可以说没有TCP/IP协议就没有互联网的今天.目前号称搞网的 ...

  7. 第八模块:算法&设计模式、企业应用 第2章 企业应用工具学习

    第八模块:算法&设计模式.企业应用 第2章 企业应用工具学习

  8. webpack前端构建工具学习总结(一)之webpack安装、创建项目

    npm是随nodeJs安装包一起安装的包管理工具,能解决NodeJS代码部署上的很多问题: 常见的使用场景有以下几种: 允许用户从NPM服务器下载别人编写的第三方包到本地使用. 允许用户从NPM服务器 ...

  9. webpack前端构建工具学习总结(二)之loader的使用

    Webpack 本身只能处理 JavaScript 模块,如果要处理其他类型的文件,就需要使用 loader 进行转换. Loader 可以理解为是模块和资源的转换器,它本身是一个函数,接受源文件作为 ...

  10. webpack前端构建工具学习总结(四)之自动化生成项目中的html页面

    接续上文:webpack前端构建工具学习总结(三)之webpack.config.js配置文件 插件的介绍文档:https://www.npmjs.com/package/html-webpack-p ...

随机推荐

  1. SpringBoot——数据访问

    对于数据访问层,无论是 SQL 还是 NoSQL,SpringBoot 默认采用整合 Spring Data 的方式进行统一处理,添加大量自动配置,屏蔽了很多设置.引入各种 xxxTemplate,x ...

  2. C#中的语句

    寄语 接下来几篇文章,将带领大家一起简单回顾下C#中常规的语法,也是平常我们在编码过程中都使用的. 今天来介绍下C#中的语句. 一般科班出身的程序猿们大家第一个学习语言基本都是C语言,C语言里面在刚开 ...

  3. C#多线程开发-了解C#5.0 05

    前面一篇文章,了解了任务并行库.这是异步编程基础设施,它允许我们以模块化的方式设计程序,来组合不同的异步操作.解决了以往线程之间传递消息难等问题,但是我们在阅读和编写此类程序时还是会觉得非常难理解程序 ...

  4. $\mathcal{Mathicの代码风格}$

    概述 \(#include\) 语句必须置于整个程序的开头. 不应 using namespace foo; 若有必要可以 using foo::bar; 单行字符数必须不超过\(80\). 预编译 ...

  5. Service Mesh之Istio部署bookinfo

    前文我们了解了service mesh.分布式服务治理和istio部署相关话题,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/17281541.html:今天我 ...

  6. 存储论——经济订货批量的R实现

    存储论又称库存理论,是运筹学中发展较早的分支.早在 1915 年,哈李斯(F.Harris)针对银行货币的储备问题进行了详细的研究,建立了一个确定性的存贮费用模型,并求得了最佳批量公式.1934 年威 ...

  7. Let's Encrypt 泛域名证书申请

    泛域名 泛域名证书又名通配符证书是SSL证书中的其中一种形式,一般会以通配符的形式(如:*.domain.com)来指定证书所要保护的域名. OV证书和DV证书都会有通配符的域名形式提供,而EV证书一 ...

  8. 通过python修改本地ip

    写在前面, 1 对于个人公司需要固定ip,而回家需要用到家里的ip, 2对于公司it人员,每台电脑都需要设置ip,,尤其批量的时候,这个作为it的自己知道 3运维人员,可以通过ip测试哪些ip可以用, ...

  9. [Java/LeetCode]算法练习:转变日期格式(1507/simple)

    1 题目描述 题目来源: https://leetcode-cn.com/problems/reformat-date 给你一个字符串 date ,它的格式为 Day Month Year ,其中: ...

  10. 使用 LoRA 和 Hugging Face 高效训练大语言模型

    在本文中,我们将展示如何使用 大语言模型低秩适配 (Low-Rank Adaptation of Large Language Models,LoRA) 技术在单 GPU 上微调 110 亿参数的 F ...