DESCRIPTION:

BScan is a configurable and extendable command line application security scanner. It’s built on top of arguably the most popular commercial security testing tool Burp Suite from PortSwigger and Buby from Eric Monti and Timur Duehr

USE CASES:

  • Run security scans offline from a command line headless (without UI).

  • Change the type of scanning easily by changing configuration parameters.

  • Extend the BScan’s functionality by adding external modules.

  • Utilize Burp’s default spidering, active and passing scanning features.

  • Integrate scan with different sources of known injections (e.g. Google’s fuzzdb: code.google.com/p/fuzzdb/).

  • Create comprehensive security regression tests suites from artifacts provided by security auditors and run them periodically from a command line.

  • Log found issues to a plain text file.

DOCS, CODE, etc.:

REQUIREMENTS:

BUILD/INSTALL:

Gem

sudo jruby -S gem install buby -d --source=http://gemcutter.org (not necessary for modules_only)
sudo jruby -S gem install bscan --source=http://gemcutter.org

After Buby and BScan are installed, you'll need to link BScan to Burp's JAR (see below)

Building Manually from Git

git git://git.code.sf.net/p/b-scan/trunk <src_dir> cd <src_dir> jruby -S gem build bscan.gemspec jruby -S gem install -d –local bscan-*.gem bscan –help bscan –help config

Linking BScan and Buby to Burp’s JAR.

  • This step is not neccessary for modules_only mode

After Buby and BScan are installed (either manually or by gem) you’ll need to link them to a Burp’s JAR.

The easiest way of doing that is to find the directory where buby.jar is located and then create a link from that directory to a Burp’s jar:

cd <dir_where_buby.jar_is_located> ln -s <path_to_burp*.jar> <dir_where_buby.jar_is_located>/burp.jar

To find where buby.jar is located you can print JRuby’s search path using:

jruby -e 'puts $:'

and then run ‘find’ command for each dirctory in the search path:

find <dir> -name buby.jar

TEST AND USAGE EXAMPLE:

To get help run:

bscan --help

To get help for config layout run:

bscan --help config

RUNNING, REGISTERING Burp Pro:

You need to register you burp.jar before you can run it headless

  • Not neccessary for modules_only mode

  • Run your Burp as usual with GUI and provide you license. After this is done, you can run it headless using ‘bscan’

DOCUMENTATION, SAMPLES, RUNNING HEADLESSLY

  • Rdoc generated files: gryb.info/bscan/

  • After installing BScan’s gem find the location of ‘samples’ dir:

jgem contents bscan | grep samples

  • Check ‘config’ sub-dir in samples to see examples of config files and static requests

  • samples/bscan_headless file show how to run bscan headlesly:

#!/bin/sh jruby -J-Xmx1024M -J-Djava.awt.headless=true -S bscan -c ../config/conf -L 2 -l bscan.log

CREDITS:

  • Burp and Burp Suite are trademarks of PortSwigger(ltd) Copyright 2012 PortSwigger Ltd. All rights reserved. See portswigger.net for license terms.

  • Buby library and the accompanying BurpExtender.java implementation are written by Eric Monti @ Matasano Security. Matasano Security claims no professional or legal affiliation with PortSwigger LTD.

  • This BScan tools and library written by Oleg Gryb who claims no professional or legal affiliation with PortSwigger LTD or Matasano Security.

  • The ideas for slowloris attack have been borrowed from slowloris.pl written by RSnake and John Kinsella

  • The ideas for apache killer attack were borrowed from killap.pl written by Kingcope

LICENSE:

  • Burp and Burp Suite are trademarks of PortSwigger Ltd. Copyright 2012 PortSwigger Ltd. All rights reserved. See portswigger.net for license terms.

  • The Buby library and its accompanying BurpExtender implementation are both freely available under the terms of the MIT public license:

(The MIT License)

Copyright © 2009 Eric Monti, Matasano Security

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

  • The BScan tools and library are freely available under the terms of the MIT public license:

(The MIT License)

Copyright © 2012 Oleg Gryb

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.