A1 Perceptron
Assignment #1 -- Perceptron
題目
我的答案
如何執行 ( Execution Description )
把 perceptron_code.ipynb 檔案以 GOOGLE COLAB 開啟。
點選 執行階段 > 全部執行 。
實驗結果 ( Experimental Results )
題目 1 實驗結果:
我實作 rand_sample_generation 這個 function ,其有兩個參數 pos_n 和 neg_n ,分別代表 positive label 的資料數量以及 negative label 的資料數量。
rand_sample_generation 有定義題目所要求的一直線,如下:
rand_sample_generation 會在 0.7 * x_tmp - y_tmp + 0.3 != 0 的時候才產生樣本,也就是說不會產生落在線上的樣本。
rand_sample_generation 會產生出指定數量的樣本並且以 random.shuffle 打亂順序。
使用以下程式碼便可以產生樣本 ( 樣本附帶 lab ...
Perfect Secrecy
Perfect Secrecy
簡單來說就是已知密文得出明文的機率與直接得出明文的機率一樣。
這邊要來解釋上面那句話的意思,我們要先知道我們要先有一些假設。假設我們有三個樣本空間 M ( 明文 ) 、 K ( 密鑰 ) 、 C ( 密文 ) ,我們要探討其中的機率分部:
M 機率分部:
由 先驗知識 決定,應該是根據一些我們已知的資訊整理而得。
K 機率分部:
由 密鑰生成演算法 決定。
C 機率分部:
由 M 、 K 以及 加密演算法 決定。
列一下算式,這邊我會用 Pr[] 來表示機率,裡面放的是某個被賦予值的參數:
定義以 k 為密鑰的形成的密文集合:
密文為 y 的機率,其中 y 屬於以 k 這個密鑰加密所有可能的明文產生出來的密文集合,故機率的部分是出現機率為兩者相乘:
在明文為 x 的條件下,密文為 y 的機率,其中 x 屬於以 k 這個密鑰解密 y 這個密文所產生出來的明文,故機率就是密鑰機率:
在密文為 y 的條件下,明文為 x 的機率,這邊應該也可以想成已知密文的條件下,得知明文的機率:
如果一個 Crypto-System 具有 Perf ...
Over The Wire Bandit Walkthrough
Over The Wire Bandit Walkthrough
Link
https://overthewire.org/wargames/bandit/bandit0.html
Slides
pumbling
plumbing
連線進去之後,會看到一堆字串
猜測 flag 可能就在其中,不過手動翻太難找了,直接用 grep 就可以了
First Grep
First Grep
搜尋看看有沒有類似 flag 的字串
whats a net cat
what's a net cat?
連線
Magikarp Ground Mission
Magikarp Ground Mission
用題目給的 password 進到 server 內部
根據線索把 flag 接起來
wave a flag
Wave a flag
觀察檔案
$ file ./warm
發現是一個可執行檔。
執行
$ ./warm
Hello user! Pass me a -h to learn what I can do!
$ ./warm -h
obedient cat
Obedient Cat
$ cat flag
2019 Trendmicro CTF Wildcard 400
2019 Trendmicro CTF Wildcard 400
這篇文章是我練習 2019 Trendmicro CTF Wildcard 400 這個題目時紀錄的解題筆記,我把一些參考資源放在文章最後面。
Permise ( 前情提要 )
You are a network security administrator for the medium sized business XYZcorp. You often use network flow data to uncover anomalous security events. This challenge provides some sample aggregated data on flows, and uses answers from the anomalous ( 反常的 ) events to construct the flag.
Knowledge of network security or protocols is not required. This challenge requires data ...

