--- title: 1.User Cases tags: UML --- # MCDX ATK&DEF System user cases ## Master ### main thread(20 min/大R) 1. 從channel、TCP/IP接收計分 2. 根據「真值表」計算實際扣分 3. 大R期滿(暨分數表填完),計算總分增減 4. 送入DB,至(1) 5. 產生新flag並傳送經由flag master(pipe) 6. 更新flag(DB) 7. 至(1) ### flag updater(3 sec/r) 1. 接受新的flag - True - 設定<font color="#f00">flag_chg</font>為True - 至(3) - False - 至(2) 2. 每r向Slave發出確認flag指令(**serial port**) - True - 至(1) - False - 扣分 3. 等r之後發送部署flag指令給Slave(**serial port**) 4. 判斷<font color="#f00">flag_chg</font> - True - 不扣分 - 將<font color="#f00">flag_chg</font>設定為False - False - 扣分 5. 至(1) ### service checker(3 sec/r) 1. 每r以「服務正常腳本」檢查服務 - True - False - 扣分 - 至(3) 2. 以「漏洞尚存在腳本」檢查漏洞 - True - False - 允許繳交報告(update DB) - 加分 3. 更新Score board(WEB API) 4. 至(1) ## Slave 1. 接收master指令 - 確認flag - 至(2) - 佈署flag - 至(3) 2. 回傳flag存在與否及內容 3. 回傳佈署狀況 4. 至(1) ## Vpn spy 1. 登入VPN,確認IP取得與否 - True - False - 至(1) 2. 執行[服務正常檢查腳本]400次(20分鐘) - True - False - 回傳flag master的計分API,參考扣分 3. 登出VPN,至(1)