15.2 Exploitation and Mitigation Flashcards
What is the top web vulnerability according to OWASP?
**injection**
According to OWASP, “injection flaws, such as SQL, NoSQL, OS, and LDAP injection, occur when untrusted data is sent to an interpreter as part of a command or query. The attacker’s hostile data can trick the interpreter into executing unintended commands or accessing data without proper authorization.”
What does SQL stand for?
SQL (Structured Query Language) is a language used for programming and managing databases.
What does SQLi refer to?
SQL injections
SQLi attacks inject malicious SQL code through a client-side application such as a browser, revealing private data within the database. This flaw is easily detectable and exploitable. Any website, no matter how many users it has, may experience these types of attacks.
Criminal adversaries use SQLi as a technique to perform the following:
- Violate authentication by spoofing a user’s identity.
- Cause repudiation issues.
- Violate data integrity by modifying existing data.
SQLi attacks mainly affects what part of the CIA? Explain how it affects each pillar:
SQLi attacks mainly affects the confidentiality pillar of the CIA triad by revealing private and sensitive data. However, loss of integrity and availability are also risks.
- Confidentiality: SQLi leverages the leak of sensitive data in SQL databases, directly impacting confidentiality.
- Authentication: SQL commands can be manipulated to scan, modify, and extract usernames and passwords, allowing an attacker to connect as an authorized user.
- Integrity: Attackers can potentially read sensitive information, allowing them to modify or delete critical information.
Explain SQLMap:
SQLMap is an open-source command-line tool that automates the process of detecting and exploiting SQL injection flaws in order to take control of database servers.
What does SQLMap allow attackers to do?
SQLMap contains a powerful detection engine with many features that enable attackers to access an underlying database file system.
With SQLMap, attackers can execute commands on the database server using _______ connections, meaning that an attacker can remotely control a back-end database using a backdoor connection, such as an RAT (Remote Access Trojan).
With SQLMap, attackers can execute commands on the database server using **out-of-band** connections, meaning that an attacker can remotely control a back-end database using a backdoor connection, such as an RAT (Remote Access Trojan).
Explain this command:
sqlmap -u “http://172.16.203.141/owaspbricks/login-1/”
-
sqlmap
: Detects SQL injection vulnerabilities. -
-u
: Indicates a URL for SQLMap to scan. -
"http://172.16.203.141/owaspbricks/login-1/"
is the website we are attacking.
Explain this command:
sqlmap -u http://172.16.203.141/owaspbricks/login-1/ –dbms=mysql –forms –users
-
sqlmap
: Detects SQL injection vulnerabilities. -
-u
: Indicates a URL for SQLMap to scan. -
--dbms=mysql
: Specifies which database management system to exploit. -
--forms
: Parses and tests forms on the target URL. -
--users
: Enumerates database users.
Once we run the command, SQLmap will prompt us every time about:(3)
- Do we want to test additional forms that SQLmap detects?
- Do we want to fill blank fields with random values?
- Do we want to have SQLmap try to inject with random integer values?
After learning about SQLMap, what are the key takeaways?
- Back-end database systems are a valuable source of information for criminal hackers.
- Complacency can cause significant harm. We need to remember that just because back-end databases are buried deep within the web server architecture and protected by firewalls doesn’t mean they are safe from attackers.
- As proven in this demonstration, the URL can be manipulated in various ways to circumvent layered defense mechanisms contained within web infrastructure. This is accomplished by exploiting existing trust-based systems that are public-facing, such as HTTP port
80
and the URL.
What does BeEF stand for?
The **Browser Exploitation Framework** (BeEF) is a practical client-side attack tool that exploits vulnerabilities of web browsers to assess the security posture of a target.
Ture or False:
While BeEF was developed for lawful research and penetration testing, criminal hackers have started using it as an attack tool.
True
BeEF uses ______” to activate a simple but powerful API, which takes remote control of client-based web browsers.
BeEF uses “hooks” to activate a simple but powerful API, which takes remote control of client-based web browsers.