Attack Surface Validation (Security Testing) Flashcards

1
Q

Security Testing goal

A

Security testing is conducted to attest to the presence and effectiveness of the security controls that are designed and implemented in the software.

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

Security testing can address two of the three aspects

of crime

A

It can do little about the motive of an attacker, but the opportunities and means by which an attacker can exploit the software can be determined by security testing.

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

Security testing purpose

A

Security testing is testing with an attacker perspective to validate the ability of the software to withstand attack (resiliency);

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

Testing security functionality

A

Testing security functionality (authentication mechanisms, auditing capabilities, error handling, etc.) in software is meant to assure that the functionality of protection mechanisms are working properly.

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

Security testing can validate controls such as

A

Fail secure mechanisms, proper error and exception handling, etc. and working properly to resume its functional operations as per the customer’s MTD and RTO.

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

White Box Testing

A

A security testing methodology that is performed based on the knowledge of how the software is designed and implemented.

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

White Box Testing can be performed

A

At any time post development of code, although it is best advised to do so while conducting unit tests.

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

Inputs to the white box testing method include

A

Architectural and design documents, source code, configuration information and files, use and misuse
cases, test data, test environments and security specifications.

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

The output of a white box test includes

A

Defects (or incidents), flaws and deviations from design specifications, change requests and recommendations to address security issues.

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

Black Box Testing

A

Black box testing is behavioral analysis of the software’s security. Black box testing is the opposite
of that. It is broadly known as zero knowledge assessment, because the tester has very limited to no knowledge of the internal working of the software being tested.

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

The software is essentially viewed as a “black box” that is tested for

A

Its resiliency by determining how it responds (outputs) to the tester’s input.

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

Black box testing can be performed

A

Before deployment (pre-deployment) or periodically once it is deployed (post-deployment).

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

Black box objective when performed in pre-deployment stage

A

To identify and address security vulnerabilities proactively, so that the risk of the software getting hacked is minimized.

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

Black box objective when performed in post-deployment stage

A

To find out vulnerabilities that exist in the deployed production (or actual runtime environment); to attest the presence and effectiveness of the software security controls and protection mechanisms.

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

Black box testing is performed using different tools.

A

Fuzzing; scanning; penetration testing.

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

Benefit of black box testing

A

Attest the exploitability of weaknesses in both simulated and actual production systems; there is no
need for source code and the test can be conducted both before (pre) and after (post) deployment;

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

The limitation of black box testing is that

A

The exact cause of vulnerability may not be easily detectable and the test coverage itself can be limited to the scope of the assessment.

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

Different criteria that can be used to determine the type of approach to take when validating software security are

A

Root Cause Identification, Extent of Code Coverage, Number of False Positives and False Negatives, Logical Flaws Detection, Deployment Issues Determination.

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

Cryptographic validation testing includes the following attestation

A

Standards Conformance; Environment Validation; Data Validation; Cryptographic Implementation.

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

FIPS 140-2

A

It specifies the security requirements that will be satisfied by a cryptographic module, providing four increasing, qualitative levels intended to cover a wide range of potential applications and environments.

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

Network scans are performed with the goal of

A

Mapping out the computing ecosystem. It helps
determine the devices, fingerprint operating system, identify active services (daemons), determine open/closed ports, find used protocols and interfaces,
detect webserver versions, etc. that make up the environment in which the software will run.

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

Active OS fingerprinting

A

Active OS fingerprinting involves the sending of crafted, abnormal packets to the remote host and analyzing the responses from the remote host (e.g. NMAP tool).

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

Passive OS fingerprinting

A

Passive OS fingerprinting does not contact the remote host. It captures traffic originating from a host on the network and analyzes the packets (e.g. Siphon and P0f tools).

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

Banner grabbing can be used for legitimate purposes but …

A

Banner grabbing can be used for legitimate purposes such as for inventorying the systems and services on the network, but an attacker can use banner grabbing to identify network hosts that have vulnerable services running on them.

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

Scanning can be used to

A

Map the computing ecosystems, infrastructural and application interfaces; identify server versions, open ports and running services; inventory and validate asset management databases; identify patch levels; prove due diligence due care for compliance reasons..

26
Q

The three primary types of scanning include:

A

Scanning for vulnerabilities, scanning content for threats and scanning for assuring privacy.

27
Q

Vulnerability Scanning

A

When scanning is performed with the goal of detecting and identifying security flaws and weaknesses in the software and/or network.

28
Q

Software scanning - static

A

Static scanning includes scanning the source code for vulnerabilities, it is usually performed during the code review process in the development phase.

29
Q

Software scanning - dynamic

A

The software is scanned when the software is running i.e., in an operational runtime. Dynamic scanning is performed using crawlers and spidering tools during the testing phase of the SDLC.

30
Q

Content scanning technologies

A

Analyze the content within the document (web pages, files, etc.) for malicious content that can exploit unprotected systems.

31
Q

Content scanning can analyze

A

Some content scanners are capable of even analyzing the traffic that is transmitted over secure channels like SSL/ TLS and when doing so, they function more or less like a MITM proxy, by capturing encrypted traffic, decrypting it, and analyzing it and re-encrypting it
before retransmission.

32
Q

Privacy scanning

A

Privacy scanning is starting to become the norm instead of the exception it used to be a decade ago, due to privacy regulations that mandate the protection of private (personal) information.

33
Q

Penetration testing main objective

A

To see if the network and software assets can be compromised by exploiting the vulnerabilities that were determined by the scans.

34
Q

The rules of engagement defines

A

The scope of the penetration test for the testing team,

irrespective of whether they are internal team or an external security service provider.

35
Q

NIST SP 800-115

A

Provides guidance on conducting penetration testing.

36
Q

OSSTMM

A

The Open Source Security Testing Methodology
Manual (OSSTMM) covered in the secure software concepts chapter is known for its prescriptive guidance on the activities that need to be performed before, during and after a penetration test, including the measurement of results.

37
Q

Generically the pen-testing process includes the following steps

A

(i) Reconnaissance (Enumeration and Discovery); (ii) Resiliency Attestation (Attack and Exploitation); (iii) Removal of Evidence (Cleanup activities) and Restoration; (iv) Reporting and Recommendations.

38
Q

Fuzz testing definition

A

It is a brute force type of software testing in which faults (random and pseudo-random input data) are injected into the software and its behavior observed.

39
Q

Fuzz testing can detect

A

To find coding defects and security bugs that can result in buffer overflows that cause remote code
execution, unhandled exceptions and hanging threads that cause DoS, state machine logic faults and buffer boundary checking defects.

40
Q

White box fuzzing and black box fuzzing objectives

A

In black box fuzzing, the software is sent fuzz data
and the symptoms and behavior of the software is analyzed (there is no guarantee that all actual code paths were covered as part of this type of test). White box fuzzing is sending fuzz data with verification of all code paths.

41
Q

The main shortcoming of Generation-Based Fuzzing (Smart Fuzzing)

A

Fuzzing is based on known formats and structures and so test coverage for new or proprietary protocols is limited or non-existent.

42
Q

Mutation-Based Fuzzing (Dumb Fuzzing) concerns

A

This can be dangerous leading to denial of service, destruction and complete disruption of the software’s operations, and so it is recommended to perform dumb fuzzing in a simulated environment as opposed to the production environment.

43
Q

Input Validation can effectively reduced what type of attacks

A

Buffer overflows, Injection flaws, scripting attacks, etc. can be effectively reduced if the software just performs validation of input before accepting it for processing.

44
Q

In a Client/Server environment, where is recommended to perform the input validation tests?

A

Input validation tests for both the client and the server, however in case you have to choose, make sure that validation of input happens on the server
side for sure.

45
Q

When Smart fuzzing can be used

A

When the input format is known, otherwise dumb fuzzing using random and pseudo-random inputs values can be used to attest the effective of input
validation.

46
Q

In order to perform input validation tests, it is first important to determine the sources of input and the events in which the software will connect to the backend store or command environment. Describe the sources of inputs:

A

Authentication forms, search input fields, hidden fields in web pages, Querystrings in the URL address bar and more.

47
Q

Other tests that need to be performed to avoid to injection attacks.

A

Parameterized queries that are not susceptible to injection themselves are used; Dynamic query construction is disallowed; Error messages and exceptions are explicitly handled; Non-essential procedures and statements are removed from the
database; …

48
Q

Scripting attacks are possible when user supplied input is

A

executed on the client because of lack of output sanitization.

49
Q

Tests to validate controls that mitigate scripting attacks should be performed such as:

A

Output is sanitized by escaping or encoding the input before it is sent to the client; Requests and inputs are validated using a current and contextually relevant whitelist; Scripts cannot be injected into input sources or the response; Only valid files with approved extensions are allowed to be uploaded; Secure libraries and safe browsing settings cannot be circumvented; State management items such as cookies are not accessible from client side code or script.

50
Q

To address testing for Non-repudiation Controls

A

Test cases should validate that audit trails can accurately determine the actor and their actions. It must also ensure that misuse cases generate auditable trails appropriately as well.

51
Q

NIST Special Publication 800-92

A

Guidance on the protection of audit trails and the management of security logs.

52
Q

Network spoofing attacks include

A

Address Resolution Protocol (ARP) poisoning, IP address spoofing and Media Access Control (MAC) address spoofing.

53
Q

Testing the spoofability of the user and/or certificate along with verifying the presence of transport layer security can attest

A

secure communication and protection against Man-in-the-middle (MITM) attacks.

54
Q

Testing for Spoofing Controls should cover

A

User and certificate spoofing tests along with phishing tests and verification of code that allows impersonation of other identities; Cookie expiration testing along with verifying that authentication cookies are encrypted.

55
Q

Software security failure testing includes the verification of the following security principles

A

Fail Secure (Fail safe); Error and Exception Handling; Testing for Buffer Overflow Controls.

56
Q

Fail Secure (Fail safe) Tests should verify

A

Any authentication processes; the proper functioning of account lockout mechanisms and denying access by default.

57
Q

Errors and Exception handling tests include

A

testing the messaging and encapsulation of error details.

58
Q

Error and Exception Handling should verify

A

when the software fails; error messages must be checked to make sure that they do not reveal any details that are not necessary; exceptions are handled and the details are encapsulated using user-defined messages and redirects must be performed; assure
that the reference identifier mapping to the actual error or exception is protected.

59
Q

White box testing for overflow defense includes verifying

A

the input is sanitized and its size validated; bounds checking of memory allocation is performed; conversion of data types from one are explicitly performed; banned and unsafe APIs are not used; code is compiled with compiler switches that protect the stack and/or randomize address space layout.

60
Q

Testing for elevated privileges or privilege escalation purpose

A

To verify that the user or process cannot get access to more resources or functionality than they are allowed to.

61
Q

Insecure direct object reference design flaws and coding bugs with complete mediation can lead to privilege escalation, so the following must be checked

A

Parameter manipulation checks need to be conducted to verify that privileges cannot be escalated; In web
applications both POST (Form) and GET (QueryString) parameters need to be checked.

62
Q

Tests to assure anti-reversing should cover

A
Testing to validate the presence of obfuscated code is important; Binary analysis testing can be used to check if symbolic (class names, class member names, names of instantiated global objects, etc.) and textual information that will be useful to a reverse engineering is removed from the program executable; White box testing can be used to verify the presence of code that
detects and prevents debuggers by terminating the executing program flow.