The Attack and Defense of Computers-5

來源:Internet Worms, Buffer Overflow Attacks, and Heap Overflow Attacks (43 ~ 82) Countermeasures of Buffer Overflow Attacks 之前講了幾種buffer overflow的攻擊,接下來要看針對這些攻擊所採取的防禦機制: Data Execution Prevention (DEP):這種機制出現在是讓data段的資料不

Applied Cryptography-5

來源:chapter 3(23~32),Number Theory II (3 ~ 4) 在上一次的尤拉函數中,我們推得了費瑪理論的通式$a^{ \phi (n) } \ \ mod \ \ n \ \ = \ \ 1 \ \ if \ \ gcd(a,n)=1$,這個式子對於餘數系統的乘法反元素非常有幫助,以上面例子來說,a在餘數系統中的乘法反元素就是$a^{ \phi (n) - 1}$,但如果考慮到計算量的話我們會想讓a的指數越小

Linux Operating System-4

來源:Introduction and Memory Addressing: Segmentation Unit (21 ~ 49, 72 ~ 83) Memory Addressing(x32) 在進入主題之前,先來複習一下第一堂課講過的三種address: Logical Addresses 主要是由segment base address加上offset組成,segment base address會在segment

The Attack and Defense of Computers-4

來源:Internet Worms, Buffer Overflow Attacks, and Heap Overflow Attacks (21 ~ 40) Return-into-libc Attacks 上一堂課講的stack smashing是利用return address跳到攻擊者所寫的shell code,由於攻擊者注入的shell code會是在data段,現在大多電腦data段是無法執行code的,所以這邊發展了

Applied Cryptography-4

來源:chapter 2(51~54),chapter 3(1~23) CBC Mode attack concatenation attack 假設今天CBC不用來加密,它只用來進行MAC檢查碼計算,如果沒有處理好的話可能會遭受concatenation attack。它攻擊的樣貌是這樣的:假設今天有兩個合法字串P跟Q,P跟Q的檢查碼假如攻擊者都能接收的到,那麼攻擊者就能發送”類似”P+Q的字串給受害者,並且受害者接收到P+

Linux Operating System-3

來源:Introduction (99 ~ 116),Introduction and Memory Addressing: Segmentation Unit (1 ~ 20) Execution Mode of IA32 在x86架構的processor分為real mode以及protected mode,而在protected mode底下又分為ring0、ring1、ring2、ring3,linux kernel只用到了r

Linux Operating System-2

來源:Introduction (64~98) Linux Source Code Tree Overview跟System Boot up我就跳過了… x32 Calling Conventions 這邊要介紹的是,當C呼叫一個function時參數的傳遞。關於stack frame我在網路攻防這邊有提到一些基礎知識,重複的在這邊就不再贅述。假設今天G function要呼叫H function,則我們稱呼叫者G為caller,被呼

Linux Operating System-1

來源:Introduction (1~52),x86-64,x86 Intel x86 Architecture 講x86之前當然要先講一下它的由來,x86是intel的指令集架構,Intel這家公司成立於1968年,他最早創造了全球第一顆微處理器4004,然後演變成了8位元的CPU 8008,到了1978年x86架構正式誕生,第一款x86架構的處理器是8086,它是一個16位元的處理器,直到80386之後變成了32位元的cpu,

The Attack and Defense of Computers (1~3)

來源:Malware: Logic Bombs, Key Logger, URL Injection, Browser Hijackers, Trojan Horses, and Spyware,Internet Worms, Buffer Overflow Attacks, and Heap Overflow Attacks (1~20) 由於前兩次上課名詞解釋部分較多,這邊做筆記感覺也是把投影片再抄一次(汗…所以就從第三堂課開始~~

Applied Cryptography-3

來源:chapter 2 (23~51) 在進入Block Cipher之前,先來思考一個問題: Question: 加解密,錯誤更正碼(encoder、decoder),壓縮先後順序 假設今天你要將資料m透過網路傳給別人,但資料量太大必須壓縮,而且資料必須保密不能讓第三者看到因此要加密,並且需要保證接收方收到的資料正確無誤所以你希望加個錯誤更正碼降低接收方的錯誤率,問題來了,這三道程序的先後順序要如何排列呢?如果不按照”正確”的程序