This post is part of a larger series on Security+ Common userspace utilities ping: Sends ICMP echo request to the destination, expects an ICMP echo reply but if not received before the timeout, will display as such. If a response is received, the RTT will typically be displayed in the output for each response. Implementations differ between operating systems and userspace utilities. # Windows uses -t to get correct, sane behavior ping -t 8.8.8.8 netstat: netstat will show network connections for transmission control protocol (incoming and outgoing), routing tables, as well as protocol statistics. # Windows uses netstat -a to show ports which the system is listening on as well netstat -a tracert: will display possible routes and measures transit delays of packets across an IP network. Windows uses tracert to send ICMP echo requests with an incrementing TTL starting from 0 until the specified is matched with an ICMP echo response. By default, it will perform reverse DNS lookups (PTR queries) to provide you with a hostname if possible. You can specify -d to prevent reverse DNS lookups which speed up the process drastically. tracert -d stevenpolley.net arp: allows displaying or manipulating the ARP cache. Can be used to investigate arp poisoning and L2 issues. arp -a ipconfig / ip / ifconfig (depracted): answers “who am I, and how am I configured” # Windows L3 configuration ipconfig # Windows L3 and L2 configuration ipconfig /all # Linux L3 configuration ip addr # Linux L2 configuration ip link # Linux deprecated userspace utility ifconfig nslookup/dig/drill (drill not on exam): you need to know how to make DNS queries using these tools. It’s important to know that nslookup performs DNS queries independent of system configuration, including the hosts file, cache, or if you have different DNS servers configured - it will perform a full DNS query when it’s run - that’s interesting and important for troubleshooting purposes. # Windows interactive mode to get MX record using 8.8.8.8 as DNS server # You can change mx for soa or ns or any other type of record. nslookup server 8.8.8.8 set type=mx stevenpolley.net # Linux dig command dig @8.8.8.8 stevenpolley.net MX netcat: able to open and listen on ports or act as a client on any port you want. That’s pretty cool - it’s like a swiss army knife. It obviously won’t respond correctly like a server implementation would unless it’s configured to do so, but can read incoming information (as a server) or responses (as a client) - that’s pretty neat! # netcat server listen on TCP port 8080 netcat -l 8080 # you can direct STDOUT to a file if you wish netcat -l 8080 > file.out # netcat as a client - STDIN is transmitted netcat stevenpolley.net 8080 # you can also transmit a file netcat stevenpolley.net 8080 < file.in # you can also capture a response to a file netcat stevenpolley.net 8080 > file.out Network Scanning Network scanners allow us to tell what systems are running on a particular network - or at least the systems that tell us they’re there when we ask certain questions. The most commonly used network scanner is nmap. Nmap has many command-line switches which allow you to define specifically what type of scanning you would like to perform, and it also allows you to define/constrain your scan to a specific set of IP hosts.
...