4.1 Operations and Incident Response (IR) Flashcards
(39 cards)
a Reconnaissance Tool-
provides a map of how data on the internet travels from its source to its destination. [this] differs in that it examines how the data moves through the internet.
• Determine the route a packet takes to a destination
– Map the entire path
• tracert (Windows) or traceroute (POSIX)
• Takes advantage of ICMP Time to Live Exceeded error
message
– The time in TTL refers to hops, not seconds or minutes
– TTL=1 is the first router, TTL=2 is the second router,
etc.
• Not all devices will reply with
ICMP Time Exceeded messages
– Some firewalls filter ICMP
– ICMP is low-priority for many devices
traceroute
a Reconnaissance Tool- • Lookup information from DNS servers – Canonical names, IP addresses, cache timers, etc. • nslookup -Both Windows and POSIX-based – Lookup names and IP addresses – Deprecated (use dig instead) • dig or DiG (Domain Information Groper) – More advanced domain information – Probably your first choice – Install in Windows: https://professormesser.link/ digwin
nslookup and dig
a Reconnaissance Tool-
• Most of your troubleshooting starts with your IP address
– Ping your local router/gateway
• Determine TCP/IP and network adapter information
– And some additional IP details
• ipconfig – Windows TCP/IP configuration
• ifconfig – Linux interface configuration
ipconfig and ifconfig
a Reconnaissance Tool- • Network mapper – Find and learn more about network devices • Port scan – Find devices and identify open ports • Operating system scan – Discover the OS without logging in to a device • Service scan – What service is available on a device? Name, version, details • Additional scripts – Nmap Scripting Engine (NSE) • Extend capabilities, vulnerability scans
Nmap
a Reconnaissance Tool-
• Test reachability
– Determine round-trip time
– Uses Internet Control Message Protocol (ICMP)
• One of your primary troubleshooting tools
– Can you ping the host?
• Written by Mike Muuss in 1983
– The sound made by sonar
– Not an acronym for Packet INternet Groper
– A backronym
ping
a Reconnaissance Tool- • Combine ping and traceroute – Included with Windows NT and later • First phase runs a traceroute – Build a map • Second phase – Measure round trip time and packet loss at each hop
pathping
a Reconnaissance Tool- • TCP/IP packet assembler/analyzer – A ping that can send almost anything • Ping a device – ICMP, TCP, UDP – #hping3 --destport 80 10.1.10.1 • Send crafted frames – Modify all IP, TCP, UDP, and ICMP values • A powerful tool – It’s easy to accidentally flood and DoS – Be careful!
hping
a Reconnaissance Tool- • Network statistics – Many different operating systems • netstat -a – Show all active connections • netstat -b – Show binaries • netstat -n – Do not resolve names
netstat
a Reconnaissance Tool- • “Read” or “write” to the network – Open a port and send or receive some traffic • Many different functions – Listen on a port number – Transfer data – Scan ports and send data to a port • Become a backdoor – Run a shell from a remote device • Other alternatives and OSes - Ncat
netcat
a Reconnaissance Tool-
• Search a network for IP addresses
– Locate active devices
– Avoid doing work on an IP address that isn’t there
• Many different techniques
– ARP (if on the local subnet)
– ICMP requests (ping)
– TCP ACK
– ICMP timestamp requests
• A response means more recon can be done
– Keep gathering information - Nmap, hping, etc.
IP scanners
a Reconnaissance Tool-
• Determine a MAC address based on an IP address
– You need the hardware address to communicate
• arp -a
– View local ARP table
Address Resolution Protocol
a Reconnaissance Tool- • View the device’s routing table – Find out which way the packets will go • Windows: route print • Linux and macOS: netstat -r curl • Client URL – Retrieve data using a URL – Uniform Resource Locator – Web pages, FTP, emails, databases, etc. • Grab the raw data – Search – Parse – Automate
route
a Reconnaissance Tool- • Gather OSINT – Open-Source Intelligence • Scrape information from Google or Bing – Find associated IP addresses • List of people from LinkedIn – Names and titles • Find PGP keys by email domain – A list of email contacts • DNS brute force – Find those unknown hosts; vpn, chat, mail, partner, etc.
theHarvester
a Reconnaissance Tool-
• Combine many recon tools into a single framework
– dnsenum, metasploit, nmap, theHarvester, and much more
• Both non-intrusive and very intrusive scanning options
– You choose the volume
• Another tool that can cause problems
– Brute force, server scanning, etc
– Make sure you know what you’re doing
sn1per
a Reconnaissance Tool- • Run port scans from a different host – Port scan proxy • Many different services – Choose the option for scan origination – Your IP is hidden as the scan source
scanless
a Reconnaissance Tool-
• Enumerate DNS information
– Find host names
• View host information from DNS servers
– Many services and hosts are listed in DNS
• Find host names in Google
– More hosts can probably be found in the index
dnsenum
a Reconnaissance Tool- • Industry leader in vulnerability scanning – Extensive support – Free and commercial options • Identify known vulnerabilities – Find systems before they can be exploited • Extensive reporting – A checklist of issues – Filter out the false positives
Nessus
a Reconnaissance Tool- • A sandbox for malware – Test a file in a safe environment • A virtualized environment – Windows, Linux, macOS, Android • Track and trace – API calls, network traffic, memory analysis – Traffic captures – Screenshots
Cuckoo
a File Manipulation Tools- • View the first part of a file – The head, or beginning, of the file – head [OPTION] … [FILE] … • Use -n to specify the number of lines – head -n 5 syslog
head
a File Manipulation Tools- • View the last part of a file – The tail, or end, or the file – tail [OPTION] … [FILE] … • Use -n to specify the number of lines – tail -n 5 syslog
tail
a File Manipulation Tools- • Concatenate – Link together in a series • Copy a file/files to the screen – cat file1.txt file2.txt • Copy a file/files to another file – cat file1.txt file2.txt > both.txt
cat
a File Manipulation Tools- • Find text in a file – Search through many files at a time • grep PATTERN [FILE] – grep failed auth.log
grep
a File Manipulation Tools- • Change mode of a file system object – r=read, w=write, x=execute – Can also use octal notation – Set for the file owner (u), the group(g), others(o), or all(a) – chmod mode FILE – chmod 744 script.sh • chmod 744 first.txt – User; read, write execute – Group; read only – Other; read only • chmod a-w first.txt – All users, no writing to first.txt • chmod u+x script.sh – The owner of script.sh can execute the file
chmod
a File Manipulation Tools-
• Add entries to the system log
– syslog
• Adding to the local syslog file
– logger “This information is added to syslog”
• Useful for including information in a local or remote syslog file
– Include as part of an automation script
– Log an important event
logger