Lesson 3: Assessing Security Posture with Software Tools Flashcards
Security Assessment Frameworks
- Security Assessment Frameworks
- “White hat” assessments are usually classed as either vulnerability scanning or penetration testing
- Many models and frameworks for conducting vulnerability scans and penetration tests, NIST’s Technical Guide to Information Security Testing and Assessment:
- Testing object under assessment to discover vulnerabilities
- Examining assessment objects to understand security system and identify any logical weaknesses
- Interviewing personnel to gather information and probe attitudes toward and understanding of security
Vulnerability Scanning
- Process of auditing network (or application) for known vulnerabilities
- Vulnerabilities are weaknesses that could be triggered accidentally or exploited maliciously
- examples of vulnerabilities:
- Unpatched software application
- How with no anti-virus software
- Weak password
- Vulnerability scanning generally uses passive reconnaissance
- Performing Open Source Intelligence (OSINT) represents another type of passive reconnaissance
Penetration Testing (Pen Test: Active Reconnaissance Technique)
- Ethical hacking: involves thinking like an attacker and trying to penetrate target’s security systems
- Involves the following steps
- Verify a threat exists–use surveillance, social engineering, network scanners, and vulnerabilities
- Bypass security controls–look for easy ways to attack system
- Actively test security controls–probe controls for configuration weaknesses and errors
- Exploit vulnerabilities–prove that vulnerability is high risk by exploiting it to gain access to data or install malware
- “Own” (or “pwn” in hacker idiom) server
Ground rules for any type of security assessment
- should be made explicit in contractual agreement and backed by senior management:
1. “No holds barred” or “smash and grab” testing
- Whether to stop at perimeter
- Attack profile–attacks come from different sources and motivations
a. ) Black box (blind): consultant is given no privileged information about network and its security systems
b. ) White box (full disclosure): given complete access to information about network
c. ) Gray box: consultant given some information: typically, this would resemble knowledge of junior or non-IT staff - Test system or production environment
- Out of hours: whether consultant should only perform testing out of hours to avoid causing problems on a production network
- Full disclosure of test results
- Confidentiality and non-disclosure
Authorization for Testing
- If tests involve third-parties, some complications may arise
- Privacy and data confidentiality
- Penetration testing or performing vulnerability scan
- Legal considerations
Penetration Testing Techniques
- Analysis of sophisticated adversary Techniques, Tactics, and Procedures (TTP) has established various “kill chain” models of way modern cyber-attacks are conducted
- Reconnaissance Phase Techniques
- Open Source Intelligence (OSINT) refers to using web search tools and social media to obtain information about target
- Social engineering refers to obtaining information, physical access to premises, or even access to user account through art of persuasion
- Scanning refers to using software tools to obtain information about a host or network topology
Initial Exploitation (“Weaponization”)
An exploit is used to gain some sort of access to target’s network
Persistence
- Tester’s ability to reconnect to compromised host and use it as a Remote Access Tool (RAT) or backdoor
- Tester must establish a Command and Control (C2 or C&C) network to use to control compromised host (upload tools and download data)
- Will typically require a malware executable to run and a connection network port and attacker’s IP address
Will be followed by further reconnaissance
Escalation of Privilege and Pivot
- System and/or set of privileges that allow tester to compromise other network systems (lateral spread)
- Tester has to find some way of escalating privileges available to him/her
Guidelines For Implementing Penetration Testing
- Consider benefits of conducting penetration test in addition to or instead of vulnerability assessment
- Be aware of risks involved in conducting a pen test
- Consider implementing pen test techniques as different phases in simulated attack
- Consider conducting pen tests using different types of box testing methods
- Understand different reconnaissance requirements associated with each box testing method
Topology discovery (or “footprinting”)
- part of discovery phase where attacker or pen tester starts to identify structure of target network
- Auditing technique to build an asset database and identify non-authorized hosts (rogue system detection) or network configuration errors
Network mapping tool
- performs host discovery and identifies how hosts connect together on network
- For auditing, there are enterprise suites:
- Microsoft’s System Center products
- HP’s OpenView/Business Technology Optimization (BTO)
ipconfig
(Windows) command can be used to report configuration assigned to network adapter
ifconfig
(Linux) command can be used to report adapter configuration and enable or disable it or apply different static IP configuration
ping
command can be used to detect presence of host on particular IP address or responds to particular host name
Machine’s Address Resolution Protocol (ARP)
- cache can also be examined for host entries (using arp -a command)
- ARP cache shows hardware (MAC) address of interface associated with each IP address local host has communicated with recently
nmap HOST DISCOVERY
- Scanning a network using tools such as ping would be time-consuming and non-stealthy, and would not return detailed results
- Most topology discovery is performed using a dedicated too like Nmap Security Scanner (https://nmap.org)
- Nmap (open-source and can be operated with a GUI) can use diverse methods of host discovery, some of which can operate stealthily and serve to defeat security mechanisms such as firewalls and intrusion detection
tracert (Windows) or traceroute (Linux)
- When performing host discovery on an internetwork (network of routed IP subnets), attacker will want to discover how subnets are connected by routers (and whether any misconfigured gateways between subnets exist)
- tracert (Windows) or traceroute (Linux) command tools provide simple means of probing path from one end system (host) to another, listing intermediate systems (routers) providing link
DNS harvesting (nslookup AND dig)
- Attacker might be able to obtain useful information by examining company’s domain registration records by running a
whois
lookup against appropriate registry - If DNS harvesting is successful, you will obtain IP addresses for servers in target domain
to perform network topology discovery
- Use ipconfig to return host address configuration of a Windows machine. Use ifconfig/iwconfig or ip on Linux host
- Use ping tool to perform connectivity test. You can use ping sweep and then arp command to harvest MAC addresses of local hosts
- Perform host discovery and network mapping using dedicated tool such as Nmap. The switches -sn or -sP will suppress port scanning
- Use tracert (Windows) or traceroute (Linux) to test path to a host on a remote network
- Use whois, nslookup (Windows), and dig (Linux) to query DNS records