Commix - OS Command Injection and Exploitation Tool
Last Updated :
21 Nov, 2022
In terms of security, we also refer to command injection as shell injection and operating system injection. Command injection lies in the OWASP top 10 every year. Command injection is a hacking technique in which hackers execute commands in the host operating system through vulnerable web applications after scanning. This attack can be possible if a web application is sending user data to its system shell through some connectivity. This user data can be of any type which can be HTTP headers or cookies or forms etc. The history of command injection is very interesting because command injection was accidentally discovered by a programmer in Norway in mid-1997. The command injection vulnerability gave rise to another new type of command injection which is SQL command injection.
Introduction to Commix
Commix is a free and open-source tool available on GitHub. This tool is a powerful tool used for exploiting command injection vulnerabilities in websites and web applications. Command injection is a vulnerability that usually occurred in web applications. In terms of cyber security, command injection is also called shell injection. Commix is written in python language. You must have python installed on your kali Linux operating system. The interactive console is very similar to metasploitable 1 and metasploitable which makes it easy to use. This tool works as a tester of a command injection vulnerability in websites and web applications.
Working of Commix
Commix tool comes with different modules installed within it which lets its user find out vulnerability in the target application. Commix attack on target URL using data strings or HTTP header or cookies also on authentication parameters. In commix, users can find different enumeration options. By using commix user can perform two types of command injection. The first is the result-based command injection technique and the second is the blind command injection technique.
Result Based Command Injection: RBCI or Result Based Command Injection technique is a type of command injection technique in which all commands that the attacker fires in a web application will reflect back to the attacker.
Blind Command Injection Technique: BCIT is a command injection technique where the attacker has not received any reflection back from the browser.

Installation of the commix tool
Step 1: Open your kali Linux operating system and use the following command to install the tool.
cd Desktop
git clone https://github.com/commixproject/commix.git commix

Step 2: The tool has been installed successfully. Now use the following command to move into the directory of the tool.
cd commix
ls

Step 3: Now you are in the directory of the tool. Use the following command to run the tool.
python3 commix.py

The tool is running successfully. Now we will see examples to use the tool.
Usage
Example 1: Use the commix tool to find out if the domain has command injection vulnerability or not.
--url = URL Here, the ‘URL’ is the target web address.

Example 2: Use the commix tool to find out if the domain has command injection vulnerability or not using batch flag.
python3 commix.py -u <url> --batch


Example 3: Use the commix tool to find out if the domain has command injection vulnerability or not using --all flag.
python3 commix.py -u <url> --all


Similar Reads
Tplmap - Tool For Automatic Server Side Template Injection Exploitation Server-side template injection is a security flaw in which the hacker injects malicious input into a template to run commands on the server-side. We can use various automated tools to perform this vulnerability exploitation. Tplmap is an automated cyber security tool that can perform checking and ex
2 min read
Command Injection Vulnerability and Mitigation Command injection is basically injection of operating system commands to be executed through a web-app. The purpose of the command injection attack is to inject and execute commands specified by the attacker in the vulnerable application. In situation like this, the application, which executes unwan
3 min read
Kali Linux - Exploitation Tools After Scanning, information Gathering, and finding a vulnerability comes the main concept of hacking which is Exploitation of the vulnerability. Vulnerability is not that effective if it can not be exploited or it could not cause harm to the application, So in order to get the impact of the vulnerab
3 min read
Basic Shell Commands in Linux: Complete List Anyone using Linux should become an expert in the essential shell commands, as they form the backbone of working with the Linux terminal. These commands enable you to navigate the system, manage files, handle processes, and configure settings effectively.The Linux shell serves as an interface for us
5 min read
compgen command in Linux with Examples The compgen command is a Bash built-in utility used to list all available commands that can be executed in a Linux system. It is a powerful tool for searching for commands based on specific keywords, counting the total number of commands, and printing Bash details such as built-in functions, keyword
3 min read
Tiger â The Unix Security Audit and Intrusion Detection Tool Tiger is a tool that comes with multiple uses, we can use it for security audits as well as for Intrusion Detection also. It is available for free under a GPL license. this tool supports multiple Unix platforms and is written entirely in Shell language. it is a package consisting of Bourne Shell scr
4 min read
WhatCMS - CMS Detection and Exploit Kit Whatcms tool is an automated tool that is capable of detecting the CMS information about the target domain. This tool also gas the exploit kit with multiple sub-tools integrated into it. In the current scenario, the Whatcms tool can detect 33- different CMS applications and services. All the results
2 min read
doexec command in Linux with examples doexec command in the Linux system is used to run an executable with an arbitrary argv[0]. It allows the user to argv[0] other than the name of the executable, which is by default passed. Syntax: doexec /path/to/executable argv[0] [argv[1-n]] Options: The argv list is used to send all options to the
1 min read
Yuki Chan - Automated Penetration Testing and Auditing Tool in Kali Linux Yuki Chan is a free and open-source tool available on GitHub. Yuki Chan is an Automated Penetration Testing tool. This tool is very useful for security researchers. Yuki Chan is used for information gathering and testing of the security of websites and web servers. Yuki Chan is the easiest and one o
4 min read
How to Use Linux Commands in Windows with Cygwin Cygwin is a collection of tools that provide a Linux Operating System's terminal look, feel, and some of its basic functionality for users of Windows OS who want to have a go over the basic commands of Linux without worrying about installing a Linux OS. To use this tool, first of all, we need to dow
3 min read