Questions Related to security

Multiple choice technology security
  1. HTTP PUT & DELETE method can be disabled in web.xml from the below code: <Web-resource-collection> <web-resource-name>Disallowed Location</web-resource-name> <url-pattern>/*</url-pattern> <http-method>PUT</http-m

  2. HTTP PUT & DELETE methods are disabled by default

  3. HTTP PUT & DELETE methods should not be disabled

  4. HTTP PUT & DELETE methods cannot be disabled

Reveal answer Fill a bubble to check yourself
A Correct answer
Multiple choice technology security
  1. Vulnerable to SQL Injection

  2. Vulnerable to DoS

  3. Both a & b

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology security
  1. Security is handled at OS level by giving only read level privilege so no need to put an extra check here.

  2. Only problem here is that fileName may not be syntactically incorrect so it should be validated before using it in the function.

  3. This code can lead to information disclosure attack

  4. Java provides enough security by default for IO operations so this code is not vulnerable.

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology security
  1. Can be used to mark code as being "privileged", thus affecting subsequent access determinations

  2. Can be to decide whether an access to a critical system resource is to be allowed or denied, based on the security policy currently in effect

  3. Can be used to obtain a "snapshot" of the current calling context

  4. Can be used to compute a cryptographically secure hash

Reveal answer Fill a bubble to check yourself
D Correct answer
Multiple choice technology security
  1. Since the file name is hard coded, fopen() will fail if the file already exists.

  2. 0600 is not a secure option. The parameter 0600 should be changed to 0666

  3. Attackers can exploit by creating a symboling link /tmp/cache_data that points to a system file.

  4. Attackers can exploit the application's cache by writing directly to /tmp/cache_data

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology security
  1. Overwriting freed memory is a security vulnerability

  2. Depends on the application and how important “somedata” is

  3. This will result in a buffer overflow since the freed memory location cannot handle 8 characters of data “somedata”

  4. strcpy() will fail as it cannot write to already freed memory, and the application will crash.

Reveal answer Fill a bubble to check yourself
A Correct answer