Metasploit是一款開源的安全漏洞檢測工具,能夠幫助安全性問題,驗證漏洞的緩解措施,並管理專家驅動的安全性進行評估,提供真正的安全風險情報。這些功能包括智能開發,代碼審計,Web應用程序掃描,社會工程。團隊合做,在Metasploit和綜合報告提出了他們的發現linux
實驗環境nginx
centos6.5_x64sql
實驗軟件centos
pgdg-redhat-repo-latest.noarch.rpm安全
metasploit-latest-linux-x64-installer.run ruby
軟件安裝bash
cp -pv /etc/hosts /etc/hosts.bakapp
echo 192.168.10.10 metasploit >> /etc/hostside
cp -pv /etc/sysconfig/network /etc/sysconfig/network.bak工具
sed -i.bak 's/centos6/metasploit/g' /etc/sysconfig/network
service ntpd restart && ntpdate 192.168.10.18 && clock -w
sed -i.bak 's/https/http/g' /etc/yum.repos.d/epel.repo
service iptables stop && chkconfig --level 35 iptabls off
rpm -ivh /root/pgdg-redhat-repo-latest.noarch.rpm
yum install -y ruby lsof xorg-x11-server-Xvfb
yum install -y zlib zlib-devel readline-devel
yum install -y libicu postgresql10-libs postgresql10-server
service postgresql-10 initdb
service postgresql-10 start && chkconfig postgresql-10 on
su - postgres
-bash-4.1$ psql
psql (10.13)
Type "help" for help.
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(3 rows)
chmod +x /root/metasploit-latest-linux-x64-installer.run
./metasploit-latest-linux-x64-installer.run
Select a folder [/opt/metasploit]:
SSL Port [3790]:
https://192.168.10.18:3790 from your browser
msfconsole
=[ metasploit v5.0.94-dev ]
+ -- --=[ 2034 exploits - 1102 auxiliary - 344 post ]
+ -- --=[ 562 payloads - 45 encoders - 10 nops ]
+ -- --=[ 7 evasion ]
Metasploit tip: View advanced module options with advanced
msf5 >
cat /opt/metasploit/apps/pro/ui/config/database.yml
development:
adapter: "postgresql"
database: "msf3"
username: "msf3"
password: "5a00eb2f040f728d70b15533552e60e6"
port: 7337
host: "localhost"
pool: 256
timeout: 5
production:
adapter: "postgresql"
database: "msf3"
username: "msf3"
password: "5a00eb2f040f728d70b15533552e60e6"
port: 7337
host: "localhost"
pool: 256
timeout: 5
lsof -i:7337
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
postgres. 3840 postgres 6u IPv6 77683 0t0 TCP localhost:7337 (LISTEN)
postgres. 3840 postgres 7u IPv4 77684 0t0 TCP localhost:7337 (LISTEN)
lsof -i:5432
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
postmaste 3585 postgres 3u IPv6 31448 0t0 TCP localhost:postgres (LISTEN)
postmaste 3585 postgres 4u IPv4 31449 0t0 TCP localhost:postgres (LISTEN)
lsof -i:3790
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 3976 root 9u IPv4 80068 0t0 TCP *:quickbooksrds (LISTEN)
nginx 3978 daemon 9u IPv4 80068 0t0 TCP *:quickbooksrds (LISTEN)
nginx 3979 daemon 9u IPv4 80068 0t0 TCP *:quickbooksrds (LISTEN)