35 Resource - Network Pentesting - Post Connection Attacks
35 Resource - Network Pentesting - Post Connection Attacks
http://autoscan-network.com/download/
./AutoScan*.sh
Nmap
Namp is a network discovery tool that can be used to gather detailed
information about any client or network.
We shall have a look on some of its uses to discover connected
clients and gather information about them.
We are going to use Zenmap the GUI for Nmap.
1. Ping scan: Very quick only shows connected clients.
2.Quick scan plus: Quick shows MAC and open ports.
3.Quick scan plus: Slower then the 2 above, more detailed info.
These are just sample scans, you can experiment with the scan
options and see the difference between them.
Man In The Middle Attacks
ARP Poisoning
This is one of the most dangerous and effective attacks that
can be used, it is used to redirect packets to and from any
client to our device, and since we have the network key, we can
read/modify/drop these packets. This allows us to launch very
powerful attacks.
It is very effective and dangerous because it's very hard to
protect against it as it exploits the insecure way that ARP
works.
Man In The Middle Attacks
ARP Poisoning
ARP main security issues:
1. Each ARP request/response is trusted.
2. Clients can accept responses even if they did not send a
request.
Requ
ests
Resp
on ses
ARP Poisoning
Requests
Responses
ARP Poisoning
arpspoof
Arpspoof is a tool part of a suit called dsniff, which contains a number of network
penetration tools. Arpspoof can be used to launch a MITM attack and redirect
traffic to flow through our device.
1. Tell the target client that I am the router.
Ettercap -Tq -M arp:remote -i [interface] [AP MAC]/[AP IP]/[PORT] [TARGET MAC]/[TARGET IP]/[TARGET PORT]
Ex: ettercap -Tq -M arp:remote -i wlan0 /192.168.1.1/ /192.168.1.5/
Ex2: ettercap -Tq -M arp:remote -i wlan0 // #target all networks
2. Run sslstrip.
> sslstrip -p
3. ARP poison client and AP.
Ettercap -Tq -M arp:remote -i [interface] [AP MAC]/[AP IP]/[PORT] [TARGET MAC]/[TARGET IP]/[TARGET PORT]
Ex: ettercap -Tq -M arp:remote -i wlan0 /192.168.1.1/ /192.168.1.5/
Sniffing Cookies
Session Hijacking
What if the user uses the remember me feature ??
If the user uses this feature the authentication happens using
the cookies and not the user and password. So instead of
sniffing the password we can sniff the cookies and inject them
into our browser, this will allow us to login to the user's account
without using the password. You can download it from:
https://www.cookiecadger.com/?page_id=19
Then arp spoof you target and run it using :
2. Run ettercap to arp poison the target(s) and enable the dns_spoof plugin.
Ettercap -Tq -M arp:remote -P dns_spoof -i [interface] [AP MAC]/[AP IP]/[PORT] [TARGET MAC]/[TARGET IP]/[TARGET PORT]
Ex: ettercap -Tq -M arp:remote -P dns_spoof -i wlan0 /192.168.1.1/ /192.168.1.5/
MITM
Ettercap Plugins
Ettercap plugins allow us to carry out a number of different
MITM attacks or help filter the sniffed packets in a certain way.
We have already used an ettercap plugin in the dns spoofing
video.
There is a number of ettercap plugins , all of which can be used
in the same way, therefore we shall only have a look on another
example of using a plugin.
Usage:
Ettercap [options] -P [Plugin name] //
Ex: ettercap -Tq -M arp:remote -P dns_spoof -i wlan0 /192.168.1.1/ /192.168.1.5/
MITM Ettercap Filters
Controlling internet connection
Ettercap filters can be used to carry out extra tasks with ettercap.
We are going to use a simple filter to disable internet connection to any client in our
network without disconnecting it from the network.
Usage:
> wireshark
Protecting against MITM attacks
It is very difficult to protect against MITM attacks, this is due to the fact
that they exploit the insecure way that ARP works.
Using static ARP tables can protect against MITM attacks but its not
practical in large networks. Even in small networks you have to
configure ARP tables every time a new device connects to your
network.
We can discover ARP poisoning easily by only looking at our ARP
tables.
> arp -a
If the MAC address of the router changes then we have been
poisoned.
Protecting against MITM attacks