Closed iiiusky closed 2 years ago
Hi @iiiusky,
Thanks for sharing this idea, just wanted to dig more into this, how this is different from existing payload support? for example have a look at this template where you can define a variable and call in the request section -
Hi @ehsandeep ,
My initial idea was to allow users to customize the value of variables in the exploit mode, such as the yaml modified above. In yaml, the default value of {{cmd}}
is cat /etc/passwd
, if it is- -exp mode, it will ask what value to assign to cmd. For example, if I want to execute uname -a
, I only need to enter uname -a
in the query mode of --exp to get the execution of uname -a
`The result.
Similar to the following:
[INF] Loading templates...
[INF] [CVE-2017-12615] Apache Tomcat RCE (@pikpikcu) [critical]
[INF] Loading workflows...
[INF] Using 1 rules (1 templates, 0 workflows)
The plug-in supports custom utilization, please enter the value of variable cmd (Command executed): uname -a
[2021-06-17 17:52:19] [CVE-2017-12615] [http] [critical] http://172.16.155.7:8080/poc.jsp?cmd=uname+-a
………………(dump response or filter out the results)
Okay now I get it, so you are looking to add support for taking variable input via CLI at run time?
Okay now I get it, so you are looking to add support for taking variable input via CLI at run time?
Yes, so you can make more use in the poc.
In fact, in normal mode, use the built-in default value, and in exploit mode, use the value entered in the console
Got it, this should be already supported in - https://github.com/projectdiscovery/nuclei/pull/641 and will be available to use as soon as we finalize the implementation and merge it into the branch.
This method seems to require the user to manually specify a variable similar to this format, right? key=value, this is a way, but the more troublesome thing is that you have to manually open the yaml file every time to view its variables. I think interactive input is better under certain circumstances, but if it is in batch automation mode, it is really not Too friendly.
@iiiusky I mean say, the above PR will allow us to feed variable value with user input in CLI and does not require editing template file, it's WIP.
The source code of github.com/projectdiscovery/starlight is not open yet, right? I may not be able to express it clearly. What I want to express is that if you run a poc plug-in separately, you can interactively let users enter the values of different variables. In this case, the user does not need to open yaml to see what is available. Variables, in the interaction, will loop all the extracted variable lists, because they are of map[string]interface{} type
Is your feature request related to a problem? Please describe.
I want to add a new exploit mode
Describe the solution you'd like
The verified vulnerabilities can be extended to make them more widely used in more situations
Can you join exp mode:
The conceptual verification warehouse is here (
except CVE-2017-12615.yaml, I will list it separately
)https://github.com/iiiusky/nuclei/tree/exp-concept
I changed the following files:
The content of the changed file is as follows: https://github.com/iiiusky/nuclei/commit/a4f86d2efcebe2d7681384d595d27731e43dffd6
CVE-2017-12615.yaml file content