nmapコマンド / Kali Linux
先日ラズパイにインストールを完了したKali Linuxのnmapコマンドを使って滞在先のローカルネットワーク上にあるデバイスの情報を取得してみた。
前提として、ターゲットのip 192.168.8.100がわかっているということで、叩いたコマンドは
sudo nmap -sV -O -T4 192.168.8.100
そして返ってきたのが下記の情報
┌──(kali㉿xxxxx)-[/] └─$ sudo nmap -sV -O -T4 192.168.8.100 Starting Nmap 7.93 ( https://nmap.org ) at 2022-11-24 11:07 +07 Nmap scan report for test.lan (192.168.8.100) Host is up (0.0018s latency). Not shown: 996 closed tcp ports (reset) PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 3.0.3 139/tcp open netbios-ssn Samba smbd 4.6.2 445/tcp open netbios-ssn Samba smbd 4.6.2 3334/tcp open ssh OpenSSH 8.4p1 Debian 5+deb11u1 (protocol 2.0) MAC Address: DC:xx:xx:xx:xx:xx (Raspberry Pi Trading) Device type: general purpose Running: Linux 4.X|5.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 OS details: Linux 4.15 - 5.6 Network Distance: 1 hop Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 14.67 seconds
要約すると
って具合です。
vsftpdには脆弱性があってそこが狙われるとか、sshの標準ポート22番のままにしておくと悪さされやすいとか、攻撃されるポイントは色々あるので日頃から対策しておくと良いですね。
お使いのLinux環境にnmapがインストールされていない場合は以下のコマンドでインストールできます。
sudo apt install nmap -y
ラズパイ購入はamazon.jpが便利です。