Skip to content

Commit 4fbe045

Browse files
authored
added various questions and answers to security topic, minor reformatting (iluwatar#312)
1 parent 9435ed4 commit 4fbe045

1 file changed

Lines changed: 58 additions & 4 deletions

File tree

topics/security/README.md

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ A couple of quotations from chosen companies:
2020

2121
<details>
2222
<summary>Explain the principle of least privilege</summary><br><b>
23+
24+
The principle of least privilege refers to the practice of providing minimal permissions to users, roles, and service accounts that allow them to perform their functions. If an entity does not require an access right then it should not have that right.
2325
</b></details>
2426

2527
<details>
@@ -71,6 +73,25 @@ Authorization is the process of identifying what level of access the service or
7173
A user uses the browser to authenticate to some server. It does so by using the authorization field which is constructed from the username and the password combined with a single colon. The result string is encoded using a certain character set which is compatible with US-ASCII. The authorization method + a space is prepended to the encoded string.
7274
</b></details>
7375

76+
<details>
77+
<summary>What are the three primary factors of authentication? Give three examples of each</summary><br><b>
78+
79+
Something you have
80+
- Smart card
81+
- Physical authentication device
82+
- Software token
83+
84+
Something you know
85+
- Password
86+
- PIN
87+
- Passphrase
88+
89+
Something you are
90+
- Fingerprint
91+
- Iris or retina scan
92+
- Gait analysis
93+
</b></details>
94+
7495
<details>
7596
<summary>Explain Token-based authentication</summary><br><b>
7697
</b></details>
@@ -85,6 +106,18 @@ A user uses the browser to authenticate to some server. It does so by using the
85106
SSO (Single Sign-on), is a method of access control that enables a user to log in once and gain access to the resources of multiple software systems without being prompted to log in again.
86107
</b></details>
87108

109+
<details>
110+
<summary>Explain how the Kerberos authentication protocol works as a SSO solution</summary><br><b>
111+
112+
Kerberos works as a SSO solution by only requiring the user to sign in using their credentials once within a specific validity time window. Kerberos authentication grants the user a Ticket Granting Ticket (TGT) from a trusted authentication server which can then be used to request service tickets for accessing various services and resources. By passing around this encrypted TGT instead of credentials, the user does not need to sign-in multiple times for each resource that has been integrated with Kerberos.
113+
</b></details>
114+
115+
<details>
116+
<summary>Does Kerberos make use of symmetric encryption, asymmetric encryption, both, or neither?</summary><br><b>
117+
118+
Symmetric Encryption - Kerberos uses exclusively symmetric encryption with pre-shared keys for transmitting encrypted information and authorizing users.
119+
</b></details>
120+
88121
<details>
89122
<summary>Explain MFA (Multi-Factor Authentication)</summary><br><b>
90123

@@ -93,6 +126,10 @@ Multi-Factor Authentication (Also known as 2FA). Allows the user to present two
93126
- The credentials fall into any of these three categories: something you know (like a password or PIN), something you have (like a smart card), or something you are (like your fingerprint). Credentials must come from two different categories to enhance security.
94127
</b></details>
95128

129+
<details>
130+
<summary>Explain OAuth</summary><br><b>
131+
</b></details>
132+
96133
#### Security - Passwords
97134

98135
<details>
@@ -124,6 +161,14 @@ Multi-Factor Authentication (Also known as 2FA). Allows the user to present two
124161
* MFA
125162
</b></details>
126163

164+
<details>
165+
<summary>What is password salting? What attack does it help to deter?</summary><br><b>
166+
167+
Password salting is the processing of prepending or appending a series of characters to a user's password before hashing this new combined value. This value should be different for every single user but the same salt should be applied to the same user password everytime it is validated.
168+
169+
This ensures that users that have the same password will still have very different hash values stored in the password database. This process specifically helps deter rainbow table attacks since a new rainbow table would need to be computed for every single user in the database.
170+
</b></details>
171+
127172
#### Security - Cookies
128173

129174
<details>
@@ -204,6 +249,13 @@ True. It is only used during the key exchange algorithm of symmetric encryption.
204249

205250
<details>
206251
<summary>What is Hashing?</summary><br><b>
252+
253+
Hashing is a mathematical function for mapping data of arbitrary sizes to fixed-size values. This function produces a "digest" of the data that can be used for verifying that the data has not been modified (amongst other uses)
254+
</b></details>
255+
256+
<summary>How is hashing different from encryption?</summary><br><b>
257+
258+
Encrypted data can be decrypted to its original value. Hashed data cannot be reversed to view the original data - hashing is a one-way function.
207259
</b></details>
208260

209261
<details>
@@ -212,6 +264,7 @@ True. It is only used during the key exchange algorithm of symmetric encryption.
212264
Hashes used in SSH to verify the authenticity of messages and to verify that nothing tampered with the data received.
213265
</b></details>
214266

267+
#### Security - Attacks, Threats, and Vulnerabilities
215268
<details>
216269
<summary>Explain the following:
217270

@@ -257,6 +310,7 @@ You can test by using a stored procedure, so the application must be sanitize th
257310

258311
<details>
259312
<summary>How HTTPS is different from HTTP?</summary><br><b>
313+
The 'S' in HTTPS stands for 'secure'. HTTPS uses TLS to provide encryption of HTTP requests and responses, as well as providing verifaction by digitally signing requests and responses. As a result, HTTPS is far more secure than HTTP and is used by default for most modern websites.
260314
</b></details>
261315

262316
<details>
@@ -324,10 +378,6 @@ Stuxnet is a computer worm that was originally aimed at Iran’s nuclear facilit
324378
Spectre is an attack method which allows a hacker to “read over the shoulder” of a program it does not have access to. Using code, the hacker forces the program to pull up its encryption key allowing full access to the program
325379
</b></details>
326380

327-
<details>
328-
<summary>Explain OAuth</summary><br><b>
329-
</b></details>
330-
331381
<details>
332382
<summary>Explain "Format String Vulnerability"</summary><br><b>
333383
</b></details>
@@ -405,6 +455,10 @@ MAC address flooding attack (CAM table flooding attack) is a type of network att
405455

406456
<details>
407457
<summary>What is "Diffie-Hellman key exchange" and how does it work?</summary><br><b>
458+
459+
Have you heard of [The Two General's Problem](https://en.wikipedia.org/wiki/Two_Generals%27_Problem)? The Diffie-Hellman key exchange is a solution to this problem to allow for the secure exchange of cryptographic keys over an encrypted channel.
460+
461+
It works using public/private key pairs (asymmetric encryption). Two parties that wish to communicate securely over a public channel will each generate a public/private key pair and distribute the public key to the other party (note that public keys are free to be exchanged over a public channel). From here, each party can derive a shared key using a combination of their personal private key and the public key of the other party. This combined key can now be used as a symmetric encryption key for communications.
408462
</b></details>
409463

410464
<details>

0 commit comments

Comments
 (0)