Wednesday, 17 March 2021

Network Security Quiz

 Q1: The Multimedia Internet Mail Extension (MIME) is used to allow non-ASCII content such as an image to be sent using email. Which of the following is NOT performed in order to allow for non-ASCII content to be sent?

A. Encrypt the non-ASCII content
B. Encode the non-ASCII content to ASCII format
C. Specify the encoding method in the email header
D. Specify the type of non-ASCII content in the email header

Solution: TLS

Q2: When DomainKeys Identified Email (DKIM) is used, what is stored in the DNS server that needs to be retrieved by the receiving email server?
A. Email policy specified by the sending domain
B. List of email servers that are authorized to send email from the sending domain
C. Public key of the email sender domain
D. Public key of the DNS server

Solution: Public key of the email sender domain

Q3: Which of the following data transfer is NOT done using the SMTP protocol?
A. Send email from an email client application to sender's email server
B. Transfer email message from the receiver's mailbox to the receiver's user agent
C. Send email from the sender's email server to the receiver's email server
D. Forward email from one email server to another email server

Solution: Transfer email message from the receiver's mailbox to the receiver's user agent

Q4: Which of the following S/MIME service - mechanism pair is NOT correct?
A. Integrity - hashing
B. Integrity - digital signature
C. Confidentiality - symmetric cryptography
D. Authentication - public key infrastructure (PKI)

Solution: Integrity - digital signature

Q5: To send email to the address salman@uniten.edu.my, the sender's email server needs to find the IP address of the receiver's email server (i.e. uniten.edu.my). Which DNS resource record type contains this information?
A. MX
B. A
C. NS
D. MAIL

Solution: MX

Q6: Which security objective is compromised when a transmitted email is read by an attacker during its transmission?
A. Authenticity
B. Accountability
C. Integrity
D. Confidentiality

Solution: Confidentiality

Q7: When SPF (Sender Policy Framework) is used, what is stored in the DNS server?
A. Public key of the email receiver domain
B. Public key of the email sender domain
C. Email server(s) authorized to send email for particular domain
D. Policy specified by the email sender

Solution: Email server(s) authorized to send email for particular domain

Q8: Which of the following use of encryption keys in S/MIME is not correct?
A. Receiver's public key: encrypt the secret key
B. Sender's private key: encrypt the hash value
C. Secret key: encrypt the email content
D. Symmetric key: encrypt the email header

Solution: Symmetric key: encrypt the email header 

Q9: The command STARTTLS is executed when this TLS mode is used:
A. Start TLS mode
B. Explicit TLS mode
C. Implicit TLS mode
D. Normal TLS mode

Solution: Explicit TLS mode

Q10: In which of the following situations it is more suitable to use AH instead of ESP?
A. When the main security concern is passive attack
B. When the packet carries authentication information such as login credential
C. When communication is done between two hosts instead of a host and a firewall/router
D. When the IP payload is TLS data

Solution: When the IP payload is TLS data

Q11: If IPSec is to be used to configure a VPN between a remote worker using a laptop and the main office, which of the following IPSec protocols and modes that should be used?
A. AH tunnel mode
B. ESP tunnel mode
C. ESP transport mode
D. AH transport mode

Solution: ESP tunnel mode

Q12: When two hosts are communicating using IPSec, the information regarding whether they are using AH or ESP is specified in:
A. IP header of the transmitted packets
B. The digital certificate used by the sender and receiver
C. IPSec policy configured on both the sender and receiver
D. Security association used by the communication

Solution: Security association used by the communication

Q13: The use of private IP provides security in which of the following ways?
A. It prevents hosts using private IP addresses from being directly accessed by attackers in the Internet
B. It prevents hosts with private IP addresses from accessing insecure websites in the Internet
C. It prevents other intranet hosts from directly accessing hosts using private IP addresses
D. It prevents malware from being downloaded into hosts using private IP addresses

Solution: It prevents hosts using private IP addresses from being directly accessed by attackers in the Internet

Q14: What is the main motivation behind the development of IPv6?
A. The realization that the IPv4 address space is going to be used up
B. To provide a more secure IP protocol
C. To improve the speed of the Internet traffic
D. To catch with the use of modern networking technology and equipment

Solution: The realization that the IPv4 address space is going to be used up

Q15: You are configuring a communication between two servers. You would like to use IPSec to ensure that the two servers are not replaced by a different server, and they should stop communicating if that happens. Which of the following IPSec protocols and modes that should be used?
A. AH in transport mode
B. AH in tunnel mode
C. ESP in tunnel mode
D. ESP in transport mode

Solution: AH in transport mode










Network Security Quiz

 Q1: The use of HTTPS ensures the following EXCEPT

A. Confirms that the browser is a communicating with an authentic web server
B. Hides the IP address of the user's computer
C. The website content downloaded is encrypted and cannot be read
D. HTTP header is encrypted and cannot be read

Solution: Hides the IP address of the user's computer

Q2: What is the purpose of MIME extension in email application?
A. To authenticate the email sender
B. To encrypt the email content
C. To enable email to send attachments
D. To enable email to carry ASCII contents

Solution: To enable email to send attachments

Q3: The following are true about private IP addresses EXCEPT:
A. The address block 172.16.0.0/12 belongs to one of the private IP address blocks
B. Accessing the Internet requires the use of Network Address Translation (NAT)
C. A private IP address used in an organization may also be used in another organization
D. They can be directly accessed from the Internet

Solution: They can be directly accessed from the Internet

Q4: Given below are examples of network attack surface EXCEPT:
A. A corporate firewall that is configured to allow incoming connection on port 80
B. A corporate firewall that is configured to allow outgoing connection on port 80
C. A telnet service running on a public Web server
D. A login page on a website that does not use TLS

Solution: A corporate firewall that is configured to allow outgoing connection on port 80

Q5: Which of the following is a type of passive security attack?
A. Masquerade
B. Traffic analysis
C. Denial of service
D. Replay

Solution: Traffic analysis

Q6: The feature of SSH that enables any insecure TCP connection to be converted to a secure SSH connection is called ____________.
A. Port forwarding
B. Remote login
C. Channel conversion
D. Securing channel

Solution: Port forwarding

Q7: Which of the following email security threats can be prevented using DNSSEC?
A. Email sent is transmitted to the attackerʼs server
B. Email cannot be sent due to DoS attack
C. Email sent is sniffed during transmission
D. Email sending address is spoofed

Solution: Email sent is transmitted to the attackerʼs server

Q8: Which of the following is NOT a TLS record protocol payload?
A. Application data
B. Alert protocol
C. Hello protocol
D. Change cipher spec protocol

Solution: Hello protocol

Q9: Given below are security services offered by the Authentication Header (AH) protocol in IPSec EXCEPT:

A. Confidentiality
B. Integrity
C. Access control
D. Authentication

Solution: Confidentiality

Q10: DNSSEC ensures the following security objective(s):
A. Authenticity and confidentiality
B. Confidentiality, integrity and authenticity
C. Integrity and authenticity
D. Confidentiality and integrity

Solution: Integrity and authenticity

Q11: Given below are part of the Internetʼs network layer EXCEPT:
A. The TCP protocol
B. The IP protocol
C. The routing protocols
D. The ICMP protocol

Solution: The TCP protocol

Q12: Given below are ways by which we can secure email application EXCEPT:
A. Configure email client to run SMTP and IMAP over TLS
B. Configure email client to use S/MIME
C. Configure email client to use IPSec
D. Configure email server to use SPF, DKIM and DMARC

Solution: Configure email client to use IPSec

Q13: Which of the following protocols is used to set up a security association (SA)?
A. Security Association Connection (SAC)
B. Authentication Header (AH)
C. Encapsulating Security Payload (ESP)
D. Internet Key Exchange (IKE)

Solution: Internet Key Exchange (IKE)

Q14: Given below are among the security concerns to an Internet user EXCEPT:

A. An attacker may sniff your packets
B. You may not be communicating with the person that you think you are communicating with
C. Your Internet connection may not be fast enough that an attacker may capture your slow moving packet
D. Malware may be secretly installed on your computer

Solution: Your Internet connection may not be fast enough that an attacker may capture your slow moving packet

Q15: The security protocol used in HTTPS is _____________.
A. TLS
B. DNSSEC
C. IPSec
D. SSH

Solution: TLS

Q16: The use of HTTP proxy can prevent _____________.
A. the web server from knowing the IP address of the computer running the Web browser
B. an attacker from modifying an HTTP reply message
C. an attacker from sniffing the HTTP messages sent between the web browser and server
D. hijacking of an HTTP session

Solution: the web server from knowing the IP address of the computer running the Web browser

Q17: A security policy database (SPD) may contain the following information EXCEPT:
A. Security parameter index (SPI)
B. Remote IP address and port number
C. Local IP address and port number
D. Action to be taken

Solution: Security parameter index (SPI)

Q18: Which of the following fields is not encrypted in Encapsulating Security Payload (ESP) transport mode?
A. ESP trailer
B. TCP header
C. IP header
D. TCP data

Solution: IP header

Q19: The SSH protocol was initially developed for the purpose of:
A. File transfer
B. Remote program execution
C. Sending email
D. Remote login

Solution: Remote login

Q20: Which of the following is one of the differences between S/MIME and OpenPGP?
A. S/MIME uses certificates issued by Certificate Authority while OpenPGP generates their own public and private keys
B. S/MIME provides authenticity and confidentiality, while OpenPGP only provides confidentiality
C. S/MIME does not include the senderʼs public key with the message, while OpenPGP includes the senderʼs public key with the message
D. OpenPGP provides authenticity and confidentiality, while S/MIME only provides authenticity

Solution: S/MIME uses certificates issued by Certificate Authority while OpenPGP generates their own public and private keys

Q21: Given below are part of the Internet’s network layer EXCEPT

A. The IP protocol
B. The routing protocols
C. The TCP protocol
D. The ICMP protocol

Solution: The TCP protocol

Q22: Which of the following is NOT one of the reasons why TLS has become the most popular network security protocol?
A. TLS is independent of operating system platform
B. TLS is used to secure the Web application, which is the most used network application
C. TLS only needs to be configured once, and all network applications running on the host would then be protected
D. From a user point of view, using TLS is as easy as downloading and using a client application that implements TLS

Solution: TLS only needs to be configured once, and all network applications running on the host would then be protected

Q23: Which of the following email security mechanisms can be configured by an email user?
Select one:
A. DKIM
B. SPF
C. DANE
D. PGP

Solution: PGP

Q24: Which of the following is an advantage of using IPsec (which is network-layer security protocol) as compared to using TLS (which is a transport-layer security protocol)?
A. Configuration of IPsec is easier compared to TLS
B. IPsec uses more secure cryptographic protocols compared to TLS
C. Once IPsec is configured, communication will all Internet hosts will be protected
D. Once IPsec is configured, data transfer of all network applications with the specified receiving host will be protected

Solution:  Once IPsec is configured, data transfer of all network applications with the specified receiving host will be protected 

Q25: Which of the following is NOT true about the use of explicit TLS in email application?
A. Before secure connection is achieved, port 25 is used by SMTP client to connect to SMTP server
B. When explicit TLS is used, email message sent between an email client and an email server is encrypted
C. It requires an insecure SMTP connection to be upgraded to a secure connection using the STARTTLS command
D. Explicit TLS can be used not only by SMTP, but also by IMAP and POP3

Solution: Before secure connection is achieved, port 25 is used by SMTP client to connect to SMTP server

Q26: The use of https prevents the following attacks from being conducted EXCEPT:
A. Attacker replacing the Web server with a malicious server
B. Attacker sniffing the username and password transmitted by Web browser
C. Attacker stealing the HTTP cookie transmitted in an HTTP request message
D. Attacker spoofing the IP address of the host on which the Web browser is running

Solution: Attacker spoofing the IP address of the host on which the Web browser is running

Q27: What is contained in an HTTP cookie?
A. A string that specifies the type of Web browser used by the user
B. The username and password of the Web user in cleartext
C. A string that identifies the Web user
D. The username and password of the Web user in encrypted form

Solution: A string that identifies the Web user

Q28: Which of the following is NOT true about DNS-based Authentication of Named Entities (DANE)?
A. It solves security issues related to the use of STARTTLS
B. It encrypts the email data regardless of whether the email server supports TLS or not
C. It ensures the authenticity of an email server without verifying the server's digital certificate with a Certificate Authority (CA)
D. It makes use of a DNS record called TLSA

Solution: It encrypts the email data regardless of whether the email server supports TLS or not

Q29: In S/MIME, what is the use of the receiver's private key?
A. To encrypt the message digest
B. To decrypt the message content
C. To decrypt the message digest
D. To decrypt the secret key
E. To encrypt the message content
F. To encrypt the secret key

Solution: To decrypt the secret key

Q30: In S/MIME, what is the use of the receiver's public key?
A. To decrypt the secret key
B. To decrypt the message content
C. To encrypt the message digest
D. To encrypt the message content
E. To decrypt the message digest
F. To encrypt the secret key

Solution: To encrypt the secret key

Q31: Differentiate between active and passive security attacks.

Solution: 

Passive security attack: In this attack the intruder or attacker just sniffs the information, he does not modify or change it. He only listens to the traffic and compromises the confidentiality of the data

Active Security attack: In this the attacker first listens to the information and then changes it and then forwards it to the receiving party which means the confidentiality and integrity both compromises. 

Q32: If you perform a port scan, and see that a port is opened on the host, what does that tell you?

Solution: Open port tells that the port or the network is actively accepting packets and indicates that it is listening

Q33: Both Sender Policy Framework (SPF) and DomainKeys Identified Email (DKIM) are used to prevent the email sending address from being spoofed. However, the techniques used are different. Differentiate between the techniques used by these two mechanisms.

Solution: SPF makes use of a TXT DNS resource log in which the sending domain identifies all of the domain's senders. To authenticate the sender, the receiver will query a TXT DNS resource record about the sender's address domain and IP address. DKIM, on the other hand, uses a digital signature. The sender's private key will be used to sign the message. The receiver would then search the public key to see if the message is from the legitimate sender 

Q34: HTTP cookie is a useful mechanism for Web application and can provide various functionalities to the Web application. However, it has a number of security issues.
(a) If you are logged in to a web application, HTTP cookie is used to maintain your login session. What could happen if an attacker manage to capture the cookie?
(b) What is the solution to the problem mentioned in (a) above?
(c) Explain ONE (1) more security issue related to the use of HTTP cookie.

Solution: a) Attacker could steal user session ID and perform session hijacking where attacker can later perform any action that the active user is authorized to do.
b) To solve the problem of unencrypted format for cookies the owner of the web application should use HTTPS with a digital certificate but for me, I should delete the cookies and log out after I finish using the session.
c) If an attacker steals the http cookie, the attacker can view user's browsing history and monitor user's activities. This compromises confidentiality.

Q35: For each of the following situation, identify the most suitable IPSec protocol (AH or ESP) and mode (transport or tunneling) to be used.
(a) A staff working from home during COVID-19 pandemic, and would like to establish a Virtual Private Network (VPN) to his corporate network.
(b) A system administrator configuring two servers that always send data to each other. The system administrator needs to ensure that the data transmitted between the two servers cannot be read by an attacker.
(c) A system administrator configuring firewall between two office branches. The data transmitted are all TLS data. The main aim of using IPSec would be to ensure the authenticity of the two firewalls. 

Solution: a) ESP tunnel mode
b) ESP transport mode
c) AH tunnel mode

Wednesday, 10 March 2021

Brave New World Quiz

 Q1: Lenina in BNW (Brave New World) represents a woman who:

a. Is happy in BNW, but supports Bernard's rebellion out of love for him.
b. Being the Controller's mistress, is supportive of the social goals of conditioning.
c. Is a superficial person, conditioned by BNW, and unable to understand any objection to it.
d. Understands the superficiality of life in BNW, but lacks the courage to speak out.

Solution: Is a superficial person, conditioned by BNW, and unable to understand any objection to it

Q2: Bernard in BNW (Brave New World) represents a character who:
a. Is a perfect product of social conditioning, and never thinks for himself.
b. Dislikes social conditioning, but lacks the courage to fully defy it.
c. Is tempted by power and riches to become a heartless tyrant.
d. Awakens from his conditioning and fights for democracy to the end.

Solution: Dislikes social conditioning, but lacks the courage to fully defy it.

Q3:  Slogans in BNW are -
a. Sentences people shout in order to express identification with the political party they like.
b. Sentences people recite in order to calm down and remind themselves how to behave.
c. Sentences that people invent, and sing in front of others, for the sake of entertainment.
d. Sentences people murmur in order to feel identified with their parents and family members.

Solution: Sentences people recite in order to calm down and remind themselves how to behave

Q4: The attitude towards sex in Brave New World is:
a. People are encouraged to engage in casual, pleasurable sex with many partners.
b. Conditioning has eliminated sexual drives, so that people rarely think about sex.
c. All sexual activities are prohibited, and people are instructed to suppress them.
d. Sex with your partner is encouraged, but extra-marital sex is strictly forbidden.

Solution: People are encouraged to engage in casual, pleasurable sex with many partners.

Q5: Babies in Brave New World --
a. produced, raised, and conditioned in state-run institutions.
b. are educated by their parents, and are then handed over to the state.
c. are assigned to foster families who are responsible to condition them.
d. are conditioned to become as intelligent and productive as their genes allow.

Solution: produced, raised, and conditioned in state-run institutions. 

Saturday, 27 February 2021

Microeconomics Quiz

Question 1: Rare earth metals are used to manufacture some important electronic components in popular products like cell phones. These
metals are not really rare, but they are expensive to extract from the ground. What happens to the market for the rare earth metals if
these extraction costs increase?

A. Supply curve shifts rightward
B. Supply curve shifts leftward
C. Demand curve shifts rightward
D. Demand curve shifts leftward

Solution: Supply curve shifts leftward

Question 2: When the current price is above the market-clearing level we would expect:
A. greater production to occur during the next period.
B. a shortage.
C. quantity supplied to exceed quantity demanded.
D. quantity demanded to exceed quantity supplied.

Solution:
quantity supplied to exceed quantity demanded.

Question 3:Microeconomics is the branch of economics that deals with which of the following topics?

A. The behavior of individual consumers
B. Unemployment and interest rates
C. The behavior of individual firms and investors
D. A and C

Solution:
A and C

Question 4: he price elasticity of gasoline supply in the U.S. is 0.4. If the price of gasoline rises by 8%, what is the expected change in the quantity of gasoline supplied in the U.S.?

A. +0.32%
B. +3.2%
C. +32.0%
D. -3.2%

Solution:
+3.2%

Question 5:In a perfectly competitive market:

A. there is a cartel
B. there is a single seller
C. no single buyer or seller can significantly affect the market price
D. there are a few buyers

Solution:
no single buyer or seller can significantly affect the market price

Question 6: The income elasticity of demand refers to:

A. the percentage change in quantity demanded resulting from a 1-percent increase in income.
B. a change in income following a change in quantity demanded.
C. the change in income required for quantity demanded to change by 1%.
D. the substitution of one good for another as income changes

Solution:
the percentage change in quantity demanded resulting from a 1-percent increase in income.


Question 7: Arbitraging price differences between two markets is generally not possible if:

A. there are positive costs of transporting the products from one market to the other.
B. the transportation costs are larger than the difference in prices.
C. the government has prohibited exchange between the two markets.
D. B and C above

Solution:
B and C above

Question 8: Which of the following is a normative statement?

A. The taxes paid by the poor should be reduced in order to improve the income distribution in the U.S.
B. State governments should not subsidize corporations by training welfare recipients.
C. Presidential candidates should not be given funds from the federal government to run campaigns.
D. all of the above

Solution:
all of the above 

Question 9: When 1983 is the CPI base year, the CPI value is 82.4 for 1980 and 172.2 for 2017. Suppose we want to convert this CPI series to have a base year of 2017 (that is, CPI2017 = 100). What is the value of the revised CPI for 1980?

A. 100
B. 47.9
C. 172.2
D. 209.0

Solution:
47.9


Question 10: The problem of scarcity means that people face trade-offs. Which of the following trade-offs are the concern of microeconomics?

A. Trade-offs faced by consumers in the purchase of goods
B. Trade-offs faced by workers between work and leisure
C. Trade-offs faced by firms in what goods to produce
D. all of the above

Solution:
all of the above


Question 11: The "constant dollar" price is:

A. the real price of a good.
B. the nominal price of a good adjusted for inflation.
C. the "current dollar" price adjusted for inflation.
D. all of the above

Solution:
all of the above

Question 12: Suppose the nominal price of gasoline was $0.90 per gallon in 1987. To convert this value to the real price of 1987 gasoline in 2017 dollars, we should:

A. multiply by the 1987 CPI and divide by the 2017 CPI.
B. multiply by the 2017 CPI and divide by the 1987 CPI.
C. not do anything because this is the real price in 2017 dollars.
D. none of the above

Solution:
multiply by the 2017 CPI and divide by the 1987 CPI.


Question 13: The battery packs used in electric and hybrid automobiles are one of the largest cost components for manufacturing these cars. As the price of these batteries decline, we expect that the:

A. demand curve for electric and hybrid autos will shift rightward.
B. supply curve for electric and hybrid autos will shift leftward. .
C. supply curve for electric and hybrid autos will shift rightward.
D. demand curve for electric and hybrid autos will shift leftward.

Solution:
supply curve for electric and hybrid autos will shift rightward.


Question 14: The demand for books is: Qd = 120 - P
The supply of books is: Qs = 5P
What is the equilibrium quantity of books sold?

A. 75
B. 50
C. 25
D. 100

Solution:
100

Question 15: The demand for books is: Qd = 120 - P
The supply of books is: Qs = 5P
What is the equilibrium price of books?

A. 5
B. 10
C. 15
D. 20

Solution:
20

Question 16:  Assume that the current market price is below the market clearing level. We would expect:

A. a surplus to accumulate.
B. upward pressure on the current market price.
C. downward pressure on the current market price.
D. lower production during the next time period.

Solution:
upward pressure on the current market price.

Question 17: As long as the actual market price exceeds the equilibrium market price, there will be:

A. downward pressure on the market price.
B. upward pressure on the market price.
C. no purchases made.
D. Both A and C are correct.

Solution:
downward pressure on the market price.

Question 18: A supply curve reveals:

A. the quantity of output that producers are willing to produce and sell at each possible market price.
B. the maximum level of output an industry can produce, regardless of price.
C. the difference between quantity demanded and quantity supplied at each price.
D. the quantity of output consumers are willing to purchase at each possible market price.

Solution:
the quantity of output that producers are willing to produce and sell at each possible market price.

Question 19: The price of good A goes up. As a result, the demand for good B shifts to the left. From this we can infer that:

A. good B is used to produce good A.
B. good A is used to produce good B.
C. goods A and B are substitutes.
D. goods A and B are complements.

Solution:  goods A and B are complements.


Question 20: Elasticity measures:

A. sensitivity of price to a change in quantity.
B. the percentage change in one variable in response to a one percent increase in another variable.
C. the inverse of the slope of a demand curve.
D. the slope of a demand curve.

Solution:
the percentage change in one variable in response to a one percent increase in another variable.

Question 21: Which of the following is a positive statement?

A. When the price of a good goes up, consumers buy less of it.
B. When the price of a good goes up, firms produce more of it.
C. When the Federal government sells bonds, interest rates rise and private business investment is reduced
D. all of the above

Solution:
all of the above

Question 22: Firms face trade-offs in production, including decisions related to:

A. which products to produce.
B. how much of a particular product to produce.
C. the best way to produce a given amount of output.
D. all of the above

Solution:
all of the above


Question 23: Along any downward-sloping straight-line demand curve:

A. both the price elasticity and slope vary.
B. the slope varies, but the price elasticity is constant.
C. the price elasticity varies, but the slope is constant.
D. both the price elasticity and slope are constant.

Solution:
the price elasticity varies, but the slope is constant.

Question 24: What does it mean when the CPI is higher this year than last?

A. Real prices have increased.
B. Real prices have decreased.
C. The rate of inflation has increased.
D. There has been inflation since last year.

Solution:
There has been inflation since last year. 

Question 25: You are analyzing the demand for good X. Which of the following will result in a shift to the right of the demand curve for X?

A. A decrease in the price of X
B. An increase in the price of a good that is a complement to good X
C. An increase in the price of a good that is a substitute for X
D. all of the above

Solution:
An increase in the price of a good that is a substitute for X

Question 26: Assume that steak and potatoes are complements. When the price of steak goes up, the demand curve for potatoes:

A. shifts to the right initially and then returns to its original position.
B. shifts to the right.
C. shifts to the left.
D. remains constant.

Solution:
shifts to the left.

Question 27: For automobile demand in the U.S., the income response tends to be larger in the:

A. long run.
B. short run.
C. The income response is the same in the long run and the short run.
D. We do not have enough information to answer this question.

Solution:
short run.

Question 28:  When an industry's raw material costs increase, other things remaining the same,

A. output decreases and the market price also decreases.
B. the supply curve shifts to the left.
C. the supply curve shifts to the right.
D. output increases regardless of the market price and the supply curve shifts upward.

Solution:
the supply curve shifts to the left.

Question 29: If two goods are substitutes, the cross-price elasticity of demand must be:

A. zero
B. infinite
C. negative.
D. positive.

Solution:
positive.

Question 30:  Due to the recent increase in the price of natural gas, the quantity of coal demanded by electric power generation plants has increased. Based on this information, coal and natural gas are:

A. complements.
B. substitutes.
C. independent goods.
D. none of the above

Solution:
substitutes

Saturday, 20 February 2021

Network Security Quiz

 Q1: In order to allow for secure remote login using SSH, which of the following port number needs to be allowed by the firewall?
Select one:
A. 21
B. 80
C. 443
D. 22

Solution: 22

Q2: The following statements are true about port numbers EXCEPT:
Select one:
A. Port numbers can provide an indication on the network services running on a host
B. Scanning for open port numbers on a host is considered an active attack
C. Both client and server port numbers need to be set to a fixed number based on the specification in the RFC document
D. Port numbers are among the attack surfaces of a host

Solution: Both client and server port numbers need to be set to a fixed number based on the specification in the RFC document

Q3: Which of the following is the use of the Change Cipher Spec Protocol in TLS?
Select one:
A. To tell the receiver that subsequent data transfer will be protected using the negotiated cipher spec
B. To tell the receiver that the cipher spec need to be changed and re-negotiated
C. To tell the receiver that a new TLS session need to be established
D. To tell the receiver that a new encryption key need to be generated

Solution: To tell the receiver that subsequent data transfer will be protected using the negotiated cipher spec

Q4: Which of the following security objectives are NOT addressed by the SSH protocol?
Select one:
A. Confidentiality
B. Integrity
C. Availability
D. Authentication

Solution: Availability

Q5: As of the year 2020, which of the following TLS versions are still considered secure? Check all that apply.
Select one or more:
A. TLSv1.2
B. TLSv1.1
C. TLSv1.0
D. TLSv1.3

Solution: TLSv1.2
TLSv1.3

Q6: Assume that you have developed a new network application that uses its own application-layer protocol. As it is, the application-layer protocol sends data in clear text. Which of the following protocols can be used to ensure secure data transmission? Check all that apply.
Select one or more:
A. TLS
B. TCP
C. SSH
D. UDP

Solution: TLS
SSH

Object-oriented Programming Quiz

Question 1: What will be the value of text3 when the following code is executed?

String text1 = "a" + "b";
String text2 = "c";
String text3 = text1 + text2 + text1;
Select one:
a. abca
b. abc
c. ababc
d. abcab

Solution: abcab


Question 2: An Object can be defined as an instance of a ___________.
Select one:
a. state
b. class
c. attribute
d. group

Solution: class 

Question 3: Which of the following class's object do you need in order to perform input operation in Java?
Select one:
a. Scanner
b. Date
c. JFrame
d. String

Solution:
Scanner

Question 4: Which of the following is a valid declaration and creation of an object of class Box?
Select one:
a. Box obj = new Box;
b. new Box obj;
c. Box obj = new Box();
d. obj = new Box();

Solution: Box obj = new Box();

Question 5: Identify from the below the states and the behaviours of a dog:

barking
breed
eating
color
name
wagging the tail
 

Solution:  Barking = behavior

Breed= state

Eating = behaviour

Color = state

Name = state

Wagging the tail = behavior

Question 6: Which of these operators is used to allocate memory for an object in Java?
Select one:
a. alloc
b. malloc
c. give
d. new

Solution: new 

Question 7: This code will compile and when run will print out "Hello world"

public class Main{
   public static void main(String args){
      System.out.println("Hello world");
   }
}
 

Select one:
a. True
b. False 

Solution: True

Question 8: What will be the output of the following Java program?


 

Select one:
a. I have a quiz today. I hope I can score good grade.
b. I have a quiz today.
c. I hope I can score good grade.
d. I have a quiz today.
e. I have a quiz today.I hope I can score good grade.

Solution: I have a quiz today. I hope I can score good grade.

Question 9: Study the following codes:


 In which line of the codes, the object is created? (Give the line number)
What is the type/class name of the object used in the program?

setModel is an example of _____________.

What is the name of the class?

What will be displayed by the statement in line 18?

What will be displayed by the statement in line 17?

What is the name of the object used in the program?

Solution:   In which line of the codes, the object is created? (Give the line number) = 10 

What is the type/class name of the object used in the program? = Car

setModel is an example of _____________. = method

What will be displayed by the statement in line 18? = 2017

What will be displayed by the statement in line 17? = Jazz

What is the name of the object used in the program? = car1

Question 10: Any entity that has _________ and _________ is known as an object. For example, a chair, pen, table, keyboard, bike, etc. and it can be physical or logical.

Select one:
a. method        behaviour
b. state        behaviour
c. name        age
d. state        property

Solution: state        behaviour

Question 11: Which of the following is/are incorrectly import the Scanner class into your program:
Select one or more:
a. import java.util;
b. import java.util.Scanner;
c. import java.util.*;
d. import javax.swing.Scanner;

Solution: import java.util;
import javax.swing.Scanner;

Question 12: What will be the displayed when the following code is executed?

System.out.println("Venue is  " + 18 / 2);
Select one:
Venue is 18/2
Venue is 9.0
Venue is 182
Venue is 9

Solution: Venue is 9

Question 13: Which of these keywords is used to make a class?

Select one:
a. class
b. struct
c. static
d. public

Solution: class



 

Network Security Quiz

Question 1: The TLS record protocol performs the following operations EXCEPT:
Select one:
A. Establishing TLS session
B. Appending a TLS header to the data
C. Fragmenting application data
D. Encrypting application data

Solution: Establishing TLS session

Question 2: Which of the following is NOT a characteristic of network application?
Select one:
A. The application must be assigned a port number
B. The application needs to implement a communication protocol
C. The application must be assigned an IP address
D. The application needs to communicate with another application over the network

Solution: The application must be assigned an IP address

Question 3: HTTP cookies allows a website to do the following EXCEPT:
Select one:
A. Keep track of user's activities on the website
B. Provide content based on user's identify
C. Identify the IP address of the user's machine
D. Maintain user login session

Solution: Identify the IP address of the user's machine

Question 4: What is the use of the Message Authentication Code (MAC) in TLS?
Select one:
A. To ensure the data is not modified during transit
B. To ensure the data is compressed to a smaller size
C. To ensure the data cannot be read during transit
D. To ensure an attacker cannot spoof the IP address of the sender

Solution: To ensure the data is not modified during transit

Question 5: Which of the following application protocols send its data in clear text?
Select one:
A. HTTPS
B. SCP
C. SFTP
D. FTP

Solution: FTP

Question 6: Which of the following statements best describe the port forwarding feature of SSH?
Select one:
A. It enables secure data transmission of any network application
B. It enables a port number of an application to be transferred to another application
C. It enables the port number on a host to be transferred to another host
D. It enables the forwarding of data from one host to another

Solution: It enables secure data transmission of any network application

Question 7: Which of the following is NOT true when HTTPS is used?
Select one:
A. HTTP cookies can no longer be sniffed
B. An HTTP header line indicating the use of HTTPS will be added to the header HTTP header
C. Password transmitted using form-based authentication can no longer be sniffed
D. HTTP header is encrypted

Solution: An HTTP header line indicating the use of HTTPS will be added to the header HTTP header 

Question 8: HTTPS is the combination of which protocols?
Select one:
A. HTTP + TLS
B. HTTP + SSH
C. TLS + SSL
D. HTTP + TLS + SSH

Solution: HTTP + TLS

Question 9: Which of the following is NOT the function of a Web proxy?
Select one:
A. To enable faster Web browsing
B. To block illegal websites
C. To log browsing activities of users in an organization
D. To prevent malware from being downloaded during Web browsing 

Solution: To prevent malware from being downloaded during Web browsing

Question 10: The use of digital certificate in HTTPS ensures which of the following security properties?
Select one:
A. Authenticity of the server
B. Confidentiality of the HTTP messages
C. Integrity of the HTTP messages
D. Availability of the server

Solution: Authenticity of the server

Question 11: Which of the following command line tools can be used to invoke DNS service to convert Internet hostname to IP address? Check all that apply.
Select one or more:
A. nslookup
B. netstat
C. dig
D. ifconfig

Solution: nslookup
dig

Question 12: What are the security services provided by HTTPS? Check all that apply.
Select one or more:
A. Confidentiality
B. Availability
C. Integrity
D. Authenticity

Solution: Confidentiality
Integrity
Authenticity

Question 13: Which of the following services cause data transmission in TCP to be slightly slower than in UDP? Check all that apply.
Select one or more:
A. Process-to-process delivery
B. Error detection
C. Reliable data transfer
D. Congestion control 

Solution: Reliable data transfer
Congestion control

Question 14: In order to allow browsing of both HTTP and HTTPS websites, which of the following port number(s) need to be allowed by the firewall? Choose all that apply.
Select one or more:
A. 22
B. 21
C. 80
D. 443

Solution: 80
443

Question 15: Which of the following application-layer protocols utilize the SSH protocol? Check all that apply.
Select one or more:
A. SFTP
B. SHTTP
C. SMTP
D. SCP

Solution: SFTP
SCP