# NASA 2023 - Homework 0 Announcement
## § Pinned Section
* Contact us: vegetable@csie.ntu.edu.tw
* PDF: [Google Drive](https://drive.google.com/file/d/1msNGT3pbcVK_UJtoHHid0Uq8BBAx3rbq/view?usp=share_link)
* Submission form: [Google Form](https://forms.gle/KG8CfHzA94Zdqpc66)
* Due: 2023/02/23 (Thu.) ++**21:59**++
* Sweet reminder: *tidiness score*
---
## § Announcement
<!-- :::info
Pinned:
<span style="color: red; font-weight: bold">2/20 YouTube link</span> and <span style="color: red; font-weight: bold">2/20 slido link</span> can be found on https://cool.ntu.edu.tw/courses/13536 . Also, we have sent an email about your HW0 score. Please check it and reply by 2/20 23:59.
:::
==**02/22 12:00**==
* We have sent an email about whether you can get enrolled in this course at about 20:00 yesterday. Please check your email inbox.
* If you can get enrolled in this course, you should have received an email with 授權碼 attached.
* If you cannot get enrolled in this course, you can still fill in the [旁聽表單](https://forms.gle/34dq8bgypCM3hwiq6) and join NTU COOL as auditor.
* HW1 released! If you haven't joined NTU COOL yet, you can view this assignment [here](https://cool.ntu.edu.tw/courses/13536/assignments/69597).
==**02/14 09:00**==
* 2/14 YouTube link: https://www.youtube.com/watch?v=xkmF7j2sl9c
* 2/14 slido link (for asking questions): https://app.sli.do/event/gj97AVyGJCKGeX792nr1KA
(The first class on 2/14 (Mon.) will be hosted online to minimize the risk of COVID-19. The YouTube link will be updated here before the class starts.)
==**02/10 21:01**==
If you do not have access to NTU VPN (probably student from NTNU or NTUST), you can use the VPN service of your own school to finish the NA part of HW0. Be sure to mention your school in your PDF if you are not NTU student.
==**02/08 00:00**==
If you want to run the provided VM on the CSIE workstation, you can follow these steps:
1. Use the `qemu-img` command provided in the homework description to convert the vmdk disk format to qcow2 format.
2. Run the VM using the following command. Where \<sshport\> is an arbitrary unused port number greater than 1023 and the \<vncid\> is and arbitrary unused number between 0 to 99. After the VM starts, you can ssh into the VM with \<sshport\> or use the VNC protocol to connect to the VM with port 59\<vncid\>. (Note that you may want to run the command in a `tmux` session.)
```
qemu-system-x86_64 -cpu host -enable-kvm -smp 2,cores=2 -m 4G -hda nasahw0.qcow2 -netdev user,id=n0,hostfwd=tcp::<sshport>-:22 -device virtio-net,netdev=n0 -vnc :<vncid>,password=on -monitor stdio
```
3. After running the `qemu-system-x86_64` command, you will see a qemu shell. If you want to connect to the VM with VNC protocol, type `set_password vnc <password>` in the qemu shell, where \<password\> is the password to connect to its VNC server.
If you have any problem running VM on CSIE workstation, please contact us via vegetable@csie.ntu.edu.tw.
==**02/07 23:23**==
The [Announcement](#§-Announcement) section is reordered so that you can easily see if there are new annoucements.
==**02/07 00:00**==
Due to the maintenance of the CSIE workstations, the servers of SA part will be down on 2/11. If you fail to connect to the servers on 2/11, please patiently wait for the services comming back after the workstations are up. Thank you.
==**02/05 00:00**==
Due to the `sl` package update, which changed some important program logics, the checker program `p11/cage/root/train` will definitely fail to run `sl` successfully. Hence, we should patch `pacman`'s configuration file to freeze the package repository version on 2022/01/20 to avoid this problem. Please overwrite the whole `/etc/pacman.conf` file on the vm with the following content. (Note that if you will use `pacman` in the `cage`, you should also modify the configuration file in it: `sudo cp /etc/pacman.conf ~/p11/cage/etc/`.)
Besides, you might need to downgrade the package if you have already installed `sl` in it. If you do not know how to force downgrade or remove packages in Arch Linux, you can simply remove the whole `p11` directory and extract a new one from `beginner/package.tar.gz`.
After downgrading, your `sl` version should be 5.02-6 instead of 5.05-2. (You can check the version using `pacman -Q sl` command.) Sorry for your inconvenience, thank you.
```
[options]
HoldPkg = pacman glibc
Architecture = auto
CheckSpace
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
[core]
SigLevel = PackageRequired
Server=https://archive.archlinux.org/repos/2022/01/20/$repo/os/$arch
[extra]
SigLevel = PackageRequired
Server=https://archive.archlinux.org/repos/2022/01/20/$repo/os/$arch
[community]
SigLevel = PackageRequired
Server=https://archive.archlinux.org/repos/2022/01/20/$repo/os/$arch
``` -->
==**02/12**==
* [SA P12]
「完全不同」的方法是指,從「策略面」即不一樣的方法,例如題目中有舉例:同一種指令但放了不同的字進去,只會算答對一種。
為了避免大家誤會意思,這邊補充更詳細一點,即使同學用不同指令,但是根本上是在做同樣的行為,就不會視作是「完全不同」的方法,例如 echo "..." > ./0 和 vim ./0 (然後寫入一些字) ,從策略上來看同學都只是在做塞字元進去檔案而已,因此只會算答對一種,即使同學來向我們硬凹你使用了不同的指令,我們也不會給分,還請特別留意。
==**02/09**==
* [SA VM]
目前關於 VM 開機的問題,已知使用 M1 與 M2 晶片的 macOS 電腦在 VMWare Fusion v13會有無法開機的問題,我們建議你:
1. 嘗試使用舊版 v12.2.5 ,[按此前往官方下載頁面](https://customerconnect.vmware.com/downloads/details?downloadGroup=FUS-1225&productId=1040&rPId=98450)
2. 如果舊版在你的電腦上仍然無法開啟,請你先使用非 Apple silicon 的電腦來完成作業,如果你沒有其他電腦,可以至系館 R204 電腦教室完成作業
* [SA P16]
同學可能會遇到廣播還沒關掉但 flag16 已經出現的情況,那是系統漏洞,在「某個特定情境後」會觸發,導致系統錯誤判斷廣播被關閉。
做為網路與系統的管理者,找出系統漏洞與成因也是很重要的技能,因此如果同學直接以此方法繳交 flag 也可以,但仍需寫下你認為這個漏洞產生的原因,且為了避免衍生公平性問題,我們會斟酌扣一點小分數。
如果同學想要拿到此小題完整的分數,建議先把 flag16 刪掉,再遵循正常的管道用指令解題,只要你的方法是正確的,待系統偵測一段時間理論上會再發一次 flag16給你。
==**01/31**==
Homework 0 is released! Good luck & have fun!