krlaboratories

Linux & Windows Network Audit CLI

Sep 18th, 2022 (edited)
616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. /* Linux Network */
  2.  
  3. arp - table
  4. ip neigh - show neighbors devices
  5. ip route - show current routes
  6. route - routes intenet
  7. ethtool eth0 - analysiss network card
  8. tcpdump -i eth0 - show real-time packets
  9. ip addr show - show local ip address
  10. curl ifconfig.co - see Internet IP
  11.  
  12. sudo lsof -n -P -i +c 13 | grep 1900 - взнати хто слухає 1900 порт
  13.  
  14. ifconfig -a | grep ether | gawk '{print $2}' - show all MAC addr.
  15. ip addr show eth0 - show MAC of selected device
  16. ip link show - show all devices and only MACs
  17.  
  18. ip a - display all ip addressesd
  19. ifconfig - display all network devices
  20. ping ip - check quality of internet connection
  21. host ip/domain - check hostname
  22. dig ip - check all DNS records
  23. traceroute - check route of internet connections
  24. nslookup domain.com - display dns information
  25.  
  26. netstat -ant - display all tcp port listeners
  27. netstat -a - list all sockets and ports
  28. netstat -r - routing table map
  29. netstat -i - interfaces (base command) packets
  30. netstat -l - all active sockets
  31. netstat -s - statistc info
  32. netstat -p - sockets and their PIDS
  33. netstat -tunap - all servers and establisheds
  34. netstat -tulpn - only servers
  35. netstat -anp
  36. netstat -lptnu
  37.  
  38. nmcli device - Display network devices
  39. nmcli device show eth0 - Show information about eth0 device
  40. nmcli connection - Show network connections
  41. nmcli connection up foo - Bring connection foo up
  42. nmcli device wifi connect foo - Connect to wireless network foo
  43.  
  44. ss - statistics network
  45. iptables -L -n - iptables firewall rules
  46. cat /etc/resolv.conf - conf network
  47. lsof -i - tasks network services
  48.  
  49. whoami - see logged users
  50. systemctl restart network - restart network service
  51.  
  52. /* traffic monitors */
  53.  
  54. vnstat
  55. iftop
  56. iftop -i usb0
  57. sudo systemctl restart darkstat
  58.  
  59. https://www.tecmint.com/linux-network-bandwidth-monitoring-tools/
  60.  
  61. /* firewall */
  62.  
  63. iptables -A INPUT -s XX.XXX.XXX.XXX -j DROP
  64. iptables -A INPUT -s 120.120.120.0/255.255.255.0 -j DROP
  65. iptables -A INPUT -p tcp --dport ssh -s 120.120.120.120 -j DROP
  66.  
  67. /* hosts security */
  68.  
  69. nano /etc/hosts
  70.  
  71. Base: https://github.com/StevenBlack/hosts
  72.  
  73. Documentation:
  74. https://www.opennet.ru/tips/2938_hosts_block_adblock_malware.shtml
  75.  
  76. /* DNS security */
  77.  
  78. nano /etc/resolv.conf
  79. nmcli dev show | grep DNS
  80.  
  81. /* Windows Network */
  82.  
  83. whoami - see users
  84. netstat -nao - display port listeners
  85. tracert domain.com - route path betweeeen object and localhost
  86. ping domain.com - know ip address of website
  87. nslookup ip - resolve DNS info
  88. hostname
  89. arp -a - arp-table
  90. route print - routing table
  91. ipconfig/all - all network devices servers info
  92. netstat -an - connections status
  93. path
  94. netsh wlan show profile
  95. tasklist
  96. net start - all services in system
  97. schtasks - all sheduled tasks
  98. netstat -ano - active tcp/udp
Advertisement
Add Comment
Please, Sign In to add comment