Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

IBM Rational AppScan eXtensions Framework

Software add-ons that extend new functionality to Rational AppScan

Tab navigation

IBM® Rational® AppScan is a leading suite of automated Web application security solutions that scan and test for common Web application vulnerabilities. Unlike other solutions that inundate users with vulnerability data, Rational AppScan provides intelligent fix recommendations and advanced remediation capabilities, such as comprehensive task lists necessary to fix vulnerabilities uncovered during the scan and improve an organization's overall security posture. The Rational AppScan eXtensions Framework helps you extend new functionality to Rational AppScan and advance your automated Web application security solution.

What are Rational AppScan eXtensions?

Rational AppScan eXtensions are software add-ons that extend new functionality to Rational AppScan. They can add anything from a minor utility that performs a simple task, to a full blown application that performs many complex actions. By using eXtensions, users can customize Rational AppScan to their own needs, just the way they like it. Here are some examples of things you can perform using the Rational AppScan eXtensions Framework:

  1. Make Rational AppScan better fit your process (e.g. export results to defect tracking systems, write your own report export format, etc.)
  2. Add small features to Rational AppScan (e.g. send Email/Pager/SMS notifications)
  3. Innovate big features to make Rational AppScan perform new things for you (e.g. compare files found by Rational AppScan to files on server, to see if you missed some and improve your coverage)
  4. Package your own proprietary expertise into the automated process (e.g. exploit when issue is found)
  5. Just have fun (e.g. Make Rational AppScan vocalize different events, or open a game of Solitaire while a scan is running)

Build your own eXtensions

You can find the SDK Documentation under Downloads and also under the /Docs directory in your AppScan Installation directory.

To begin writing your own eXtension, you first have to add the following namespaces to your project's source code:

This is done by adding the following lines of code to the beginning of your source file:

In addition, you should add Rational AppScan's Public SDK DLL (C:\Program Files\IBM\Rational AppScan\AppScanSDK.dll) to your project's References--Figure 1.

Figure 1. Adding Rational AppScan's Public SDK to your project's References screen capture to show how to add Rational AppScan's Public SDK to your project

Figure 2. Cont'd--Adding Rational AppScan's Public SDK to your project's References screen capture to show how to add Rational AppScan's Public SDK to your project

In order to supply extension information, your project may include an XML file (should be named "info.xml"), containing information that will be presented in the Extension Manager (more information in the next section and in the sample code below).

Your new Rational AppScan eXtension should implement the IExtensionLogic interface (Figure 3).

There are three different ways for the extension to integrate into Rational AppScan, as defined by the interface:

  1. On initialization: when Rational AppScan starts, it loads the extension, and calls its Load() method
  2. As part of Load() implementation: the extension may register to handle SDK events, so when the events are raised, extension code is executed
  3. User actions: the extension (optionally) defines menu entries to be displayed in Rational AppScan's menus. When a user selects an entry, a designated extension code is executed.

Figure 3. IExtensionLogic interface UML model screen capture to show IExtensionLogic interface UML

Publishing your eXtensions

If you would like your eXtension (or download location) to be published and linked from our IBM Rational AppScan eXtensions Framework pages, please email us at: wfwebmaster@ca.ibm.com.

When you have completed your eXtension, you should package it for reuse with Rational AppScan. Packaging of the eXtension is done in the following way:

  1. Create a directory with your extension's name (e.g. MyExt)
  2. Place the extension DLL and the optional info.xml information file in the directory
  3. You can place any additional directories and files inside the /MyExt directory as well
  4. Zip the directory using WinZip
  5. After launching Rational AppScan, click on Tools > Extensions > Extension Manager > Install Extension, and add the new extension to Rational AppScan

Optionally, you can manually create a directory for your extension under "Application Data: TODO", and put your DLL and info.xml file into this directory. This replaces the installation process.

Figure 4. Rational AppScan's Extension Manager window screen capture to show Rational AppScan's Extension Manager window

Code samples

Listing 1 demonstrates how to implement an extension that registers to a Rational AppScan event, using the Rational AppScan eXtensions Framework.

Listing 1.

                            
using System;

using System.Collections.Generic;

using System.Windows.Forms;

 

using AppScan;

using AppScan.Scan;

using AppScan.Events;

using AppScan.Extensions;

using AppScan.Scan.Events;

 

namespace MyExtension1

{

    /// <summary>

    /// SayIt main implementation class.

    /// implementing the IExtensionLogic interface

    /// </summary>

    public class MyExtension : IExtensionLogic

    {

       /// <summary>

       /// extension initialization. typically called on AppScan's startup

      /// </summary>

     /// <param name="appScan">
         main application object the extension is loaded into
         </param>

     /// <param name="extensionDir">
         extension's working directory
         </param>

     public void Load
         (IAppScan appscan, IAppScanGui appScanGui, string extensionDir)

       {

                  appScan = appscan;

                  RegisterToAppScanEvents();

            }

 

            /// <summary>

            /// Register to AppScan events

            /// </summary>

            private void RegisterToAppScanEvents()

            {

                  appScan.Scan.StateChanged += Scan_StateChanged;

            }

 

            #region event handlers

 

            private void Scan_StateChanged(object sender, StateChangedEventArgs e)

            {

                  if (e.CurrentState == ScanOperationState.Exploring)

                  {

                        MessageBox.Show("Now Exploring");

                  }

            }

 

            #endregion event handlers

 

            #region private members

 

            IAppScan appScan;

 

            #endregion private members

 

            #region other IExtensionLogic operations

 

            /// <summary>

            /// retrieves data about current available ext-version

            /// </summary>

            /// <param name="targetApp">app this extension is designated for</param>

            /// <param name="targetAppVersion">current version of targetApp</param>

            /// <returns>
                update data of most recent extension version, or null if no data was 
               found, or feature isn't supported. it is valid to return update data of 
               current version. extension-update will take place only if returned value 
               indicaes a newer version
               </returns>

            public ExtensionVersionInfo GetUpdateData
                  (Edition targetApp, Version targetAppVersion)

            {

                  return null;

            }

 

            #endregion other IExtensionLogic operations

           

      }

}
                            
                        

Listing 2 demonstrates how to add new menu items to Rational AppScan. The first menu item is added to the Tools > Extensions menu, and the second is added as an Issue context menu item (right-click on an Issue).

Listing 2.

                            
using System;

using System.Collections.Generic;

using System.Windows.Forms;

 

using AppScan;

using AppScan.Events;

using AppScan.Extensions;

using AppScan.Scan.Data;

 

namespace MyExtension1

{

      /// <summary>

      /// GuiDemo main implementation class.

      /// implementing the IExtensionLogic interface

      /// </summary>
                                    
      public class GuiDemo : IExtensionLogic

      {

            #region Initialization

           
            /// <summary>

            /// extension initialization. typically called on AppScan's startup

            /// </summary>

            /// <param name=
            "appScan">main application object the extension is loaded into</param>

            /// <param name="extensionDir">extension's working directory</param>

            public void Load
              (IAppScan appscan, IAppScanGui appScanGui, string extensionDir)

             {

                  InitGuiHooks();

                  RegisterGuiHooks(appScanGui);

            }

 

            /// <summary>

            /// Creates the menu entries objects

            /// </summary>

            private void InitGuiHooks()

            {

                  extMenuItems = CreateMenuItems(); 
                  // Create a (Tools->Extension) menu entry collection

                  IssueMenuItems = CreateIssueContextMenuItems(); 
                 // Create a context-menu entry collection

            }
            
             /// <summary>

            ///  Add menu entries to AppScan

            /// </summary>

            /// <param name="appScanGui"></param>

            private void RegisterGuiHooks(IAppScanGui appScanGui)

            {

                  foreach 
                      (IMenuItem<EventArgs> item in extMenuItems)

                        appScanGui.ExtensionsMenu.Add(item);

 

                  foreach 
                       (IMenuItem<IssuesEventArgs> item in IssueMenuItems)

                        appScanGui.IssueContextMenu.Add(item);

            }

 

            #endregion Initialization

 

            #region GUI itmes construction

 

            private ICollection<IMenuItem<EventArgs>> CreateMenuItems()

            {

             mainExtMenuItem = new MenuItem
             <EventArgs>(messagePrefix + "Hello!", DelegateEmpty);

             List<IMenuItem<EventArgs>> items = 
             new List<IMenuItem<EventArgs>>();

             items.Add(mainExtMenuItem);

             return items;

            }
            
             private ICollection<IMenuItem<IssuesEventArgs>> CreateIssueContextMenuItems()

            {

            mainIssuesExtMenuItem = 
            new MenuItem<IssuesEventArgs>(messagePrefix + "Operation 1", DelegateIssue1);

            List<IMenuItem<IssuesEventArgs>> items = 
            new List<IMenuItem<IssuesEventArgs>>();

           items.Add(mainIssuesExtMenuItem);

           return items;

            }

            #endregion GUI itmes construction

            #region delegates

            /// <summary>

            /// Tools-Extensions menu entry action

            /// </summary>

            /// <param name="args"></param>

            private static void DelegateEmpty(EventArgs args)

            {

                  MessageBox.Show("Hello!", messageTitle);

            }
            
             /// <summary>

            /// Issue-context menu entry action

            /// </summary>

            /// <param name="args"></param>

            private void DelegateIssue1(IssuesEventArgs args)

            {

                  DoDelegateIssue(1, args.issues);

            }

 

            private static void DoDelegateIssue(int num, ICollection<IIssue> issues)

            {

             if (issues != null)

               {

               MessageBox.Show
              ("Issue operation " + num.ToString() 
                 + " issues count: " + issues.Count, messageTitle);

              }

             else

             MessageBox.Show
             ("Issue operation " + num.ToString() 
                + " issues list is empty", messageTitle);

            }
            
            #endregion delegates 

            #region data members 

            IMenuItem<EventArgs> mainExtMenuItem;

            IMenuItem<IssuesEventArgs> mainIssuesExtMenuItem; 

            ICollection<IMenuItem<EventArgs>> extMenuItems;

            ICollection<IMenuItem<IssuesEventArgs>> IssueMenuItems;

 

            const string messageTitle = "GuiDemo ";

            const string messagePrefix = "GuiDemo: ";

 

            #endregion data members

 

            #region other

 

            /// <summary>

            /// retrieves data about current available ext-version

            /// </summary>

            /// <param name="targetApp">app this extension is designated for</param>

            /// <param name="targetAppVersion">current version of targetApp</param>

            /// <returns>
                update data of most recent extension version, 
                or null if no data was found, or feature isn't supported. 
                It is valid to return update data of current version. 
                extension-update will take place only if returned value indicates 
                a newer version
               </returns>

            public ExtensionVersionInfo GetUpdateData
            (Edition targetApp, System.Version targetAppVersion)

            {

                  return null;

            }

 

            #endregion other

 

      }

}


 
                                          

Listing 3 shows an example of an info.xml file.

Listing 3.

                            
<?xml version="1.0"?>

 

<AppScanExtension>

 

  <!-- Front End MetaData -->

  <FullName>MyExt</FullName>

  <Description>Sample Extensions that does nothing</Description>

  <Version>1.0</Version>

  <Author>Author Name</Author>

  <Copyright>My Copyright info</Copyright>

  <HomepageURL>http://www.ibm.com/developerworks/rational/products/appscan/</HomepageURL>

  <IconFile>MyExt.gif</IconFile>

  <MainDllFile>MyExt.dll</MainDllFile>

 

  <!-- Target Application this extension can install into,

       with minimum and maximum supported versions. -->

  <TargetEdition>

   

    <!-- supported values: AppScanAuditors, AppScanDev, AppScanQA, AppScanXM, All -->

    <ID>All</ID>

   

    <MinCompatibleVersion>7.5</MinCompatibleVersion>

    <MaxCompatibleVersion>7.9</MaxCompatibleVersion>

 

  </TargetEdition>

 

</AppScanExtension>
                        

Pyscan

Coupling Rational AppScan with the powerful capabilities of Python™ scripts -- one of the most advanced, established, and yet easy to learn scripting languages used by penetration testers -- give users an unprecedented platform for extending security testing. Pyscan is a revolutionary new way to leverage the power of Rational AppScan without the limitations of a user interface. Integrating Python scripting within Rational AppScan's configuration framework produces a level of customization previously unavailable to security professionals and penetration testers. Users can now harness core Web application scanning functions, such as Rational AppScan Advanced Session Management, a reporting and scanning engine, to customize a scan for a specific audit.

Targeted, real-time penetration testing

Pyscan leverages the Advanced Session Management engine of Rational AppScan to establish and maintain login state while enabling Python scripting via Rational AppScan's engine in order to expose potential Web application vulnerabilities. All results are immediately reported in Rational AppScan's Security Issues view. Users can invoke customized scripted Web application attacks that previously were not feasible through manual penetration testing efforts alone. Examples of such scripts include finding suspicious content, scriptable rules, or HTTP fuzzing.

Pyscan comes installed with Rational AppScan v7.5, but in case you need to install it again, you can download the eXtension file.

In order to get started with Pyscan, we have created a small sample Python script called PyscanUtils.py, which contains several useful functions. Load this sample script by going to the File menu, choose Open, and point to the PyscanUtils.py script. In the new IDE window that will open with the script, go to the Run menu, and choose Run Module. The script can also run by hitting F5 in the Open menu.

Frequently asked questions

How/Where do I download and install Rational AppScan eXtensions?
You can download free Rational AppScan eXtensions by linking to the IBM Rational AppScan eXtensions Framework from the IBM developerWorks site at: http://www.ibm.com/developerworks/rational/products/appscan/

What's the advantage for me, as a developer, to use Rational AppScan eXtensions in my projects?
Rational AppScan eXtensions allow you to integrate your own knowledge and code into the automated scanning process while leveraging Rational AppScan as a platform for Web application security scanning and reporting. Your own utilities can now make use of Rational AppScan's crawling engine, advanced reporting, powerful communication layer (e.g. SSL support, Client Side Certificates, Advanced Session State Management, etc.) and automated testing capabilities.

Who can write Rational AppScan eXtensions?
Users who own a copy of Rational AppScan 7.5 (or above) can immediately start developing their own extensions by using Rational AppScan's public SDK and the Rational AppScan eXtensions Framework, which comes bundled with documentation and code samples.

What is the Rational AppScan Public Software Development Kit (SDK)?
The Rational AppScan Public SDK is a programming package which enables you to develop applications that integrate with Rational AppScan closely. The SDK provides interface specifications and API libraries to Rational AppScan as well as thorough documentation and code samples of how to use them.

Rational AppScan's Public SDK is ideal for those who wish to integrate their own applications with the industry's leading Web application security scanner. It is available to end users of Rational AppScan, as well as value-added resellers (VARs) and independent software vendors.

You can write your own applications (or Rational AppScan eXtensions) using the Rational AppScan Public SDK in any language that is .NET-CLR compliant (e.g. C#, VB.NET, VB or J#). In addition, you can use the SDK with the Python scripting language, using PyScan, an integration between Python and Rational AppScan that comes built-in with Rational AppScan v7.5.

Where can I find the Rational AppScan SDK documentation?
You can find the SDK Documentation under the Downloads section, and also under the /Docs directory in your Rational AppScan Installation directory.

Is there a discussion forum that I can visit to ask questions about eXtensions to the broader community?
You can post your questions in the Rational AppScan forum on developerWorks.

Downloads

DescriptionNameSizeDownload method
AppScanSDK.zipAppScanSDK.zip2080KBHTTP
PyscanPyScan.zip84KBHTTP
Pyscan UtilitiesPyscanUtils.zip3KBHTTP

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

Contact IBM

live-assistance

Considering a purchase?


Or call us at:
1-800-728-1212
Priority code:
109HG03W