# Integrating WiFi Analyzer within Bro

**URL:** <https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061>\
**Category:** Zeek\
**Created:** [March 21, 2016, 1:50am UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061 "2016-03-21T01:50:41Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pratik\_Inamdar1](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Pratik\_Inamdar1](https://community.zeek.org/u/Pratik_Inamdar1)\
**Post date:** [March 21, 2016, 1:50am UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/1 "2016-03-21T01:50:41Z")

</div>

Hi,

In my project, I am integrating a WiFi protocol analyzer with bro to parse and monitor WiFi packets header information.

I am using BinPac to generate template for the WiFi protocol analyzer in the src/analyzer/protocol directory.

As per my knowledge WiFi(802.11) is not a TCP type of protocol. So I wish to know what should I use instead of the option “–tcp” while using the command:

python start.py WiFi “WiFi Protocol” …/bro --tcp

Any help will be really appreciated!

---

<div class="post-metadata">

**Author:** ![Vlad\_Grigorescu3](https://avatars.discourse-cdn.com/v4/letter/v/dec6dc/32.png) [@Vlad\_Grigorescu3](https://community.zeek.org/u/Vlad_Grigorescu3)\
**Post date:** [March 21, 2016, 3:28pm UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/2 "2016-03-21T15:28:18Z")

</div>

Unfortunately, there is no way to implement lower level protocols with  
BinPAC quickstart right now. Similary, we don't have any examples of a  
BinPAC lower-level analyzer if you were to do it manually.

If you are able to get it working, I'd certainly be interested in how  
you did it, and would look at adding it to binpac\_quickstart.

&nbsp;&nbsp;--Vlad

pratik inamdar \<[pratikinamdar@gmail.com](mailto:pratikinamdar@gmail.com)\> writes:

---

<div class="post-metadata">

**Author:** ![Pratik\_Inamdar1](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Pratik\_Inamdar1](https://community.zeek.org/u/Pratik_Inamdar1)\
**Post date:** [March 21, 2016, 3:43pm UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/3 "2016-03-21T15:43:53Z")

</div>

Hi,

Thank you for your reply!

Is BinPac parser the only way to generate an analyzer for a protocol? What is other way I can do it?

Because as far as I know, BinPac also generated 3 files automatically in base/scripts folder which cannot be done manually. Please let me know another way I could do it without using BinPac.

Please shed some light on this.

Thanks,  
Pratik inamdar

---

<div class="post-metadata">

**Author:** ![Pratik\_Inamdar1](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Pratik\_Inamdar1](https://community.zeek.org/u/Pratik_Inamdar1)\
**Post date:** [March 25, 2016, 4:40pm UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/4 "2016-03-25T16:40:23Z")

</div>

Hi Vlad,

Hope you are doing good!

I chose to switch the protocol. So now I am writing an analyzer for 6LoWPAN instead of WiFi.

Quick question:

Will I be able to successfully use BinPac to write an analyzer for 6LoWPAN?

Also, if possible, please guide me with some key points to remember while writing analyzer for 6LoWPAN.

Your help will be greatly appreciated!

Thanks,  
Pratik Inamdar  
 ![](http://t.sidekickopen04.com/e1t/o/5/f18dQhb0S7ks8dDMPbW2n0x6l2B9gXrN7sKj6v5dbn6N2zhqc-dDZc0W2zGDKq3LvrVvW1LdCKw1k1H6H0?si=5092804061822976&pi=b2c0bd48-004c-4905-da6e-1b2404891f5d)

---

<div class="post-metadata">

**Author:** ![johanna](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@johanna](https://community.zeek.org/u/johanna)\
**Post date:** [March 25, 2016, 4:48pm UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/5 "2016-03-25T16:48:45Z")

</div>

Hello Pratik,

I think the answer stays the same - if I understand things correctly, you have to implement IEEE 802.15.4, which is a lower level protocol, which currently cannot be implemented with just BinPAC and needs core changes (probably in src/iosource/Packet.cc and others). There are currently no examples for that, besides the existing code.

Johanna

---

<div class="post-metadata">

**Author:** ![Pratik\_Inamdar1](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Pratik\_Inamdar1](https://community.zeek.org/u/Pratik_Inamdar1)\
**Post date:** [March 25, 2016, 4:55pm UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/6 "2016-03-25T16:55:25Z")

</div>

Hi,

Thanks you for the prompt response!

My task is to write an analyzer in bro using BinPac for an IoT protocol. I have already written analyzers for application layer protocols namely MQTT and AMQP.

Now I wish to write an analyzer for an IoT protocol which does not fall in the application layer.

The IoT protocol should be able to use Bro BinPac language. Could you please suggest me one?

Thanks,  
Pratik Inamdar

---

<div class="post-metadata">

**Author:** ![johanna](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@johanna](https://community.zeek.org/u/johanna)\
**Post date:** [March 25, 2016, 5:06pm UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/7 "2016-03-25T17:06:06Z")

</div>

Hi,

the answer is the same for all protocols that are underneath tcp/udp. You will have to change the core for any of them. If you have an IoT protocol that works over UDP/TCP, you should be able to use BinPac alone.

Johanna

---

<div class="post-metadata">

**Author:** ![Pratik\_Inamdar1](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Pratik\_Inamdar1](https://community.zeek.org/u/Pratik_Inamdar1)\
**Post date:** [March 25, 2016, 5:10pm UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/8 "2016-03-25T17:10:13Z")

</div>

So just to verify if I understood it correctly.

You mean to say that all the protocols on or above the Transport Layer ONLY should be able to use Bro BinPac?

Thanks,  
Pratik Inamdar

---

<div class="post-metadata">

**Author:** ![Pratik\_Inamdar1](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Pratik\_Inamdar1](https://community.zeek.org/u/Pratik_Inamdar1)\
**Post date:** [March 25, 2016, 5:32pm UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/9 "2016-03-25T17:32:02Z")

</div>

If what I said in my previous email is correct then why was I able to integrate RIP(Routing Information protocol) analyzer with bro? RIP is a network layer protocol which lied below Transport Layer.

Similarly, 6LoWPAN is another name for IPV6 and is used for Low powered devices. If I was able to integrate RIP, do you think I will be integrate 6LoWPAN?

Thanks,  
Pratik Inamdar

---

<div class="post-metadata">

**Author:** ![johanna](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@johanna](https://community.zeek.org/u/johanna)\
**Post date:** [March 25, 2016, 5:37pm UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/10 "2016-03-25T17:37:10Z")

</div>

It is as I said - there is a straightforward way to implement everything above TCP/UDP with BinPac. RIP is not below the transport layer - it uses UDP as its transport protocol.

Johanna

---

<div class="post-metadata">

**Author:** ![Pratik\_Inamdar1](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Pratik\_Inamdar1](https://community.zeek.org/u/Pratik_Inamdar1)\
**Post date:** [March 25, 2016, 6:15pm UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/11 "2016-03-25T18:15:43Z")

</div>

I see! So you mean to say that no matter which layer does the protocol itself lies. If that protocol uses a port number (TCP/UDP) for transportation of its packets then ONLY I can use BinPac to write an analyzer for it.

Thanks,  
Pratik Inamdar

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:43pm UTC](https://community.zeek.org/t/integrating-wifi-analyzer-within-bro/4061/12 "2022-05-06T15:43:30Z")

</div>


