Building OWASP ZAP Using Eclipse IDE



Similar documents
Installing the Android SDK

Eclipse installation, configuration and operation

Getting Started with Android Development

Download and Installation Instructions. Android SDK and Android Development Tools (ADT) Microsoft Windows

Download and Installation Instructions. Android SDK and Android Development Tools (ADT)

Introduction to Eclipse

Application Development Setup Guide

Informatics for Integrating Biology & the Bedside. i2b2 Workbench Developer s Guide. Document Version: 1.0 i2b2 Software Release: 1.3.

3. Installation and Configuration. 3.1 Java Development Kit (JDK)

Practice Fusion API Client Installation Guide for Windows

POOSL IDE Installation Manual

DAVE Usage with SVN. Presentation and Tutorial v 2.0. May, 2014

SDK Code Examples Version 2.4.2

Download and Installation Instructions. Android SDK and Android Development Tools (ADT) Microsoft Windows

Lab 0 (Setting up your Development Environment) Week 1

How To Run A Hello World On Android (Jdk) On A Microsoft Ds.Io (Windows) Or Android Or Android On A Pc Or Android 4 (

Fahim Uddin 1. Java SDK

Home Course Catalog Schedule Pricing & Savings Training Options Resources About Us

Beginning with SubclipseSVN

Android Environment SDK

WA1826 Designing Cloud Computing Solutions. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

How to Set Up Your PC for Android Application Development

Introduction to Android Development

IBM TRIRIGA Anywhere Version 10 Release 4. Installing a development environment

Android Development Setup [Revision Date: 02/16/11]

SIM900 Eclipse environment install Application Note_V1.00

Apache Directory Studio. User's Guide

How to Install Eclipse. Windows

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

Epidefender Studio Installation notice

To begin, visit this URL:

Installing (1.8.7) 9/2/ Installing jgrasp

Android Environment SDK

Primavera P6 Professional Windows 8 Installation Instructions. Primavera P6. Installation Instructions. For Windows 8 Users

Click Start > Control Panel > System icon to open System Properties dialog box. Click Advanced > Environment Variables.

Configuring the BBj Jetty Web Server (rev10.02) for OSAS

Tutorial on Basic Android Setup

Java. How to install the Java Runtime Environment (JRE)

Rational Application Developer v7.0 (RAD7) trial version. Installation guide

Download and Installation Instructions. Java JDK Software for Windows

Personal Token Software Installation Guide

Supplement I.B: Installing and Configuring JDK 1.6

ABS2020 Moving Airfreight Forward

Hello World. by Elliot Khazon

IBM Bluemix Tutorial Connecting Eclipse to Bluemix v2.0

1) SETUP ANDROID STUDIO

Using Intel C++ Compiler in Eclipse* for Embedded Linux* targets

Installing Ruby on Windows XP

Android 4.4 App Development Essentials

Witango Application Server 6. Installation Guide for Windows

Developing In Eclipse, with ADT

Reflection DBR USER GUIDE. Reflection DBR User Guide. 995 Old Eagle School Road Suite 315 Wayne, PA USA

Installation Guide of the Change Management API Reference Implementation

Supplement I.B: Installing and Configuring JDK 1.6

SSO Plugin. J System Solutions. Upgrading SSO Plugin 3x to 4x - BMC AR System & Mid Tier.

A Tutorial on installing and using Eclipse

Oracle FLEXCUBE Direct Banking Android Tab Client Installation Guide Release

S. Bouzefrane. How to set up the Java Card development environment under Windows? Samia Bouzefrane.

JBoss Portal 2.4. Quickstart User Guide

Setting Up Your Android Development Environment. For Mac OS X (10.6.8) v1.0. By GoNorthWest. 3 April 2012

Implementing a SAS 9.3 Enterprise BI Server Deployment TS-811. in Microsoft Windows Operating Environments

Hudson configuration manual

Online Backup Client User Manual

1 Building, Deploying and Testing DPES application

ClassiX Software GmbH. A description for installing and using the program BIRT to generate Reports. in GESTIN-77

T320 E-business technologies: foundations and practice

RoomWizard Synchronization Software Manual Installation Instructions

TUTORIAL ECLIPSE CLASSIC VERSION: ON SETTING UP OPENERP 6.1 SOURCE CODE UNDER WINDOWS PLATFORM. by Pir Khurram Rashdi

Advantages. manage port forwarding, set breakpoints, and view thread and process information directly

Crystal Reports Integration Plugin for JIRA

Oracle Fusion Middleware. 1 Oracle Team Productivity Center Server System Requirements. 2 Installing the Oracle Team Productivity Center Server

Installing Eclipse C++ for Windows

Installing and Configuring DB2 10, WebSphere Application Server v8 & Maximo Asset Management

WA2102 Web Application Programming with Java EE 6 - WebSphere RAD 8.5. Classroom Setup Guide. Web Age Solutions Inc. Web Age Solutions Inc.

Notepad++ The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3

CSA Software Listing Table of Contents. Both Windows and Mac platforms are supported.

Installing Primavera P6 Professional R8.2

INF 111 / CSE 121. Homework 4: Subversion Due Tuesday, July 14, 2009

Aladin. There are currently two recommended links for Aladin. Suitable for most users, the default Aladin link is:

Symantec Client Firewall Policy Migration Guide

Getting Started using the SQuirreL SQL Client

How to Set Up Your PC for Android Application Development

isupplier PORTAL ACCESS SYSTEM REQUIREMENTS

Android: Setup Hello, World: Android Edition. due by noon ET on Wed 2/22. Ingredients.

Sophos Mobile Control Installation guide. Product version: 3

Android Programming: Installation, Setup, and Getting Started

Creating a Java application using Perfect Developer and the Java Develo...

Online Backup Client User Manual

L01: Using the WebSphere Application Server Liberty Profile for lightweight, rapid development. Lab Exercise

Introduction: The Xcode templates are not available in Cordova or above, so we'll use the previous version, for this recipe.

Sophos Mobile Control Installation guide. Product version: 3.5

Version Control with Subversion

Building graphic-rich and better performing native applications. Pro. Android C++ with the NDK. Onur Cinar

Oracle Java Micro Edition Software Development Kit

PTC Integrity Eclipse and IBM Rational Development Platform Guide

How to build your first Android Application in Windows

1. Product Information

Exchange Server Backup and Restore

Transcription:

Building OWASP ZAP Using Eclipse IDE for Java Pen-Testers Author: Raul Siles (raul @ taddong.com) Taddong www.taddong.com Version: 1.0 Date: August 10, 2011 This brief guide details the process required to build the OWASP Zed Attack Proxy (ZAP) 1 from source code using the Eclipse IDE for Java Developers. The guide has been developed for Windows 7 but the Eclipse build process should be very similar for other operating systems, such as Linux. The official version of this document is available in PDF format for easy download, distribution, and usage at Taddong s Lab: http://www.taddong.com/en/lab.html. The original guide detailing how to build ZAP is available from the OWASP ZAP project Wiki: http://code.google.com/p/zaproxy/wiki/building. Software Requirements The following software is required to gather the latest OWASP ZAP (ZAP from now on) source code revision from the official SVN repository, and build a working copy of ZAP using Eclipse: Base operating system: Windows 7 (64 bits) TortoiseSVN Windows client: http://tortoisesvn.net (v1.6.16.21511 64 bits) OWASP ZAP SVN repository: http://code.google.com/p/zaproxy/source/checkoutgle.com/p/zaproxy/source/checkout svn co http://zaproxy.googlecode.com/svn/trunk zaproxy-read-only Eclipse IDE for Java Developers Indigo (v3.7 32 bits) 2 : http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/indigordevelopers/indigor Java SE 6 Update 26 (JDK 6.0.26-32 bits): http://www.oracle.com/technetwork/java/javase/downloads/ NOTE: The Java Development Kit (JDK) and Eclipse must use the same version architecture, 32 or 64 bits, independently of the OS version used. The proposed environment makes use of the 32 bits version of Java and Eclipse over Windows 7 64 bits, but other combinations might work. If you find any improvement to this guide, or have any related comment to make it a more valuable resource for the web application development and pen-testing communities, do not hesitate to contact me and contribute to future versions of this Building OWASP ZAP guide. 1 https://www.owasp.org/index.php/owasp_zed_attack_proxy_project 2 Older versions of Eclipse: http://wiki.eclipse.org/older_versions_of_eclipse Copyright 2011 Taddong S.L. www.taddong.com 1

Installing the Software Install TortoiseSVN and the (Java) JDK following the default Windows installation. Install Eclipse by uncompressing the official ZIP file and placing the eclipse folder in the selected destination location, such as C:\eclipse. NOTE: The usage of TortoiseSVN is out of the scope of this guide. Use TortoiseSVN, or your preferred SVN client (such as svn ), to retrieve a copy of the latest ZAP source code revision, available at the Google Code URL detailed on the Software Requirements section. Starting Eclipse Run C:\eclipse\eclipse.exe. The first time Eclipse starts it asks the user to configure the workspace folder: Enter your workspace folder (e.g. C:\Users\siles\eclipse_workspace ) and check the Use this as the default and do not ask again option so that Eclipse does not ask for the workspace folder every time it runs. In the Welcome screen, click on the right arrow to go to the workbench: Copyright 2011 Taddong S.L. www.taddong.com 2

NOTE: You can always go back to the Welcome screen from the Help Welcome menu. Checking the Java Environment (JRE or JDK) Detected by Eclipse Go to the Window Preferences menu to open the workbench preferences. Select the Java Installed JREs page to confirm the Java environment has been detected by Eclipse and it is available: It is recommended to replace the JRE by the JDK if both are installed on the system. If only the JDK is installed, confirm it has been properly detected. Using the Add or Search buttons locate the JDK folder and add it. Uncheck (first screenshot below), or preferably Remove (second screenshot below), the original JRE entry (if both are available): Copyright 2011 Taddong S.L. www.taddong.com 3

NOTE: The Eclipse Indigo help is available at: http://help.eclipse.org/indigo/index.jsp. Creating the ZAP Project in Eclipse NOTE: Remember, as a prerequisite, use TortoiseSVN or any other SVN client, to download the latest ZAP source code revision from the official ZAP SVN repository to a local directory (e.g. C:\Users\siles\SVN\zaproxy_20110721_r829 ). Using the File New Java Project menu, select a project name (e.g. zaproxy ) and click Finish. Copyright 2011 Taddong S.L. www.taddong.com 4

From the Package Explorer, select the zaproxy project, right click and select Import From the Import window, select General File System and click Next : From the File system window, browse (using the From directory: option) to the directory where the ZAP source code revision has been saved. Expand the directory (e.g. zaproxy_20110721_r829 ) and select all its contents, that is, the four build, lib, src, and wave folders. Click Finish. As a result, all the ZAP project contents (the four folders previously listed) are imported inside the Eclipse project: Copyright 2011 Taddong S.L. www.taddong.com 5

The Problems tab (at the bottom) will reflect several import errors due to the absence of the ZAP project libraries. Adding the ZAP Project Libraries to the Build Path Go to the Project Properties menu and select the Java Build Path page: Copyright 2011 Taddong S.L. www.taddong.com 6

From the Libraries tab, use the Add JARs button to include all the ZAP project libraries (.jar files). Form the JAR Selection window, expand the zaproxy Eclipse project, and manually select all the JAR files inside the lib folder. Click OK. As a result, all the ZAP project JAR files are added to the build path. Click OK. Configuring the ZAP Runtime Environment in Eclipse To be able to run ZAP from within Eclipse, both the Eclipse IDE working directory and the ZAP project's output directory must match. From the (previous) Project Properties menu and the Java Build Path page, go to the Source tab (accept the unsaved modifications warning, if any, by clicking on Apply ): Copyright 2011 Taddong S.L. www.taddong.com 7

At the bottom of the Source configuration page you will find the Default output folder value. Record this value for a further step (e.g. zaproxy/bin ). Click OK. Go to the Run Run configurations menu. Select Java Application and press the New button: Copyright 2011 Taddong S.L. www.taddong.com 8

Change the name of the new run configuration to ZAP and, on the Main tab, define the ZAP project main class using the Main class: field (e.g. org.zaproxy.zap.zap ). Go to the Arguments tab and change the working directory at the bottom to the ZAP project s output directory previously recorded, using this format: ${workspace_loc:zaproxy/bin}. Copyright 2011 Taddong S.L. www.taddong.com 9

Click Run and the Eclipse zaproxy project should compile and run from within the Eclipse IDE (ZAP is using the Spanish language pack in the screenshot below): Building ZAP To build your own ZAP version, so that you are able to package, distribute and test your own ZAP version, go to the Package Explorer tab and select the zaproxy build build.xml file: Copyright 2011 Taddong S.L. www.taddong.com 10

Right click on the build.xml file and select Run As - Ant Build. Eclipse will compile the ZAP project and generate the ZAP.jar file under the local workspace zaproxy\build\zap\ directory, as indicated by the Eclipse console at the bottom: The full contents of the build directory (e.g. C:\Users\siles\eclipse_workspace\zaproxy\build\zap\ ) can be packed in a ZIP file, distributed and tested (or you can modify the build.xml file to do it automatically). This zap folder is a self contained ZAP project package ready to run, on both Linux ( zap.sh ) and Windows ( zap.bat ). Simply unzip the contents of the ZIP file on any system with a Java Runtime Environment (JRE) and execute the corresponding shell or batch file. Copyright 2011 Taddong S.L. www.taddong.com 11

Appendix: Contributing to ZAP If you plan to contribute to the ZAP project, by adding new features or capabilities to this tool or fixing known issues 3, the ZAP project lead (psiinon) recommends to use Subclipse (http://subclipse.tigris.org), a plug-in providing support for Subversion (SVN) within the Eclipse IDE, to easily integrate the current SVN ZAP revision in Eclipse and be able to manage source code changes from within Eclipse. The current Subclipse download and install instructions from within the Eclipse IDE (for v3.0.2 on Windows XP) are available at http://subclipse.tigris.org/servlets/projectprocess?pageid=p4wyua. To briefly sum up the installation process for the current Eclipse IDE version Indigo (v3.7), go to the Help Install New Software menu. Enter the following URL for Subclipse 1.6.x (Eclipse 3.2+) into the Work with field, http://subclipse.tigris.org/update_1.6.x, and click the Add... (Repository) button. Select a name for the repository, such as Subclipse, and click OK. Eclipse will contact the Subclipse repository and display all the available features on the intermediate pane. Select the Subclipse checkbox to select all the associated features, or select them individually, and click Next. Eclipse will guide you through the installation process, providing first the install details. Click Next, accept the license agreements and click Finish. The Subclipse software will be installed and, once finished, it is required to restart Eclipse for the installation changes to take effect. After restarting Eclipse you have to define the ZAP SVN repository from the Window Open Perspective Other menu, by selecting the SVN Repository Exploring option and clicking OK. From the SVN Repositories tab, right click and select New Repository Location. Enter the ZAP SVN repository ( http://zaproxy.googlecode.com/svn/trunk or an alternative branch) in the Url field and click Finish. As a result, the ZAP SVN repository is available from Eclipse. Other Subclipse options and settings can be managed from the Window Preferences menu, by selecting the Team SVN page. It is recommended to review the Subclipse documentation and help to learn how to use Subclipse within Eclipse, available from the Help Help Contents menu, under the Subclipse Subversion Eclipse Plugin section. 3 OWASP ZAP Issues: https://code.google.com/p/zaproxy/issues/list Copyright 2011 Taddong S.L. www.taddong.com 12