Making the Grendel-Scan module

Get the Binary for Grendel-Scan

Go to the Grenel-Scan website and navigate to the download page. On the downloads page, you'll see links to the Windows, OS X, Linux, source and Java Doc versions of Grendel-Scan. Grab the latest Linux version which is Grendel-Scan-v1.0-linux.zip at the time of this writing.

Go ahead and extract the download into the working/temp directory:

 $ cp /home/mtesauro/owasp-live-cd/tools/Grendel-Scan-v1.0-linux.zip temp/
$ cd temp/
$ mkdir grendel-scan
$ mv Grendel-Scan-v1.0-linux.zip grendel-scan
$ unzip Grendel-Scan-v1.0-linux.zip
$ cd ../../

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/
$ mkdir -p ./fakeroot/usr/bin
$ mkdir -p ./fakeroot/usr/share/aplications
$ mkdir -p ./fakeroot/usr/share/pixmaps

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

Since we are getting a pre-compiled binary, lets get the application file where it needs to go.

 mv temp/grendel-scan fakeroot/opt/owasp/

Next, well need a script to start Grendel-Scan in fakeroot/usr/bin. This one is very easy:

 $ vi fakeroot/usr/bin/grendel-scan
[create script]
$ cat fakeroot/usr/bin/grendel-scan
#!/bin/sh

cd /opt/owasp/grendel-scan/
/opt/owasp/grendel-scan/grendel.sh

Creating Grendel-Scan's menu file is rather simple. Use a text editor and create the file grendel-scan.desktop

 $ vi fakeroot/usr/share/applications/grendel-scan.desktop
[create the file]
$ cat fakeroot/usr/share/applications/grendel-scan.desktop
[Desktop Entry]
Encoding=UTF-8
Exec=grendel-scan
Icon=/usr/share/pixmaps/grendel-scan-icon.png
Type=Application
Categories=Application;Network;
Name=Web App Sec Scanner
Name[cs]=Web App Sec Scanner
GenericName=Grendel Scan
GenericName[cs]=Grendel Scan
MimeType=text/html
X-KDE-StartupNotify=true

The icon was a bit interesting. I did find one with the download called icon.JPG in the conf/ directory. I then used Gimp to cut out a circular version of the icon with a transparent background. I saved that as a 48x48 .png file called grendel-scan-icon.png in the working/temp directory. I then moved that into fakeroot.

 cp ./temp/grendel-scan-icon.png ./fakeroot/usr/share/pixmaps/

Grendel-Scan requires Java. I've already created a Java module. I document how I did that in the making the Java module page. [PAGE NOT MADE]

Everything is in place to create the modules, a quick final check:

find fakeroot
fakeroot/
fakeroot/opt
fakeroot/opt/owasp
fakeroot/opt/owasp/grendel-scan
fakeroot/opt/owasp/grendel-scan/bin.zip
l ...

Generate the .lzm module

This is the easy part.

 $ ./dir2lzm ./fakeroot grendel-scan-1.0.lzm

Add the modules to the ISO build directory

Also cake

 $ cp -i grendel-scan-1.0.lzm ../contents/slax/base/
$ chmod 775 ../contents/slax/base/grendel-scan-1.0.lzm

Test the new module

I like scp'ing the new modules into a running Live CD and using the Module Manager to Add modules to a running system. [PAGE NOT MADE] I typically have the Live CD running in a VM while I create modules so its already up and ready.

You can also gen a new ISO and run it in a VM of your choice.

 $ 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/grendel-scan
$ mv grendel-scan-1.0.lzm ./completed_modules/grendel-scan/
$ mv temp/Grendel-Scan-v1.0-linux.zip ./completed_modules/grendel-scan/
$ mv temp/grendel-scan-icon.png ./completed_modules/grendel-scan/
$ rm -rf ./temp/*

I usually delete anything under ./fakeroot also.

 $ rm -rf ./fakeroot/*