metasploit安全审计
  hHWnOnebRjW2 2023年11月27日 19 0

实验环境

centos7_x64

实验软件

metasploit-framework-6.3.45%2B20231125112655_1rapid7-1.el6.x86_64.rpm


软件安装

rpm -ivh metasploit-framework-6.3.45%2B20231125112655_1rapid7-1.el6.x86_64.rpm  

yum install -y  postgresql11 postgresql11-server  



/usr/pgsql-11/bin/postgresql-11-setup initdb

Initializing database ... OK


systemctl start postgresql-11 && systemctl enable postgresql-11


su - postgres && psql

postgres=# create user msf_test with password '123456' nocreatedb;  创建用户配置密码

postgres=# create database msf1 with owner ='msf_test';             创建数据库

postgres=# \q


cp -pv /var/lib/pgsql/11/data/pg_hba.conf /var/lib/pgsql/11/data/pg_hba.conf.bak

cat /var/lib/pgsql/11/data/pg_hba.conf

# "local" is for Unix domain socket connections only

local   all             all                                     md5

# IPv4 local connections:

host    all             all             127.0.0.1/32            md5

# IPv6 local connections:

host    all             all             ::1/128                 md5


systemctl restart postgresql-11  重启服务 检测配置文件


touch /opt/metasploit-framework/database.yml && cat /opt/metasploit-framework/database.yml

production:

adapter: postgresql

database: msf1

username: msf_test

password: 123456

host: 127.0.0.1

port: 5432

pool: 75

timeout: 5


cp -pv /etc/bashrc /etc/bashrc.bak

echo export MSF_DATABASE_CONFIG=/opt/metasploit-framework/database.yml >> /etc/bashrc

source ~/.bashrc  


msfconsole  

Metasploit tip: View advanced module options with advanced                                                  

______________________________________________________________________________

|                                                                              |

|                          3Kom SuperHack II Logon                             |

|______________________________________________________________________________|

|                                                                              |

|                                                                              |

|                                                                              |

|                 User Name:          [   security    ]                        |

|                                                                              |

|                 Password:           [               ]                        |

|                                                                              |

|                                                                              |

|                                                                              |

|                                   [ OK ]                                     |

|______________________________________________________________________________|

|                                                                              |

|                                                       https://metasploit.com |

|______________________________________________________________________________|



      =[ metasploit v6.3.45-dev-                         ]

+ -- --=[ 2376 exploits - 1232 auxiliary - 416 post       ]

+ -- --=[ 1388 payloads - 46 encoders - 11 nops           ]

+ -- --=[ 9 evasion                                       ]


Metasploit Documentation: https://docs.metasploit.com/


msf6 > workspace

* default

msf6 > workspace -a test

[*] Added workspace: test

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

上一篇: 共享内存的创建和映射过程 下一篇: JMeter
  1. 分享:
最后一次编辑于 2023年11月27日 0

暂无评论

推荐阅读
  eHipUjOuzYYH   2023年12月10日   12   0   0 mysqlsqlUser
  bYdMetjCLs2g   2023年11月28日   16   0   0 bash
  wwLZeziuqjLR   2023年12月08日   67   0   0 Dockercentosbash
  mjtHZIki74si   2023年12月06日   21   0   0 ubuntubash
  hHWnOnebRjW2   2023年11月27日   20   0   0 PostgreSQLsqlbash
  vxoexqgjyiCS   2023年11月25日   13   0   0 linuxbash数组