# IDunit 第二章 Basic Computer Structure, OS, VM to process --- 課程連結 board.idunit.online ---- ## 開始之前先說好 before we start ---- - workshop 需要的工具 - 筆電 ---- - workshop 會用到的線上工具 [hackmd](board.idunit.online) discord https://discord.gg/UdtEyq slido https://app.sli.do/event/pr46kr0u ---- - 現場資源 - wifi - 電源 ---- - 如果太累 可以睡覺,但請不要打乎吵到其他人。 ---- - 如果覺得講太快 請告訴我 ---- - 由於我們時間有限,我們無法涵蓋所有內容 ---- - 而是挑選幾個代表性的工具跟用法 ---- - 如果覺得內容有誤 - 或覺得講得可以更好 歡迎來意見回饋 bootcamp 工作人員 ---- - 或你有更多想說 - 歡迎報名成為講師 ---- - Greeting I am jeffery - icafe - self-study to open source in security - teapook - London linux scholarship - consult ---- - shell basic last time ---- ### .net + powershell + chocolatey ---- - 接下來是 - Computer Structure - OS unix to linux - VM and some devops - process - isolated bomb ---- - 再來就是 - internet workshop 8/29 - git workshop 9/5 --- ## 馮紐曼架構 [【Lynn 寫點科普】你知道你正在用的電腦是 70 年前發明的馮紐曼架構嗎?](https://www.inside.com.tw/article/9507-von-neumann-architecture) ---- ## processor CPU core ![](https://2static1.fjcdn.com/comments/Gtgt14+gtgt32+gtgt1+gtgt2+_32915279b83ce18ad241dda6eac6a9ef.jpg =400x) ---- ## memory ![](https://cgfrog.com/wp-content/uploads/2016/07/RAM-Chrome-parents.jpg =400x) ---- ## I/O 鍵盤、滑鼠,與螢幕、印表機 ![](https://bournetocode.com/projects/GCSE_Computing_Fundamentals/pages/img/Input_Output_Main.png =400x) ---- 指令集架構(ISA)+ 馮紐曼架構(Von Neuman Machine)= 電腦基礎架構(Basic Computer Structure) ---- 深入了解 [Great Ideas in Computer Architecture (Machine Structures) ](https://cs61c.org/su20/) ---- [Intro, Number Representation](https://cs61c.org/su20/lectures/?file=lec01.pdf) ---- ## buffer overflow ---- security breach [Intel外漏20GB機密資料](https://www.plurk.com/p/ny8qm5) ---- 熵 (資訊理論) https://zh.wikipedia.org/zh-tw/%E7%86%B5_(%E4%BF%A1%E6%81%AF%E8%AE%BA) --- OS https://cs61c.org/su20/lectures/?file=lec18.pdf ---- [作業系統由來 wiki](https://zh.wikipedia.org/w/index.php?title=%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%8E%86%E5%8F%B2&variant=zh-tw&summary=%2F%2A+top+%2A%2F+) ---- # linux [What is Linux?](https://www.linux.com/what-is-linux/) ---- why linux? [https://www.youtube.com/watch?v=o8NPllzkFhE](the mind behind linux) ---- why not windows macOS? [ NSA 要求微軟安置在 Windows 裡的後門... 保護智財, 無可奉告 ](https://ckhung0.blogspot.com/2013/07/nsakey.html) ---- 可是我沒有 linux starting from local --- ## 下載 image ISO image ---- ## mount 看看裡面有什麼 [mount on mac](https://osxdaily.com/2008/04/22/easily-mount-an-iso-in-mac-os-x/) [mount on linux](https://www.cyberciti.biz/tips/how-to-mount-iso-image-under-linux.html) [mount on windows](https://www.howtogeek.com/howto/windows-vista/mount-an-iso-image-in-windows-vista/) ---- linux live system --- starting from vm ---- ## vm 種類 virtualbox,vmware,parrallel desktop [Best virtual machine software of 2020: virtualization for different OS](https://www.techradar.com/best/best-virtual-machine-software#) ---- https://missing.csail.mit.edu/2019/virtual-machines/ ---- virtualbox ---- vmware,parellel desktop ---- hyper-v ---- 連 iphone 都有 https://www.plurk.com/p/nyf7lf ---- 檢查你的作業系統 ``` uname uname -r ``` ---- ## vagrant vm in command tools ---- 以我自己的經驗來說,新安裝一台虛擬機器有一些麻煩之處: 1. 從原始作業系統的映像檔 (iso) 開始下載、安裝,要花很多時間。 2. 對虛擬機器一開始建立的設置有些內容不太熟悉,不知道要選什麼。 3. 網路的設定有點麻煩,尤其是對網路不熟的人,什麼 bridge、NAT 的,我只是希望這台虛擬機有一個 IP 可以讓我從本機連,然後這台虛擬機可以連外。 4. 虛擬機和本機共享目錄的設定。 ---- 以上的問題,透過 Vagrant 都可以輕鬆地解決。Vagrant 的工作流程大概是這樣的: 1. 編寫設定檔 (Vagrantfile) 2. 根據設定檔下載引入 Vagrant box 檔案。 3. Vagarnt 根據設定檔配置,開通並執行虛擬機器,讓它成為運行狀態。 --- ## devops CI/CD continue integret continue deploy ---- docker ![](https://i1.wp.com/www.docker.com/blog/wp-content/uploads/Blog.-Are-containers-..VM-Image-1-1024x435.png?ssl=1) ---- intro 4 piece of linux https://hackmd.io/p8yqWHBcRmyADm7t0RzhnQ - bootloader - kernel - tool chain - rootfs ---- HOW LINUX WORKS WHAT EVERY SUPERUSER SHOULD KNOW ![](https://images-na.ssl-images-amazon.com/images/I/91aesfTYNXL.jpg =200x) --- Process ---- ## SCIP data, program and process ---- process and processor ---- init process ---- process managemnet ---- ``` ps -a ``` ---- top and more https://itsfoss.com/linux-system-monitoring-tools/ ---- ## kill process ![](https://i.redd.it/jbxxoy0acqy41.png) ---- ``` killall ``` ![](https://images-cdn.9gag.com/photo/aYe4jpm_700b_v2.jpg =400x) ---- ``` lsof ``` everything is a file in linux ---- systemd ``` systemctl ``` --- # 沙箱試爆 ---- ## 刪庫跑路 ``` rm -rf ``` ---- ## fork bomb https://www.cyberciti.biz/faq/understanding-bash-fork-bomb/ ---- ## zip bomb - [Gavin Belson gets Zip Bombed - Silicon Valley](https://www.youtube.com/watch?v=3kQysc-C180) - [tech detail](https://www.reddit.com/r/SiliconValleyHBO/comments/4mx5ya/question_about_the_zipbomb_in_the_last_episode/)
{"metaMigratedAt":"2023-06-15T11:56:13.454Z","metaMigratedFrom":"Content","title":"IDunit 第二章","breaks":true,"contributors":"[{\"id\":\"e597b683-1086-4827-a909-b042866d09c2\",\"add\":4984,\"del\":155}]"}
    405 views
   Owned this note