[THM][Note] Nmap Basic Port Scans
https://tryhackme.com/room/nmap02
Task2
Which service uses UDP port 53 by default?
- こちらの記事などを参考に、よく使われるサービス名と、ポート番号、TCP/UDPタイプは覚えておきましょう。
Which service uses TCP port 22 by default?
- こちらの記事などを参考に、よく使われるサービス名と、ポート番号、TCP/UDPタイプは覚えておきましょう。
How many port states does Nmap consider?
- 説明をよく読む。
Which port state is the most interesting to discover as a pentester?
- 自分がポートスキャンを行っている時に、nmapが示すポートの結果として嬉しいのはどれでしょうか。
Task3
What 3 letters represent the Reset flag?
- 説明文をよく読む。
Which flag needs to be set when you initiate a TCP connection (first packet of TCP 3-way handshake)?
- TCPの3WAYハンドシェイクはとても重要です。(SYN => SYN/ACK => ACK)の順序を覚えておきましょう。
Task4
Launch the VM. Open the AttackBox and execute nmap -sT MACHINE_IP
via the terminal. A new service has been installed on this VM since our last scan. Which port number was closed in the scan above but is now open on this target VM?
- 以下のコマンドを実行してみる。
- 1つ増えているポートがある。
nmap -sT MACHINE_IP
What is Nmap’s guess about the newly installed service?
- 上記の結果から増えたポートのSERVICEを確認する。
Task5
Launch the VM. Some new server software has been installed since the last time we scanned it. On the AttackBox, use the terminal to execute nmap -sS MACHINE_IP
. What is the new open port?
- 以下のコマンドを実行してみる。
- 1つ増えているポートがある。
sudo nmap -sS MACHINE_IP
What is Nmap’s guess of the service name?
- 上記の結果から増えたポートのSERVICEを確認する。
* 「-sT(デフォルト)」と、「-sS」の違いを理解しましょう。また、Wiresharkを使用してお互いの送信されているパケットの違いを確認すると理解が深まります。また、なぜ「-sS」の実行には、root権限が必要なのでしょうか?
Task6
Launch the VM. On the AttackBox, use the terminal to execute nmap -sU -F -v MACHINE_IP
. A new service has been installed since the last scan. What is the UDP port that is now open?
- 以下のコマンドを実行してみる。
- 1つ増えているポートがある。
sudo nmap -sU -F -v MACHINE_IP
* -Fをつける理由はなんでしょうか?また、-vをつけることにより、表示がどの様に変わりましたか?また、-vvをつけるとどうなるでしょうか?
What is the service name according to Nmap?
- 上記の結果から増えたポートのSERVICEを確認する。
Task7
What is the option to scan all the TCP ports between 5000 and 5500?
- 説明文をよく読む。
How can you ensure that Nmap will run at least 64 probes in parallel?
- 説明文をよく読む。
What option would you add to make Nmap very slow and paranoid?
- 説明文をよく読む。
- こちらに、テンプレートとその使いどころについてのまとめが有ります。