Security Testing Flashcards
What is penetration testing (pentesting)?
the process of attacking a piece of software with the purpose of finding security vulnerabilities.
aka
hacking with permission
What is automated pen testing?
- fuzzing or fuzz testing
- a systematic and repeatable approach to pentesting,
What is the aim of penetration testing?
To find vulnerabilities
What is a vulnerability?
A security hole in the hardware or software (including operating system) of a system that provides the possibility to attack that system
What are examples of vulnerabilities?
- gaining unauthorised access (unescaped SQL commands)
- stealing confidential information (weak, easy to guess passwords)
- modifying/corrupting critical data (buffer overflows that permit access to memory outside of the running process)
- crashing the system or make it unavailable to others (denial of service attack)
What is an SQL injection?
(answer this mentally)
What is a buffer overflow attack?
when data is written into a buffer (in memory) that is too small to handle the size of the data.
In some languages, the additional data simple overwrites the memory that is located immediately after the buffer. If carefully planned, attacker-generated data and code can be written here.
What are some ways to prevent security attacks?
- defensive programming that checks for
array bounds - using programming languages that do this automatically
- finding and eliminating these problems via reviews and inspections
- letting hackers find them for us (not recommended)
- using verification techniques.
What are examples of verification techniques?
fuzz testing
What is fuzz testing?
a (semi-)automated approach for penetration testing that
involves the randomisation of input data to locate vulnerabilities.
How does fuzz testing work?
- a fuzz testing tool (or fuzzer) generates many test inputs - it monitors the program behaviour on these inputs
- it looks for things such as exceptions, segmentation faults, and memory leaks; rather than testing for functional
correctness. - Typically, this is done live: that is, one input is generated, executed, and monitored, then the next input, and so on.
What are the 3 techniques for fuzzing?
- Random testing
- Mutation-based fuzzing
- Generation-based fuzzing
What is random testing?
tests generated randomly according to some probability distribution (possible uniform) to permit a large amount of inputs to be generated in an fast and unbiased way.
What are the advantages of random testing?
- often (but not always) cheap and easy to generate random tests, and cheap to run many such tests
automatically. - unbiased, unlike tests selected by humans. (useful for pentesting because the cases that are missed during programming are often due to lack of human understanding, and random testing may search these out)
What are the disadvantages of random testing?
- A large number of test inputs may need to be generated in order to be confident that the input domain has been adequately covered.
- The distribution of random inputs simply misses the program faults
- It is highly unlikely to achieve good coverage.