1.What properties of hash functions are necessary when used for hashing passwords?

A. It converts string of any length to a string of fixed length

B. It converts any string to the same random string each time

C. It is not possible to recover the original string from its hashed value

D. The chance of two strings giving the same hash value is very low

 Ans(s):
B.It converts any string to the same random string each time
C.It is not possible to recover the original string from its hashed value
D.The chance of two strings giving the same hash value is very low

2.How many cookies can you save for your webapp on a browser

A. 1

B. 2

C. 50

D. Depends on the browser

 Ans: D.Depends on the browser

3.Which of these are good places to keep your web app’s database credentials?

A. In a separate file in your source code

B. In a separate file on your web server host

C. In your database

D. None. The database credentials should never be stored

 Ans:B.In a separate file on your web server host

4.XSS exploits vulnerability in the

 

A. network

B. browser

C. app source code

D. web server host

 Ans:C.app source code

5.Which of the following security attacks are caused due to not sanitizing user input carefully

A. DDOS

B. XSS

C. SQL injection

D. Man in the middle

 Ans(s):
B.XSS
C.SQL injection

6.A HTML + CSS

A. web app and a native mobile app can share the same

B. API for fetching data

C. Web server

D. None of the above

 Ans(s):
B.API for fetching data
C.Web server

7.What is essential to ensure data is sent securely over the network to the right server

A. Using HTTPS protocol

B. Having an authentication token

C. Server SSL certificate verification

D. Using hash functions

 Ans(s):
A.Using HTTPS protocol
C.Server SSL certificate verification

8.Which of the following are almost completely under a developer’s control for a webapp

A. Network security

B. Browser security

C. Database security

D. Server host security

 Ans(s): 
C.Database security
D.Server host security

9.Which protocols’ headers are used for web app session management?

A. TCP

B. IP

C. HTTP

D. HTTPS

 Ans(s):
C.HTTP
D.HTTPS

10.Which of these is a good candidate for a user’s session-id

A. User’s password

B. User’s hashed password

C. A fixed random string saved in the user database

D. A newly generated random string every time the user logs in

 Ans:D.A newly generated random string every time the user logs in

Stay Hackademic , Be Hackademic(Subscribe Hackademic)