成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

打造基于Zigbee的IoT漏洞安全試驗環境

安全 漏洞
Zigbee是在智能家居設備和其他物聯網設備中最常見的通信協議之一。 由于Zigbee具備低功耗、網狀網絡和易用性的優勢,所以日益成為制造商的首選。

前言

目前,Zigbee已經成為智能家居和醫療設備中最流行的物聯網無線電通信協議,本文將討論它的安全性以及相關的物聯網設備的利用技術。

Zigbee簡介

Zigbee是在智能家居設備和其他物聯網設備中最常見的通信協議之一。 由于Zigbee具備低功耗、網狀網絡和易用性的優勢,所以日益成為制造商的首選。它是在IEEE 802.15.4的基礎之上,由Zigbee聯盟成員公司共同創建的一個開放協議,該聯盟成員包括TI、Silicon Labs、Philips等公司。Zigbee協議已經進行了多次迭代,當前版本是Zigbee 3.0。

可能的攻擊

作為一種無線電通信協議,Zigbee同樣免不了受到標準無線電協議的漏洞的影響。在使用Zigbee進行通信時,可能發生的攻擊有:

1. 攻擊者能夠嗅探傳輸的數據

2. 捕獲傳輸的數據后重放數據包,從而執行惡意動作

3. 在初始通信期間嗅探加密密鑰

4. 修改捕獲的數據包,然后重放

5. 欺騙攻擊

6. 拒絕服務攻擊

本文只是一個入門指南,介紹如何搭設利用Zigbee漏洞的實驗環境和有關的基礎知識,在后續文章中,我們將在此基礎上進一步介紹上述每種類型的安全漏洞的利用技術。

硬件要求

在繼續閱讀下文之前,請不要忘了,這里介紹的硬件只是探索Zigbee安全性的可能硬件組合之一。實際上,有各種其他類型的硬件可資使用,例如我們既可以使用Zigbee開發套件,也可以使用商業IoT設備發射Zigbee信號等。

下面是一個供我們入門的簡單配置:

1. Arduino Uno/Nano

2. DigiKey Xbee module / Arduino Xbee shield

3. Atmel RzRaven USB stick

4. Attify Badge

Arduino:Arduino已經在各種類型的電子項目中廣為普及了。實際上,你很可能已經在大學或高中階段早就用過它了。Nano是體積最小的Arduino nano,但是對于本文的用途來說,它的功能已經足夠了。

DigiKey Xbee module / Xbee Shield :為了學習Zigbee,你需要一些可以發送和接收Zigbee信號的東西。 Xbee是一種全雙工收發器,能夠使用Zigbee標準協議與其他Xbee模塊進行無線通信。

Atmel RzRaven USB Stick:這是半雙工模塊,它能執行嗅探,并且可以將捕獲的Zigbee數據包進行相應的修改后再次傳輸。如果你熟悉其他類型的無線電利用技術的話,可以將其視為“用于Zigbee的HackRF”。

Attify Badge:您可以將其插到系統上,然后使用它和XCTU對Xbee模塊進行編程。之所以這么做,是因為Xbee通常沒有miniUSB或類似的端口,所以無法直接插入進行編程。如果您沒有Attify Badge或類似的硬件,可以通過亞馬遜或您當地的商店購買一個用于Xbee的迷你USB套件,比如類似于頁面https://www.sparkfun.com/products/11812中這樣的套件。

[[177880]]

用于Xbee的MiniUSB電路板

或者,你也可以通過郵件(secure@attify.com)方式購買 Attify BadgeAttify Badge。

利用Attify攻擊物聯網嵌入式設備

對于編程和硬件連接來說,使用它是最簡單的方案,只需要連接下列引腳:power => power,Gnd => Gnd,Tx到Rx,Rx到Tx。如果需要的話,您可以進一步參考Xbee模塊相應版本的說明書。

對Arduino和Xbee進行編程

對Arduino進行編程

要想對Arduino進行編程,只需從https://www.arduino.cc/en/Main/Software下載使用Arduino IDE即可。加載后,可以從Attify的github庫中逐一打開每個Arduino的Hub和Node程序。

代碼本身提供了詳細的內聯注釋,你可以通過注釋來了解代碼的含義。另外,提供的代碼示例還可以通過傳感器和DHT庫來獲取溫度、濕度和光照值。它非常適合用于進行完整的分析,以及通過傳輸一個硬編碼字符串進行攻擊,而不是使用DHT值。此外,如果你想原封不動地使用這些代碼的話,則需要購買DHT11和所需的其他附屬設備。

所需工具

Arduino * 1 https://www.sparkfun.com/products/11021

DHT 11 * 1 https://www.adafruit.com/product/386

XBee S1模塊(S2模塊需要不同的配置)* 2 LDR / Photocell * 1 https://www.sparkfun.com/products/9088

BC547 * 1 https://www.sparkfun.com/products/8928

LED *任意數量https://www.sparkfun.com/products/10635

跳線https://www.sparkfun.com/products/13870

面包板https://www.sparkfun.com/products/12046

Xbee shield * 2 https://www.sparkfun.com/products/128

電路圖

下面是我們的入門套件配置的電路圖。

Node電路圖:

Node電路圖

Hub電路圖:

Hub電路圖

Node代碼:

  1. // Offensive IoT Exploitation by Attify  
  2. // www.attify.com | www.offensiveiotexploitation.com  
  3. // <span id="eeb-575002"></span><script type="text/javascript">(function(){var ml="k-CeFED2o0t%ylAfaismr.4ch3un",mi=";I2@;79HD3?;I6;77C@A=:8;I>B3GJD3;F9@::A?<EG8C;77;79;79G=@BB;I6;77C@A=:81=AK0;77;I5B3GJD3;F9@::A?<EG8C;I2;74@;I5",o="";for(var j=0,l=mi.length;j<l;j++){o+=ml.charAt(mi.charCodeAt(j)-48);}document.getElementById("eeb-575002").innerHTML = decodeURIComponent(o);}());</script><noscript>*protected email*</noscript>  
  4. #include <dht.h> //Library for DHT11  Humidity 
  5. #define dht_dpin A0 // DTH11 Data pin connected to AO of arduino 
  6. #define led 2 // Led connected to Pin D2 
  7. #define ldr A1 // LDR connected to Pin A1 
  8. dht DHT; // Creating DHT function  
  9. void setup() { 
  10.   // initialize serial: 
  11.   Serial.begin(2400); // Initiliaze Hardware serial for xbee 
  12.   pinMode(2, OUTPUT); // Pin direction of LED to Output as it sends current 
  13. void loop() { // Continous loop 
  14.   // if there's any serial available, read it: 
  15.    DHT.read11(dht_dpin); // Reading DHT11 using the library 
  16.   int lig = analogRead(ldr); // Reading analog values from LDR 
  17.   int ligp = map(lig, 0, 1023, 0, 100); // Mapping the 10bit resolution ADC to 0 to 100 
  18.   int h = DHT.humidity; // Humidity value 
  19.   int t = DHT.temperature; // Temperature value 
  20.   while (Serial.available() > 0) { // Checking for any data on Xbee 
  21.     int red = Serial.parseInt(); // look for the next valid integer in the incoming serial stream 
  22.     if (Serial.read() == '!') // Check if the next Serial data is '!' 
  23.     { 
  24.       if(red == 1) // if the recieved data is 1!  
  25.         { 
  26.         Serial.print(h,DEC); // Send humidity value with '!' 
  27.         Serial.print("!"); 
  28.           } 
  29.          else  
  30.          if(red == 2) // if the recieved data is 2! 
  31.     { 
  32.       Serial.print(t,DEC); // Send Temperature value with '!' 
  33.       Serial.print("!"); 
  34.     } 
  35.     else  
  36.     if(red == 3) // if the recieved data is 3! 
  37.     { 
  38.     Serial.print(ligp,DEC); // Send Light value with '!' 
  39.       Serial.print("!"); 
  40.     } 
  41.      else  
  42.      if(red == 4) // if the recieved data is 4! 
  43.     { 
  44.    digitalWrite(2, HIGH); // Turn ON the LED 
  45.     delay(100); 
  46.     } 
  47.     else if(red == 5)  // if the recieved data is 5! 
  48.     { 
  49.    digitalWrite(2, LOW);  //Turn OFF the LEd 
  50.     delay(100); 
  51.     Serial.print("!attify!"); // Send the AES key 
  52.     } 
  53.     } 
  54.   } 

Hub代碼:

  1. // Offensive IoT Exploitation by Attify  
  2. // www.attify.com | www.offensiveiotexploitation.com  
  3. // <span id="eeb-82412"></span><script type="text/javascript">(function(){var ml="ikruc-CFsA3En%mahD.2l04oyfte",mi="=:6?=CE@2KI=:A=CC>?0DJG=:98K432K=FE?JJ0IHB4G>=CC=CE=CE4D?88=:A=CC>?0DJG5D0<1=CC=:;8K432K=FE?JJ0IHB4G>=:6=C7?=:;",o="";for(var j=0,l=mi.length;j<l;j++){o+=ml.charAt(mi.charCodeAt(j)-48);}document.getElementById("eeb-82412").innerHTML = decodeURIComponent(o);}());</script><noscript>*protected email*</noscript> 
  4. #include <SoftwareSerial.h> // Software based UART port to use Zigbee module 
  5. int a = 1; 
  6. float hum = 0, temp = 0;  // Float Variable to store Temperature and Humidity 
  7. SoftwareSerial xbee(3, 2); // RX, TX 
  8. void setup() //One time preloading function 
  9. {    
  10. Serial.begin(9600); // Hardware Serial initialization to be connected to a bluetooth module or PC 
  11. xbee.begin(2400);  // Software Serial initialization at 2400 Baud rate to communicate with zigbee  
  12. void loop() // Continous loop 
  13.  xbee.print(a);   // Sends (a) with "!" to Xbee -> "1!" Requests temperature data and vice versa 
  14.  xbee.println("!"); 
  15.  while(xbee.available() > 0) //Checks is any data has been recieved from zigbee.  
  16.   {  
  17.     char aChar = xbee.read();  //reading the value from the Xbee serial port 
  18.       if(aChar == 33)  //If the first character is 33 ie) ! in ASCII 
  19.       { 
  20.         xbee.flush();  // Clear the buffer and  
  21.         aChar = NULL
  22.        } 
  23.       if(aChar >= 100) // If it is more than 100 or random ASCII character flush the data 
  24.        { 
  25.         xbee.flush(); 
  26.         aChar = NULL
  27.        } 
  28.   Serial.print(aChar); //Printing the Read value  
  29.   } 
  30.   if(a == 3) // if a = 3 create new line or end of one set of data transmission 
  31.   { 
  32.     Serial.println(); //New line print 
  33.   } 
  34.   else  
  35.   { 
  36.     Serial.print(","); // if a not 3 then add ","  
  37.   } 
  38.   if(a> 3) // after a > 3 print the AES encryted data to xbee 
  39.   { 
  40.     a =1; // initialize a = 1 back 
  41.     xbee.print("!f+F8YW+9W3+Cg0S1NVBexycQxz32biWTmzVsxO48+fk=!"); 
  42.   } 
  43.   delay(100); // Wait for few ms for this to happen 
  44.   xbee.flush(); // flush any data in Xbee serial port 
  45.   a=a+1;  //Increment data 
  46.   if(Serial.available()); // Check if any data is sent from Hardware serial port 
  47.   { 
  48.     int r = Serial.parseInt(); // Recieving any integer data 
  49.     if(r== 1)  // if recieved data is 1. Send 4! which turns the LED on the Node. 
  50.     { 
  51.       xbee.print(4); 
  52.       xbee.print("!"); 
  53.       delay(100); 
  54.     } 
  55.       if(r== 2)// if recieved data is 2. Send 5! which turns the LED off the Node. 
  56.     { 
  57.       xbee.print(5); 
  58.       xbee.print("!"); 
  59.     } 
  60.   } 

一旦完成了這兩個Arduino的編程工作,下一步就是使用XCTU來配置Xbees。

對Xbee進行編程

啟動XCTU并單擊Discover Radio模塊,這時將顯示已插入設備的可用COM端口的列表。然后,選擇與Xbee模塊對應的COM端口(如果您不太確定,就全部選上)。

其他配置總是8N1、8個數據位、無奇偶校驗位和1個停止位。 此外,您還需要為給定的Xbee模塊指定波特率。 如果您不知道模塊使用的波特率,您可以給模塊選擇所有波特率,XCTU將掃描所有波特率并為您找到正確的波特率。

結束模塊的搜索后,點擊Finish,它就能識別出該設備。 單擊Add the Device。

利用XCTU識別出的設備

在這一步中,您將看到設備的各種屬性,例如信道名稱和PAN ID,這兩個屬性對于我們來說非常重要。在Zigbee中,每個頻帶總共有16個信道,每個信道間隔5MHz,2MHz的帶寬用于無噪聲數據傳輸。我們可以從http://www.digi.com/wiki/developer/index.php/Channels,_Zigbee找到所有Zigbee通道的清單。 Zigbee網絡的PAN ID是唯一的標識符,其對于該網絡上的所有設備都是相同的。我們可以將信道名稱和PAN ID配置為任何特定的值,只需要確保其他Xbee也使用相同的信道名稱和PAN ID即可。

XCTU中顯示的Xbee屬性

后記

到此為止,我們一家搭建好了Zigbee的漏洞實驗環境。在將來的Zigbee安全文章中,我們將在這個實驗平臺上面介紹各種利用技術,包括控制商業設備發射Zigbee信號等。

責任編輯:武曉燕 來源: attify
相關推薦

2017-05-04 15:10:01

漏洞IoT智能燈泡BLE

2015-08-26 10:14:29

2013-09-17 12:26:43

BYOD環境安全BYOD移動設備

2022-07-07 10:41:53

鯤鵬

2009-12-04 10:22:35

網絡安全內網安全企業安全

2011-05-25 18:23:52

2021-04-25 21:45:25

網絡安全網絡安全攻防ZigBee安全

2019-10-25 10:34:49

變異測試單元測試

2015-11-03 16:43:01

容器編排容器環境可擴展

2018-09-10 06:00:12

2009-02-27 11:32:00

2011-10-08 16:46:29

2018-10-26 14:14:19

Zigbee無線安全網絡拓撲

2018-12-26 09:14:24

物聯網安全物聯網設備物聯網

2010-09-09 13:10:00

2016-08-18 13:51:43

安全云聯盟360云安全

2016-02-15 14:13:39

Python編碼環境

2011-05-18 14:07:59

XSL

2020-09-01 09:51:13

云安全漏洞攻擊
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 久久国产精品视频 | 91久久爽久久爽爽久久片 | 羞羞视频在线观免费观看 | 国产一区精品 | 成人一区二区三区 | 日本三级视频 | 亚洲乱码一区二区 | 综合久久av| 久久久久免费精品国产小说色大师 | 精品一区二区三区在线观看国产 | 久草成人网 | 夜夜骑首页 | 久久久xx | 欧美激情一区二区三区 | 麻豆久久久久久久久久 | 国产成人免费视频网站高清观看视频 | 亚洲精品久久视频 | 亚洲3p | 日韩欧美高清dvd碟片 | 日本福利一区 | 精品国产区 | 国产一区二区 | 国产成人免费视频网站视频社区 | 色播久久 | 国产一区二区三区免费 | 91网在线播放 | 精品久久久精品 | 国产精品久久久久久一区二区三区 | 天天操妹子| 精品成人av | 国内精品久久久久 | 成人精品毛片国产亚洲av十九禁 | 日韩精品在线看 | 成人国产精品 | 欧美一区2区三区4区公司二百 | a视频在线观看 | 91久久精品一区二区二区 | 一级一级一级毛片 | 一本在线 | 亚洲精品在线播放 | 91久久久久久 |