HITCON
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 你的雲端攝影機安全嗎? - 王凱慶, Weber Tsai {%hackmd @HITCON/HkzqEGQsR %} > 從這裡開始 ### Let's think about it 1. 這些小型設備如何使用AI 2. 這些數據如何被傳輸跟儲存 3. 這些設備有甚麼功能 ### Target - Baby Cam - Pet Cam ### Device Initialization #### Pairing - WIFI - Bluetooth > 沒有 Web 介面 --> Just do port scan #### How to control device > 拜託🙏不要提到是誰 ^_^ > 補充: IoT 設備從硬體、軟體甚至雲端平台都可以 OEM/ODM,所以有時候你找到的洞其實也可以影響到同一個家族系的其他廠牌設備。 - 即時串流 - AI 也在網站上設定 1. 沒有開 port 2. 用網頁控制和 AI ### How Vendors Claim Security 推薦看 TOS term of service,通常裡面會講到他蒐集哪些資料,如何運用與儲存,以及各種免責聲明,從中可以得到很好的「提示」,畢竟宣傳詞是一回事,但面對法律又是另一回事,面對法律只能誠實。 ### About Data Retention 可以從廠商對於資料如何保存與保存多久來判斷廠商對於資料的重視程度,一般來說都會盡可能地不刪除,以利於累積 AI 訓練資產,如果要使用類似產品,使用者一定要想清楚 ### About Data Use 很多會拿去 Train AI,這時候就要考慮都訓練進去了他最好會刪,這些資料可能要上標記,就會有非你預期的人看到這些東西 ### Possible Architecture 使用者的控制訊號與設備均透過雲端主機來控制,這樣的架構易於整合 IFTTT 這類第三方服務,同時也容易突破使用者的網路架構限制,達到在哪裡都能控制的目的。 ### IoT 步驟 #### PLAT A 1. download firmware 2. decompose firmware 3. start reverse engineering #### PLAN B 1. Dump firmware (UART/JTAG) 2. decompose firmware 3. start reverse engineering 找 tx rx: 看電路板上的標誌 用設備測量 用肉眼追電路 直接叫工程師幫你 debug,多出兩個焊腳 XD UART 登入 Device console 神秘密碼 "12345" (不在弱密碼表裡) 找晶片型號,找相關說明書,可能有帳密 (供應鏈下手 > 思路跟linux恢復密碼差不多 中斷(interrupt)開機 bootloader 指定特定參數到 /bin/sh 進到 /etc/shadow 改密碼 改完密碼要重新開機,避免環境不完整,妨礙後續作業 UART 上密碼 不能中斷開機 boot delay 設 0 --- 部分韌體 device update 抓封包 Man in Middle 本來想用 Burp 來當 Proxy,但設備沒地方設定 Proxy,因此只能把 Burp 收回去 改用下列工具 1. DNSChef - 重新導向所有 DNS 查詢到 Kali 2. Custom https server proxy - 客製化中間人 Web Service (Python Flask),記錄所有流量 #### step 1. DHCP set DNS 2. DNS Query API Serveer 3. Return Fake Result 4. Request Without verify CA SSL inspection Module (SSLproxy) Mirror decrypt ... > Fortigate 的勝利 XD 有路徑資訊 沒有加密的韌體 ## Reverse engineering 主程式非常大 static compilation debug symbols is available 找到後門 "/tmp/tunnel/start" "Socket bind" ---> 找綁定PORT,回推功能表 > 還是回到 command injection 進入 > 主要入侵點,寫 log ,直接用 echo 進去 > 濫用此處的 system() 功能本身不一定有問題,很多時候問題是出在寫 Log 的方法 BLE 送 payload,但協議有加密,因此要先解決加密問題 Unicon 可以讓你借用一下別人的 Binary Code,不用逆向不用重寫直接拿來用 手機 App 端要能跟設備溝通,這代表 App 中一定有加解密函數,因此只要逆向 App 就可以拿到加密算法 --- ### remote access 只要裝置的 SN 就可以 前面是產品型號後面是亂數 從下載韌體測到序號 "英文大小寫" 沒差 MQTT 主題式訂閱 `#` (所有) ### 存取 bootloader bootloader password cat /proc/ ... 查看 CPU 架構,決定用甚麼工具逆向 從 /mnt/mtd0 把 Bootloader 拉出來,送進 IDA Rebase firmware 不 Rebase 會很難追函數與參照,因此 Rebase 是第一步 1. 開發手冊 - 看記憶體分布 2. 觀察 reference 地址開頭 initial vector table Uboot 0 秒完成: 先輸入,讓密碼&指令進到 buffer 然後到那個階段時,直接讀進去 公開分享網站 link -> model和序號 錯誤版本會給最新版本 S3 bucket 沒關 ### other git專案不要直接丟在公網公開 ### Can I Borrow Your AI Model > 既然都解出來了,就把 AI Model 借來玩玩看XD 找副檔名關鍵字 "model..." > barknet.caffemodel 可以用 cv.dnn 來載入這個模型 透過逆向來發掘模型的使用參數與資料如何建立 Trick The Model 雜訊混音訊,成功 ## 雲端攝影機的缺點 ### 使用這些設備前要先考慮 1. 當沒了對外網路(這意味著你不能把他關在地端),就廢了 2. 安全程度完全取決於設備廠商 ### 如果真的要用 1. 隔離設備在另一個網段 2. 不要照到容易有隱私的地方 ## 還能怎麼辦 1. 買有認證的~ 2. 有洞不要緊,重要的是廠商本身對資安的態度,是忽略還是盡力維護,我們可以從 CVE, HITCON Zeroday 做初步觀察 3. 開發者要 SSDLC,將資安設計左移,不然這些設備成千上萬撒出去,要更新要撤回都是非常大的工程,容易造成極大的 Cost 與客戶的不信任 4. 產品序號難猜一點,同時設備應該註冊後要交換秘密金鑰,避免有人假冒來註冊 5. 可以觀察長得類似的產品有沒一起獲得更新,可以從中窺探廠商對於資安的處理方式 6. 設備只要經過配對後,應該進入另一個狀態,讓配對功能不再有效,來降低被利用的機會 7. 若你是廠商,你可以建立良善的弱點回報管道,好駭客會願意回報問題的 ## 智慧辨識功能 不要穿的太隨便,你可能意外入境 ## 小補充 1. 配對功能使用的頻率很低,越少人用的功能被測試到的機率越低,越容易發現弱點

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully