Security Testing Flashcards
What is security testing?
A systematic method of testing security flaws in a system.
What is “a method of testing running applications manually” in security testing?
Penetration Testing or Pentesting
What is “a method of testing static applications manually” in security testing?
Manual Code Review
What is “an automated system that tests running applications” in security testing?
DAST, or Dynamic Application Security Testing
What is “a system used to secure software by reviewing the source code” in security testing?
SAST, or Static Application Security Testing
What is the difference between dynamic and static security testing?
Dynamic security testing involves starting the application and feeding it strange input to observe how it responds.
Static security testing, on the other hand, involves parsing the source code of a program, analysing the parsed files and reporting any problems found.
What are two forms of static security testing?
SAST / Static Application Security Testing
Manual Code Review
What are two forms of dynamic security testing?
DAST / Dynamic Application Security Testing
Penetration Testing
What is a compromise we may have to make when building a fully automated security testing tool?
We may have to consider whether to alert the user of every vulnerability we find, even if we’re still in doubt.
Two options are to either always report it, at risk of annoying the user, or to stay silent, and risk missing severe issues.
What is the difference between a false negative and a false positive?
A false negative is where the tool reports no error when there is actually one.
A true positive is where the tool reports an error, but there isn’t one.
Why may we find false negatives in our tool?
We may lack knowledge of known insecure frameworks, of certain security threats, or simply have an under-approximation of the tool, missing language features or support for complete syntax.
Why may we find false positives in our tool?
We may lack knowledge of the security framework, or have an over-approximation of the tool (the tool got too crazy).
There may also be situations where the false positive is in fact a true positive, but the severity of the weakness is mitigated by the attack surface. For example, if the admin is able to breach the central database, it doesn’t matter if they already have access.
What do we want to look out for when doing static security analysis?
Local issues, which have no dependency on the dataflow - for example, known insecure functions like Math.random() in Javascript, or secrets stored in the source code.
Dataflow-related issues, such as a cross-site scripting attack, or secrets being initialised earlier in the code.
How would you analyse a control flow?
One way to analyse a control flow is to evaluate all different cases a function may have. In a function with four cases, we can read all the different outputs of that method and where it is all going.
Why may you choose a dynamic analysis tool over a static analysis tool?
Static analysis tools are very good at detecting generic defects, and sometimes at finding context-specific defects, but they aren’t suitable for projects stored only in the design, as issues like this aren’t visible at source code level.