Generating DHCP packets

248 views
Skip to first unread message

Charlie Boy

unread,
Sep 24, 2020, 4:49:41 AM9/24/20
to ostinato

Dear forum,

I am a student studying aspects of network.

I need to craft several DHCP packets in studying the DORA (Discovery, Offer, Request, Acknowledge) process.

BUT I would need to have the ability to control several ‘options’ within the DHCP packet: notably option 3 and 6 – in order to set the IP address of the DNS server and router respectively.

With a box of routers, this would be carried out on a simple home type network.

I will happily purchase Ostinato if it allows me to set ‘options’ in DHCP or, if not, could I be signposted to software that would give me this control.

Warmest regards - Paul

Aaron Pepelis

unread,
Sep 24, 2020, 8:42:57 AM9/24/20
to Charlie Boy, ostinato
Still open, but it gives the ability at the end in a link if you want to make it yourself.

I made my own packet headers and used the hex field:
        p = stream_id.protocol.add()
        p.protocol_id.id = ost_pb.Protocol.kbootpFieldNumber
        p.protocol_id.id = ost_pb.Protocol.kHexDumpFieldNumber
        payloadData = BootpPacketHeader.get_header_bytes(self).replace(" ", "")
        payloadData = binascii.a2b_hex(payloadData)
        p.Extensions[hexDump].content = payloadData

aaron

--
Get Ostinato News and Updates on Twitter - Follow @ostinato (http://twitter.com/ostinato)
---
You received this message because you are subscribed to the Google Groups "ostinato" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ostinato+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ostinato/813c9617-bab7-484f-b6de-a78d48f2998cn%40googlegroups.com.


--
*******************************************************
// If you are waiting for something, bug me daily
// http://www.returntothepit.com
// http://www.pepelis.com
*******************************************************

Srivats P

unread,
Sep 24, 2020, 9:38:14 AM9/24/20
to Aaron Pepelis, Charlie Boy, ostinato
Yes, you can write a user script.

Easier and faster may be to just import a pcap with the required DHCP packets, edit and replay it.

The following websites carry sample DHCP pcaps -

Srivats (Author, Ostinato)



--
Srivats P (Author, Ostinato)
Reply all
Reply to author
Forward
0 new messages