Closed U53RW4R3 closed 6 months ago
Thank you for your time and the detailed report. Several of the issues you mention, will be fixed in version v4.0-stable.
Also the -r request.txt
requires absolute path which is the same problem with --output-dir
. Commix is thinking the files are included and stores in /usr/share/commix
.
Τake a look at the dev version using git clone
(that is under development / code refactoring). Some of the issues you mention (i.e. about slashes etc) have been resolved.
The path specification works and the issue has been resolved.
$ ./commix.py -m urls.txt --cookie="security=low; PHPSESSID=4enqpmsuibona05k9pqrrg5nqk" -d "ip=localhost&Submit=Submit" --random-agent -p ip --prefix=";" --technique=C
[06:54:18] [info] Parsing targets using the 'urls.txt' file.
[06:54:18] [info] Found a total of 1 target.
[1/1] URL - http://dvwa.local/dvwa/vulnerabilities/exec/#
Do you want to use URL #1 to perform tests? [Y/n] >
However the double slashes hasn't been resolved. But specifying the path wasn't an issue any longer.
$ ./commix.py -m urls.txt --cookie="security=low; PHPSESSID=4enqpmsuibona05k9pqrrg5nqk" -d "ip=localhost&Submit=Submit" --random-agent -p ip --prefix=";" --technique=C --output-dir=../vulns
[06:57:18] [info] Fetched data logged to text files under '/home/user/commix//home/user/vulns/dvwa.local/logs.txt'.
$ ls ~/vulns/dvwa.local
cli_history logs.txt session.db
Fyi the issue regarding help (?
) command (that terminates the console) is on my to-do list (I'll let ya know).
The "double slashes" issue has been resolved.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related issues.
What are the running context details?
$ sudo apt install -y commix
Client OS is Kali Linux
Target OS is Ubuntu 22.04
Program version
Parameter Injection
In the DNS hosts file for easy navigation in the URL.
Pretty sure you're still aware of the pseudo terminal when I list the files (
ls -l
) it gives meThe rest of the commands are fine.
When I issue help (
?
) command it terminates the console.Two additional front slashes and wrong path:
/usr/share/commix//home/user/.commix/output/dvwa.local/logs.txt
. However, the log file is there along with session and history.The work around is to execute a single command
--os-cmd
and there's no issue so far.I discovered when I use
--batch
and to skip using the console (--answers="pseudo-terminal=N"
) it started to inject commands in theSubmit
POST parameter which I'm suppose to pass the argument (-p Submit
) but that wasn't my intention I think it's the session file (~/.commix/output/dvwa.local/session.db
).Now here's the interesting part it doesn't recieve any output when I wanted to execute a single command with
--os-cmd="uname -a"
? It already worked once so I have no idea what's going on. Probably there is something wrong with the cookies I think. I don't believe this is a bug so you can ignore this part.No output.
The fix is to purge the previous session and re-run the exploit.
I've used the
--batch
and to skip the console (--answers="pseudo-terminal=N"
) but it does the same thing to inject theSubmit
parameter and I didn't specify the parameter with-p Submit
. It's suppose to terminate the program when the adversay is on the post exploitation phase.You can reproduce this with
sqlmap
to see that it's not required to pass the parameters after it was exploited. Which is whycommix
requires a bit of improvement.BULKFILE when scanning URLs
Last but not least the BULKFILE flag (
-m
) requires an absolute path in order to scan the URLs.If not it won't recognize the file existence.
--output-dir
flag is also affected by this bug as well which corresponds with/usr/share/commix//home/user/.commix/output/dvwa.local/logs.txt
the output path.