NCNU-OpenSource
      • 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
    • 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 Versions and GitHub Sync Note Insights 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    ###### tags: `lsa` `ncnu` # Week 13 (2023/05/18) - Book mode: https://hackmd.io/@ncnu-opensource/book [TOC] --- ## 數位鑑識 ### 數位鑑識簡介 #### 什麼是數位鑑識 - 數位鑑識: 對電腦或是一些數位產品進行分析還原過去發生的事情 - 情境 - 執法機關查到線上賭場,他們把可疑的相關紀錄刪除 > 對資料還原,釐清案情眽絡 - 犯罪者用無痕登入社交媒體詐騙金錢 > 無痕不會有 cookie 或是 session,但應用程式執行,系統就會將紀錄在記憶體,可用記憶體鑑識蒐證 - 公司被駭客入侵,內部資料被竊取 > 分析受害者 log file or package,確定攻擊方式找證據 - 個人電子產品被病毒感染 > 停用電子產品,中斷網路,再用防毒軟軟體掃描 #### 困難與挑戰 - 證據大小 - 證據複雜性 - 不同運算設備轉換程映像檔,花費大量精力 - 證據位置 - 有可能在雲端,難易找到 - 多重司法管轄權 ### Linux 系統的數位鑑識 #### 硬體 - 內部硬體 - 外接式硬體 :::success **USB 鑑識** 僅能得知 USB 授權狀況,若是由內部發起的攻擊則不在鑑識範圍 ::: #### Linux Kernel - 開機過程 kernel 會在 ring buffer 留下資訊,透過 syslog daemon 將事件紀錄在 /var/log/kern.log or /var/log/dmesg,防止資料關機後被清除 - 在 kern.log 中可以找到的資訊 - 開機過程的錯誤或警告 - 硬體 attached,detached, modified ... 紀錄 - BIOS 和主機板的資訊 - 主機板可以指出系統的應用(server,PC...) - 韌體版本在查安全漏洞可以參考 - 網路資訊 - 在調查入侵或資料竊取時,發現不曾出現的網路卡,有可能是之前為使用的 port - CPU, file system... :::info - 傳統電腦用 BIOS 第一個磁區的程式碼開機 - 第一個磁區稱 Master Boot Record (MBR),內含 Bootloader 負責將作業系統的 Kernel 載入到記憶體執行,Kernel 載入後開始偵測硬體和掛載根目錄。 ![](https://hackmd.io/_uploads/H1t0QF7Hn.png) ::: #### 系統裝置 - Linux 裝置是一個特殊檔案,通常存放在 `/dev` - 裝置檔類型 | 裝置檔類型 | 存取方式 | Buffer | 設備 | | ----- | ------ | ---- | ---- | | 區塊裝置 | 隨機存取 | 有 Buffer | 儲存設備(硬碟、SSD) | | 字元裝置 | 循序存取(立即性) | 無 Buffer | 滑鼠、鍵盤、printer... | **`/dev` 裝置檔命名** - 每一個磁碟對應到一個裝置檔代號 - /dev/sda, /dev/sdb, /dev/sdc... - SATA 和 SAS 磁碟依字母順序表示 - /dev/nvme0n1, /dev/nvme1n1 - NVMe 磁碟以數字表示,第一個數字代表磁碟,n + 第二個數字代表命名空間 - /dev/mmcblk0, /dev/mmcblk1 - SD 卡用數字表示 :::success **用 dd 取得鑑識映像檔** - 插入有 image 的 USB, 下 `lsblk`,USB 在 ::: #### Shell - 重要概念 - piping(|) 允許某一個程式的輸出傳送給另外一個程式作為輸入 - redirection(>) 把程式的結果存到某一個檔案 - shell 作用 - 一般/原本:讓使用者快速搜尋/選用命令 - 鑑識:保存使用者輸入命令的歷史紀錄 > 最多記錄到 2000 筆就會清掉 - `history` 列出 在暫存檔中的所有指令 - `cat ~/.bash_history` 查看歷史紀錄檔 ### 分析儲存裝置和檔案系統 #### 什麼是分析儲存裝置和檔案系統 - 儲存裝置 - 長期儲存資料 - 關機後,資料還在電腦中 - 記憶體(RAM):短期儲存用 - file system - 管理電腦上的磁碟分割、位置分配 - 負責硬碟上的一切操作 #### 分析磁碟的 partition table - 儲存裝置利用分割區 (partition) 管理空間 - 分割區定義在 partition table:分割區的類型、大小、偏移量... - Linux 中的分割區 - `/` 根目錄,安裝作業系統用 - `/boot` 儲存 bootloader and kernel file - `/var` 儲存可變得系統資料 - `/tmp` 暫時儲存資料,關機後就會全數清除 - `/home` user's home - `swap` 儲存記憶體的 page 和休眠狀態 > 不被視為一種檔案系統,因為他不用於儲存實際的檔案,而是作業系統的管理機制之一 - 為初始化的全新硬體在裝作業系統之前,要對 partition table 選擇,常見的方案: - MBR(Master Boot Table) - GPT(GUID Partition Table) - APM(Apple Partition Map) - None - file system 從零磁區開始儲存,不使用分割區 - MBR 流行一陣子,但 GPT 越發普遍 :::info - 兩種定址模式 - CHS - LBA **CHS vs LBA addressing** - CHS(Cylinders-heads-sectors) 定址通常用三個數字表示,藉由三個數字的組合,可辨識磁碟上的一個區域並讀寫 - `C` 磁柱號碼 - `H` 讀寫頭號碼 - `S` 磁區號碼 - 邏輯區塊位址 LBA - 漿磁碟的磁區看做事硬碟的最小定址單元 - 磁區都有一個唯一編號,從 0 開始 - 作業系統可用LBA 直接讀寫詞盤上的資料 - LBA 取代了原先作業系統須面對儲存裝置映構造的方式,如 CHS **GPT** ![](https://hackmd.io/_uploads/Hyap5YQr2.png) - Protective MBR:為了讓 GPT 知道後面還有其他 GPT 需要讀取 **補充:UEFI** - 由於 BIOS 已經不太適用現今的作用系統,故出現 UEFI :::

    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