1. Building Testing Environment



Similar documents
WebCruiser Web Vulnerability Scanner User Guide

IP Application Security Manager and. VMware vcloud Air

SYWorks Vulnerable Web Applications Compilation For Penetration Testing Installation Guide

WebCruiser Web Vulnerability Scanner User Guide

MOODLE Installation on Windows Platform

Acunetix Web Vulnerability Scanner. Getting Started. By Acunetix Ltd.

Livezilla How to Install on Shared Hosting By: Jon Manning

Querying Databases Using the DB Query and JDBC Query Nodes

Secure Web Development Teaching Modules 1. Security Testing. 1.1 Security Practices for Software Verification

SQL Server Setup for Assistant/Pro applications Compliance Information Systems

WebCruiser User Guide

WordPress Security Scan Configuration

Using Internet or Windows Explorer to Upload Your Site

Expresso Quick Install

Setting up Sharp MX-Color Imagers for Inbound Fax Routing to or Network Folder

Labtech Learning Management System. Windows Installation. Standart Version 1.0

TIMETABLE ADMINISTRATOR S MANUAL

MySQL quick start guide

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

JOOMLA SECURITY. ireland website design. by Oliver Hummel. ADDRESS Unit 12D, Six Cross Roads Business Park, Waterford City

WebCruiser Web Vulnerability Scanner Test Report. Input Vector Test Cases Cases Count Report Pass Rate. Erroneous 200 Responses %

Installing Drupal on Your Local Computer

Online Vulnerability Scanner Quick Start Guide

Sugar Open Source Installation Guide. Version 4.5.1

Executive Summary On IronWASP

Project management integrated into Outlook

Web application security: Testing for vulnerabilities

All the materials and/or graphics included in the IceThemetheme folders MUST be used ONLY with It TheCityTheme from IceTheme.com.

How to hack a website with Metasploit

TECHNICAL NOTE SETTING UP A STRM UPDATE SERVER. Configuring your Update Server

1. Open the preferences screen by opening the Mail menu and selecting Preferences...

Web Application Report

Attack and Penetration Testing 101

Video Administration Backup and Restore Procedures

Managing Qualys Scanners

MassTransit 6.0 Enterprise Web Configuration for Macintosh OS 10.5 Server

Online shopping store

Microsoft SQLServer Restore / Redirected Restore Procedure

Installing LearningBay Enterprise Part 2

WWPass External Authentication Solution for IBM Security Access Manager 8.0

Backup and Restore MySQL Databases

Configure Single Sign on Between Domino and WPS

Upgrading MySQL from 32-bit to 64-bit

How to set up Outlook Anywhere on your home system

Active Directory Authentication Integration

MySQL Quick Start Guide

FireBLAST Marketing Solution v2

Accessing the Media General SSL VPN

This is a training module for Maximo Asset Management V7.1. It demonstrates how to use the E-Audit function.

Lets Get Started In this tutorial, I will be migrating a Drupal CMS using FTP. The steps should be relatively similar for any other website.

Create e-commerce website Opencart. Prepared by : Reth Chantharoth Facebook : rtharoth@yahoo.

System Administration and Log Management

Advanced Web Security, Lab

Installation Guide. C o p y r i g h t , S e e F i l e S o f t w a r e L L C

Secure Web Development Teaching Modules 1. Threat Assessment

BusinessObjects Enterprise XI Release 2

SQL Injection Attack Lab Using Collabtive

Sophos UTM Web Application Firewall for Microsoft Exchange connectivity

This installation guide will help you install your chosen IceTheme Template with the Cloner Installer package.

Application Security Testing. Generic Test Strategy

SpectraPro. SLQ Server databases

IIS, FTP Server and Windows

AXIS 70U - Using Scan-to-File

SQL Injection Attack Lab

Getting Started with Dynamic Web Sites

NSi Mobile Installation Guide. Version 6.2

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

Introduction. Installation of SE S AM E BARCODE virtual machine distribution. (Windows / Mac / Linux)

Installation Instructions

Virtual Office Remote Installation Guide

equate Installation QUICK START GUIDE

GWAVA 5. Migration Guide for Netware GWAVA 4 to Linux GWAVA 5

Installing TestNav Mac with Apple Remote Desktop

MySQL Quick Start Guide

The Web Pro Miami, Inc. 615 Santander Ave, Unit C Coral Gables, FL T: info@thewebpro.com

MSI Admin Tool User Guide

Publish Joomla! Article

1 Classified Script. User Guide v1.0

SAP Business Objects Data Services Setup Guide

HIPAA Compliance Use Case

Web attacks and security: SQL injection and cross-site scripting (XSS)

PaperStream Connect. Setup Guide. Version Copyright Fujitsu

Deploying the BIG-IP LTM system and Microsoft Windows Server 2003 Terminal Services

StreamServe Job Gateway

Enterprise Manager. Version 6.2. Installation Guide

Backing Up CNG SAFE Version 6.0

Perceptive Intelligent Capture Solution Configration Manager

QuickStart Guide for Client Management. Version 8.7

This is a training module for Maximo Asset Management V7.1. In this module, you learn to use the E-Signature user authentication feature.

Nixu SNS Security White Paper May 2007 Version 1.2

INTRODUCTION: SQL SERVER ACCESS / LOGIN ACCOUNT INFO:

Restoring Sage Data Sage 200

Installation Tutorial Script: The Real Estate Script. 1. Please login to download script. On PHP Classifieds Script web site.

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

Installation Guidelines (MySQL database & Archivists Toolkit client)

Talk Internet User Guides Controlgate Administrative User Guide

Secure Messaging Server Console... 2

Web Application Vulnerability Testing with Nessus

Technical Bulletin. SQL Express Backup Utility

Configuration Manual

Transcription:

The Practice of Web Application Penetration Testing 1. Building Testing Environment Intrusion of websites is illegal in many countries, so you cannot take other s web sites as your testing target. First, you need build a test environment for yourself. If you are not good at building servers, we recommend you build a simple one with XAMPP. OS: Windows 7, 8 Software: XAMPP for Windows, download: https://www.apachefriends.org/zh_cn/index.html XAMPP for Windows has modules such as Apache, PHP, Tomcat, and MySQL etc. The default installation path is c:\xampp, please do not change it. Take DVWA (Damn Vulnerable Web Application) as an example, Start Apache and MySQL, and access with http://127.0.0.1. After started, you can use the following command to set the password to 123456 (This is a weak password, just for example, please modify it) C:\xampp\mysql\bin\mysqladmin -u root password 123456 Now, you can download DVWA from https://github.com/randomstorm/dvwa, unzip it to C:\xampp\htdocs\dvwa, Then modify its configuration file, which is C:\xampp\htdocs\dvwa\config\config.inc.php: $_DVWA[ 'db_server' ] = 'localhost'; $_DVWA[ 'db_database' ] = 'dvwa'; $_DVWA[ 'db_user' ] = 'root';

$_DVWA[ 'db_password' ] = 123456 ; $_DVWA['default_security_level'] = "low"; Open http://127.0.0.1/dvwa/setup.php, Click Create/Reset Database to finish the installation. Access the front page of it and it will redirect to http://127.0.0.1/dvwa/login.php Now, a basic test environment is available. 2. DVWA Brute Force The first challenge of DVWA is how to login it. Usually, you can search the network and get the default username/password, or try to use SQL Injection to escape the authentication mechanism, such as use a username like admin ;-- or other ways. Here we will use brute force, and use WebCruiser Web Vulnerability Scanner 3 (http://www.janusec.com/ ) as a brute force tool. First, input any username and password, such as 123, 456, etc. submit.

Switch to Resend tab: We found there was a request list which includes requests we submit just now. Note that there is a button Bruter, click it, it will switch to Bruter tool. The username and password field has been identified automatically. The dictionary files are located in the same directory with WebCruiserWVS.exe and supports custom modifying.

Click Go to start guess process, result will be list in the window. Log in with the username and password. 3. SQL Injection Select SQL Injection menu, input 1 and submit: Input 1 to try:

MySQL throw exception because of unpaired single quotes. Now, we can suspect that there is SQL Injection vulnerability here. Continue try 1 and 1=1 and 1 and 1=2 But we found it is not the same as expected, SQL Injection with integer type was ruled out. Continue try with 1' and '1'='1 and 1' and '1'='2

There is no result return to us when we input 1 and 1 = 2 Till now, we can adjudge there is SQL Injection vulnerability with string type here. Recap : Criterion of SQL Injection Assume the initial response is Response0, Response by append true logic is Response1, Response by append false logic is Response2, If Response1= Response0, but Response1!= Response2, SQL Injection exists. OK, can you takeover some data by exploiting it?

Try: 1 from ( select count(*),concat((select database()),0x3a,floor(rand(0)*2)) x from information_schema.tables group by x)a)%23 Well, the database name dvwa returns on the page. This case is a little complex; actually it builds an exception intentionally by twice rand computation. Another way is blind SQL Injection, by guest the length and ASCII of each byte of the field. To compute if the length of database name bigger than 10: char_length(database()))>10 and '1'='1 Wrong, try less than 10: char_length(database()))<10 and '1'='1

Right, continue guess till: char_length(database()))=4 and '1'='1 We got the length is 4. Continue to guess each byte of it: ord(substr(database(),1,1)) )=100 and %271%27=%271

The ASCII of the first byte is 100, it is d, and so on. ord(substr(database(),2,1)) )=118 and %271%27=%271, the second byte is v. ord(substr(database(),3,1)) )=119 and %271%27=%271,the third byte is w. ord(substr(database(),4,1)) )=97 and %271%27=%271,the fourth byte is a. Got the full name of database is dvwa. Is there a tool which can do these tests instead? Yes, we can use a web application security scanner to do it. Take WebCruiser as an illustration, navigate page and click ScanURL : SQL Injection vulnerabilities found. Right click vulnerability and select SQL INJECTION POC,

continue click Get Environment Information : 4. XSS Select XSS from the menu, http://127.0.0.1/dvwa/vulnerabilities/xss_s/ Input text and script directly in the title and content field, such as: testinput<img src=0 onerror="alert(123456)"> Or use scanner, it found 2 XSS vulnerabilities.

Note: In order to improve efficiency, WebCruiser Web Vulnerability Scanner can scan designated vulnerability type (setting) or designated URL (ScanURL button) separately.