OWASP part 1 Flashcards
What are 3 topics of OWASP?
Information gathering
Injection attacks
Session management attacks
What does an attacker want to achieve with information gathering?
Find attack vectors (ways to enter a system or network)
Low hanging fruits
Improve efficiency of attack
What does a developer want to achieve with information gathering?
test scope
coverage
prioritization
test efficiency
What application information is gathered during the information gather fase (4)?
Application structure: All pages and subdomains you have found in the application.
Any external links.
Trust zones, what needs authentication/authorization and what is open.
Data flow within the application. What parameters and values are used. What GET and POST requests are sent, and what are the respones.
What infrastructure/platform information is gathered during the information gather fase (5)?
Information about web server. Version that is running, the type.
Applications running on the server. If any of this have known vulnerabilities, known attack strategies can be exploited to gain access. We can also check if any of the applications are misconfigured.
Application entry points. Finding the applications attack surface. HTTP-requests, parameters.
Execution path through application. This means finding out about the structure and layout of the application.
Fingerprint Web Application Framework: Find out what frameworks an application implements. The well known frameworks will have known headers, cookies, and directory structures, making it easier to identify the application.
Why is web debugging proxies useful?
They can capture and examine requests and responses.
They can be used to manipulate payloads.
Can be used in attacks.
Name a Website copier tool used for information gathering
HTTtrack
VisualWget
Name a Web debugging proxy server used for information gathering
Firefox developer tool
Fiddler
Name a Tool set used for information gathering
Kali linux
Burp suite
OWASP Zap
What are the main features of Owasp ZAP (6)?
Intercepting proxy
Active and passive scanners
Spider
Report generation
Brute force
Fuzzing
What does the spider tool do in OWASP Zap?
To automatically descover new resources(URLs) on a particular site.
What is Fiddler?
It is a web-debugging tool that monitors, inspects, edits, and logs all HTTPS traffic, issues requests between your computer and the Internet, and fiddles with incoming and outgoing data
When testing for vulnerabilities, should one always use only automated tools?
No, these tools are limited. Some information cannot be found using automated scanners.
Additional manual testing is always recommended.
What is Google dorking?
A technique that uses Google advanced search operations to find security holes in configs and computer code that websites are using.
The information found through dorking may not be readily available through standard search queries.
Name 3 injection attacks
SQLi
Blind SQLi
XPath injection
Name a possible SQLi query to delete a user table from a username input
username_input ’ OR 1=1); Drop TABLE Users; –
What can an adversary achieve using SQLi (4)?
Bypass authentication
Privilege escalation
Stealing information
Modification/destruction
What is blind SQLi?
Occurs when an application is vulnerable to SQLi, but its HTTP responses do not contain the result of the relevant SQL query or the details of any DB errors.
A type of SQLi attacks where the attacker asks the database true or false questions, and determines the answer based on the application response. For example can an attacker try to inject a query that returns ‘false’ and afterwards a query that return ‘true’. If the contents of the webpage change for these queries, the attacker is able to distinguish when the executed query return true or false.
When an attacker exploits SQL injection, sometimes the web application displays error messages from the database complaining that the SQL Query’s syntax is incorrect. Blind SQL injection is nearly identical to normal SQL Injection, the only difference being the way the data is retrieved from the database. When the database does not output data to the web page, an attacker is forced to steal data by asking the database a series of true or false questions. This makes exploiting the SQL Injection vulnerability more difficult, but not impossible. .
What is XPath injection?
Occurs when a website uses user input to construct an XPath query for XML data.
Give an example of XPath injection
Normal:
string(//user[username/text()=’gandalf’ and
password/text()=’Abcd3’]/account/text())
Attack:
string(//user[username/text()=’’ or ‘1’ = ‘1’ and
password/text()=’’ or ‘1’ = ‘1’ ]/account/text())
What are 5 countermeasures agains SQLi?
Blacklisting
Whitelisting
Escaping
Prepared statement & bind variables
Mitigating impact
What is blacklisting when it comes to mitigating SQLi?
Filter away certain symbols such as quotes, semicolons, etc.
Why is blacklisting a bad mitigation technique (2)?
It’s difficult to know exactly every symbol or combination of symbols that might be dangerous. This way, some dangerous symbols could be missed in the blacklist.
Blacklisting can also conflict with functional requirements of an application.