Welcome back.
One thing we haven't talked about so far is resetting our set up.
And this one is also very important.
Let's say you want to switch between these states, a man in the middle state and back to a normal non
man in the middle stage, maybe to verify if the certificate pinning approach is really the issue in
our connection over here.
This can be a little bit tricky.
Therefore, let's have look how we can perform this without having a much overload over here.
All righty.
Okay, let's switch back to the Ubuntu VM and then we have look into this.
So here we are now with the Ubuntu VM and now let's have a look how we can switch between these setups
between the man in the middle setup and the clean one so how we can toggle them on and off.
Therefore, let's start with establishing our man in the middle setup over here.
So if you open a terminal, we can see we haven't performed anything right now.
Therefore, let's plug it in.
All righty.
Let's see.
That we have now our interface.
Okay.
Now let's run the burp suite.
There we go.
Temporary project default settings.
Okay.
So now we are pretty familiar right now with all these steps and proxy options.
We edit this interface to 1040 201.
We enable invisible proxy.
And there we go.
And we also disable HTTP two.
So project option options http and here we disable it.
OC burp suite set up done.
Now let's take our IP table rule and this one over here, IP tables.
RT not we want to append a new pre routing rule regarding to the protocol TCP destination port 80.
We want to change the destination address to destination 1042 zero 188 and there's also for HTTPS connections
set up should be done right now.
Let's see, let's open our smartphone and also kick the burp over here.
All right, now, let's see if this one works.
So within the proxy, be history and let's open a new tab you tap no internet connection.
All right.
We can see no Wi-Fi connection.
And therefore, let's enable Wi-Fi.
Yes.
We select our Tp-link access point over here and now it's retrieving an IP.
Now we should be good to go.
We can already see the requests over here.
All right.
Many in the middle setup is working.
Nevertheless, let's verify if this is really our device.
So let's open a new Incognito tab and then example dot com.
Yes.
All right.
So man in the middle set established successfully.
Nice.
Now let's see how we can reset this.
And the temptation is, if we simply delete our IP table rules, then this whole setup should be gone,
right?
Absolutely.
Therefore, let's have look into this.
So mass or.
There we have it.
Okay.
So we can list the IP table rules with IP tables, dash ht, not we.
And here we have our IP table rules for the not table.
Okay, now if you want to delete them, we have two options.
One, if we go back into our command over here in this one, instead of append this a, we can also
use capital D for delete this rule.
So by having this, we can delete certain rules in there.
If you perform this, for example, for four, for three, and now if we list them back again, we can
see the IP type rule regarding to four for three has been gone.
In our case, we do not have complex set ups with multiple IP table rules, therefore we can also flush
them on.
But this can come super handy if you have ten ports and you want to.
Yeah.
Release certain parts in your connection over here, then you can delete single rules via this command.
All righty.
Now, if you want to get rid of all, then we can simply use IP tables, dash t nut and flash command.
This will now delete all IP table rules within the nut table.
And if you read something about IP tables, dash dash flash and this doesn't affect the nut table,
therefore we have to provide this over here for our IP to other routes.
All right, so let's delete this once again.
IP tables, dash t nut and then flash.
All right, now it should be gone.
There you go.
Okay, so the estimation is right now we are not forwarding our package into the burp suite anymore.
Therefore, this connection over here should now work as it has no man in the middle set up right now.
So the traffic should be generally forwarded to our NAT interface of our ubuntu VM over here and then
back into the internet.
Like there is no proxy in between this, but we can already see this icon over here, no internet connection.
So if you try to open the back page, https example dot com and then we can see it's not working anymore.
And if you take a look into the burp suite, we can also see them over here or even not see them over
here.
So the connection is now gone.
The reason for this is by flashing the IP tab routes, they are not being deactivated so they get removed.
But existing IP table rules might be still affecting our connection over here.
This is very tricky.
Therefore, if you want to go back to a clean setup, we can reset this network interface and then those
IP table routes which has been established before, are also removed.
The simplest way to do is simply pluck it off and on again the USB cable of your USB to Ethernet adapter.
Let's do this over here.
So if you plug it out and you put it in again now the whole connection is refreshing.
The purpose we can be still active over here because we're not forwarding any package anymore and now
we only have to wait until the smartphone connects back to this wi fi interface.
We can maybe observe this over here.
Let's see.
Settings.
It's connected back to the wi fi and it still claims no internet, but it hasn't just refreshed it.
So if you now go back into this tab over here and if you are now opening example dot com, we can see
the site is loading and also there's no internet connection should be disappear in just a moment.
So maybe let's do this for HTTPS Examiner.com.
All right.
So it's loading, maybe let's do Google because they might be cached right now.
There we go.
And we can also see on the left there's no interaction with the burp suite anymore.
So if we now want to establish our man in the middle connection once again, we only have to insert
our two IP table commands and this one over here.
So maybe let's do this.
All right.
I'm using the upper arrow keys to to simply select this and this one, and also the one for the port
18.
And now if you are opening a web page and let's try if example dot com is still being cached.
Yes.
And therefore, let's close this browser, reopening it.
And now let's open a new Incognito tab and opening https example dot com.
And there we go.
Here we have it.
All right, men in the middle set up established ones again.
If you want to get rid of this and simply use the IP tables, flash command IP tables, dash ht, not
flash.
Plug it off.
Wait a second.
Plug it in again.
And then we are going to go to have a clean set up once again.
All right.
So this is how we can reset our men in the middle set up over here.
You can also, of course, reset the the network interface via the if config command.
But I like to do the turn it off and on again approach over here.
Okay.
So that's all for this video right now.
And do not get disturbed by messages like this.
We are having right now an Internet connection and this is how we can reset our men in the middle set
up very easily.
We can now switch it off and on by simply performing these steps, flushing the IP table rules, plug
it off and on.
And if you want to have it once again, simply inserting these IP travel routes once again.
Alrighty, perfect.
I'm looking forward to see you in the next video.