root@masadmin:~# apt install arp-scan Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: libflashrom1 libftdi1-2 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: ieee-data libauthen-sasl-perl libclone-perl libdata-dump-perl libencode-locale-perl libfile-listing-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libtimedate-perl libtry-tiny-perl liburi-perl libwww-perl libwww-robotrules-perl perl-openssl-defaults Suggested packages: libdigest-hmac-perl libgssapi-perl libcrypt-ssleay-perl libsub-name-perl libbusiness-isbn-perl libauthen-ntlm-perl The following NEW packages will be installed: arp-scan ieee-data libauthen-sasl-perl libclone-perl libdata-dump-perl libencode-locale-perl libfile-listing-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libtimedate-perl libtry-tiny-perl liburi-perl libwww-perl libwww-robotrules-perl perl-openssl-defaults 0 upgraded, 32 newly installed, 0 to remove and 0 not upgraded. Need to get 3,816 kB of archives. After this operation, 18.3 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libencode-locale-perl all 1.05-1.1 [11.8 kB] Get:2 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libtimedate-perl all 2.3300-2 [34.0 kB] Get:3 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libhttp-date-perl all 6.05-1 [9,920 B] Get:4 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libfile-listing-perl all 6.14-1 [11.2 kB] Get:5 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libhtml-tagset-perl all 3.20-4 [12.5 kB] Get:6 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 liburi-perl all 5.10-1 [78.8 kB] Get:7 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libhtml-parser-perl amd64 3.76-1build2 [88.4 kB] Get:8 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libhtml-tree-perl all 5.07-2 [200 kB] Get:9 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libio-html-perl all 1.004-2 [15.4 kB] Get:10 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 liblwp-mediatypes-perl all 6.04-1 [19.5 kB] Get:11 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libhttp-message-perl all 6.36-1 [76.8 kB] Get:12 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libhttp-cookies-perl all 6.10-1 [18.4 kB] Get:13 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libhttp-negotiate-perl all 6.01-1 [12.5 kB] Get:14 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 perl-openssl-defaults amd64 5build2 [7,542 B] Get:15 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libnet-ssleay-perl amd64 1.92-1build2 [327 kB] Get:16 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libio-socket-ssl-perl all 2.074-2 [192 kB] Get:17 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libnet-http-perl all 6.22-1 [23.2 kB] Get:18 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 liblwp-protocol-https-perl all 6.10-1 [10.9 kB] Get:19 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libtry-tiny-perl all 0.31-1 [21.8 kB] Get:20 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libwww-robotrules-perl all 6.02-1 [12.6 kB] Get:21 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libwww-perl all 6.61-1 [141 kB] Get:22 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 ieee-data all 20210605.1 [1,887 kB] Get:23 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libclone-perl amd64 0.45-1build3 [11.0 kB] Get:24 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libdata-dump-perl all 1.25-1 [25.9 kB] Get:25 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libfont-afm-perl all 1.20-3 [13.6 kB] Get:26 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libhtml-form-perl all 6.07-1 [22.2 kB] Get:27 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libhtml-format-perl all 2.12-1.1 [41.3 kB] Get:28 http://id.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libhttp-daemon-perl all 6.13-1ubuntu0.1 [22.9 kB] Get:29 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libnet-smtp-ssl-perl all 1.04-1 [5,948 B] Get:30 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libmailtools-perl all 2.21-1 [80.7 kB] Get:31 http://id.archive.ubuntu.com/ubuntu jammy/universe amd64 arp-scan amd64 1.9.7-2 [338 kB] Get:32 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 libauthen-sasl-perl all 2.1600-1.1 [43.1 kB] Fetched 3,816 kB in 1s (6,477 kB/s) Extracting templates from packages: 100% Selecting previously unselected package libencode-locale-perl. (Reading database ... 110320 files and directories currently installed.) Preparing to unpack .../00-libencode-locale-perl_1.05-1.1_all.deb ... Unpacking libencode-locale-perl (1.05-1.1) ... Selecting previously unselected package libtimedate-perl. Preparing to unpack .../01-libtimedate-perl_2.3300-2_all.deb ... Unpacking libtimedate-perl (2.3300-2) ... Selecting previously unselected package libhttp-date-perl. Preparing to unpack .../02-libhttp-date-perl_6.05-1_all.deb ... Unpacking libhttp-date-perl (6.05-1) ... Selecting previously unselected package libfile-listing-perl. Preparing to unpack .../03-libfile-listing-perl_6.14-1_all.deb ... Unpacking libfile-listing-perl (6.14-1) ... Selecting previously unselected package libhtml-tagset-perl. Preparing to unpack .../04-libhtml-tagset-perl_3.20-4_all.deb ... Unpacking libhtml-tagset-perl (3.20-4) ... Selecting previously unselected package liburi-perl. Preparing to unpack .../05-liburi-perl_5.10-1_all.deb ... Unpacking liburi-perl (5.10-1) ... Selecting previously unselected package libhtml-parser-perl:amd64. Preparing to unpack .../06-libhtml-parser-perl_3.76-1build2_amd64.deb ... Unpacking libhtml-parser-perl:amd64 (3.76-1build2) ... Selecting previously unselected package libhtml-tree-perl. Preparing to unpack .../07-libhtml-tree-perl_5.07-2_all.deb ... Unpacking libhtml-tree-perl (5.07-2) ... Selecting previously unselected package libio-html-perl. Preparing to unpack .../08-libio-html-perl_1.004-2_all.deb ... Unpacking libio-html-perl (1.004-2) ... Selecting previously unselected package liblwp-mediatypes-perl. Preparing to unpack .../09-liblwp-mediatypes-perl_6.04-1_all.deb ... Unpacking liblwp-mediatypes-perl (6.04-1) ... Selecting previously unselected package libhttp-message-perl. Preparing to unpack .../10-libhttp-message-perl_6.36-1_all.deb ... Unpacking libhttp-message-perl (6.36-1) ... Selecting previously unselected package libhttp-cookies-perl. Preparing to unpack .../11-libhttp-cookies-perl_6.10-1_all.deb ... Unpacking libhttp-cookies-perl (6.10-1) ... Selecting previously unselected package libhttp-negotiate-perl. Preparing to unpack .../12-libhttp-negotiate-perl_6.01-1_all.deb ... Unpacking libhttp-negotiate-perl (6.01-1) ... Selecting previously unselected package perl-openssl-defaults:amd64. Preparing to unpack .../13-perl-openssl-defaults_5build2_amd64.deb ... Unpacking perl-openssl-defaults:amd64 (5build2) ... Selecting previously unselected package libnet-ssleay-perl:amd64. Preparing to unpack .../14-libnet-ssleay-perl_1.92-1build2_amd64.deb ... Unpacking libnet-ssleay-perl:amd64 (1.92-1build2) ... Selecting previously unselected package libio-socket-ssl-perl. Preparing to unpack .../15-libio-socket-ssl-perl_2.074-2_all.deb ... Unpacking libio-socket-ssl-perl (2.074-2) ... Selecting previously unselected package libnet-http-perl. Preparing to unpack .../16-libnet-http-perl_6.22-1_all.deb ... Unpacking libnet-http-perl (6.22-1) ... Selecting previously unselected package liblwp-protocol-https-perl. Preparing to unpack .../17-liblwp-protocol-https-perl_6.10-1_all.deb ... Unpacking liblwp-protocol-https-perl (6.10-1) ... Selecting previously unselected package libtry-tiny-perl. Preparing to unpack .../18-libtry-tiny-perl_0.31-1_all.deb ... Unpacking libtry-tiny-perl (0.31-1) ... Selecting previously unselected package libwww-robotrules-perl. Preparing to unpack .../19-libwww-robotrules-perl_6.02-1_all.deb ... Unpacking libwww-robotrules-perl (6.02-1) ... Selecting previously unselected package libwww-perl. Preparing to unpack .../20-libwww-perl_6.61-1_all.deb ... Unpacking libwww-perl (6.61-1) ... Selecting previously unselected package ieee-data. Preparing to unpack .../21-ieee-data_20210605.1_all.deb ... Unpacking ieee-data (20210605.1) ... Selecting previously unselected package libclone-perl. Preparing to unpack .../22-libclone-perl_0.45-1build3_amd64.deb ... Unpacking libclone-perl (0.45-1build3) ... Selecting previously unselected package libdata-dump-perl. Preparing to unpack .../23-libdata-dump-perl_1.25-1_all.deb ... Unpacking libdata-dump-perl (1.25-1) ... Selecting previously unselected package libfont-afm-perl. Preparing to unpack .../24-libfont-afm-perl_1.20-3_all.deb ... Unpacking libfont-afm-perl (1.20-3) ... Selecting previously unselected package libhtml-form-perl. Preparing to unpack .../25-libhtml-form-perl_6.07-1_all.deb ... Unpacking libhtml-form-perl (6.07-1) ... Selecting previously unselected package libhtml-format-perl. Preparing to unpack .../26-libhtml-format-perl_2.12-1.1_all.deb ... Unpacking libhtml-format-perl (2.12-1.1) ... Selecting previously unselected package libhttp-daemon-perl. Preparing to unpack .../27-libhttp-daemon-perl_6.13-1ubuntu0.1_all.deb ... Unpacking libhttp-daemon-perl (6.13-1ubuntu0.1) ... Selecting previously unselected package libnet-smtp-ssl-perl. Preparing to unpack .../28-libnet-smtp-ssl-perl_1.04-1_all.deb ... Unpacking libnet-smtp-ssl-perl (1.04-1) ... Selecting previously unselected package libmailtools-perl. Preparing to unpack .../29-libmailtools-perl_2.21-1_all.deb ... Unpacking libmailtools-perl (2.21-1) ... Selecting previously unselected package arp-scan. Preparing to unpack .../30-arp-scan_1.9.7-2_amd64.deb ... Unpacking arp-scan (1.9.7-2) ... Selecting previously unselected package libauthen-sasl-perl. Preparing to unpack .../31-libauthen-sasl-perl_2.1600-1.1_all.deb ... Unpacking libauthen-sasl-perl (2.1600-1.1) ... Setting up libfont-afm-perl (1.20-3) ... Setting up libclone-perl (0.45-1build3) ... Setting up libhtml-tagset-perl (3.20-4) ... Setting up libauthen-sasl-perl (2.1600-1.1) ... Setting up liblwp-mediatypes-perl (6.04-1) ... Setting up libtry-tiny-perl (0.31-1) ... Setting up perl-openssl-defaults:amd64 (5build2) ... Setting up libencode-locale-perl (1.05-1.1) ... Setting up libdata-dump-perl (1.25-1) ... Setting up libio-html-perl (1.004-2) ... Setting up libtimedate-perl (2.3300-2) ... Setting up ieee-data (20210605.1) ... Setting up liburi-perl (5.10-1) ... Setting up libnet-ssleay-perl:amd64 (1.92-1build2) ... Setting up arp-scan (1.9.7-2) ... Setting up libhttp-date-perl (6.05-1) ... Setting up libfile-listing-perl (6.14-1) ... Setting up libnet-http-perl (6.22-1) ... Setting up libwww-robotrules-perl (6.02-1) ... Setting up libhtml-parser-perl:amd64 (3.76-1build2) ... Setting up libio-socket-ssl-perl (2.074-2) ... Setting up libhttp-message-perl (6.36-1) ... Setting up libhtml-form-perl (6.07-1) ... Setting up libhttp-negotiate-perl (6.01-1) ... Setting up libhttp-cookies-perl (6.10-1) ... Setting up libhtml-tree-perl (5.07-2) ... Setting up libhtml-format-perl (2.12-1.1) ... Setting up libnet-smtp-ssl-perl (1.04-1) ... Setting up libmailtools-perl (2.21-1) ... Setting up libhttp-daemon-perl (6.13-1ubuntu0.1) ... Setting up libwww-perl (6.61-1) ... Setting up liblwp-protocol-https-perl (6.10-1) ... Processing triggers for man-db (2.10.2-1) ... Scanning processes... Scanning linux images... Running kernel seems to be up-to-date. No services need to be restarted. No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. root@masadmin:~#
root@masadmin:~# ip ad 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:50:56:a3:81:cc brd ff:ff:ff:ff:ff:ff altname enp3s0 inet 192.168.58.78/24 brd 192.168.58.255 scope global ens160 valid_lft forever preferred_lft forever inet6 fe80::250:56ff:fea3:81cc/64 scope link valid_lft forever preferred_lft forever 3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default link/ether 02:42:16:22:f6:67 brd ff:ff:ff:ff:ff:ff inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0 valid_lft forever preferred_lft forever 4: br-8624767ab484: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default link/ether 02:42:c2:41:61:a8 brd ff:ff:ff:ff:ff:ff inet 172.18.0.1/16 brd 172.18.255.255 scope global br-8624767ab484 valid_lft forever preferred_lft forever inet6 fe80::42:c2ff:fe41:61a8/64 scope link valid_lft forever preferred_lft forever 10: vethd6b6a1e@if9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-8624767ab484 state UP group default link/ether 56:b2:27:c9:33:a1 brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet6 fe80::54b2:27ff:fec9:33a1/64 scope link valid_lft forever preferred_lft forever root@masadmin:~#
untuk melakukan scan ip di segment yang sama, bisa menjalankan perintah arp-scan –interface ens160 -l
root@masadmin:~# arp-scan --interface ens160 -l Interface: ens160, type: EN10MB, MAC: 00:50:56:a3:81:cc, IPv4: 192.168.58.78 Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan) 192.168.58.1 00:22:bd:f8:19:ff Cisco Systems, Inc 192.168.58.10 38:68:dd:2f:f2:88 INVENTEC CORPORATION 192.168.58.11 38:68:dd:2f:f0:70 INVENTEC CORPORATION .. .. 192.168.58.95 00:50:56:a3:23:94 VMware, Inc. 192.168.58.95 00:50:56:a6:96:69 VMware, Inc. (DUP: 2) 192.168.58.96 00:50:56:a3:f2:9d VMware, Inc. .. .. 192.168.58.253 50:6b:8d:8b:4a:14 Nutanix (DUP: 2) 192.168.58.254 0c:da:41:1d:6d:b1 Hangzhou H3C Technologies Co., Limited 192.168.58.254 0c:da:41:1d:6d:b1 Hangzhou H3C Technologies Co., Limited (DUP: 2) 223 packets received by filter, 0 packets dropped by kernel Ending arp-scan 1.9.7: 256 hosts scanned in 2.009 seconds (127.43 hosts/sec). 222 responded root@masadmin:~#