QualysGuard InfoDay 2014 - WAS

Post on 18-Nov-2014

160 views 1 download

description

 

transcript

ww

w.r

ac.

cz

Ris

k A

naly

sis

Con

sult

an

tsV

06

04

20

QualysGuard InfoDay 2014

Představení nástroje pro testování webových aplikací (WAS)

ww

w.r

ac.

cz

Ris

k A

naly

sis

Con

sult

an

tsV

06

04

20

QualysGuard InfoDay 2014

Představení nástroje pro testování webových aplikací (WAS)

1. Všeobecný úvod - webová aplikace

Webová aplikace

• Co to je webová aplikace− Aplikace klient x server založená převážně na HTML protokolu− Logika převážně založena na relační databázi (Oracle, MS

SQL, MySQL) a skriptovacím jazyku (PHP, ASP, .NET, Java)− Každá aplikace je jiná a jedinečná− Nelze hledat zranitelnosti pouhým porovnáním s databází

zranitelností

How does a web application work? Web Architecture

Client Browser

IE, FF, Safari, iCab ec…

Database

HTTP/HTML

Web Server

Application

Application

Application

Legacy Service

Merchant Services,

etc

Defining a Web Application

An Application is:− A business function typically requiring a login− Running unique code− Typically supported by a single developer or team

of developers

ww

w.r

ac.

cz

Ris

k A

naly

sis

Con

sult

an

tsV

06

04

20

QualysGuard InfoDay 2014

Představení nástroje pro testování webových aplikací (WAS)

Live Demo : Ukázka uživatelského rozhraní

ww

w.r

ac.

cz

Ris

k A

naly

sis

Con

sult

an

tsV

06

04

20

QualysGuard InfoDay 2014

Představení nástroje pro testování webových aplikací (WAS)

2. Všeobecný úvod - Princip testování

Scanning Flow

Web Application

Scanning engine

Auth. Required?Auth Record

yes

Crawl Scope

no

Option Profile

Crawl Phase

Discovery Vulnerability

FinishedVulnerability

Checks

Scan TypesDiscovery Scan• Validate Scope settings• Crawl and ensure right coverage• Faster than Vulnerability Scan

Vulnerability Scan• Should happen after at least one Discovery Scan• Tests the web application for vulnerabilities

Discovery Phase - Links Crawled

This list may contain fewer links than the maximum threshold.

Maximum links to crawl includes:

• Links in this list

• Requests for the same link made as anonymous and authenticated user

• Requests made via HTML forms

Discovery Phase – Forms

What is a form? - Forms are used to pass data to a server**

** www.w3schools.com

ww

w.r

ac.

cz

Ris

k A

naly

sis

Con

sult

an

tsV

06

04

20

QualysGuard InfoDay 2014

Představení nástroje pro testování webových aplikací (WAS)

3. Typy zranitelností

Web Application Scanning Introduction of Web Application Security

WASC www.webappsec.org divides Web vulnerabilities into six categories • Authentication • Authorization• Client-side Attacks• Command Execution• Information Disclosure• Logical Attacks

Web Application Scanning

What is (Stored) XSS?

Attacker enters script on page, and the server stores it.

Victim goes to view the page and the script is rendered in the victim’s browser.

In the background, the script steals the victim’s session cookie and sends it to the attacker (who then uses it to gain access to the application with permissions of the user.)

What is (Reflected) XSS?

Web site (no input or output validation)

Attacker

1. Attacker can input text into form2. Application reflects it back, rendering the script3. Attacker crafts email (Phishing) containing script for vulnerable page (and form)

- Script can pass cookie over to attacker - Script can redirect the credentials plugged in to Attacker’s site.

4. Victim clicks on link, and vulnerability is exploited

Victim

12

3

4

How does WAS check for XSS?WAS engine verifies XSS vulnerabilities using multiple injections and verifications.

What is SQLi?

Attacker sees a form on a web site.

Attacker sends an attack in the form of an SQL query in the form

data. (‘ OR 1=1 --)

The application sends the attacker’s input to the database.

The database runs the query and sends those results back to the

attacker.

How does WAS check for SQL Injection?WAS engine verifies SQLi vulnerabilities using multiple injections and verifications.

ww

w.r

ac.

cz

Ris

k A

naly

sis

Con

sult

an

tsV

06

04

20

QualysGuard InfoDay 2014

Představení nástroje pro řízení zranitelností (VM)

4. Nastavení testování

Průvodce definice webové aplikaci

Průvodce pro autentizaci

• Formulářové přihlašování− Používá většina webů − Přihlašovací formulář je vytvořen vývojářem, přihlašovací

proměnné jsou různé− Při přihlašování použity často další skryté parametry, např.

cookies− Není úplně triviální zjistit typ autentizace

Formulářové přihlašování - popis

Autentizace - podpora pro selenium IDE• Pro Formulářové přihlašování

• Usnadňuje nastavení autentizace• Od verze 2.1

Autentizace - podpora pro client certifikáty

Crawling• Přesná specifikace cíle testování

− White list, Black List, Explicit URL, POST Data Black List − Od verze 2.3 – podpora selenium IDE pro definici přístupu

ww

w.r

ac.

cz

Ris

k A

naly

sis

Con

sult

an

tsV

06

04

20

QualysGuard InfoDay 2014

Představení nástroje pro testování webových aplikací (WAS)

Live Demo : Možnosti nastavení testů

ww

w.r

ac.

cz

Ris

k A

naly

sis

Con

sult

an

tsV

06

04

20

QualysGuard InfoDay 2014

Představení nástroje pro testování webových aplikací (WAS)

5. Scan + Reporting

Dashboard

Catalog

ReportsView Scans

Summary

Scan Results

Did Authentication Work? &What type was used?

Build scan reports from here

Find largest applications

Web Application ScanningReporting – Scan Report

• Choose from Scans (similar to Manual Data in VM)

Web Application ScanningReporting – Scorecard

• Statistics on all applications tagged in UI

• High-level• Good

starting point

ww

w.r

ac.

cz

Ris

k A

naly

sis

Con

sult

an

tsV

06

04

20

QualysGuard InfoDay 2014

Představení nástroje pro testování webových aplikací (WAS)

Live Demo : Reporty