HackTheBox頑張る その4 ~nmapのvulnスクリプトとポート検索
マシン攻略の上で、nmapのスクリプト機能を使って脆弱性を確認しました
2つのやり方で表示に違いが出るか確認します
・・・というのも、前回複数ポートスキャンをしたとき、ポート単体でスキャンしたときに出てきた脆弱性が出てきてなかった気がしたんですよね・・・うーむ
ということで確認
・ポート複数
kali@kali:~/SyachinekoLab/workspace/HTB/Legacy$ sudo nmap -p 1-1000 --script vuln 10.10.10.4 Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-19 20:30 EDT 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 10.10.10.4 Host is up (0.32s latency). Not shown: 998 filtered ports PORT STATE SERVICE 139/tcp open netbios-ssn |_clamav-exec: ERROR: Script execution failed (use -d to debug) 445/tcp open microsoft-ds |_clamav-exec: ERROR: Script execution failed (use -d to debug) Host script results: |_samba-vuln-cve-2012-1182: NT_STATUS_ACCESS_DENIED | smb-vuln-ms08-067: | VULNERABLE: | Microsoft Windows system vulnerable to remote code execution (MS08-067) | State: LIKELY VULNERABLE | IDs: CVE:CVE-2008-4250 | The Server service in Microsoft Windows 2000 SP4, XP SP2 and SP3, Server 2003 SP1 and SP2, | Vista Gold and SP1, Server 2008, and 7 Pre-Beta allows remote attackers to execute arbitrary | code via a crafted RPC request that triggers the overflow during path canonicalization. | | Disclosure date: 2008-10-23 | References: | https://technet.microsoft.com/en-us/library/security/ms08-067.aspx |_ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4250 |_smb-vuln-ms10-054: false |_smb-vuln-ms10-061: ERROR: Script execution failed (use -d to debug) | smb-vuln-ms17-010: | VULNERABLE: | Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010) | State: VULNERABLE | IDs: CVE:CVE-2017-0143 | Risk factor: HIGH | A critical remote code execution vulnerability exists in Microsoft SMBv1 | servers (ms17-010). | | Disclosure date: 2017-03-14 | References: | https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/ | https://technet.microsoft.com/en-us/library/security/ms17-010.aspx |_ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0143 Nmap done: 1 IP address (1 host up) scanned in 82.14 seconds
・ポート単体
kali@kali:~/SyachinekoLab/workspace/HTB/Legacy$ sudo nmap -p 139 --script vuln 10.10.10.4 [sudo] kali のパスワード: Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-19 19:47 EDT 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 10.10.10.4 Host is up (0.17s latency). PORT STATE SERVICE 139/tcp open netbios-ssn |_clamav-exec: ERROR: Script execution failed (use -d to debug) Host script results: |_samba-vuln-cve-2012-1182: NT_STATUS_ACCESS_DENIED | smb-vuln-ms08-067: | VULNERABLE: | Microsoft Windows system vulnerable to remote code execution (MS08-067) | State: LIKELY VULNERABLE | IDs: CVE:CVE-2008-4250 | The Server service in Microsoft Windows 2000 SP4, XP SP2 and SP3, Server 2003 SP1 and SP2, | Vista Gold and SP1, Server 2008, and 7 Pre-Beta allows remote attackers to execute arbitrary | code via a crafted RPC request that triggers the overflow during path canonicalization. | | Disclosure date: 2008-10-23 | References: | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4250 |_ https://technet.microsoft.com/en-us/library/security/ms08-067.aspx |_smb-vuln-ms10-054: false |_smb-vuln-ms10-061: ERROR: Script execution failed (use -d to debug) | smb-vuln-ms17-010: | VULNERABLE: | Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010) | State: VULNERABLE | IDs: CVE:CVE-2017-0143 | Risk factor: HIGH | A critical remote code execution vulnerability exists in Microsoft SMBv1 | servers (ms17-010). | | Disclosure date: 2017-03-14 | References: | https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/ | https://technet.microsoft.com/en-us/library/security/ms17-010.aspx |_ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0143
結論からすると、ポートの指定数によらず結果は出てくるようだ。
ちなみに、実行結果が何回か出てこなかったことがあってちょっとよくわからない
ダメだった例
kali@kali:~/SyachinekoLab/workspace/HTB/Legacy$ sudo nmap -p 1-1000 --script vuln 10.10.10.4 [sudo] kali のパスワード: Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-19 20:15 EDT 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 10.10.10.4 Host is up (0.18s latency). All 1000 scanned ports on 10.10.10.4 are filtered
なんかフィルターかかってる???
なんででしょう
同時アクセスだめだったりするんだろうか
この件について検索してみると、以下のサイトが
https://nmap.org/man/ja/man-port-scanning-basics.html
ほかの人が同じようにポートスキャン等してポートを占有してると出るらしい
今後これが出たら、時間をおいて再度打ってみようと思う
以上