Doge
    • 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
    • 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
    • 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 Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
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
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
  • 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
    ###### tags: `PEARL` `lab` # LAB MEETING 2021-09-07 10:05-12:40 Participants: Toby, Jerry, 世宇, Solomon, Phoebe. 其他人遲到(要罰跑校園)。 > Henry (10:00 申請進入會議室,但未被允許進入 > Angela 10:18 > Jeffery 10:35 > Johnson 10:35(?) Scribe: Jerry ## intro - 起源 - ARPANET在初期發展時通常不會考慮安全性,在介紹時如果講到安全性,可以考慮直接講出結果,忽略容易讓人誤解的部份 - ipsec 是在 arpanet 退休時才發展出來的,可以跳過介紹 arpanet - ipsec 不是最廣泛使用的 vpn ## advantage of ipsec - 不依賴於 application - 這可能可以加強補充 - OSI 第七層的 application - SSL - web server 建立雙向連接 - 建立 https 的連線 - layer 4 vpn - 其他意見() - Henry - ipsec 比較像是把第4 or 3(沒聽清楚)層的資料包起來,剩下的部份的都不管 - Edger - ssl 就和 http 走同一個 port,但也不一定不依賴 application - Solomon - SSL vpn: layer 4 vpn; - ipsec vpn: layer 3 vpn; - 驗證、encrypted 的功能 - 每個人學習時都透過已知的理論去學習其他的理論,好的講者要組合聽者已知的理論。 - 提醒 angela - 除非把握所有人對 sip 的註冊熟悉,不然大概聽眾會聽得很混亂 - 加密同時有認證的功能 - 加密是用其他人的 key 發來的,加密可以同時做身份確認的功能 - 驗證只是確認身份,其他人可以看到他的訊息 - CIA - 只單純做驗證 - 機密性沒有獲得 - 加密 - 附帶身份驗證 - 有些國家規定不允許加密,為了避免封包偽造,可以啟用只驗證的模式,在有些國家會觸法 => 驗證發展出來 - transport layer、 network layer 、 application layer - 可以在 ip 那層直接加密,不用擔心內容被偷看或竄改 - Angela - 驗證比起加密更高層級 - 驗證在傳輸時就被加密 encode 在封包內 - 這描述的是 4-way authentication(SIP) - HTTPS - 驗證的安全層級比起加密更高 - Finn - 驗證和加密不能比較 - 不再同一個平面上 - 相輔相成的 - Toby - 驗證和加密不能比較 - 加密會比較好 ## Ipsec Arch ![](https://i.imgur.com/uk3Moqt.png) - domain of interpretation (DOI) - esp protocol - 加密 and 驗證 ### Authentication Header - 對封包 header 進行驗證 - 50 port - 4 icmp 5 udp 6 tcp * Authentication Header 封包格式 * Next Header : 標示 AH 標頭後面的封包格式 * Payload Length : 表示整個 AH 標頭欄位長度 * Reserved * 可能備用做填補空位 * Security Parameter Index : 安全協定 ( AH、ESP )、操作模式、加密鑰匙等等… * 這東西就是要存取某個東西才有 index 但不知道要查什麼 * 會隨著每次的傳送而改變 * Topy 去查 ipsec 得 RFC 文件確認 * 32 bit: 40E 個 enrty? 放了什麼 * Sequence Number : 遞增的序列號,用來防禦重播攻擊 * request 過去再回來利用 slide window 進行防禦 * 避免 replay 得攻擊 * Authentication Data : 包含認證所必需的資料 * ICV ( Integrity Check Value ) 雜湊所得到的東西 1. 傳送端發送之前,會先進行雜湊,附在封包後方 - payload & header 未被加密但有被 hash, aka 數位簽章 - 如果被竄改 ICV 不對的話不用 server 、router 就 drop 掉了 - 防止 ddos 偽造來源 ip 位置 - ICV 不一定是 hash 的結果 3. 使用者接受使用相同雜湊函式解密,就是沒被竄改 4. 如果發現被竄改 ### Encapsulating Security Payload ( ESP ) Packet * Encapsulating Security Payload 封包格式 * Security Parameter Index : 安全協定 ( AH、ESP )、操作模式、加密鑰匙等等… * Sequence Number : 遞增的序列號,用來防禦重播攻擊 * Payload Data : IP 封包所乘載的資料 * Padding : 對齊資料長度是否為 32 位元的整倍數 * Pad Length : 填補資料的長度 * Next Header : 辨識封包裡所承載資料的協定 * 16 進位, 同樣是 4( icmp ) * Authentication Data : 包含認證所必需的資料 ( 此封包已預先進行解密,所以裡面沒有資料 ) * ## Security Association(SA) - 每個訊息都要有對應的 SA - 出/入連線都必須有獨立的安全關聯 - 當一筆 SA 建立連線後,可以在有效期限內重複使用 - 每一筆 SA 只能有一種 Protocol (AH Or ESP) - 不能同時有 AH(50) 和 ESP(51) port 的協定,只能二選一。 - 操作模式 : SA 定義 Transport Mode 和 Tunnel Mode 這兩種模式,Transport Mode 應用於 Host to Host ,Tunnel Mode 應用於 Site to Site - traceroute 在建立了 tunnel 會發現 hup or ttl 只少 1 - tunnel 相當於 virtual link :::info maybe suitable?? ![](https://i.imgur.com/MRnNMjn.png) [ref](http://www.tsnien.idv.tw/Security_WebBook/chap12/12-5%20IPSec%20AH%20%E6%93%8D%E4%BD%9C%E6%A8%A1%E5%BC%8F.html) ::: ![](https://i.imgur.com/zjc6R5U.png) * 傳輸模式 ( Transport Mode ) * 主要對上層協定提供保護,僅加密或認證上層協定的資料 * 僅支援 Host-To-Host 的通訊 * 通道模式 ( Tunnel Mode ) * IPsec 會保護整個封包,當 IP 封包加入 AH 或 ESP 時,整個封包會被**當作一個新 IP 封包的載荷(payload)**。 * 提供 Site-To-Site 的通訊 ![](https://i.imgur.com/38aq4SJ.png) ![](https://i.imgur.com/YbDILxq.png) - site-to-site - 私有 ip address -> 公有 ip address 要經過 Masquerade (Network Address Translation, NAT),但不一定要 NAT - 在 ip 位置不轉換(NAT)時怎麼運作(都是 public ip)? - 第 10 頁的 tunnel mode 的 new ip header 是由這協定生成的嗎 - 是建立連線的兩端透過 ipsec 這格協定產生的 new ip header - 好像沒有 life time 的時間 - 第 10 頁的 transport mode - 加密 payload - 但 header 還是原本的 ip header - src ip address or dst ip address 是可以被看見的 - esp 剛開始只有 transport mode, 那為何有保護 IP address的需求? - 情境 - src ip address 是塔利班統治的地區 ip - dst ip address 是 CIA 的網站 - 結果 - 可能會有保密 ip header 的需求(tunnel mode) - tunnel mode - 要藏身在同一個 router 會比較隱密 - src router 是資工系的 router (很多人一起使用) - dst router 遊戲網站的 ISP (很多人一起使用) ![](https://i.imgur.com/uDNnowa.png) ## What is SSL VPN ### what is SSL - 加密網站 - https - 透過 web server 進行雙端連線 - server to client 的關係 ### IPsec vs SSL VPN - 優勢 - IPsec VPN 不依賴於 Application 的功能 | 而 SSL VPN 需要 Web Server 的功能 - IPsec VPN 支援多對多的功能,如 : Site-To-Site | 而 SSL VPN 只支援- 一對多,如 : Server-To-Client - 劣勢 - 傳輸性能較差,且會耗費大量 CPU > 你拿不加密的跟 IPsec 比而不是跟 SSL 比這樣不公平吧 > [name=solomon] - 需雙方電腦都有 IPsec 套件才能建立起來 - 維護方面較為複雜,不易維護 - 跟 NAT 不大相容(需要做其他設定) ToDo === 1. Toby 去查 ipsec 得 RFC 文件確認如何得到 32-bit 的SPI 2. Toby 補充 IPsec 不經 NAT 的例子 3. Solomon 補充 tunnel mode 4. 下一回輪到 Toby 報告時, Solomon 補充 tunnel & 實驗( including how to use ubuntu as router ); Toby Demo IPSec 5. Toby survey auto set up IPSec 6. 下周 Meeting 9/15 15:00

    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