Titan Lee
    • Create new note
    • Create a note from template
      • 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
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • 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
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync 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
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
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
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# HITCON FreeTalk 20180119 ``` Last Modified: Create: 20180119 13:23 ``` Hitcone官方共筆 [link](https://hackmd.io/IYTgRsAMaQTAtAZhAEwGbwCxlgdniAMaIaGECmAjISoWAKzCbBA=?view#panel-%E5%95%8F%E9%A1%8C%EF%BC%88%E6%AD%A1%E8%BF%8E%E5%A4%A7%E5%AE%B6%E5%85%88%E4%BE%86%E5%A1%AB%E5%AF%AB%EF%BC%89) ## 暢談 CPU 處理器的歷史包袱 - Spectre & Meltdown 漏洞原理說明與 POC 剖析(講師:Bletchley) > [講師簡報連結](https://drive.google.com/file/d/1E2VXtXTTD4_-IR6sbRvP9MiADKo41zvu/view?usp=sharing==) Execute low privilege code can read unpermitted memory region Google 研究團隊發布漏洞的網站 - https://meltdownattack.com CPU Architecture 中,frontend 是作 fetch and decode 的部分,接著才交給 backend 去做 execution,其中 code (record) buffer 也在這邊 ### out-of-order execution 有時候處理器為了加速,會偷跑排在後面的指令,例如後面指令可能是一個加法指令,而且已經在 register 中,就可能會被選為偷跑項目 但有時候偷跑會發生出錯,一旦出錯,有可能被處理器丟棄,不會 commit 到 CPU 的輸出結果中(memory write) ### speculative execution 這個是 branch instruction 的一種執行方法,會去猜測 condition instrcution 的成立與否,如果猜對了,就會 commit 到 CPU 的 memory 偷跑動作的時候,會去存取記憶體,subsytem cache 不知道是偷跑的,所以還是會把獨進來的資料做處理,這就是漏洞 > [main differences between Meltdown and Spectre](https://www.facebook.com/ENISAEUAGENCY/photos/pb.260742884030702.-2207520000.1516342064./1316708825100764) ### Flush + Reload Attack ``` var = array[ secret* cache_line_size ] ``` 256 accesses time helps discover one byte data () ### CVEs * CVE-2017-5753 * CVE-2017-5715 * CVE-2017-5754 ### Inside the CPU (CPU architecture) * Frontend * Execution Engine * Reorder Buffer * CPU 偷跑後面順序可以先執行的指令 * 若發現偷跑的指令不合法則把指令結果丟棄 * 可是已經把 value 寫到 cache 當中了 * Execution Unit ### Meltdown Proof-of-Concept * Website: https://github.com/IAIK/meltdown > 請問有Spectre的 POC 連結嗎,剛剛投影片太快沒看到 ### Spectre POC https://github.com/crozone/SpectrePoC ## 從晶片設計角度看硬體安全(講師:黃世旭教授) 現代CPU設計由於Multithread & Multicore的因素CPU執行指令運算之前需要peak一下CPU的狀態與看預算時需求的Memory是否會產生lock,這個過程會在CPU的底層做(注意到這裡OS已無法管理,指令並須被執行除非CPU drop這個指令,CPU drop會通知回OS) 利用這個方法去看CPU Handle的記憶體區段Peak其他區域的記憶體位置(OS無法阻擋),或者CPU上的Memory管理機制重新回Initial state ![](https://i.imgur.com/eXEUSuc.png) 在邏輯電路裡設計狀態機(FSM)時傳統訓練方法有don't care condition可能會造成電路運行時產生你所不期望的狀態循環,例如重回initial state,所以設計時不太應該使用don't care(雖然可以節省電路成本與最邏輯複雜度最佳化),但為了安全性,應當把所有組合列出,額外去處理不期望的例外。 ![](https://imgur.com/6Zqob33) ![](https://imgur.com/DbtocCO) ![](https://imgur.com/kPUIcfX) ![](https://imgur.com/fQNbHiU) PUF -> physical unclonable function [Some basic description about PUF](https://en.wikipedia.org/wiki/Physical_unclonable_function) 電路最佳化問題 - 電路複雜度 - 電路成本 - Data Store(Cache & Register )漏電問題 - 面積 Intel identified the vulnerabilities as: CVE-2017-5705 – Multiple buffer overflows in kernel in Intel ME Firmware allowing an attacker with local access to the system to execute arbitrary code. CVE-2017-5708 – Multiple privilege escalations in kernel in Intel ME Firmware allowing unauthorized processes to access privileged content via unspecified vector. CVE-2017-5711 & CVE-2017-5712 – Multiple buffer overflows in Active Management Technology (AMT) in ME Firmware allowing attacker with local access to the system to execute arbitrary code with AMT execution privilege. CVE-2017-5706 – Multiple buffer overflows in kernel in Intel SPS Firmware 4.0 allow attacker with local access to the system to execute arbitrary code. CVE-2017-5709 -Multiple privilege escalations in kernel in Intel SPS Firmware 4.0 allows unauthorized process to access privileged content via unspecified vector. CVE-2017-5707 – Multiple buffer overflows in kernel in Intel TXE Firmware 3.0 allow attacker with local access to the system to execute arbitrary code. CVE-2017-5710 – Multiple privilege escalations in kernel in Intel TXE Firmware 3.0 allows unauthorized process to access privileged content via unspecified vector. 原文: https://meltdownattack.com/meltdown.pdf ## Spectre & Meltdown 漏洞的修補策略與 risk mitigation(講師:gasgas) windows 微軟提供新的PowerShell你可以檢查是否已更新 安全最大風險:Browser 使用 JavaScript 打包 POC 放在網路上,瀏覽器看了,記憶體的資料就被偷了。 https://xlab.tencent.com/special/spectre/spectre_check.html * CPU Level 修補 : intel microcode update AMD will make optional microcode update * 程式千萬別看錯執行錯,變磚機率爆高! * 目前還不是 CPU Microcode 修補的好時機,可能都只是暫時修補,後續的修補應該會比較全面也比較安全。 * BIOS Level * 修補會是個比較好的選擇 (其中也包含 CPU Microcode),變磚機率低一點點。 * BIOS Update 只能修補其中一個 Spectre 的弱點 * OS Level 修補 * Amazon (AWS)/(VMware) 已修補 * Application Level 修補 微軟在核心地方插旗標,VS也有個選項,自動幫你path > Visual Studio 2017 version 15.5 /Qsperctre lfence :系統執行到此會停止預先運算 **請愛用官方修正程式** **漏洞衍伸物 ➡️ skyfall and solace** ## 詭譎多變威脅下的資安應變與治理(講師:微軟-林宏嘉協理) ===廣告略過=== XD 微軟

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