Monday, September 26, 2011

Setting up LibreOffice For Fuzz Testing

I will assume that your VM is properly set up with the CERT BFF :)

Now, you will need to install Java, which you can download from Oracle.
To do so
1. Copy to your virtual machine's shared folder
2. Create the target installation directory, e.g. /usr/java
3. Run the unpacking, e.g. sudo /.../jre-6u26-linux-i586.bin
4. Add to your path: sudo vim /etc/profile and add PATH=$PATH:/usr/java/jre1.6.0_26/bin
5. Source the new setting: source /etc/profile

Then you will need a reasonably recent copy of LibreOffice. For instance, the latest bundle of debs. After you got that
1. Copy to your virtual machine's shared folder
2. Unpack: tar xvfz  LibO_3.4.2_Linux_x86_install-deb_en-US.tar.gz
3. cd  LibO_3.4.2rc3_Linux_x86_install-deb_en-US
4. sudo dpkg -i *.deb
5. Add to your path sudo vim /etc/profile and add PATH=$PATH:PATH=$PATH:/opt/libreoffice3.4/program
6. Source the new setting: source /etc/profile

After you did all that, it is a good idea to power down and take a snapshot of your virtual machine.
Once this is done,
1. Unzip the scripts folder into the directory shared with the virtual machine
2. vim bff.cfg and replace as follows
program=soffice
killprocname=soffice.bin
preargs=
postargs=
seedfile=seed.doc
zzuftimeout=30
killproctimeout=60
gdbtimeout=30
valgrindtimeout=120

You should be good to go. Try starting you VM and the fuzz testing should happen automatically


No comments:

Post a Comment