Security Assessment and Testing Flashcards

1
Q

Three Major Components of a Security Assessment Program

A
  1. Security tests
  2. Security assessments
  3. Security audits
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Security tests

A

Security tests verify that a control is functioning properly - automated scans, tool-assisted penetration tests, and manual tests to undermine security. It should take place on a regular schedule with attention paid to the security controls protecting the organization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Security Assessments

A

Security assessments are comprehensive reviews of the security of a system, application or other tested environment. A risk assessment is performed and recommendations for remediation are made.

An assessment report is addressed to management that contains the results of the assessment in non-technical language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Security Audits

A

Security audits is similar to a security assessment but must be performed by independent auditors. Audits are performed to demonstrate the effectiveness of controls to a third-party

Auditors provide an impartial, unbiased view of the state of security controls

Three main types of audit:
1. internal: completed by internal audit and reporting line is independent of the function they evaluate. Usually reports to CIO and governing board.

  1. external: performed by an outside firm
  2. third-party: conducted by, or on behalf of, another organization e.g. a regulatory body
    - Type I: a description of the controls provided by the organizations with the auditor’s opinion based on the description
    - Type II: cover a minimum six-month time period and also include an opinion by the auditor and considered much more reliable because the controls are tested independently,
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Security Content Automation Protocol (SCAP)

A

Provided by NIST, a common framework for discussion and automation between different systems

  1. Common Vulnerabilities and Exposure (CVE) a naming system for describing security vulnerabilities.
  2. Common Vulnerability Scoring System (CVSS) a standardized scoring system for describing the severity of security vulnerabilities
  3. Common Configuration Enumeration: (CCE): a naming system for system configuration issues.
  4. Common Platform Enumeration (CPE): a naming system for operating systems, applications, and devices
  5. Extensible Configuration Checklist (XCCDF): a language for specifying security checklists
  6. Open Vulnerability and Assessment Language (OVAL): a language for describing security testing procedures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Vulnerability Scans

A

Vulnerability scans automatically probe systems, applications and networks looking for weaknesses that may be exploited by an attacker - point and click scans that don’t require manual intervention.

Four main categories of vulnerability scans:

  1. Network Discovery scans
  2. Network Vulnerability Scans
  3. Database Vulnerability Scans
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Network Discovery Scanning

A

Network discovery scans scan a range of IP addresses, searching for systems with open network ports that are exposed through the network and server firewalls that lie on the network path and between the scanner and scanned system.

TCP SYN Scanning: AKA half open scanning, it sends a single packet to each scanned port with a SYN flas set, which indicates a request to open a new connection. If the response has a SYN and ACK flags set, this indicates the system is moving to the second phase in the 3-way TCP handshake and the port is OPEN.

TCP Connect Scanning: opens a full connection to the remote system on the specified port - it is used when the user running the scan does not have the necessary permissions to run a half-open scan. Most other scan types of scans only have the ability to send raw packets, and user scanner may not be able to send handcrafted packets????

TCP ACK Scanning: Sends a packet with the ACK flag set, indicating that it is part of the open connection. This type of scan can determine the rules enforced by a firewall and firewall methodology.

XMAS Scanning: send a packet with FIN, PSH, and URG flags set

Nmap: the most common tool used for network discovery scanning and is an open-source tool from 1997. (more detail in another flashcard)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Nmap

A

When nmap scans a system, it identifies the current state if each network port it detects on that system:

Open: port is open on the remote system and there is an application that is actively accepting connections on that port.

Closed: port is accessible on the remote system, meaning the firewall is allowing access but there is no application accepting connections on that port

Filtered: nmap is unable to determine whether a port is open or closed because a firewall is interfering with the connection attempt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Common Network Ports

A

22/tcp open ssh: used to allow administrative connections to servers

80/tcp open http: indicates the system is accepting connection requests on port 80 which is used by Hypertext Transfer Protocol to deliver web pages

443/tcp closed https: indicates a firewall rule exists to allow access to port 443 but no service is listening on that port. Port 443 is used by HTTPS protocol to accept encrypted web server connections

Results: the system being scanned is probably a web server that is openly accepting connection requests from the scanned system - the firewalls between the scanner and system are configured to allow both secure (443) and insecure (80) connections, but the server is not set up to actually perform encrypted transactions

From an attacker’s perspective: by pointing a browser at the server, one can get a good idea of what the server does and who operates it

  • connections to this server are unencrypted and eavesdropping on those connections, if possible, may reveal sensitive info
  • the open SSH is interesting and can perform brute force password attack against admin accounts on that port to gain access to that system.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Network Vulnerability Scanning

A

Deeper than discovery scans, these scans probe deeper to the known vulnerabilities.

By default, they run authenticated, but to reduce the amount of false positives and negatives, they will run authenticated scans

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Web Vulnerability Scanning

A

Important because they may not be picked up by network vuln scans.

Recommended to run:

  • when you first implement web vuln scanning to detect any issues with legacy applications
  • when you have new applications before the code changes move into production
  • scan all applications on a recurring basis - may have to schedule this based on the priority of the application when resources are limited. It is sometimes required by compliance requirements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Database Vulnerability Scanning

A

scans that scan both databases and web applications for vulnerabilities that may affect database security

sql-map is commonly used open-source database vulnerability scanner that allows security admins to probe web applications for database vulnerabilities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Vulnerability Management Workflow

A
  1. Detection: the initial identification of a vulnerability normally takes place as the result of a vulnerability scan
  2. Validation: once a scanner detects and vulnerability, admins should confirm the vulnerability, to determine that it is not a false positive report
  3. Remediation: validated vulnerabilities should then be remediated. This may include vendor security patch, modifying a device configuration, implementing a workaround to avoid vulnerability, or installing a web application firewall or other control that prevents the exploitation of the vulnerability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Penetration Testing Phases

A

Planning: agreement upon scope of the test and the rules of engagement EXTREMELY IMPORTANT STEP to ensure both testing and management teams are in agreement with the tests

Information Gathering and Discovery: manual and automated tools to collect information about the target environment. Basic reconnaissance to determine system function such as visiting websites hosted on the system and conducting network discovery scans to identify open ports

Vulnerability Scanning: probes for system weaknesses using network vulnerability scans, web vulnerability scans and database vulnerability scans

Exploitation: seeks to use manual and automated exploit tools to attempt to defeat system security

Reporting: summarized the results of the penetration testing and makes recommendations for improvements to systems security

Metasploit is the commonly used tools which auto-executes exploits against targeted systems - uses scripting language to allow the automatic execution of common attacks

Hazards:

  • time-consuming
  • requires specialized resources
  • may disrupt system access
  • may corrupt data in stored systems
Industry Standard Testing Methodologies
- OWASP testing guide
- OSSTMM
- NIST 800-115
- FedRAMP Penetration Test Guidance
PCI-DSS Information Supplement on Penetration Testing as references
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Types of Penetration Tests

A

White Box Penetration Test: provides the attackers with detailed information about the systems they target. This bypasses many of the reconn steps that normally precede the attacks, shortening the time of the attack and increasing the likelihood that it will find the security flaws

Gray Box Penetration Test: AKA partial-knowledge tests, these are sometimes chosen to balance the advantages and disadvantages of white and black box penetration tests. This is particularly common when black box results are desired by costs or time constraints mean that some knowledge is needed to complete the testing.

Black Box Penetration Test: This does not provide attackers with any information prior to the attack. This stimulates an external attacker trying to gain access to information about the business and technical environment before engaging an attack.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Code Review

A

AKA Peer Review, developers other than the one who wrote the code reviews it for detects and determines if the code makes it into production

Very formal (e.g. Fagan inspections) review and testing process with the following 6 steps, where flaws in code can be catastrophic:

  1. Planning
  2. Overview
  3. Preparation
  4. Inspection
  5. Rework
  6. Follow-up

Less formal:

  1. developers walk through their code in a meeting with one or more other team members
  2. senior developer performing manual code review and signing off on all code before moving to production
  3. automated review tools to detect common application flaws before moving to production
17
Q

Static vs. Dynamic Testing

A

Static Testing: Does not run the code, only analyzes the source code or the compiled application usually via automated tools designed to detect common software flaws, such as buffer overflows

Dynamic Testing: evaluates in a runtime environment and is often the only option for organization deploying applications written by someone else - testers often do not have access to the underlying source code.
- dynamic testing may include the use of synthetic transactions to verify system performance. These are scripted transactions with known expected results - compare output of the transactions to the expected state

18
Q

Fuzz Testing

A

Specialized dynamic testing technique that provides many different types of input to software to stress its limits and find previously undetected flaws via invalid input and then monitors performance for software crashes, buffer overflows, other undesirable or unpredictable outcomes

Two Types:
1. Mutation (Dumb) Fuzzing: takes previous input values from actual operation of the software and manipulates (or mutates) it to create fuzzed content. It might alter characters of the content, append strings to the end of the content, or perform other data manipulation techniques

  1. Generational (Intelligent) Fuzzing: develops data models and creates new fuzzed input based on an understanding of the types of data used by the program
    - zzuf: popular tool for mutation fuzzing
    - bit flipping: slightly manipulating the content

Limitations: typically doesn’t result in full coverage of code, and is commonly limited to detecting simple vulnerabilities that do not require complex manipulation of business logic
= should only be considered one tool in a suite of tests performed and is useful to conduct

19
Q

Interface Testing

A

Multiple teams of developers work on different parts of a complex application that must function together to meet business objectives

Application Programming Interfaces (APIs): offer a standardized way for code modules to interact and may be exposed to the outside world through web services. Developments must test APIs to ensure they enforce that they enforce all security requirements

User Interfaces (UIs): examples include graphic user interfaces (GUIs) and command line interfaces. UI s provide end users with the ability to interact with the software. Interface tests should include reviews of all user interfaces to verify that they function properly