or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Network Security (大家網安期中考加油,by 安鳳)
Spring 2018
- Network Security (大家網安期中考加油,by 安鳳)
- Ch1. Introduction.
- Ch2. Symmetric Encryption and Message Confidentiality
- Concept correction here:
- Common type of the cryptanalysis
- Feistel cipher architecture
- Model of symmetric encryption
- RSA Encryption standard
- DES Encryption standard
- From DES to 3DES
- AES Encryption standard
- The truly random number and pseudo random number
- Block cipher vs Stream cipher
- Ch3. Message Authencation and Public Key Cryptography
- Message Authencation Code (MAC)
- Secure Hash Functions
- Hash collision, strong vs weak
- SHA Note, NOT AN Encryption standard!
- Hashing, Why and How?
- Hash-based message authentication code (HMAC)
- HMAC vs CMAC??
- Message encryption vs Message digestion(hashing), what is the difference?
- Authenticated encryption (HMAC x CMAC x CCM = CMAC + AES block cipher + CTR block mode)
- Public key cryptography
- Private key vs Secret key, what is the difference?
- Diffie Hellman key exchange
- Man in the middle attack (MITM)
- Ch.4 Key Distribution and User Authentication
- Key distribution
- Kerberos and its components
- Timestamp portocal vs Challenge-Response Portocal
- Comparison b/w Kerberos v4 and Kerberos v5
- What is mutual authentication and why we need it??
- Key distribution with asymmetric encryption (Public key certificate)
- What is the difference b/w the digital signature and public key authentication.
- Why chain of trust??
- PKI, CA, Key…etc great explanation video
- When to revoke a user's certification??
- The PKI architecture
- Ch.5 Cloud Security
- 802.1X, EAP(A framework)
- Cloud Couputing
- Data protection in the cloud
- Ch.6 Transport-Level Security
- SSL Architecture
- SSL Record Portocol
- Pre master, master secret, private, shared / session key
- Cryptographic Computations
- TLS, HTTPS = HTTP + SSL/TLS HTTP under a secure transport layer
- SSH
- SSH Channel types
- Port Forwarding
- Ch.7 Wireless Security
- Protect against wireless eavesdropping
- Protect the access point
- Mobile device security
- 802.11i Wireless protocol
- WEP, WPA, RSN
- 802.11i Fourway handshake auth.
- Ch8. EMAIL Security
- PGP (Pretty Good Privacy)
- S/MIME
- DKIM
- 2nd midterm note
- 2014mid2
- 2015mid2
- 2016mid2
- 2017mid2
- Ch9. IP Security
- 概念
- IPSEC的應用
- 路由方面的應用
- IPSEC中的資料
- IPSEC所提供的服務
- 兩種模式 transport mode 或是 tunnel mode
- 安全關聯(Security Association)
- 防止重放攻擊
- 結合數個SA
- ESP wiht authentication在兩種模式下的情況
- 傳輸相鄰(transport adjacency)
- 傳輸與隧道複合(transport-tunnel bundle)
- 網路鑰匙交換(internet key exchange, IKE)
- ISAKMP/OAKLEY
- Ch.10 Malicious Software
- 粗略分類
- 發展史
- 電腦病毒
- 以攻擊的目標分類病毒
- 以病毒如何規避偵測來分類
- 巨集以及腳本病毒
- 電腦蠕蟲
- 行動的程式碼(mobile code)
- 下載感染(driven-by-downloads)
- 垃圾郵件
- 木碼軟體
- 惡意軟體會做的傷害(payload)
- 殭屍網路的使用(use of bots)
- 對於惡意軟體的對策
- 掃毒軟體的演進
- perimeter-scanning
- 對抗蠕蟲
- DDoS
- Ch11. Intruder
- thee classes of intruder
- 對抗hackers的系統
- insider attack
- way to protect password file
- intrusion detection
- honeypot
- pdf p29 30(考前一天看,內容偏死記)
- password management
- Ch12. Firewalls
- Firewall characteristics
- Types of Firewalls
- Firewall comparison
- Bastion host
- Host-based firewall
- Personal firewall
- DMZ
- Firewall locations and Topologies(建議考前一天看,偏死記)
- Final exam note
- 2012Final(Jan. 11 2013)
- 2015final(Dec. 29 2015)
- 2016final(Jan. 3 2017)
- 2017final (Jan. 2 2018)
Lecturer: Shiuhpyng Shieh
tags:
NCTU CS
共筆
CS
IOE 5048
Ch1. Introduction.
Ch2. Symmetric Encryption and Message Confidentiality
Concept correction here:
Common type of the cryptanalysis
Brute force attack
Ciphertext only attack
Known plaintext attack
Chosen plaintext attack
Difference b/w known plaintext and chosen ciphertext
See here
Chosen ciphertext attack
Feistel cipher architecture
Model of symmetric encryption
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →keep the secret key as safe as possible.
RSA Encryption standard
This encryption standard mainly focus on prime factorisation
更多資訊可以參考外星人的筆記
Course project1. Chosen cipher attack
DES Encryption standard
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Image src
DES Briefly introduction
From DES to 3DES
DES is not so secure since the key is 56bits long, which is quite prone to BF cryptanalysis
3DES lengthens the key of DES (56 * 3 = 168), doing DES 3 times to make the encryption safer.
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Please feel free to refer to my classmate's note for more information
For encryption procedure:
P–E(K1)–A–D(K2)–B–E(K3)–>C
C–D(K1)–B–E(K2)–A–D(K3)–>A
Since the Fiestel architecture, the encryption and decryption method are just the reverse of each other.
For decryption procedure:
AES Encryption standard
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Image source from textbook
One grey-coloured box is the one "round" of the encryption in AES
Each of the round we take the preceding round's output as the input of this round and do the encryption again, with the following 4 tasks to be done
1.The Substitution Bytes is to use the non-linear transform to let the input transformed with a "Affine transformation", making the encryption robust and hard to be cracked
2.The Shift Rows(Bit transposition) is shifting the data, to rearrange the text, for row i we shift i-1 times to the left.
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Image source from wikipedia
3.The Mix Columns is a linear transform under the mod multiplication
4.The Add Round Key is let the input XOR with the Key in the current state. (Rijndael key generator solution,which is a subkey in each round, which we can be seen from the image provided above that Key(16 bytes and expand to match for each round, divided into 10 subkeys for 10 operations in AES encryption))
5.After the aforementioned four steps are done, go to the next encryption box. The operation is bytewise
The truly random number and pseudo random number
Applications of the random number
1.RSA pub-key generation and other pub-key algorithms.
2.Session key for encryption in system such as Wi-Fi, e-mail
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Image source from wikipedia
The following 2 criteria are used to validate a sequence is random.
1.Uniform distribution: The each element in the seed of random number must take the same proportion of being taken out.
2.Independence: A sequence cannot be inferred from the other sequence, strictly and absolutely.
Block cipher vs Stream cipher
Stream cipher
The key of such encryption algorithm should have a extremely large period and as random as possible, o.w. it is crack-prone.
In order to guard the BF attack, the longer key is preferred (However there is a trade-off b/w speed and security.)
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →As we can see the sender and receiver generate the same key for encryption and decryption.
Image source from textbook
1.An algorithm with changeable key length encryption.
2.SSL TLS WEP WPA use this encryption algorithm
3.Easy to implement in both HW ans SW, but terminated in 2015 due to attack
RC4 Encryption procedure
1.Shuffle the key, make it randomised.
2.Get even more shuffle data, each time for a input byte, locate the i and j value by take the value in the key, XOR the inputByte with the key (since the reverse of XOR operation is itself, once we insert the ciphertext we'll get plaintext, and converse is true as well.)
Block cipher
Use the same key for the text, and divide the text into blocks, processing ONE BLOCK for each time. Processing procedure including shift position, substitute text to let the plaintext look similar, however, generating the
totally different ciphertext for cryptographically secure.
The AES(128 bits per block), DES(64 bits per block), 3DES(64 bits per block) are lie in this category.
5 Block modes for the block cipher, defined by NIST USA. Intended to use for the symmetric cipher. .
1.Electronic Code Book where Encryption: ciphertext[i] = code_book[plaintext[i]] just. Need a decryptor to do reversed tasks.
2.Cipher Block Chaining, take the step i's ciphertext XOR with next step's plaintext and encrypt again. If there is a bit error in the ciphertext, it will cause the decryption of plaintext i and plaintext i+1 error since they are chained together from step to step.
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →3.Cipher FeedBack , only the encryptor is needed, 2 times of encryption is equivalent to decryption (Reason: ).
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →4.CounTeR , use the counter directly for the key of encryption. Can be processed parallelly since each block can be processed with its counter and independent with other blocks, random access is suitable as well. And use the same key for decryption due to the properties of XOR operation, once the ciphertext XOR key –-> plaintext is decrypted.
The CTR mode is both HW and SW efficiency (parallelism are able to implemented in both CPU and compiler, OS …etc).
What's more, the preprocessing can be done as well, even without the presence of the plaintext, we can still generate the required key and the next task is just let plaintext XOR key –-> ciphertext.
5.Output FeedBack similar too Cipher FeedBack, take the ciphertext from previous round and encrypt again
Useful reference site ,MUST READ!!!
Ch3. Message Authencation and Public Key Cryptography
Message Authencation Code (MAC)
Image source from wikipedia
Secure Hash Functions
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →1.Collision and preimage-found resistant, making it unable to do the reverse of hash to forge the data.
Hash collision, strong vs weak
Strong
Given an arbitrary x there exists no x' with x' != x so that h(x) = h(x')
(更厲害,無法找到任取兩個產生相同雜湊數值)
Weak
There exist no given x, and will be infeasible to find x' with x != x' so that h(x) = h(x') (一個已知找無法找到另一個產生相同數值的雜湊)
SHA Note, NOT AN Encryption standard!
Term explanation (waiting for the answer from OAlienO)
1.Message Digest Size: Message digest, MD(same as MD of MD5), of how much data amount we output, such as in the following SHA1 algorithm, we produce 160bits output (hex * 40 = 160).
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →2.Message Size: Message amount that we can process in one time(Maxium input).
3.Block Size: In block cipher, cut all the message into several blocks, in the block is how much message in a block to be processed
4.Word Size: A size of a given state.
The following are the Message digest from the SHA512.
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Hashing, Why and How?
hash youtube
result is called Avalanche Effect. It ensures the security of hash algorithm.
Hash is doomed to be broken or cracked, what matters is that we have to try out best to lengthen the time before being cracked
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Hash-based message authentication code (HMAC)
Watch out the color correspondence for better understanding the procedure
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →HMAC vs CMAC??
so hmac vs cmac
Message encryption vs Message digestion(hashing), what is the difference?
so encryption-vs-digest
so how-is-an-md5-or-sha-x-hash-different-from-an-encryption
hash ,encryption and more
so why-should-i-use-authenticated-encryption-instead-of-just-encryption
key difference between encryption and hashing is that encrypted strings can be reversed back into their original decrypted form if you have the right key ex. RSA AES DES …
Hashing is great for usage in any instance where you want to compare a value with a stored value, but can't store its plain representation for security reasons. Other use cases could be checking the last few digits of a credit card match up with user input or comparing the hash of a file you have with the hash of it stored in a database to make sure that they're both the same. ex. MD5 SHA …
1.For example in SHA family 能計算出一個數位訊息所對應到的,長度固定的字串(又稱訊息摘要)的演算法。且若輸入的訊息不同,它們對應到不同字串的機率很高。
OAlienO : SHA 不是加密因為他沒辦法解回原本的 input
Authenticated encryption (HMAC x CMAC x CCM = CMAC + AES block cipher + CTR block mode)
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Public key cryptography
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →so What is we encrypt with private key??
Private key vs Secret key, what is the difference?
Diffie Hellman key exchange
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Math theory behind this algorithm
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Since the process of RSA is quite burdensome (numbers in it are extremely huge) so if we can back to the traditional symmetric encryption such as AES (just now we need a "secure pipe" under the "insecure pipe") to perform key exchange.
Than the end-to-end encryption can be achieved, what's more, this method is faster in which stream cipher are performed
Man in the middle attack (MITM)
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →And the wikipedia analogy ,note: sequence different from the image
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →The core idea about this is still the mathematical expression, for example for the secret key K1, since Darth intercepts the message, then he can forge the key with his secret key XD2 ,due to the following mathematical theory about modulo exponential.
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →So Alice is able to acquire the secret key via her own private key XA due to the upper math theory. BUT SHE DOES NOT KNOW THAT YD2 ACTUALLY COMES FROM DARTH and DARTH now share the same key with Alice, so Alice thinks that Darth is Bob!! and the same is true for Bob!!
Originally the shared secret key should be lie on the mathematical expression like this
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Rather than this
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Ch.4 Key Distribution and User Authentication
Key distribution
Kerberos and its components
Authencation server (AS)
Ticket granting server (TGS)
wikipedia for detailed procedure
Detailed explanation video
Timestamp portocal vs Challenge-Response Portocal
Timestamp portocal
But how come will this happen??
If the system time is not synchronised, then suppose the end point EA is slower, then the MITM can intercept the message b/w two endpoint and resend the password again to hack and pretend to be the genuine user. What's more, since the time is slower in EA, then as the MITM intercepts data and resend, it does need some time to "RETRANSMIT" , but it is the slower time that allows the delay of retransmit time not be discovered if the time difference |T_received - T_send| < epsilon is not so strict.
Challenge-Response Portocal
Server sends a unique challenge value sc to the client
Client sends a unique challenge value cc to the server
Server computes sr = hash(cc + secret) and sends to the client
Client computes cr = hash(sc + secret) and sends to the server
Server calculates the expected value of cr and ensures the client responded correctly
Client calculates the expected value of sr and ensures the server responded correctly
where
sc is the server generated challenge
cc is the client generated challenge
cr is the client response
sr is the server response
Comparison b/w Kerberos v4 and Kerberos v5
Reference here
What is mutual authentication and why we need it??
疑問:Mutual authentication 相較於 one way 他的好處是 可以同時驗證 伺服器方和使用者方嘛??
就是伺服器能確認這個user 而且使用者也可以確認這個server
但是原本只有usr來確認server
多出這個server來確認usr 會有什麼優點呢?
解答:因為user和server都有可能被仿冒,因此需要雙重認證雙方。
Both the server and client may be inpersonated, so we need to verify their real identification.
Key distribution with asymmetric encryption (Public key certificate)
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →What is the difference b/w the digital signature and public key authentication.
A digital signature is used to verify a message. It is basically an encrypted hash (encrypted by the private key of the sender) of the message. The recipient can check if the message was tampered with by hashing the received message and comparing this value with the decrypted signature (decrypted the signature with the public key from the sender).
To decrypt the signature, the corresponding public key is required. A digital certificate is used to bind public keys to persons or other entities. If there were no certificates, the signature could be easily be forged, as the recipient could not check if the public key belongs to the sender.
Original discussion thread
Similar reference
Chain of Trust YouTube video
So a question comes to my mind, What is the differenct b/w HTTPS,TLS and SSL?
1.TLS is just the new name (or say acronym) of SSL Namely, SSL protocol got to version 3.0; TLS 1.0 is "SSL 3.1". TLS versions currently defined include TLS 1.1 and 1.2. Each new version adds a few features and modifies some internal details. We sometimes say "SSL/TLS".
2.HTTPS is the HTTP under the secured transmission protocol, i.e. HTTPS is HTTP-within-SSL/TLS. SSL (TLS) establishes a secured, bidirectional tunnel for arbitrary binary data between two hosts.
Why chain of trust??
, however, we are still not sure about whether the issuer of the digital certificate is the real "good guy" or the "forged guy."
wikipedia ref
PKI, CA, Key…etc great explanation video
Here
When to revoke a user's certification??
include subject’s name has changed, the certificate is
superseded, or the certificate was not issued in conformance
with the CA’s policies
The PKI architecture
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →PKI YouTube video
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Ch.5 Cloud Security
802.1X, EAP(A framework)
exchange of authentication information between a
client system and an authentication server.
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →1.EAPOL(OL stands for data encapsulation)-Start, start the eap
2.EAPOL(OL stands for data encapsulation)-EAP(REQ/IDENTITY) auth server wants to know the identity />
3.EAPOL(OL stands for data encapsulation)-EAP(RESPONSE/AUTH) five the clinet response
4.EAPOL(OL stands for data encapsulation)-Logoff end the connection
Cloud Couputing
describing, discussing, and developing a system-specific
architecture using a common framework of reference.
hardware resources such as the network server and hosts…etc
1.Carrier: Provide the transport b/w cloud services and consumers
2.Auditor(稽查員): Assures that THE CP conforms to a certain cloud standards
3.Broker(經紀人):Help the consumer to manage the cloud service when it is too complicated.
Data protection in the cloud
The rest of cloud computing will be read before the midterm 2
Ch.6 Transport-Level Security
SSL Architecture
wikipedia
NetAdmin
SSL Record Portocol
such that we may check whether the data has been modified or not.
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Pre master, master secret, private, shared / session key
Check here
Cryptographic Computations
TLS, HTTPS = HTTP + SSL/TLS HTTP under a secure transport layer
SSH
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →SSH Channel types
Port Forwarding
SSHPF
Useful features of SSH
Insecure TCP -> SSH (Change the port from TCP to SSH)
SSH force the traffic in the TCP change to the SSH layer.
Local vs Remote PF
Local vs Remote ??
1.Local 自己連向更遠端的伺服器,從自己的角度看將自己的a埠經由ssh隧道連向(轉發導向)遠端remote server的b埠,藉由remote server傳到更遠端的faraway host
2.Remote 當遠端伺服器想要連回來時,從自己的角度看將遠端的a埠經由ssh隧道連向(轉發導向)我這端local server的b埠,藉由local server連向我一旁的near host
Ch.7 Wireless Security
Protect against wireless eavesdropping
Protect the access point
Mobile device security
802.11i Wireless protocol
WEP, WPA, RSN
802.11i Fourway handshake auth.
provides message integrity and data confidentiality.
Ch8. EMAIL Security
PGP (Pretty Good Privacy)
can be used for electronic mail and file storage applications
1.Digital signature: DSS, RSA , SHA
2.Message encryption: CAST, IDEA, 3DES
3.Compression: zip
4.email compatibility: Base64 encryption
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →PGP Authencation
PGP Confidentiality and Authentication
PGP Compression
PGP E-mail Compatibility
S/MIME
MIME
S/MIME Functionality
encrypted content encryption keys for one or
more recipients.
base64 recipients without S/MIME
capability can view the message content,
although they cannot verify the signature
Cryptographic algorithms used in S/MIME
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →S/MIME Certificate Processing
–>Local wil maintaining the certs needed
to verify incoming signatures and to encrypt outgoing messages.(MACV人的證書來檢驗別人的數位簽有以及要用自己的證書來為
DKIM
YouTube
2nd midterm note
2014mid2
客戶端在進行EAP拓展認證協議的時候是透過uncontrolled port和認證伺服器溝通,這個協議的標準制定在802.1X
在每一個SSL session和connection中 他們的參數會彼此互相分享,例如加密方法與秘鑰匙長度,session 和conenction他們的差別在於:SSL session與SSL connection是不同的概念。 SSL session指的是通過握手而產生的一些參數和加密秘鑰的集合;然而SSL connection是指利用某個session建立起來的活動的會話。換句話來說,connection是會話的進程,而session是建立這個會話所需要的一些參數。
(修正過!)SSL中 加密、MAC、壓縮可能的順序有六種,但其中合理的可能只有加密在壓縮之後!(壓縮前就加密,因為資料已經變成祕文,有可能壓縮會ERROR)
WEP的缺點就是 因為C1 = P1 XOR RC4(IV, K). 如果蒐集夠多的資料則很容易找出許多的Ci Pi對,這樣就容易找出之中的RC4加密關係,進而破解秘文,加上RC4是一種stream cipher模式,需要夠長的key,但WEP只有24bits,因此很容易重複(stream cipher是希望key不要重複,因此2^24太小,容易重複)
PMK–>PTK(暫態)–>KCK(EAP confirmation,用來保障四次握手交換協定鑰匙交換的完整性)+KEK(EAP encryption, 用來保證四次握手交換中GTK、RSN IE 的機密性,就是確保這個鑰匙不不會被盜用)+TK(traffic encryption, user traffic 的機密性與完整性,在用戶和伺服器之間的資料加密)
WPA加密的4路交互協定,因為有 SNonce 和 ANonce 用來組成TK,故能確保freshness
更詳細請點此
2014最後一題,如果是用郵件的本身內容來加密,而並非郵件的雜湊數值加密依然可稱作簽章,但是效果相當差,因為是整份郵件,計算量太大了,加上因為是用寄件人的私鑰加密,因此很容易用寄件人的公鑰打開,再加上隨便亂說解密前的東西就是簽章便會造成風險
2015mid2
2016mid2
以下有討論的題目
A(O)SNonce ANonce
B(X)應該是TK(?)
C(O)用Nonce
D(O) E(X)應為AP
A:對,因為有Nonce組成TK,
B:應該對,吧? 但是GROUP KEY提到如果有一個裝置離開了,就會變更,
C:沒有,吧? 因為他是採用RC4stream cipher,KEY會一直變
D: TKIP也是採用RC4的stream cipher 所以KEY會一直變
A: a–noncea–>b b–nonceb–>a one way 2times, 2 way four times??
C: both吧?, replay attack沒有用因為會有nonce確保信息是最新的
2017mid2
以下有討論的題目
全部
a,b,c,d,e,f,g,h
(i) 用來產生PTK
(ii)因為週期性的設定為0,那麼同樣為0的兩個nonce有可能代表不同的時間點,所以容易遭受replay attack
(i) WEP key只有24bits,因此很容易重複(stream cipher是希望key不要重複,因此2^24太小,容易重複)
(ii) 因為C1 = P1 XOR RC4(IV, K). 如果蒐集夠多的資料則很容易找出許多的Ci Pi對,這樣就容易找出之中的RC4加密關係,進而破解秘文
Ch9. IP Security
概念
IPSEC的應用
在網路上遠端連結的安全
路由方面的應用
IPSEC中的資料
IPSEC所提供的服務
兩種模式 transport mode 或是 tunnel mode
安全關聯(Security Association)
def: 在兩個網路實體之間,所建立起的共享網路安全屬性。(介於發送者與接收者之間的單向關係)
ex: 在IP封包中,以鐘點地址的IPV4 V6封包中的SPI資訊作為安全關聯的定義(SPI 安全參數 in the enclosed extension header)
兩個重要的東西來確保安全關聯的運作
Ipsec 的SPD和SAD详解 - CSDN博客 與搭配課本的圖表一起看,可以知道,在SPD中查到有相符的來源與目的以及端口後,就可以套用其中SPD的規則,也就是網址中的執行協議或是pdf中的action。

英文單字: outbound: 送去外面、向外發送的;inbound: 送去裡面,向內送的
以下為流程圖兩張


ESP詳細解釋
在tunnel mode中會有一個新的ip header(new ip header)
防止重放攻擊
結合數個SA
ESP wiht authentication在兩種模式下的情況
傳輸相鄰(transport adjacency)
傳輸與隧道複合(transport-tunnel bundle)
C * 結果就是整個認證的inner packet都被加密了,而且還附上了新的ItP頭 C
網路鑰匙交換(internet key exchange, IKE)
ISAKMP/OAKLEY
All the pics , images credits to the original author, I only use it for the education purpose, please DO NOT distribute
Ch.10 Malicious Software
粗略分類
發展史
電腦病毒
介紹
架構
階段
壓縮病毒(compression virus): 將自己解壓縮附加(prepend)到其他執行檔之中,可以用來規避size checking的掃毒方式
以攻擊的目標分類病毒
以病毒如何規避偵測來分類
巨集以及腳本病毒
電腦蠕蟲
一個會自己找機器來感染的程式
為了複製,可能會用以下方式來接到遠端機器
蠕蟲的運作階段和病毒一樣,看上方提過的即可
與電腦病毒不同的是,電腦蠕蟲不需要附在別的程式內,可能不用使用者介入操作也能自我複製或執行
蠕蟲如何發現目標
蠕蟲的技術(worm technology)
行動的程式碼(mobile code)
下載感染(driven-by-downloads)
垃圾郵件
木碼軟體
惡意軟體會做的傷害(payload)
system corruption: (自己看XD)
attack agent: 惡意程式佔據(好像叛軍一樣)了網頁或是服務,在用被占據的網頁或是服務來發動攻擊,因為是佔據他人的地盤所以難以溯源
information theft:竊取個資,例如
偷偷進入系統(stealthing)
殭屍網路的使用(use of bots)
對於惡意軟體的對策
掃毒軟體的演進
host-based scanner 以主機為主的
host-based + behavor-blocking
perimeter-scanning
對抗蠕蟲
DDoS
Ch11. Intruder
thee classes of intruder
(奪取系統管理員控制權限的人)
對抗hackers的系統
insider attack
way to protect password file
one-way function: 只儲存密碼經過單向函數運算後的資料(例如雜湊數值,而非密碼本身)(The system stores only the value of a function based on the user’s password)
access control: 限定只有一個或少數幾個帳戶可以存取密碼檔(Access to the password file is limited to one or a very few accounts)
intrusion detection
系統的第二道防線(system’s second line of defense ),因為已經有人突破柵欄進來了,現在就是要監測那個進來的人。
Profiles of Behavior of Intruders and Authorized Users(那張圖)說明 : the nature of the task confronting the designer of an intrusion detection system. Although the typical behavior of an intruder differs from the typical behavior of an authorized user, there is an overlap in these behaviors. Thus, a loose interpretation of intruder behavior, which will catch more intruders, will also lead to a number of "false positives," or authorized users identified as intruders. On the other hand, an attempt to limit false positives by a tight interpretation of intruder behavior will lead to an increase in false negatives, or intruders not identified as intruders. Thus, there is an element of compromise and art in the practice of intrusion detection.
audit record
Threshold detection : 計算某一事件發生的次數,如果次數超過一個特定數字就代表有可能遭受入侵(簡陋且沒效率的方法)
Profile-based : 以過去的行為和現在的比較後,如果有重大偏差(detecting significant deviations)代表可能遭受攻擊
Rule-Based Intrusion Dectection : 嘗試訂定一些規則規矩,專門用來檢查出系統是否有不當的入侵的方法
分散式入侵者檢測(distributed intrusion detection)
honeypot
pdf p29 30(考前一天看,內容偏死記)
password management
Ch12. Firewalls
Firewall characteristics
design goals for a firewall
(所有內到外或是外到內的流量都必須要經過防火牆)
(只有經過授權的流量才可以被允許通過 EX. 區域安全政策的設定)
(防火牆本身對侵入具有免疫力)
techniques that firewalls use to control access and enforce the site's security policy
firewall expectations
firewall limitations
Types of Firewalls
Packet filtering firewall(設定規則檢查IP封包)
– 難以設計出一組長期有效又正確的無誤過濾規則。
– 無法處理應用層協定,所以對於封包資料段或特定應用服務弱點的攻擊方式無能為力。
– 缺乏驗證能力。
– 安全性較差。
Stateful inspection firewall
PROXY 概念
Application proxy firewall
Circuit-level proxy firewall
Firewall comparison
Bastion host
Host-based firewall
(用來檢驗indivitual host的軟體模組,host在server或是個人電腦都可)
Personal firewall
(控制 個人電腦或工作站 到 網路或企業網路 的流量)
DMZ
Firewall locations and Topologies(建議考前一天看,偏死記)
Final exam note
2012Final(Jan. 11 2013)
(3) IPSec 可以用滑動視窗來阻擋重放攻擊,具體流程如下,首先在滑動視窗中,如果有一個封包的序列號小於視窗最小的(也就是位於視窗的左側,則是為重放攻擊,因為那是之前已經接收過的封包),如果封包序列號可以落在視窗中,而且之前還沒有被接收過,則是為新的封包接收他,如果已經有mark為接收過則也是蟲放攻擊,拋棄他,如果封包再視窗的右邊,右邊都是還沒接收過的,是一個全新的封包,則將其接受後,把視窗往右滑動。
(4) keyspace大的password會比較安全,而已經建立於dictionary的是最不安全的密碼
(5) 檢測攻擊者的兩種方法
(6) 監控資料中,資料可能會相當龐大,每一個都看的話太耗時了,所以要有選擇性(selectivity)
(7) 見上方筆記,簡單來說蜜罐就是一個和主要nerwork隔開的系統,偽裝豐富、有利用價值的資訊吸引印駭客往那裏走,從而保護主要網路裝置,並且蜜罐是被監測的,因此可以用於收集攻擊者的資料以便資安分析。
(8)
(9) 攻擊的方法請建上方筆記,影響packet filter的方法如下
(10)
2015final(Dec. 29 2015)
以下有疑問,還煩請助教解答:
2016final(Jan. 3 2017)
因為沒有正解,所以以下有疑問的也煩請助教解答:
(1) 連線公司的分部,應該採用tunnel mode就好,如這張圖(cooperate network通常會用tunnel mode),因為這樣不用每一個分部的電腦都要具備IPSEC功能,比較簡單,而在加上要加密,則使用ESP in


transport mode(應該是tunnel)封包如這個tunnel最後的結果
(2)
(3)
(4)
(5)
(6)
hash(salt(typein_password)) ?= hash(salt(stored_password)) 來確認是不是一個合法的登入。
(7)
(8)
(9)
(10) 尋找可能有弱點、漏洞的port以進行攻擊(不知道這樣解釋是否正確,還希望助教解答)
2017final (Jan. 2 2018)
(1)
(2) 不知道耶,但推測應該是cross-site scripting(還希望助教解答)
(3)
(4) ingress(吧?),因為spoofing attack是外面的造假封包傳入作為攻擊
(6) 不會,因為salt是隨機產生的字串,兩者salt值不同,則hash(salt(pass1)) != hash(salt(pass2))
(7)

(8)
(9) AH, ESP auth
(10) 上面有了就不重複寫囉
(11) 兩個都是比較低(碰撞少,錯誤率低)
如圖:
(12) 小封包攻擊,定義是將大的封包切割成數個小封包來發送,藉此規避安全檢測,以達成攻擊。 能躲過檢查原因在於,第一,封包切割後較難看出惡意的pattern(因為pattern 也被切割了);第二,切割後size明顯會降低許多,因此能規避如大小檢查機制的方法。
(13)
(14) 上一次的範圍,就沒有寫了
(15)
(16)