Now that we have all of our configurations out of the way and everything's connected back and forth, we've done our edits to ProxyChains.com.
We are here in the Kali system taking a look at our terminal command line.
And I'm going to have this command below because we're going to run an nmap, but not a normal one.
We're going to run nmap fortunate through ProxyChains and through the connection that we have to our pivot point inside the network, which in this case is BWAP.
So ProxyChains is basically a sub-commandlet that allows you to run network commands through the proxy that you have established.
So it's a command laundry command would be the best way to put it.
Now normally if you run nmap, it's just going to have the nmap scan perform from our actual system.
For instance, if I go over to Wireshark real quick and start this up and go into the terminal, let me control C that and just say nmap-a16801.
You can see that it's going from 053 to 01.
And if I come over to my target system, which is BWAP, you can see that there's absolutely nothing going on.
Now I'm going to leave this one running on the target system.
I'm going to leave that one running and I'm going to go over, cancel that nmap scan, and this time say ProxyChains nmap.
And as I move this machine over, you can see stuff starting to happen on the backside quite rapidly.
So what's happening here?
Well, I'm glad you asked because what's really happening is the full use of a proxy.
All the network traffic going from this Kali system that you see on the right side of the screen, one right above me,
is going over to our BWAP system, the one over yonder, and is then going to the actual target itself.
Again, this is all about the pivot that we talked about in the previous skill.
So if you're sitting on the system that we're scanning, which in this case is 0.1, the host VM,
and you were to run Wireshark on here, let's crank it up and see what it would look like and where that traffic is actually coming from.
Now this may take a second because I have a bunch of network traffic going, so you may see a bit of a time jump here.
And as you can see right here inside of our Wireshark, we have a lot of traffic going to and from 13 to 1 and 1 to 13.
But in actuality, it's happening from the Kali box, which is that 0.53 system.
So our traffic is going from Kali to BWAP to the 0.1, which is our host VM,
and then back from that, taking the reverse path back to us.
And you can see in the Kali system, I'll highlight for us because there's a lot going on here,
right there, all the commands are going through proxy chain.
So this is in fact acting as a true proxy of our BWAP system and pivoting.
Now again, we're only running layer 5 and above. Sorry, I had a little bit of a stutter there.
So if we were to run ICMP or just a ping from the Kali system using proxy chains, which I'm going to try to do right now,
you will see the traffic as I go over to my host VM system, scroll down to real time on the Wireshark,
ping 192.168.0.1, if I can type correctly today.
And you can see right there, slow down there, right there, 53 to 1, 1 to 53 for ICMP traffic.
Even though we went through over here, as you can see,
the proxy chain command link to force all the traffic to go through proxy,
the ICMP is not a layer 5 or above protocol in the OSI model.
So that's why it's all happening down below.
And it's not being passed through that SOCKS proxy that we have set up on the actual BWAP system.
So Chisel is a very effective tool.
It's just something you have to be really mindful of in terms of what you're actually going to use it for.
Are you going to use it for NMAP and other high level OSI model protocols for you to be able to go through
and execute commands or do more reconnaissance?
Excellent.
Are you going to go through and try to ping your way through the actual network
and do low level OSI commands and reconnaissance?
Not so excellent.
So you might want to use some other commands or do a little bit of more pivoting on your targeted system
or actually use something like the reverse TCP main operator inside of your target system
if you can have that set up and then run the commands from there itself.
Now, along with Chisel,
you may have noticed that we run this inside the actual command prompt and terminal window.
Much like all commands, you would want to run these in the background.
And to do so with this, well, not really on the Kali system,
but on the Windows system, you would just run it as a service.
And we have skills for that or plug it to a DLL.
We have skills for that, too, in this very course.
Many different ways to skin this mango.
And it's up to you to figure out how you want to do that and build your preferences.
Just know the limitations and benefits of using each individual tool set.