Attacking Cisco R&S With Kali (Backtrac)
Attacking Cisco R&S With Kali (Backtrac)
hping3 is a network tool able to send custom TCP/IP packets and to display target replies like ping
program does with ICMP replies. hping3 handle fragmentation, arbitrary packets body and size and can
be used in order to transfer files encapsulated under supported protocols. Using hping3 you are able to
perform DoS attacks
http://linux.die.net/man/8/hping3
---------------
Yersinia is a network tool designed to take advantage of some weakeness in different network
protocols. It pretends to be a solid framework for analyzing and testing the deployed networks and
systems.
Attacks can Yersinia preform :
http://www.yersinia.net/attacks.htm
-------------------
Kali Linux is an advanced Penetration Testing and Security Auditing Linux distribution.
Kali is a complete re-build of BackTrack Linux, adhering completely to Debian development standards.
with more than 300 penetration testing tools
https://www.kali.org/
--------------------
Ike-scan is a command-line tool that uses the IKE protocol to discover, fingerprint and test IPSec VPN
servers. It is available for Linux, Unix, MacOS and Windows under the GPL license.
------------------
THC IPv6 tools
http://manpages.ubuntu.com/manpages/trusty/man8/thc-ipv6.8.html
https://www.thc.org/thc-ipv6/
1
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Kali side we will run Yersinia , -G will run this application in GUI instead of CLI :
Yersinia –G ,
Go to DHCP tab
2
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
After one few seconds choose List Attacks then choose cancel all attacks
From R2 side:
Countermeasure:
Use dhcp snooping in the switch and make interface connected to R1 with rate limit for receiving dhcp
discover messages , also we can make sure Kali will not perform dhcp spoofing attack by making same
interface to be the only trusted one to send dhcp offer messages
also we can prevent this attack by using port security command in the switch with max 1 mac address
allowed.
3
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Kali side:
Yersinia –G
STP tab
Choose Calming Root Role
Countermeasure to a root takeover attack is simple and straightforward. Two features help thwart a
root takeover attack:
Root guard
BPDU-guard
4
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
VTP Attack
Countermeasure
Just use vtp MD5 password , still attackers can crack MD5 hash passwords using tools such as Cain &
Abel but this will take long time from them.
5
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Kali side:
Yersinia –G
CDP tab
6
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
7
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Before attack
After attack
Countermeasure
Just disable cdp globally using no cdp run from configuration mode
Or just disable it on interfaces facing the edge or external networks using per interface command no cdp
enable
8
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Before attack R1 is active with priority 110 , R2 is standby with default priority 100
Kali side:
Yersinia –G
HSRP tab
9
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
10
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Now our kali machine we will try to notify R1&R2 that its HSRP router with higher possible priority 255
After few minutes lets check R1 & R2 and we will find both dealing with kali as the HSRP active router
now
Countermeasure
Just use max higher priority which is 255 in R1 will not fix the issue since If priorities are equal, the
primary IP addresses are compared, and the higher IP address has priority.
The best thing to do here will be using HSRP authentication password and with MD5 if possible ( will
depend in IOS version)
11
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Ike scan can do some Man In The Middle Attack for reconnaissance purposes , it will easily find out in
below topology what IPsec VPN site-to-site Policy are being used with all IKE SA information whatever its
IKEv1 or IKEv2.
In above topology I will assume you configured R1&R2 with IPsec VPN site-to-site and any necessary
static routes
We can see from following command IKEv2 is not used
From following command we can know all SA isakmp & ipsec policy SA’s
12
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Kali will perform SYN DoS Attack Against R1 using Hping3 CLI tool.
In Kali side we open terminal as root and assign ip address with default gateway (we should did that
before on all above labs ) then issue the attack using hping command:
Countermeasure:
R2:
In R2 we create ACL to detect attack and applied in serial interface facing R1
We will know destination address and ports
ip access-list extended cisco
permit tcp any any syn log-input
permit ip any any log-input
int f0/0
ip access-group cisco in
13
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
14
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
To protect infrastructure devices and minimize the risk, impact, and effectiveness of direct
infrastructure attacks, administrators are advised to deploy infrastructure access control lists (iACLs) to
perform policy enforcement of traffic sent to infrastructure equipment. Administrators can construct an
iACL by explicitly permitting only authorized traffic sent to infrastructure devices in accordance with
existing security policies and configurations. For the maximum protection of infrastructure devices,
deployed iACLs should be applied in the ingress direction on all interfaces to which an IP address has
been configured.
in iACL we create Anti spoofing entries where internal address cannot be sourced from external
connection.
We will also Deny special-use address sources RFC 3330 such as:
0.0.0.0
255.255.255.255
127.0.0.0
broadcast address
15
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Kali coming with many tools including a great tool called THC IPv6 Attack Toolkit
16
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Kali will get network prefix from one of the routers and will use eui-64 by default as his host prefix
17
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
18
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Now lets try another tool in THC , will flood the all routers with RA messages
19
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Also we can know what ipv6 machines are on and what ipv6 address assigned to it by :
Also we can performs various implementation checks on ipv6 using implementation6 command
To know more about the network and what protocols and techs are being used
20
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
21
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
22
Attacking Cisco R&S with Kali (Backtrack) By CCSI/CCIE: Yasser Auda
Also I can make my kali as fack router and start respond to RS with spoofed RA and assigned fake ipv6
address to machines by sending fake network prefix
Using command :
fake_router6 eth1 2001:BAD:BAD:BAD::1/64
We can even perform DoS attack against R1 for instance , using command:
denial6 eth1 2001:DAD:DAD:DAD::1 1
Countermeasure
For more about IPv6 FHS , what is NS/NA/RS/RA and how to countermeasure, kindly read my 23 pages
guide about it :
https://learningnetwork.cisco.com/docs/DOC-24288
Good Luck
Yasser Auda
CCIE R&S # 45694
CCSI # 34215
https://learningnetwork.cisco.com/people/yasser.r.a?view=documents
https://www.facebook.com/YasserRamzyAuda
https://www.youtube.com/user/yasserramzyauda
23