Reader small image

You're reading from  Practical Web Penetration Testing

Product typeBook
Published inJun 2018
PublisherPackt
ISBN-139781788624039
Edition1st Edition
Right arrow
Author (1)
Gus Khawaja
Gus Khawaja
author image
Gus Khawaja

Gus Khawaja holds a bachelor's degree in computer science. He specializes in IT security and ethical hacking. He is an author and shares his passion with millions of viewers around the world using his online courses. He also works as a cybersecurity consultant in Montreal, Canada. After many years of experience in programming, he turned his attention to cybersecurity and the importance that security brings to this minefield. His passion for the ethical hacking mixed with his background in programming and IT makes him a wise swiss-knife professional in the computer science domain.
Read more about Gus Khawaja

Right arrow

Command Injection

Command Injection is very simple, you just exploit it by executing commands on a web page because it allows you to do so. In other words, if you ever see a page that offers the functionality of executing a command in the backend, then it's probably vulnerable to this attack. Command Injection is very popular in Capture the Flag (CTF) because it allows you to completely own a remote machine (the machine that hosts the web application).

As usual, let's see a practical example using Mutillidae. Open the left menu OWASP 2017 | Injection | Command Injection | DNS Lookup:

This page executes the DNS Lookup command in the backend. In this example, I entered the IP address 10.0.0.1 and clicked on the Lookup DNS button.

Do you think we can override the normal behavior of this page and execute any command of our liking? (Or maybe execute a backdoor such as netcat...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Practical Web Penetration Testing
Published in: Jun 2018Publisher: PacktISBN-13: 9781788624039

Author (1)

author image
Gus Khawaja

Gus Khawaja holds a bachelor's degree in computer science. He specializes in IT security and ethical hacking. He is an author and shares his passion with millions of viewers around the world using his online courses. He also works as a cybersecurity consultant in Montreal, Canada. After many years of experience in programming, he turned his attention to cybersecurity and the importance that security brings to this minefield. His passion for the ethical hacking mixed with his background in programming and IT makes him a wise swiss-knife professional in the computer science domain.
Read more about Gus Khawaja