Upgrade to Pro — share decks privately, control downloads, hide ads and more …

他人事ではないサイドチャネル攻撃 / Side-channel attacks are no stranger to us.

cottondesu
October 26, 2021

他人事ではないサイドチャネル攻撃 / Side-channel attacks are no stranger to us.

みんなのCSIRTさんから許可を頂いて、代理で「他人事ではないサイドチャネル攻撃」で使用した資料をアップロードしています。

cottondesu

October 26, 2021
Tweet

More Decks by cottondesu

Other Decks in Technology

Transcript

  1. Copyright© 2021 みんなのCSIRT All Rights Reserved. 自己紹介 小西 享 (こにし

    とおる) [所属] アライドテレシス株式会社 ※ここでの発言と、所属会社は関係ありません。 [仕事] インフラエンジニア ⇒ NWとかセキュリティ講師 ⇒ セキュリティ演習を作る人 [近況] キャンプとかBBQやりながら、お酒飲みながら セキュリティの話ができればなと考え中。 コロナが落ち着いたら考えます。
  2. Copyright© 2021 みんなのCSIRT All Rights Reserved. はじめに ※ 注意 ※

    今回は 攻撃手法に関するお話が含まれます。 この会の中で説明する攻撃手法は 他者が管理しているサーバや Webアプリケーションに対して実行しないでください。 以下の様な 罪に問われる可能性があります。 (1) 電子計算機損壊等業務妨害罪 (2) 偽計業務妨害罪 (3) 電子的記録不正作出及び共用の罪 はじめに
  3. Copyright© 2021 みんなのCSIRT All Rights Reserved. [問題] サイドチャネル攻撃に該当するものはどれか。 “情報処理安全確保支援士平成31年春期 午前Ⅱ

    問7”より 暗号化装置における暗号化処理時の消費電力などの測定や統計処理によって、当 該装置内部の秘密情報を推定する攻撃 攻撃者が任意に選択した平文とその平文に対応した暗号文から数学的手法を用い て暗号鍵を推測し、同じ暗号鍵を用いて作成された暗号文を解読する攻撃 操作中の人の横から、入力操作の内容を観察することによって、利用者IDとパス ワードを盗み取る攻撃 無線LANのアクセスポイントを不正に設置し,チャネル間の干渉を発生させるこ とによって、通信を妨害する攻撃 ① ② ③ ④ Introduction -> サイドチャネル攻撃とは
  4. Copyright© 2021 みんなのCSIRT All Rights Reserved. [問題] サイドチャネル攻撃に該当するものはどれか。 “情報処理安全確保支援士平成31年春期 午前Ⅱ

    問7”より 暗号化装置における暗号化処理時の消費電力などの測定や統計処理によって、当 該装置内部の秘密情報を推定する攻撃 攻撃者が任意に選択した平文とその平文に対応した暗号文から数学的手法を用い て暗号鍵を推測し、同じ暗号鍵を用いて作成された暗号文を解読する攻撃 操作中の人の横から、入力操作の内容を観察することによって、利用者IDとパス ワードを盗み取る攻撃 無線LANのアクセスポイントを不正に設置し,チャネル間の干渉を発生させるこ とによって、通信を妨害する攻撃 ① ② ③ ④ Introduction -> サイドチャネル攻撃とは
  5. Copyright© 2021 みんなのCSIRT All Rights Reserved. [問題] 暗号機能を実装したIoT機器において脅威となるサイドチャネル攻撃に該当するものはどれか。 “情報処理安全確保支援士令和元年秋期 午前Ⅱ

    問2”より 暗号化関数を線形近似する式を導き,その線形近似式から秘密情報の取得を試みる。 機器が発する電磁波を測定することによって秘密情報の取得を試みる。 二つの平文の差とそれぞれの暗号文の差の関係から,秘密情報の取得を試みる。 理論的にあり得る復号鍵の全てを機器に入力して秘密情報の取得を試みる。 ① ② ③ ④ Introduction -> サイドチャネル攻撃とは
  6. Copyright© 2021 みんなのCSIRT All Rights Reserved. [問題] 暗号機能を実装したIoT機器において脅威となるサイドチャネル攻撃に該当するものはどれか。 “情報処理安全確保支援士令和元年秋期 午前Ⅱ

    問2”より 暗号化関数を線形近似する式を導き,その線形近似式から秘密情報の取得を試みる。 機器が発する電磁波を測定することによって秘密情報の取得を試みる。 二つの平文の差とそれぞれの暗号文の差の関係から,秘密情報の取得を試みる。 理論的にあり得る復号鍵の全てを機器に入力して秘密情報の取得を試みる。 ① ② ③ ④ Introduction -> サイドチャネル攻撃とは
  7. Copyright© 2021 みんなのCSIRT All Rights Reserved. Work -> spy As

    a spy, you are spying on the "ctf4b company". You got the name-list of employees and the URL to the in-house web tool used by some of them. Your task is to enumerate the employees who use this tool in order to make it available for social engineering.
  8. Copyright© 2021 みんなのCSIRT All Rights Reserved. Work -> spy (1)

    Spy問題サイト http://35.76.215.101/ (2) ファイルのダウンロード: https://github.com/SECCON/ Beginners_CTF_2020/ [web]⇒[Spy]⇒[files]からDL
  9. Copyright© 2021 みんなのCSIRT All Rights Reserved. Work -> spy (1)

    Spy問題サイト http://35.76.215.101/ (2) ファイルのダウンロード: https://github.com/SECCON/Beginners_CTF_2020/ [web]⇒[Spy]⇒[files]からダウンロード As a spy, you are spying on the "ctf4b company". You got the name-list of employees and the URL to the in-house web tool used by some of them. Your task is to enumerate the employees who use this tool in order to make it available for social engineering.
  10. Copyright© 2021 みんなのCSIRT All Rights Reserved. Explanation -> spy It

    took nnn sec to load this page. Arthur Elbert ⇒ 0.0002094 ⇒ 0.9466392 処理時間に大きな差
  11. Copyright© 2021 みんなのCSIRT All Rights Reserved. Explanation -> spyソース name

    = request.form["name"] password = request.form["password"] exists, account = db.get_account(name) if not exists: return render_template( “index.html”, message=“Login failed, try again.”, sec="{:.7f}".format(time.perf_counter()-t)) # auth.calc_password_hash(salt, password) adds salt and performs stretching so many times. # You know, it‘s really secure... isn't it? :-) hashed_password = auth.calc_password_hash(app.SALT, password) if hashed_password != account.password: return render_template( "index.html", message="Login failed, try again.", sec="{:.7f}".format(time.perf_counter()-t)) session["name"] = name return render_template("dashboard.html", sec="{:.7f}".format(time.perf_counter()-t))
  12. Copyright© 2021 みんなのCSIRT All Rights Reserved. Explanation -> spyソース name

    = request.form["name"] password = request.form["password"] exists, account = db.get_account(name) if not exists: return render_template( “index.html”, message=“Login failed, try again.”, sec="{:.7f}".format(time.perf_counter()-t)) # auth.calc_password_hash(salt, password) adds salt and performs stretching so many times. # You know, it‘s really secure... isn't it? :-) hashed_password = auth.calc_password_hash(app.SALT, password) if hashed_password != account.password: return render_template( "index.html", message="Login failed, try again.", sec="{:.7f}".format(time.perf_counter()-t)) session["name"] = name return render_template("dashboard.html", sec="{:.7f}".format(time.perf_counter()-t)) アカウントが存在するか? アカウントが存在しないときの処理 ここから、アカウントが存在するときの処理 SALT + Stretching 認証処理
  13. Copyright© 2021 みんなのCSIRT All Rights Reserved. Explanation -> spyソース name

    = request.form["name"] password = request.form["password"] exists, account = db.get_account(name) if not exists: return render_template( “index.html”, message=“Login failed, try again.”, sec="{:.7f}".format(time.perf_counter()-t)) # auth.calc_password_hash(salt, password) adds salt and performs stretching so many times. # You know, it‘s really secure... isn't it? :-) hashed_password = auth.calc_password_hash(app.SALT, password) if hashed_password != account.password: return render_template( "index.html", message="Login failed, try again.", sec="{:.7f}".format(time.perf_counter()-t)) session["name"] = name return render_template("dashboard.html", sec="{:.7f}".format(time.perf_counter()-t)) SALT + Stretching かなり重たい処理をしている
  14. Copyright© 2021 みんなのCSIRT All Rights Reserved. Explanation -> spy ->

    Arthurの場合の処理 “Arthur”を入力 アカウントチェック ※passwordなし 認証エラー 処理時間:0.0002094
  15. Copyright© 2021 みんなのCSIRT All Rights Reserved. Explanation -> spy ->

    Elbertの場合の処理 “Elbert”を入力 アカウントチェック SALT + Stretching 認証 ※passwordなし 認証エラー 処理時間:0.9466392