Skip to content
Snippets Groups Projects
Commit 9beff010 authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

final removing of zfuzz dir

parent 2acc2aac
No related branches found
No related tags found
No related merge requests found
Pipeline #2466 canceled
Showing
with 13 additions and 144 deletions
......@@ -8,24 +8,24 @@ source set_env_vars
# Test with afl
echo "Setup afl - ZAFL_HOME=$ZAFL_HOME "
$ZAFL_HOME/zfuzz/util/setup-afl.sh
sudo $ZAFL_HOME/zfuzz/util/afl_setup_core_pattern.sh
$ZAFL_HOME/util/setup-afl.sh
sudo $ZAFL_HOME/util/afl_setup_core_pattern.sh
echo "Test various zafl configurations"
$ZAFL_HOME/zfuzz/test/strings/test_strings.sh
$ZAFL_HOME/zfuzz/test/bc/test_bc.sh
$ZAFL_HOME/zfuzz/test/od/test_od.sh
$ZAFL_HOME/test/strings/test_strings.sh
$ZAFL_HOME//test/bc/test_bc.sh
$ZAFL_HOME//test/od/test_od.sh
echo "Test graph optimizations"
$ZAFL_HOME//tools/zax/test/test_graph.sh
$ZAFL_HOME//tools/zax/test/test_context.sh
$ZAFL_HOME//tools/zax/test/test_context_recursion.sh
$ZAFL_HOME/tools/zax/test/test_graph.sh
$ZAFL_HOME/tools/zax/test/test_context.sh
$ZAFL_HOME/tools/zax/test/test_context_recursion.sh
echo "Test zafl with ZAFL_TRACE_MAP_FIXED_ADDRESS=0x10000"
export ZAFL_TRACE_MAP_FIXED_ADDRESS=0x10000
$ZAFL_HOME/zfuzz/test/bc.fixed_map/test_bc.sh
$ZAFL_HOME/zfuzz/test/sha256sum/test_sha256sum.sh
$ZAFL_HOME/test/bc.fixed_map/test_bc.sh
$ZAFL_HOME/test/sha256sum/test_sha256sum.sh
echo "Test zuntracer configurations"
$ZAFL_HOME/zfuzz/test/ls.zuntracer/test_ls.sh
$ZAFL_HOME/test/ls.zuntracer/test_ls.sh
......@@ -17,7 +17,7 @@ log_error()
sanity_check_bc()
{
$ZAFL_HOME/zfuzz/bin/zafl.sh $(which bc) bc.zafl
$ZAFL_HOME/bin/zafl.sh $(which bc) bc.zafl
if [ ! $? -eq 0 ]; then
log_error "something went wrong trying to transform a binary with zafl instrumentation"
fi
......
......@@ -7,7 +7,7 @@ main()
cd /zafl
source ./set_env_vars
cd /tmp
/zafl/zfuzz/bin/zafl.sh "$@"
/zafl/bin/zafl.sh "$@"
res=$?
if [[ $res != 0 ]]; then
......
ZAFL installation
============================
=== ZAFL
============================
1. Install the tarball locally on your machine
tar -xzvf zafl_install.tgz
2. Set the proper environment variables. To use any Zipr-based tools, you will
need these environment variables to be set.
cd zafl_install
. set_env_vars
3. You will need to have sudo priviledges (please don't run as root)
4. Make sure the postgres DB is running and that you have an account
cd $ZAFL_HOME/zipr_umbrella
./postgres_setup.sh
============================
=== Zafl binary fuzzing ===
============================
1. Again make sure the proper environment variables are set
cd zafl_install
. set_env_vars
2. Test Zafl instrumentation
pushd /tmp
zafl.sh `which bc` bc.zafl
ldd bc.zafl
# you should see lizafl.so as a dependence
ZAFL_DEBUG=1 ./bc.zafl
# you should see output of the form (this is normal)
Error getting shm environment variable - fake allocate AFL trace map
# at this point, you should be able to use bc normally
at the bc promt, enter: 2+3
the answer should be: 5
popd
3. Download and install your own version of American Fuzzy Lop (afl)
Be sure to set the environment variable AFL_PATH to point to your afl installation directory
After installing, type:
afl-fuzz
You should see the usage instructions for afl-fuzz
4. Test with bc.zafl created in step 2
pushd /tmp
mkdir input_seeds
echo "1" > input_seeds/seed.1
afl-fuzz -i input_seeds -o afl_output -- ./bc.zafl
# afl should now be fuzzing bc.zafl
popd
#/bin/bash
# use absolute paths
releasedir=$(dirname $(readlink -f $0))
zaflinstalldir=$releasedir/zafl_install
zestruntimeinstalldir=$releasedir/zafl_install/zest_runtime
pre_cleanup()
{
pushd $releasedir
rm *.tgz >/dev/null 2>&1
rm -fr $zaflinstalldir >/dev/null 2>&1
popd
}
post_cleanup()
{
pushd $releasedir
rm -fr $zaflinstalldir >/dev/null 2>&1
popd
}
main()
{
# create local copy of install dir
pre_cleanup
mkdir $zaflinstalldir
# regen install for zipr umbrella
cd $PEASOUP_UMBRELLA_DIR
echo "Reinstalling just the right parts."
./regen_install.sh ps zipr stars >/dev/null
echo "Adding zipr sub-component"
cp -r $ZAFL_HOME/install/zipr_umbrella $zaflinstalldir
$PEDI_HOME/pedi -c -m manifest.txt > /dev/null
echo "Adding installation README.txt"
cp $releasedir/README.txt $zaflinstalldir
echo "Adding zest/zafl runtime libraries"
mkdir -p $zestruntimeinstalldir/lib
cd $zestruntimeinstalldir/lib
cp $PEASOUP_UMBRELLA_DIR/zest_runtime/lib64/*.so .
cd $releasedir
echo "Adding zfuzz sub-component"
cp -r $ZAFL_HOME/install/zfuzz $zaflinstalldir
cp -r $ZAFL_HOME/install/set_env_vars $zaflinstalldir
echo "Creating installation archive"
tar czf zafl_install.tgz zafl_install
echo "Cleaning up"
post_cleanup
echo "Complete: release tarball ready"
}
main "$@"
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment