62
IOT 與與與與 Realtek Technical Project Manager Neo Jou

Io t security-ameba-ppt

  • Upload
    jou-neo

  • View
    488

  • Download
    4

Embed Size (px)

Citation preview

Page 1: Io t security-ameba-ppt

IOT 與 系統安全 Realtek Technical Project Manager

Neo Jou

Page 2: Io t security-ameba-ppt

REALTEK 瑞昱半導體全球前十大 IC 設計公司網路通訊 IC – ethernet / wifi

PC 周邊 , 多媒體 Audio – AC97 , video – ISP/H.264

TV

Page 3: Io t security-ameba-ppt

WHAT IS IOT

The internet working of physical devices, vehicles (also referred to as "connected devices" and "smart devices"), buildings and other items—embedded with electronics, software, sensors, actuators, and network connectivity that enable these objects to collect and exchange data.

• Ref: wiki IoT

Page 4: Io t security-ameba-ppt

君の名は90’s : Internet

SUN - JAVA (Oak) 智慧家電1995 - 比爾蓋茲 - 未來之路Motorola 銥計畫 - 50 億美元 / 66 顆衛星

IoE ( Internet of Everything ) - Cisco / Qualcomm

M2M : machine to machine

Web of Things

===> SkyNet?

Page 5: Io t security-ameba-ppt

IOT GROW

* Massive IoT - LPWAN

Page 6: Io t security-ameba-ppt

WHERE - EVERY處處有智慧

Page 7: Io t security-ameba-ppt

SMART HOME- smart lighting

- smart door

- smart coffee machine

- smart air conditioner

- smart weight meter

- smart vacuum cleaner

- smart water heater

Page 8: Io t security-ameba-ppt

IOT SCOPE

市場產品範圍廣泛技術需求廣泛

Big Data

ASIC / HW design

SW ( HAL / driver/ RTOS / communication protocol / … )

multimedia : video / audio / .. : 視訊與影像處理AI : 影像識別 / 行為分析規劃 / 購買建議 / ..

Security

Page 9: Io t security-ameba-ppt

WHY SECURITY

家是安全的避風港 ?

Page 10: Io t security-ameba-ppt

模仿遊戲 密碼學

Page 11: Io t security-ameba-ppt

加密 – 18 世紀

Attack at dawn

AT TA CK AT DA WN

CR RC LM CR BL VB

* Modern cryptography

Page 12: Io t security-ameba-ppt

加密 – 19 世紀

Gronsfeld Cipher-1844

Attack at dawn

AUVDGP GZ LJWO

* Modern cryptography

Page 13: Io t security-ameba-ppt

ENIGMAhttp://enigmaco.de/enigma/enigma.html

Page 14: Io t security-ameba-ppt

加密對稱式

Key 只有一把 , 速度快 , 但如何儲存 / 傳遞是關鍵非對稱式

有公鑰 / 私鑰

Page 15: Io t security-ameba-ppt

對稱式加密DES – 1970 IBM 金鑰過短 , 有效位元只有 56 bits.

AES – 2000 年 ; 128/192/256

3DES : 112 bits

RC4 – 串流加密 ; 不安全 NIST FF : finite field ; IF : integer fraction ; EC: Elliptic Curve

Page 16: Io t security-ameba-ppt

RC4 破解單字節偏移 / 多字節偏移Cookie 字段開頭 “ cookie:”

https://cr.yp.to/streamciphers/rc4biases-20130708.pdf

Page 17: Io t security-ameba-ppt

AES

CBC/CTR/ 其他更安全加密 : 右圖ECB 問題

Page 18: Io t security-ameba-ppt

非對稱性加密RSA

- 憑證 TLS key exchange

ECC

- ECDH :

Elliptic Curve Diffie-Hellman : key 交換 ECDSA : Elliptic Curve Digital Signal Algorithm : 簽章

Page 19: Io t security-ameba-ppt

HASH

MD5 / SHA-1 / SHA-2 / …

MAC : message authentication code

Page 20: Io t security-ameba-ppt

RAINBOW TABLE

一般 : 暴力破解法 / 字典攻擊法Hash chain : 有效縮減儲存空間儲存起點和終點 : aaaaaa , kiebgt

e.g. Hash 值為 920ECF10 == key : sgfnyd

Page 21: Io t security-ameba-ppt

RANDOM NUMBER

PRNG : pseudo random number generator

TRNG : true random number generator

- NIST random test

Page 22: Io t security-ameba-ppt

量子密碼學

- Grover – 資料庫搜尋演算法 - 秀爾 shor 量子演算法 – 質因數分解 - RSA

量子密鑰分發 – BB84 協定

Page 23: Io t security-ameba-ppt

IOT 系統架構 攻擊 雲端 Server

攻擊 中間通訊攻擊 IoT device

Page 24: Io t security-ameba-ppt

LINE LEGY

Page 25: Io t security-ameba-ppt

LINE 漏洞賞金計畫https://bugbounty.linecorp.com/en/

Page 26: Io t security-ameba-ppt

MBED OS

LoRa : https://docs.mbed.com/docs/lora-with-mbed/en/latest/intro-to-lora/

Page 27: Io t security-ameba-ppt

OSI

DataLink : WIFI WPA2

IP : IPSec

Presentation : TLS

Application : HTTPS / Apple Home Kit

Page 28: Io t security-ameba-ppt

DDOSDistributed

Deny of Service阻斷服務攻擊

洪水攻擊- ICMP flood- ping flood- UDP flood

- TCP SYNC flood- HTTP flood

- …

CPU / Network Resource

Page 29: Io t security-ameba-ppt

WEB ATTACK 1.https port 443  掃端口2.XOR-based firmware

encryption  反組譯3.found buffer overflow

vulnerability in the CGI script  找漏洞4.sending a very long session

cookie to the script

5.full control over the device

Ref: http://126kr.com/article/8fer1xbx1m9

Page 30: Io t security-ameba-ppt

IOT CLIENT ATTACK

Program

Buffer overflow

random number - TRNG

System

unnecessary open ports

firmware rollback / firmware update

Device Attack

物理接觸 : e.g. flash, steal code

DOS/DDOS/wifi jammer/… : 功能癱瘓

Page 31: Io t security-ameba-ppt

物理性攻擊側通道攻擊 / 邊通道攻擊 ( side channel attack )

針對加密電子設備在運行過程中 , 通過測量功耗、電磁輻射以及產熱量的側通道信息洩露 ,

來計算出晶元的內部工作• RSA4096 / SIM card (AES-128) / …

外部 flash / LDPPR

steal code / confidential data

insertion / destroy the code

JTAG

efuse : 不適合存密碼 , 但適合做控制保護

Page 32: Io t security-ameba-ppt

MEMORY LAYOUT

Page 33: Io t security-ameba-ppt

緩衝區溢位

改變控制流程stack-based buffer overflow

Page 34: Io t security-ameba-ppt

緩衝區溢位

Ref: http://pws.niu.edu.tw/~hbc/StackBO.pdf

Page 35: Io t security-ameba-ppt

TCP 3WHS

Why not 2 ways?

Page 36: Io t security-ameba-ppt

SYNC FLOOD

Timeout : 1 sec

首包丟棄 / 封包追蹤 /....

SYNC COOKIE

SYNC PROXY

Page 37: Io t security-ameba-ppt

TCP FAST OPEN

RFC7413 - TCP Fast Open : 降低延遲Linux 3.13 開始 , IPv4 的 TCP fast open 預設開啟

Page 38: Io t security-ameba-ppt

SYNC PROXY

可搭配 sync cookie 檢測

Page 39: Io t security-ameba-ppt

SEC PROGstrcpy -> strncpy -> strlcpy

strncpy : NUL , 長度計算strlcpy 是 OpenBSD 2.4, 不屬於 ANSI C

compiler option : -fstack-protector-strong

Page 40: Io t security-ameba-ppt

SEC CODE

static code analysis

Page 41: Io t security-ameba-ppt

緩衝區溢位保護

HW Improve - ARM v8m StackLimit

Improve OS

can not run code in stack

malfunction -> Program DOS

Page 42: Io t security-ameba-ppt

SEC POLICY

用人不疑 , 疑人不用 分成 secure / non-secure :

放到 secure 的 , 自己人相信他 不要輕易放進 secure

身份認證 ACL

安全門 secure / non-secure 區之間溝通要控管

Page 43: Io t security-ameba-ppt

WHAT TO DO

HW solutions - 以 ARM 為例ARM v8m TrustZone

RTOS security solutions - 和硬體結合Communication Security

Page 44: Io t security-ameba-ppt

ARM ARCH

Page 45: Io t security-ameba-ppt

ARM V8M

Page 46: Io t security-ameba-ppt

ARM V7M

privileged

thread / handler

handler only have privileged mode

Page 47: Io t security-ameba-ppt

ARM MPU

從 ARM11 開始就有ARMv7m 時 , mbed 利用 MPU 做 uvisor

ARM V8M 時 , 改進 size 需要是 2 的次方倍數的限制

1kB 16kB 256kB 1kB

SINGLE 274kB REGION

PMSAv7

PMSAv8

0x3BC00 0x80400

Page 48: Io t security-ameba-ppt

MBED UVISOR - V7M

Page 49: Io t security-ameba-ppt

MBED UVISOR - V7M但 privilege + MPU 來做 uvisor, 會有 額外 overhead

interrupt forwarding - ISR 是在 privilege mode , 可以改 MPU 設定

Page 50: Io t security-ameba-ppt

ARM V8M SAU

除了原本 MPU 外 , 新增 SAU 來幫忙做權限管理memory 先透過 SAU 劃分成 secure / no-secure

IRQ 也分為 secure / non-secure

Non-SecureMPU

SecureMPU

SecurityAttributionUnit (SAU)

SystemLevel

Control

Request from CPU

Request to System

Page 51: Io t security-ameba-ppt

TRUSTZONE

Page 52: Io t security-ameba-ppt

ARM TRUSTZONE

v8m 效能增進 , 會比 v8A 來得好

Page 53: Io t security-ameba-ppt

ARM V8M

Page 54: Io t security-ameba-ppt

SEC RTOS

Page 55: Io t security-ameba-ppt

網路安全wifi 不安全 , 仍需靠上層 protocol 加密

WEP: RC4->AES;

PSK: DK = PBKDF2(HMAC−SHA1, passphrase, ssid, 4096, 256)

HTTPS

SSL -> TLS

DTLS : 針對 UDP 安全性加強

Page 56: Io t security-ameba-ppt

SEC INFO

BugTraq

Page 57: Io t security-ameba-ppt

回顧IoT market and architecture

Why Security

Attacks

Solutions

HW based security solution - ARM v8M

RTOS security

Communication Security

工商時間

Page 58: Io t security-ameba-ppt

AMEBA

Page 59: Io t security-ameba-ppt

空氣盒子

Page 60: Io t security-ameba-ppt

AMEBA

Page 61: Io t security-ameba-ppt

Q&A

Page 62: Io t security-ameba-ppt

THANK YOU