Command injection is one of my favorite things to be covering.
There's a lot of good, bad, and ugly things that we can take out of command
injection.
When we talk about command injection, the base principle of it is that we can
insert
one command into another. Now, there are plenty of examples that we'll be
covering throughout this
skill and inside of our lab for us to be able to see that this is a common
practice that's
in something kind of we've been doing already, especially when we were in pen
103 covering the
Cali as a whole. And where we took one command where we started off with, added
another command
on the back end of it to be able to simplify the structure of how we operate on
a system and
be an administrator or run different series of operations for ease.
Basically, we're going through and making life a little bit easier for us. And
when you script,
let's say you're running a Python script to be able to test the network out for
,
we did an example in pen 100 and earlier in this course, where we went through
in brand I F config
along with promiscuous mode. And then we went through and tested out the
network for simplistic
reply for ICMP, keep alive packets to tell us how many systems were alive on
the network.
Well, those included multiple commands. And that's definitely the good side of
being able to do
command injection. Where the bad side comes in at is that somebody can craft a
packet or craft a
program to not only run, but run and have another command run in the background
. Now,
why is that bad? Well, what if somebody sends you a file or program to install
on your system and
it's running netcat in the background? Well, there's potential that an attacker
can run netcat for a
reverse command prompt or shell on their system remotely. And that's something
we'll be covering
as well. But that command is hidden as an injection inside the original cover
of purpose for what
the original program was supposed to be. Now, the ugly side of it is that as we
mentioned already,
that it takes a little bit of digging to be able to find this kind of stuff.
Now, we're not going to
dive so deep into the code that we're looking at assembly code, but we are
going to take a look
at some of the process IDs and some event logs throughout, doing a little bit
of investigation
work to see if we can find where commands have been injected and ran, unbeknown
st to the actual
user in front of us on the screen. All this comes into play as we continue
through our course here
in pin 200 to be able to find new ways to improvise and try to penetrate
systems for testing. And
again, we'll be using our Windows 10 lab environment as our guinea pig and be
able to use Kali to be
able to try and craft some of the stuff as well. So let's do it to it.