Making the OWASP WebScarab module from binaries

NOTE:  This is how I oringinallymade the OWASP WebScarab module.  Recent versions of the OWASP Live CD have WebScarab made from source.  That page is here.

Get the source for WebScarab

Go to the OWASP website and navigate to the WebScarab page In the Downloads section, you'll see a link to the OWASP Source Code Center at Sourceforge. Grab the latest for Linux. At the time of this writing, that's webscarab-selfcontained-20070504-1631.jar

Create the needed directories in fakeroot

Eventually, we'll use dir2lzm to make the module, so lets get the directories created that we need:

 $ mkdir -p ./fakeroot/opt/owasp/webscarab
$ mkdir -p ./fakeroot/usr/share/aplications
$ mkdir -p ./fakeroot/usr/share/pixmaps
$ mkdir -p ./fakeroot/root

More on that ./fakeroot/root directory later

Create and put the module's files into the fakeroot directory

We're prettly lucky with WebScarab. It was the first module I created and I was glad for that as it was rather straight forward. Since we are getting a pre-compiled binary, lets get the application file where it needs to go.

 $ cp ./temp/webscarab-selfcontained-20070504-1631.jar ./fakeroot/opt/owasp/webscarab

Creating WebScarab's menu file is rather simple. Use a text editor and create a file with the following contents:

[Desktop Entry]
Encoding=UTF-8
Exec=java -jar /opt/owasp/webscarab/webscarab-selfcontained-20070504-1631.jar
Icon=/usr/share/pixmaps/webscarab.png
Type=Application
Categories=Application;Network;
Name=Local Proxy
Name[cs]=Local Proxy
GenericName=WebScarab
GenericName[cs]=WebScarab
MimeType=text/html
X-KDE-StartupNotify=true

The icon was a bit interesting. I didn't get one with the download (selfcontained-20070504-1631.jar). I downloaded the actual source ( webscarab-src-20070504-1631.zip) which did have the logo at ./webscarab-20070504-1631/src/org/owasp/webscarab/webscarab_logo.gif after I unzipped it. A quick run through Gimp to convert the .gif to .png and then I moved the new .png into ./fakeroot.

 cp ./temp/webscarab_logo.png ./fakeroot/usr/share/pixmaps/webscarab.png

I also knew (cause I looked on the CD running in a VM) that Java wasn't on the default SLAX distro. I needed to create a Java module. I document how I did that in Making the Java module[PAGE NOT MADE]

One other thing I realized I needed (after testing the module in a freshly built iso) was a WebScarab.properties configuration file was needed so that WebScarab didn't open in its default "Lite" (and crippled) mode. I just ran WebScarab from the CD and scp'ed off the WebScarab.properties file which was created when I ran and configured WebScarab.

 $ cp ./temp/WebScarab.properties ./fakeroot/root/

Generate the .lzm module

This is the easy part.

 $ ./dir2lzm ./fakeroot webscarab-20070504.lzm

Add the modules to the ISO build directory

Also cake

 $ cp -i webscarab-20070504.lzm ../contents/slax/base/
$ chmod 775 ../contents/slax/base/webscarab-20070504.lzm

Test the new module

Since we might have to "rinse and repeat", lets test the new module

 $ cd ../contents/slax/
$ ./make_iso.sh /home/mtesauro/isos/new-owasp.iso

If anything doesn't work as expected, make the changes needed to ./fakeroot and try again.

Clean up and archive

Once you've got a working module, lets clean up a bit.

 $ $ mkdir ./completed_modules/webscarab
$ mv webscarab-20070504.lzm ./completed_modules/webscarab/
$ tar -cjvf ./completed_modules/webscarab/fakeroot-webscarab.tar.bz fakeroot/
$ mv temp/selfcontained-20070504-1631.jar ./completed_modules/webscarab/
$ mv temp/selfcontained-src-20070504-1631.zip ./completed_modules/webscarab/
$ mv temp/WebScarab.properties ./completed_modules/webscarab/
$ mv temp/webscarab_logo.png ./completed_modules/webscarab/
$ mv temp/webscarab_logo.gif ./completed_modules/webscarab/
$ rm -rf ./temp/*

I usually delete anything under ./fakeroot also.

 $ rm -rf ./fakeroot/*