{"id":310,"date":"2021-05-25T11:46:14","date_gmt":"2021-05-25T08:46:14","guid":{"rendered":"https:\/\/zerontek.com\/zt\/?p=310"},"modified":"2022-06-30T17:27:28","modified_gmt":"2022-06-30T14:27:28","slug":"wireshark-bacnet-security-analysis","status":"publish","type":"post","link":"https:\/\/zerontek.com\/zt\/2021\/05\/25\/wireshark-bacnet-security-analysis\/","title":{"rendered":"Wireshark: BACnet security analysis"},"content":{"rendered":"\n<p>BACnet (Building Automation and Control Networking Protocol) is an ICS protocol, developed by ASHRAE (American Society of Heating,Refrigerating and Air Conditioning Engineers). Like most ICS protocols, BACnet suffers from design vulnerabilities [source 3] such as poor implementation, lack of encryption and ability to load files (firmware) into BACnet devices making it open to various attacks [source 2]  such as network mapping and Dos attacks (abusing broadcast messages)&#8230;etc. BACnet devices can be found in online search engines such as <a rel=\"noreferrer noopener\" href=\"https:\/\/www.shodan.io\/search?query=port%3A47808\" data-type=\"URL\" data-id=\"https:\/\/www.shodan.io\/search?query=port%3A47808\" target=\"_blank\">Shodan<\/a> , just type &#8220;port:47808&#8221; or &#8220;bacnet&#8221; in Shodan&#8217;s search bar. <a rel=\"noreferrer noopener\" href=\"http:\/\/bfr.sourceforge.net\/\" data-type=\"URL\" data-id=\"http:\/\/bfr.sourceforge.net\/\" target=\"_blank\">BACnet Firewall Router (BFR)<\/a> is an open source technology that can help secure this protocol against network mapping and  Dos and spoofing [Source 2] and and its ability to filter BACnet packets. In this article I have assembled a list of filters and messages that can help you towards securing your network and assets if you are using BACnet protocol.<\/p>\n\n\n\n<p>BACnet traffic analysis helps in understanding BACnet normal and abnormal behavior in your network. It&#8217;s also useful to develop firewall\/IDS\/IPS rules and most importantly monitoring operation (see 1st table) and security messages (see 2nd table).  BACnet traffic can be analyzed using tools such as Wireshark. I mentioned in my article &#8220;<a rel=\"noreferrer noopener\" href=\"https:\/\/zerontek.com\/zt\/2021\/04\/12\/wireshark-filters-for-ics-protocols\/\" target=\"_blank\">Wireshark filters for ICS protocols<\/a>&#8220;that BACnet is supported by Wireshark. Check out the Wireshark filters for BACnet <a rel=\"noreferrer noopener\" href=\"https:\/\/www.wireshark.org\/docs\/dfref\/b\/bvlc.html\" data-type=\"URL\" data-id=\"https:\/\/www.wireshark.org\/docs\/dfref\/b\/bvlc.html\" target=\"_blank\">here<\/a>. To get started quickly,  here are the common filters to use in Wireshark that can aid you with your investigation:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-table aligncenter is-style-stripes\"><table><tbody><tr><td>bvlc || bacnet || bacapp<\/td><td>BACnet packets<\/td><\/tr><tr><td>bacnet<\/td><td>BACnet NPDU packets<\/td><\/tr><tr><td>bacnet.mesgtyp<\/td><td>BACnet Network Layer (router) packets<\/td><\/tr><tr><td>bvlc<\/td><td>BACnet\/IP packets<\/td><\/tr><tr><td>bvlc.function == 0x0b<\/td><td>BACnet\/IP Broadcast packets<\/td><\/tr><tr><td>bacapp<\/td><td>BACnet APDU packets<\/td><\/tr><tr><td>bacapp.confirmed_service == 12<\/td><td>BACnet ReadProperty packets<\/td><\/tr><tr><td>bacapp.confirmed_service == 15<\/td><td>BACnet WriteProperty packets<\/td><\/tr><tr><td>bacapp.unconfirmed_service == 0<\/td><td>BACnet I-Am packets<\/td><\/tr><tr><td>bacapp.unconfirmed_service == 8<\/td><td>BACnet WhoIs packets<\/td><\/tr><tr><td>bacapp.unconfirmed_service == 2<\/td><td>BACnet UnconfirmedCOVNotification packets<\/td><\/tr><\/tbody><\/table><figcaption>Source: 1<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"549\" src=\"https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac3-1024x549.png\" alt=\"\" class=\"wp-image-317\" srcset=\"https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac3-1024x549.png 1024w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac3-300x161.png 300w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac3-768x412.png 768w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac3-1536x824.png 1536w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac3.png 1889w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>BACnet WhoIs packets<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"548\" src=\"https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac1-1024x548.png\" alt=\"\" class=\"wp-image-318\" srcset=\"https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac1-1024x548.png 1024w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac1-300x161.png 300w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac1-768x411.png 768w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac1-1536x823.png 1536w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac1.png 1910w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>I-Am-Router-To-Network (0x01)<\/figcaption><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"551\" src=\"https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac2-1024x551.png\" alt=\"\" class=\"wp-image-319\" srcset=\"https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac2-1024x551.png 1024w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac2-300x161.png 300w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac2-768x413.png 768w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac2-1536x826.png 1536w, https:\/\/zerontek.com\/zt\/wp-content\/uploads\/2021\/05\/bac2.png 1914w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Who-Is-Router-To-Network (0x00)<\/figcaption><\/figure>\n<\/div>\n\n\n<p>So, what are the BACnet security messages that are worth watching in your network traffic ? . They can be found using this filter: <strong><span class=\"has-inline-color has-vivid-cyan-blue-color\">bacnet.mesgtyp<\/span><\/strong> and see the below table for those messages&#8217; codes. Just look for the message inside the &#8220;Network Layer Message Type&#8221; section.<\/p>\n\n\n\n<figure class=\"wp-block-table aligncenter is-style-stripes\"><table><tbody><tr><td>0x0A<\/td><td>Challenge-Request<\/td><\/tr><tr><td>0x0B<\/td><td>Security-Payload<\/td><\/tr><tr><td>0x0C<\/td><td>Security-Response<\/td><\/tr><tr><td>0x0D<\/td><td>Request-Key-Update<\/td><\/tr><tr><td>0x0E<\/td><td>Update-Key-Set<\/td><\/tr><tr><td>0x0F<\/td><td>Update-Distribution-Key<\/td><\/tr><tr><td>0x10<\/td><td>Request-Master-Key<\/td><\/tr><tr><td>0x11<\/td><td>Set-Master-Key<\/td><\/tr><\/tbody><\/table><figcaption>source: 2<\/figcaption><\/figure>\n\n\n\n<p>References:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><a rel=\"noreferrer noopener\" href=\"http:\/\/kargs.net\/captures\/AnalyzingBACnetWithWireshark.pdf\" target=\"_blank\">Analyzing BACnet<\/a><\/li><li><a href=\"https:\/\/link.springer.com\/content\/pdf\/10.1007%2F978-3-319-18467-8_41.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">Securing BACnet\u2019s Pitfalls<\/a><\/li><li><a href=\"https:\/\/store.chipkin.com\/articles\/how-is-bacnet-vulnerable\" target=\"_blank\" rel=\"noreferrer noopener\">HOW IS BACNET VULNERABLE?<\/a><\/li><\/ol>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>BACnet (Building Automation and Control Networking Protocol) is an ICS protocol, developed by ASHRAE (American Society of Heating,Refrigerating and Air Conditioning Engineers). Like most ICS protocols, BACnet suffers from design vulnerabilities [source 3] such as poor implementation, lack of encryption and ability to load files (firmware) into BACnet devices making it open to various attacks [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":355,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,161,4,45,3,46,48,23,5,32,49],"tags":[50,55,7,54,42,6,52,44,53,56,47,20,43,27,51],"class_list":["post-310","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asset-identification","category-bacnet","category-cyber-security","category-ics-protocols","category-ics-security","category-ics-tools","category-ot-security","category-shodan","category-vendors","category-vulnerability-assessment","category-wireshark","tag-bacnet","tag-bacnet-filters","tag-cyber-security","tag-firewall-rules","tag-ics-protocols","tag-ics-security","tag-ics-security-consultant","tag-ics-tools","tag-ids-rules","tag-ips","tag-ot-security","tag-shodan","tag-wireshark","tag-zerontek","tag-51"],"_links":{"self":[{"href":"https:\/\/zerontek.com\/zt\/wp-json\/wp\/v2\/posts\/310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zerontek.com\/zt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zerontek.com\/zt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zerontek.com\/zt\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/zerontek.com\/zt\/wp-json\/wp\/v2\/comments?post=310"}],"version-history":[{"count":41,"href":"https:\/\/zerontek.com\/zt\/wp-json\/wp\/v2\/posts\/310\/revisions"}],"predecessor-version":[{"id":827,"href":"https:\/\/zerontek.com\/zt\/wp-json\/wp\/v2\/posts\/310\/revisions\/827"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zerontek.com\/zt\/wp-json\/wp\/v2\/media\/355"}],"wp:attachment":[{"href":"https:\/\/zerontek.com\/zt\/wp-json\/wp\/v2\/media?parent=310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zerontek.com\/zt\/wp-json\/wp\/v2\/categories?post=310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zerontek.com\/zt\/wp-json\/wp\/v2\/tags?post=310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}