Commix (short for [comm]and [i]njection e[x]ploiter) has a simple environment and it can be used, from web developers, penetration testers or even security researchers to test web applications with the view to find bugs, errors or vulnerabilities related to command injection attacks.

By using this tool, it is very easy to find and exploit a command injection vulnerability in a certain vulnerable parameter or string. Commix is written in Python programming language.

Requirements and Installation

Requires version 2.6.x and above to run this tool, it can be download from the Github.

[email protected]

Also, commix can be installed through Ubuntu’s APT (Advanced Packaging Tool)

[email protected]

Supported Platforms

Linux

Mac OS X

Windows (experimental)

Classic Injection with Commix

Step1: Download and mount the Pentester lab exercise Web for Pentester and then you can reach the labs from your kali machine browser Ex: http://192.168.169.130

Step2 : You can find command line Injection excerises.

Step3: Now in Kali type commix and copy the path for the example 1.

INJECT_HERE – It will try to inject various queries here.

[email protected]

It checks for various payloads and successful with Payload: ;echo WIBYAT$((24+78))$(echo WIBYAT)WIBYAT.

Then it asks to connect with terminal shell Do you want a Pseudo-Terminal shell? [Y/n/q] >by pressing “y” we can get the terminal access for the machine.

Blind Injection

Injecting Weevely PHP web shell

Step1: Create a payload with weevely, if weevely not installed you can use apt-get install weevely.

Step2: Launch weevely and generate a PHP web shell.

[email protected]

[email protected]

Step3: To upload the file in the remote host, use the following command.

–file-write = File to write in the destination host

–file-dest = Filepath to write or Upload

Also Read: