Fatal error: Uncaught Error: [8] Undefined variable: config in /home/my_username/target_simple.php on line 4 in phar:///php-fuzzer/src/Fuzzer.php:435
Stack trace:
#0 /home/my_username/target_simple.php(4): _HumbugBox923d3ce06112\PhpFuzzer\Fuzzer->_HumbugBox923d3ce06112\PhpFuzzer\{closure}(8, 'Undefined varia...', '/home/my_username/target_simple.php', 4, Array)
#1 phar:///php-fuzzer/src/Fuzzer.php(79): require('/home/my_username/target_simple.php')
#2 phar:///php-fuzzer/src/Fuzzer.php(80): _HumbugBox923d3ce06112\PhpFuzzer\Fuzzer::_HumbugBox923d3ce06112\PhpFuzzer\{closure}(Object(_HumbugBox923d3ce06112\PhpFuzzer\Fuzzer))
#3 phar:///php-fuzzer/src/Fuzzer.php(370): _HumbugBox923d3ce06112\PhpFuzzer\Fuzzer->loadTarget('/home/my_username/target_simple.php')
#4 phar:///php-fuzzer/bin/php-fuzzer(15): _HumbugBox923d3ce06112\PhpFuzzer\Fuzzer->handleCliArgs()
#5 /php-fuzzer(14): require('phar:///php-fuz...')
#6 {main}
thrown in phar:///php-fuzzer/src/Fuzzer.php on line 435
Fatal error: Uncaught TypeError: Argument 1 passed to _HumbugBox923d3ce06112\PhpFuzzer\CorpusEntry::__construct() must be of the type string, null given, called in phar:///php-fuzzer/src/Fuzzer.php on line 448 and defined in phar:///php-fuzzer/src/CorpusEntry.php:14
Stack trace:
#0 phar:///php-fuzzer/src/Fuzzer.php(448): _HumbugBox923d3ce06112\PhpFuzzer\CorpusEntry->__construct(NULL, Array, 'Fatal error: Un...')
#1 [internal function]: _HumbugBox923d3ce06112\PhpFuzzer\Fuzzer->_HumbugBox923d3ce06112\PhpFuzzer\{closure}()
#2 {main}
thrown in phar:///php-fuzzer/src/CorpusEntry.php on line 14
Help text
./php-fuzzer --help:
Operand target is required
Usage: ./php-fuzzer <command> [options] <target> [operands]
Options:
-h, --help Display this help
--dict <file> Use dictionary file
--max-runs <num> Limit maximum target executions
--timeout <seconds> Timeout for one target execution
--len-control-factor <num> A higher value will increase the maximum length more slowly
Commands:
fuzz Fuzz the target to find bugs
minimize-crash Reduce the size of a crashing input
run-single Run single input through target
report-coverage Generate a HTML coverage report
How can I use this PHP fuzzer on Linux OS?
The steps I used
php-fuzzer.phar
(v0.0.7
)php-fuzzer.phar
tophp-fuzzer
chmod +x php-fuzzer
(to set executable bit)./php-fuzzer --help
(help text is shown properly,php-fuzzer
confirmed working)target_simple.php
./php-fuzzer fuzz target_simple.php
target_simple.php
Error
./php-fuzzer fuzz target_simple.php
:Help text
./php-fuzzer --help
: