1 / 9

網路安全技術 – 期末報告

網路安全技術 – 期末報告. A0933348 高名勳 指導教授:梁明章 老師. 大綱. 緣起 何謂 MBR? LINUX dd 指令 復原 MBR. 緣起. 重灌電腦 失敗 無法進入 OS 安裝系統前以乾淨 linux 光碟冷開機,清除 MBR dd if=/dev/zero of=/dev/hda bs=1024 count=1000. 何謂 MBR (Master Boot Record)?.

joey
Download Presentation

網路安全技術 – 期末報告

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 網路安全技術 – 期末報告 A0933348 高名勳 指導教授:梁明章 老師

  2. 大綱 • 緣起 • 何謂 MBR? • LINUX dd 指令 • 復原MBR

  3. 緣起 • 重灌電腦 • 失敗 • 無法進入OS • 安裝系統前以乾淨linux光碟冷開機,清除MBR • dd if=/dev/zero of=/dev/hda bs=1024 count=1000

  4. 何謂 MBR (Master Boot Record)? • 位於硬碟第0面、第0軌、第1磁區的MBR,在512 Bytes大小的磁區空間中存放著“開機程式”及“硬碟分割表”,因此一旦此區域招受破壞肯定會無法正常開機。

  5. MBR 結構 • MBR (512 bytes)可以分成三個部分: • 前面446 bytes 為開機程式(即Pre-Boot程式) • 由於程式區是在BIOS之後,最先被電腦載入執行的區域,所以像是多重開機管理程式、開機型病毒,以及硬碟資料加密軟體,都是利用安裝或感染程式區的方式,在載入作業系統之前先取得操控電腦的控制權。 • 接著的64bytes就是partition table, 每16bytes代表一個logical HD • 最後2 bytes 一定是55 AA (十六進位)為硬碟有效標誌

  6. LINUX dd 指令 • 即可從標準輸入裝置或檔案讀取資料,經過指定的格式來轉換資料,再輸出至檔案、裝置或標準輸出。 • if = 輸入文件(或設備名稱) of = 輸出文件(或設備名稱) bs = bytes 同時設置讀/寫緩衝區的位元組

  7. 復原MBR • 使用 DOS • fdisk /mbr 重建MBR • 使用 Linux 光碟片開機 • 依序輸入以下指令恢復 Windows MBR • wget ftp://cha.homeip.net/ms.mbr -O /tmp/ms.mbr • dd if=/tmp/ms.mbr of=/dev/hda bs=446 count=1 • exit (重開機時請移除光碟片)

  8. 清除MBR • 使用 Linux 光碟片開機 • dd if=/dev/zero of=/dev/hda bs=446 count=1 • /dev/zero檔代表一個永遠輸出0的設備檔,使用它作輸入可以得到全為空的檔。因此可用來創建新檔和以覆蓋的方式清除舊檔。上面使用dd命令將從zero設備中創建一個446K大小(bs決定每次讀寫446位元組,count定義讀寫次數為1次),但內容全為0的檔。

  9. ~The End~ Thanks for your attention!

More Related