3.1.2. 使用nmap扫描firmadyne虚拟环境运行的防火墙 root@aflfuzz:~/firmadyne# nmap -O -sV 10.0.0.100 Starting Nmap 7.40SVN ( https://nmap.org )at 2017-04-20 11:13 CST Nmap scan report for localhost (10.0.0.100) Host is up (0.0011s latency). Not shown: 997 closed ports PORT STATE SERVICE VERSION 22/tcp open ssh Dropbear sshd 0.51 (protocol 2.0) 80/tcp open http lighttpd 1.4.18 443/tcp open ssl/http lighttpd 1.4.18 MAC Address: 52:54:00:12:34:56 (QEMUvirtual NIC) Device type: general purpose Running: Linux 2.6.X OS CPE: cpe:/o:linux:linux_kernel:2.6.32 OS details: Linux 2.6.32 Network Distance: 1 hop Service Info: OS: Linux; CPE:cpe:/o:linux:linux_kernel OS and Service detection performed. Pleasereport any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scannedin 68.30 seconds 3.1.3. 使用nmap vuln脚本探测防火墙漏洞 root@aflfuzz:~/firmadyne# nmap--script=vuln -O -sV 10.0.0.100 Starting Nmap 7.40SVN ( https://nmap.org )at 2017-04-20 11:22 CST Pre-scan script results: | broadcast-avahi-dos: | Discovered hosts: | 224.0.0.251 | After NULL UDP avahi packet DoS (CVE-2011-1002). |_ Hosts are all up (not vulnerable). Nmap scan report for localhost (10.0.0.100) Host is up (0.0014s latency). Not shown: 997 closed ports PORT STATE SERVICE VERSION 22/tcp open ssh Dropbear sshd 0.51 (protocol 2.0) 80/tcp open http lighttpd 1.4.18 | http-cookie-flags: | /: | PHPSESSID: |_ httponly flag not set |_http-csrf: Couldn't find any CSRFvulnerabilities. |_http-dombased-xss: Couldn't find any DOMbased XSS. | http-enum: |_ /test.php: Test page |_http-phpself-xss: ERROR: Script executionfailed (use -d to debug) |_http-server-header: lighttpd/1.4.18 | http-slowloris-check: | VULNERABLE: | Slowloris DOS attack | State: LIKELY VULNERABLE | IDs: CVE:CVE-2007-6750 | Slowloris tries to keep many connections to the target web server openand hold | them open as long as possible. Itaccomplishes this by opening connections to | the target web server and sending a partial request. By doing so, itstarves | the http server's resources causing Denial Of Service. | | Disclosure date: 2009-09-17 | References: | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6750 |_ http://ha.ckers.org/slowloris/ |_http-stored-xss: Couldn't find any storedXSS vulnerabilities. 443/tcp open ssl/http lighttpd 1.4.18 |_http-aspnet-debug: ERROR: Scriptexecution failed (use -d to debug) | http-cookie-flags: | /: | PHPSESSID: |_ httponly flag not set |_http-csrf: Couldn't find any CSRFvulnerabilities. |_http-dombased-xss: Couldn't find any DOMbased XSS. | http-enum: |_ /test.php: Test page |_http-phpself-xss: ERROR: Script executionfailed (use -d to debug) |_http-server-header: lighttpd/1.4.18 | http-slowloris-check: | VULNERABLE: | Slowloris DOS attack | State: LIKELY VULNERABLE | IDs: CVE:CVE-2007-6750 | Slowloris tries to keep many connections to the target web server openand hold | them open as long as possible. Itaccomplishes this by opening connections to | the target web server and sending a partial request. By doing so, itstarves | the http server's resources causing Denial Of Service. | | Disclosure date: 2009-09-17 | References: | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6750 |_ http://ha.ckers.org/slowloris/ |_http-stored-xss: Couldn't find any storedXSS vulnerabilities. | ssl-ccs-injection: | VULNERABLE: | SSL/TLS MITM vulnerability (CCS Injection) | State: VULNERABLE | Risk factor: High | OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h | does not properly restrict processing of ChangeCipherSpec messages, | which allows man-in-the-middle attackers to trigger use of a zero | length master key in certain OpenSSL-to-OpenSSL communications, and | consequently hijack sessions or obtain sensitive information, via | a crafted TLS handshake, aka the "CCS Injection"vulnerability. | | References: | http://www.openssl.org/news/secadv_20140605.txt | http://www.cvedetails.com/cve/2014-0224 |_ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0224 | ssl-poodle: | VULNERABLE: | SSL POODLE information leak | State: VULNERABLE | IDs: CVE:CVE-2014-3566 OSVDB:113251 | The SSL protocol 3.0, as used in OpenSSL through 1.0.1i and other | products, uses nondeterministic CBC padding, which makes it easier | for man-in-the-middle attackers to obtain cleartext data via a | padding-oracle attack, aka the "POODLE" issue. | Disclosure date: 2014-10-14 | Check results: | TLS_RSA_WITH_AES_128_CBC_SHA | References: | https://www.openssl.org/~bodo/ssl-poodle.pdf | https://www.imperialviolet.org/2014/10/14/poodle.html | http://osvdb.org/113251 |_ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3566 | sslv2-drown: | ciphers: | SSL2_RC2_128_CBC_WITH_MD5 | SSL2_DES_64_CBC_WITH_MD5 | SSL2_DES_192_EDE3_CBC_WITH_MD5 | SSL2_RC4_128_WITH_MD5 | SSL2_RC2_128_CBC_EXPORT40_WITH_MD5 | SSL2_RC4_128_EXPORT40_WITH_MD5 | vulns: | CVE-2016-0703: | title: OpenSSL: Divide-and-conquer session key recovery in SSLv2 | state: VULNERABLE | ids: | CVE:CVE-2016-0703 | description: | The get_client_master_keyfunction in s2_srvr.c in the SSLv2 implementation in | OpenSSL before 0.9.8zf, 1.0.0 before 1.0.0r, 1.0.1 before 1.0.1m, and1.0.2 before | 1.0.2a accepts a nonzero CLIENT-MASTER-KEY CLEAR-KEY-LENGTH value for anarbitrary | cipher, which allows man-in-the-middle attackers to determine theMASTER-KEY value | and decrypt TLS ciphertext data by leveraging a Bleichenbacher RSApadding oracle, a | related issue to CVE-2016-0800. | | refs: | https://www.openssl.org/news/secadv/20160301.txt | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-0703 | CVE-2016-0800: | title: OpenSSL: Cross-protocol attack on TLS using SSLv2 (DROWN) | state: VULNERABLE | ids: | CVE:CVE-2016-0800 | description: | The SSLv2 protocol, as used inOpenSSL before 1.0.1s and 1.0.2 before 1.0.2g and | other products, requires a server to send a ServerVerify message beforeestablishing | that a client possesses certain plaintext RSA data, which makes iteasier for remote | attackers to decrypt TLS ciphertext data by leveraging a BleichenbacherRSA padding | oracle, aka a "DROWN" attack. | | refs: | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-0800 |_ https://www.openssl.org/news/secadv/20160301.txt MAC Address: 52:54:00:12:34:56 (QEMUvirtual NIC) Device type: general purpose Running: Linux 2.6.X OS CPE: cpe:/o:linux:linux_kernel:2.6.32 OS details: Linux 2.6.32 Network Distance: 1 hop Service Info: OS: Linux; CPE:cpe:/o:linux:linux_kernel OS and Service detection performed. Pleasereport any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scannedin 192.14 seconds 3.1.4. firmadyne对防火墙使用msf进行渗透 runExploits.py会自动使用metasploit中存在的路由器的攻击脚本进行自动攻击,执行结果会存储在exploits目录 root@aflfuzz:~/firmadyne# chmod +xanalyses/*.py root@aflfuzz:~/firmadyne#mkdir exploits; root@aflfuzz:~/firmadyne#./analyses/runExploits.py-t 192.168.0.100 -o exploits/exploit -e x (requires Metasploit Framework)