Hello everybody, and welcome to this tutorial.
Today I'm gonna go ahead and start configuring my computer,
my network settings, in order to be able to strip the SSL encryption
from various packets that I'm going to redirect to myself.
Anyway, one of the first things that we need to do is take a look at the list
of these commands here.
So it's echo 1 to this file here.
Let me just show you, I'm going to copy basid.
I am deliberately not giving you the text files from which you can copy paste.
I mean, I know that it's perhaps tiresome or
something like that but try typing the commands in.
It does help you a great deal to understand them better,
because you're gonna make mistakes and you're gonna correct them and
you will understand and remember the commands as well.
A very good way to remember them is just to type them in.
Also, you will be able to understand a bit more,
because you're gonna get error messages that are gonna tell you stuff about it.
Anyway, I have buried a file for myself here to save us a bit
of time today and to save myself from making mistakes when typing.
But, anyway. What we need to do is type this in.
It says echo 1 and then put it into this file here.
I can go ahead and press Enter.
It's already set to 1 but it doesn't matter.
I can also verify that it is 1 by catting the content.
So, it is 1.
If you wish to revert it back to dual state, just type in 0.
And if I type in cat again, it's going to be 0.
By default on your machines, it will be set to 0, so you do need to change this.
I have done this before, so it was already on 1.
But it doesn't matter.
It does no harm to type it in one more time.
Now there is this rather lengthy command in terms of IP tables
configuration that we need to configure our firewall for
port redirection because we need to redirect traffic
from a certain port to a certain port.
So from port 80 to the listening port of the SSL strip and
iptables as I mentioned before is a fantastic firewall.
Completely open source and it can be used to conduct extremely
complex operations and it can be used for the simplest of things.
The wonder of it is that it's free and that it's very good.
Anyway, type in ip.
There's also graphical interface, but
rarely people use it on very rare occasions.
I don't think that that is the general approach.
Usually people prefer to just type the commands in themselves.
Anyway, iptables, space -t nat.
So, nat is a table for Network Address Translation.
-A, that stands for append.
I could also type in here -I for insert or -D for delete, but we need append.
And chain prerouting.
PREROUTING.
Excellent.
We're going to specify a protocol.
So it's gonna be tcp --destination-port.
You can also use deport argument.
I don't know, I suppose for some strange reason, I've opted for destination port.
It's a lot easier to understand when looking at it.
It's practically written as though it was literally English language.
It is English language, but
how would you tell somebody to redirect to a certain point.
You tell them redirect to port and type in the port.
You use the same syntax you would use when telling somebody,
a real person, to redirect something.
You would use the same syntax to actually tell the machine as well.
So, they've made a great effort to make it as simple as possible.
Although at first glance it can seem a bit complex.
So, It's tcp the destination port is 80 so
-j and I want to redirect the traffic, so
just type in REDIRECT --to- port 8080.
Now port 8080 is going to be the port on which SSL strip will be listening on.
Go ahead and press Enter.
There is no output there is no information nothing.
The exit code is zero so nothing happens here and
if nothing happens that's great, it means it has worked.
Not necessarily but 99% of the cases it means that it has worked.
However I do like to run a verification, and I'm gonna go ahead and
type in iptables -t nat -L to get a listing.
And I want PREROUTING, I want to see what I've done there.
Excellent!
So, you see, it says redirect tcp from anywhere to anywhere.
Destination port of you see dport, dpt, it's a short version here.
So, this nation port is port JD, which is HTTP.
Redirect towards 8080.
Excellent.
I've already inserted, I have a bad feeling I've inserted
this root three times by now, cuz I've done some test runs in order to
not make any mistakes during your tutorial to save us all time.
But it seems to be effective.
It seems to be working so let's just go ahead and clear the screen.
Keep in mind that while you're doing this you're gonna encounter a lot of problems.
There's gonna be error messages.
Things are not gonna work.
You're gonna need to reinstall some things,
install additional libraries perhaps or something of a kind.
Don't sweat it, that is all standard procedure.
It happens to everybody quite literally.
You just need nerves of steel to go through it.
Now I've written for myself here find a target.
Now you can use, I know what target I'm going to use but
you can use nmap and before you use nmap just like an ifconfig.
Clear, ifconfig p8p1.
Excellent.
So I just wanted to get a listing for the interface that I'm using because you
need to be using the interface that you are using to connect to the Internet.
So this is the IP address that is assigned to me, usually the default gateway is
simply the lowest one, but you can check the default gateway by typing in route,
press Enter and there we go.
Gateway 192.168.1.1.
That will be the IP address of my router within a LAN now.
Looking at this, I'm guessing it's
assigning IP addresses from 2 to 254,
because it can't assign 255.
255 is the broadcast.
Anyway, so from 2 to 254 it's going to be assigning
IP addresses I can perform a nmap scan of the network so
nmap, and I'm going to go ahead and And
type in 192.168.1.1/24.
So please scan the entire subnet or I can just do this, 2-254,
to save myself a couple of IP addresses here, two IP addresses less.
And I want -vv after it.
This might take a while if you're doing it.
This will reveal all the hosts that are up on the network and that nmap can reveal.
I've also told it to scan on all ports as well.
However, you're gonna have to do this, basically,
if you're in a real life situation and it's gonna keep on scanning.
And it says, okay, host down.
I only have one host that is up here.
That is up and running, which is my Windows machine.
And I'm not gonna go and sift through all these up.
I'm just gonna go ahead over to my VirtualBox,
and open up my Windows 8 machine.
There you go.
So it says, scanned hosts, never mind.
Anyway you will need to perform this scan if you want to figure out who's alive.
But I've just shown you how to do it.
Just do nmap and if you don't find any hosts try passing
on some different arguments through nmap.
Try saying like -Pn or something of a kind, and
see if that yields any different results.
Also you can use -o for, oops, -o for OS detection and something of a kind.
Yeah, there we go.
So, I'm gonna open up my Windows machine.
Type in ipconfig into the CMD, oops.
Is it IP? Yep, it's ipconfig into the CMD, and
I'm gonna get a lot of information here.
Basically I'm only interested to see which IP address is actually assigned to this
machine.
It's 100.
Excellent.
So this machine, this Windows 8.1 virtual machine
is functioning on 192.168.1.100.
That is my victim that is a machine that I wish to vandalize,
that I want to actually strip of it's encryption and view it's traffic.
So just go ahead and minimize it for
the time being as we know what the IP address is there.
And if you're wondering why I have all these terminals open,
we will need two terminals to perform this attack and
a third one to view the results of the attack,
because we don't want to stop the attack while we are viewing the results.
Anyway, second part in the followup tutorial, I'm gonna go ahead and
go over arpspoofs, since we have completely prepared our machine.
We have found our victim.
Now we need to do the arspoof and we need to conduct an SSL strip,
and then we need to have a live report of the log as well,
in order to pull out some of the valuable information from it.
Anyway, I bid you all farewell and I hope to see you in the next tutorial.