How to build the BGP UPDATE packet


bgp-update-create is a small program used to generate the payload of a BGP UPDATE message. It was written to test if routes could be injected in a BGP conversation between two routers.

It’s usage is very simple; it takes three parameters:

–as: Autonomous System number

–nexthop: Host name or IP address of next hop

–destnet: Network number/prefix to advertise

To use it with tcphijack you just pipe its output to tcphijack, like in:

sudo bgp-update-create –as 2 –nexthop 1.1.1.1 –destnet 2.2.2.2 | tcphijack […]

or just send its output to a file and then use tcphijack’s -P switch to specify a payload:

bgp-update-create –as 2 –nexthop 1.1.1.1 –destnet 2.2.2.2 > payload.dat


sudo tcphijack […] -P payload.dat


bgp-update-create
is built at the same time as tcphijack (by typing “make”), the header files used by bgp-update-create.c come from the Zebra project.



BGP Update Create download
 

Комментарии

Leave a Reply

Your email address will not be published. Required fields are marked *