Operations and Incident Response Flashcards
Determine the route a packet takes to a destination
- Map the entire path
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\tracert
Lookup information from DNS servers
- Canonical names, IP addresses, cache timers, etc.
Both windows and POSIX-based
- Lookup names and IP addresses
- Deprecated
nslookup
Lookup information from DNS servers
- Canonical names, IP addresses, cache timers, etc.
More advanced domain information
dig
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
ifconfig - Linux
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
- Extended capabilities, vulnerability scans
Nmap
Test reachability
- Determine round-trip home
- Uses Internet Control Message Protocol (ICMP)
One your primary primary troubleshooting tools
ping
Combine ping and traceroute
- Included with Windows NT and later
First phase runs a traceroute
- Build a map
Second phase
- Measure route trip time and packet loss at each hop
pathping
TCP/IP packet assembler/analyzer
- A ping that can send almost anything
Ping a device
- ICMP, TCP, UDP
Send crafted frames
- Modify all IP, TCP, UDP, and ICMP values
A powerful tool
- It’s easy to accidentally flood and DoS
hping
Network statistics
- Many different operating systems
netstat
Show all active connections
netstat -a
Show binaries
netstat -b
Do not resolve names
netstat -n
“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
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
Determine a MAC address based on an IP address
- You need the hardware address to communicate
Address Resolution Protocol
View local ARP table
arp -a
View the device’s routing table
- Find out which way the packets will go
route print - Windows
netstat -r - Linux and MAC
Client URL
- Retrieve data using a URL
- Uniform Resource Locator
- Web pages, FTP, emails, databases, etc.
Grab the raw data
- Search
- Parse
- Automate
curl
Gather OSINT
- Open-Source Intelligence
Scrape Information from Google or Bind
- 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
Combine many recon tools into a single framework
- densenum, 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
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
Enumerate DNS information
- Find host names
View host information from DNS servers
- Many services and hosts are listed in DND
Find host names in Google
- More hosts can probably be found in the index
dnsenum
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 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
View the first part of a file
Use -n to specify the number of lines
head
View the last part of a file
Use -n tp specify the number of lines
tail
Concatenate
- Link together in a series
Copy a file/files to another file
cat
Find text in a file
- Search through many files at a time
grep
Change mode of a file system object
- r=read, w=write, x=execute
- Can also use octal notations
- Set for the file owner (u), the group (g), others (o), or all (a)
chmod
User = read, write, and execute
Group = read only
Others = read only
chmod 744
Add entries to the system log
- syslog
Adding to the local syslog file
Useful for including information in a local or remote syslog file
- Include ad part of an automation script
- Log an important event
logger
Encrypted console communication
TCP port 22
Looks and acts the same as Telnet
Secure Shell (SSH)
Command line for system administrators
- ps1 file extension
- Included with Windows 8/8.1 and 10
Extend command-line functions
- Uses cmdlets (command-lets)
- Standalone executables
Automate and integrate
- System administration
- Active domain registration
Windows PowerShell
General-purpose scripting language
- .py file extension
Popular in many technologies
- Broad appeal and support
Python
A toolkit and crypto library for SSL/TLS
- Build certificates, manage SSL/TLS communication
Create X.509 certificates
- Manage certificate signing requests (CSRs) and certificate revocation lists (CRLs)
Message digests
- Support for many hashing protocols
Encryption and Decryption
- SSL/TLS for services
OpenSSL
A suite of packet replay utilities
- Replay and edit packet captures
- Open source
Test security devices
- Check IPS signatures and firewall rules
Test and tune IP Flow/Netflow devices
- Send hundreds of thousands of traffic flows per second
Tcpreplay
Capture packets from the command line
- Display packets on the screen
- Write packets to a file
tcpdump
Graphical packet analyzer
- Get into the details
Gathers frames on the network
- Or in the air
Sometimes built into the device
- View traffic patterns
- Identify unknown traffic
- Verify packet filtering and security controls
Extensive decodes
- View the application traffic
Wireshark
Create a bit-by-bit copy of a drive
- Used by many forensics tools
Create a disk image
- dd if=/dev/sda of =/tmp/sda-image.img
Restore from an image
- dd if=/tmp/sda-image.img of=/dev/sda
dd
Copy information in system memory to the standard output stream
- Everything that happens is in memory
- Many third-part tools can read a memory dump
Copy to another host across the network
- Use netcat, stunnel, openssl, etc.
memdump
A universal hexadecimal editor for Windows OS
Edit disks, files, RAM
- Includes data recovery features
Disk cloning
- Drive replication
Secure wipe
- Hard drive cleaning
Much more
- A full-featured forensics tools
Winhex
AccessData forensic drive imaging tool
- Includes file utilities and read-only image mounting
- Windows executable
Widely supported in many forensics tools
- Third-party analysis
Support for many different file systems and full disk encryption methods
- Investigator still needs the password
Can also import other image formats
- dd, Ghost, Expert Witness, etc.
FTK Imager
Perform digital forensics of hard drives, smartphones
- View and recover data from storage devices
Extract many different data types
- Downloaded files
- Browser history and cache
- Email messages
- Databases
- Much more
Autopsy
A pre-built toolkit for exploitations
- Build custom attacks
- Add more tools as vulnerabilities are found
- Increasingly powerful utilities
Metasploit
- Attack known vulnerabilities
The Social-Engineer Toolkit (SET)
- Spear phishing,, infectious media generator
Exploitation frameworks
The keys to the kingdom
- Find the passwords
Online cracking
- Try username/password combinations
Offline cracking
- Brute force a hash file
Limitations
- Password complexity/strength (entropy)
- Hashing method and CPU power
- Graphics processors are useful hardware tools
Password crackers
Completely remove data
- No usable information remains
Many different use cases
- Clean a hard drive for future use
- Permanently delete a single file
A one-way trip
- Once it’s gone, it’s really gone
- No recovery with forensics tools
Data sanitization
User clicks an email attachment and execute malware
- Malware then communicates with external servers
DDos
- Botnet attack
Confidential information is stolen
- Thief wants money or it goes public
User installs peer-to-peer software and allows external access to internal servers
Security incidents
Specialized group, trained and tested
Incident response team
Corporate support
IT security management
Intricate knowledge of compliance rules
Compliance officers
Your team in the trenches
Technical staff
National Institute of Standards and Technology
- Computer security incident
The incident response lifecycle
- Preparation
- Detection and Analysis
- Containment, Eradication, and Recovery
- Post-incident Activity
NIST SP800-61
Communication methods
- Phones and contact information
Incident handling hardware and software
- Laptops, removable media, forensic software, digital cameras, etc
Incident analysis resources
- Documentation, network diagrams, baselines, critical file hash values
Incident mitigation software
- Clean OS and application images
Policies needed for incident handling
- Everyone knows what to do
Preparation (Step 1 of Incident Response lifecycle)
Many different sources
- Different levels of detail, different levels of perception
A large amount of “volume”
- Attacks are incoming all the time
- How do you identify the legitimate threats?
Incidents are almost always complex
- Extensive knowledge needed
Detection (Step 2 of Incident Response lifecycle)
An incident might occur in the future
- This is your heads-up
Web server log
- Vulnerability scanner in use
Exploit announcement
- Monthly Microsoft patch release
- Adobe Flash update
Direct threats
- A hacking group doesn’t like you
incident precursors (Step 2 of Incident Response lifecycle)
An attack is underway
- Or an exploit is successful
Buffer overflow attempt
- Identified by an intrusion detection/prevention system
Anti-virus software identifies malware
- Deletes from OS and notifies administrator
Host-based monitor detects a configuration change
- Constantly monitors system files
Network traffic flows deviate from the norm
- Requires constant monitoring
Incident indicators (Step 2 of Incident Response lifecycle)
Generally a bad idea to let things run their course
- An incident can spread quickly
- It’s your fault at that point
Sandboxes
- An isolated operating system
- Run malware and analyze the results
- Clean out the sandbox when done
Can sometimes be problematic
- Malware or infections can monitor connectivity
- When connectivity is lost, everything could be deleted/encrypted/damaged
Isolation and containment (Step 3 of Incident Response lifecycle)