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:
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.
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)
After learning about SQLMap, what are the key takeaways?
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.
Once a browser has been “hooked,” it becomes ______ which awaits instructions from the BeEF control station.
Once a browser has been “hooked,” it becomes a zombie which awaits instructions from the BeEF control station.
Zombies that have been hooked by BeEF send out periodic **polls** to the BeEF control center. These are **keep alive** signals, and indicate that the zombie connection is running and awaiting further instructions from BeEF.
The majority of BeEF exploits occur as the result of an ______, however, they can also be facilitated by______ campaigns and _______attacks.
The majority of BeEF exploits occur as the result of an XSS attack, however, they can also be facilitated by social engineering campaigns and man-in-the-middle attacks.
True or False:
The BeEF framework also allows for the integration of custom scripts, which more experienced criminal hackers can use.
True
BeEF exploits what pillar of the CIA?
BeEF exploits compromise the integrity of hooked machines.
A breach can also cause loss of confidentiality and availability, depending on the motives of the attackers.
What was BeEF originally intended for?
BeEF was originally intended for pentesting. In addition to being an exploitation tool, BeEF acts as an information gathering tool by providing additional details about the victim’s computer, revealing other types of attacks that can be performed.
BeEF uses an ____ through JavaScript to hook vulnerable web browsers of unsuspecting clients.
BeEF uses an API through JavaScript to hook vulnerable web browsers of unsuspecting clients.
Mitigation strategies against BeEF hooks include: (3)
alert tcp $HOME_NET any -\> $EXTERNAL_NET $HTTP_PORTS (flow:to_server,established; content:"Cookie|3a 20|BEEFSESSION=";)Just as each piece of hardware and software becomes a possible attack surface, various parts of the web can also become targets. These include:(4)
Injection flaws are most common in older code and modern code with weak ______ practices.
Injection flaws are most common in older code and modern code with weak SDLC practices.