I'm attempting to test tcsh on OS X with American Fuzzy Lop as an exercise, but don't want to accidentally clobber any useful files on my system.Knowing essentially nothing about fuzz testing, I did the following:I installed the fuzzer through brew.$ brew install afl-fuzzas a side node, the tcsh configure script seems to ignore the --disable-shared flag.$ ./configure CC=afl-clang --disable-shared --prefix=$HOME/opt/fuzzy-local ; makeThen gave it a stupid example test script: samples/sample.cshecho '45'Then I ran afl-fuzz for a while in the most naive way possible.$ afl-fuzz -i samples -o afl_findings ./bin/tcsh -f @@I soon discovered that the randomly generated shell scripts had created some garbage files.$ ls?d%FF%FFd%A7    ?               5?              bin             share?45?            45              afl_findings    samplesWhat would be the correct way to limit the things that the randomly generated shell scripts can do and stop them from potentially deleting or modifying files I care about.I went on to try$ chown nobody:nogroup afl-findings$ sudo -u nobody afl-fuzz -i samples -o all_findings ./bin/tcsh -f @@but I'm not sure that does a good enough job of constraining what randomly generated shell scripts can do.
American Fuzzy Lop run test program as unprivileged user or in chroot
shell script;permissions;chroot