🔨Fuzzing
doing some multi-threading
lotus is focusing to make the fuzzing or multi-threading process easy and simple by providing two class to help in common fuzzing cases
the first one is for parameter scanning that doesn't means this the can be used for Param Scanner this but the idea is this class has been created for that reason
ParamScan
this class takes one string with List, for the target parameter to scan and the payloads list, after that the ParamScan class will send the target parameter with every item in the payloads list to the target function
target function is just lua function you create to so simple thing like sending http requests and return the response
after sending it to the target function it will take the output of this function and then send it to the callback function
Callback function is list the target function but for parsing
in you callback function parse the target function output and see if this able is valid to save it in the report or not
FUZZ_WORKERS is lua varaible the value of --fuzz-workers option
Basically, we are doing a for loop on all url parameters in the code above and then creating a scanning thread with the target parameter, the SSTI_PAYLOAD List, scan_ssti as the target function and ssti_callback as the callback function, and FUZZ_WORKERS is a lua variable that gets its value from the --fuzz-workers parameter (you can replace it with real number of you want)
As part of the ssti_scan function, we change the parameter value to the SSTI payload, and then send an HTTP request to it, and return a list with the following components: body, url, payload, parameter name.
ParamScan will then take the output of this function and pass it to the function callback (ssti_callback).
in the call callback function first lines it checks if the function parameter value is nil (Null) or not because doing any match
You may set this option to prevent ParamScan from sending Nil to the call_back functions
If you are scanning parameters, you do not need to call any of these functions since the default option is not to pass any null values to them
From anywhere in your script, you may call the ParamScan:stop_scan()
function to stop the scanner and clear all futures
You can disable this option by using the ParamScan:start_scan()
function
and if you want to check first if ParamScan is stopped or not you can use ParamScan:is_stop()
LuaThreader
this a simple class to do multi-threading, it only takes iterator and function to run
The LuaThreader class will open two threads in this example, one for the hello word and one for the world word
It is really as simple as that
Last updated