Computer Knowledge ยท General Awareness

Information Security

4,634 Questions

Information security involves protecting computer systems and data from unauthorized access, cyber threats, and damage. It is a core part of the computer knowledge section in various banking and government exams. Practicing these concepts helps in understanding digital signatures, network security, and access control effectively.

Cybersecurity threatsAccess controlCryptography basicsSecurity risk managementDatabase protection

Information Security Questions

Multiple choice technology security
  1. Method of validating a credential set

  2. Method of ensuring that a subject is the entity it claims to be

  3. Method of validating the entitlements for an authenticated subject

  4. Another term for identification

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Authorization is the process of determining what permissions and access rights an authenticated subject has. It comes AFTER authentication (proving identity) and answers the question 'what is this user allowed to do?' Option B describes authentication, not authorization. Option A describes credential validation, which is part of authentication.

Multiple choice technology security
  1. String hashPassword(String password)

  2. String hashPassword(String password, String accountName)

  3. String hashpassword(String password)

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The hashPassword method requires both the password and accountName parameters. The accountName is typically used as a salt or to ensure uniqueness of hashes across accounts. Option A only takes the password, which would result in identical passwords producing identical hashes - a security vulnerability. Option C has incorrect capitalization.

Multiple choice technology security
  1. Boolean

  2. String

  3. Integer

  4. void

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The verifyPasswordStrength() method returns void because it likely throws an exception if the password doesn't meet strength requirements rather than returning a boolean. This pattern is common in security APIs where failure should halt execution. However, this is a specific API design choice that depends on the actual framework being referenced.

Multiple choice technology security
  1. Integer

  2. Byte

  3. String

  4. BigInteger

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

CSRF tokens are typically generated as random strings that are included in forms or requests and validated on the server. String is the standard return type for token generation methods because tokens need to be transportable in HTTP headers, form fields, or URLs. Numeric types would not serve this purpose.

Multiple choice technology security
  1. Input Validation and OutPut Encoding

  2. Authentication and Authorization

  3. Data Protection and Cryptography

  4. HTTP and Communication Security

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Input Validation ensures data meets expected criteria before processing, while Output Encoding converts special characters to safe representations, preventing malicious scripts from executing. These two practices directly combat XSS by controlling what enters the system and how it's rendered. Authentication/Authorization and Cryptography address access control and data protection, not script injection prevention.

Multiple choice technology security
  1. java.lang.String sign(java.lang.String data, java.lang.String key) throws EncryptionException

  2. java.lang.String sign(java.lang.String data, java.lang.String key)

  3. java.lang.String sign(java.lang.String data)

  4. java.lang.String sign(java.lang.String data) throws SecurityException

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The sign() method takes only the data parameter and throws SecurityException because signing operations are critical security operations that can fail for various reasons (invalid key format, cryptographic errors, etc.). Unlike method A which incorrectly requires a key parameter, the signature method implies the key is managed internally. Option C is incorrect because signing can fail and should signal errors.

Multiple choice technology security
  1. java.lang.String seal(java.lang.String data,long timestamp) throws SecurityException

  2. java.lang.String seal(java.lang.String data,long timestamp) throws EncryptionException

  3. java.lang.String seal(java.lang.String data)

  4. java.lang.String seal(java.lang.String data) throws EncryptionException

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The seal() method signature includes both the data and timestamp parameters, throwing SecurityException because cryptographic sealing operations can fail. The timestamp is essential for implementing expiration, as described in the seal() functionality. Option B incorrectly specifies EncryptionException - security API methods throw SecurityException to signal security-related failures.

Multiple choice technology security
  1. String safeURIToDisplay= "/admin/findUser.do?name=" + TCSSAPI.encoder().encodeForJavaScript(request.getParameter( "dangerousInput"));

  2. String safeURIToDisplay = TCSSAPI.encoder().encodeForURL( "/admin/findUser.do?name=" + request.getParameter( "dangerousInput" ) );

  3. String safeURIToDisplay= "/admin/findUser.do?name=" + com.tcs.sapi.io.ValidationUtil.encodeForURL(request.getParameter( "dangerousInput"));

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

When encoding user input for URLs, you must encode only the parameter value, not the entire URL string. encodeForURL applied to the whole URL (option B) would break the URL structure. encodeForJavaScript (option A) is for JavaScript context, not URLs. Option C correctly encodes only the dangerous user input portion before concatenating it with the safe URL structure.

Multiple choice technology security
  1. Validation Exception

  2. SecurityException

  3. Encoding Exception

  4. Encryption Exception

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

SecurityException is the most common exception thrown by validation methods in the security API because it serves as the base class for security-related failures. When validation fails due to security violations (invalid input, malicious patterns, policy violations), the API throws SecurityException or its subclasses. Validation, Encoding, and Encryption exceptions are not standard exception types in this API.

Multiple choice technology security
  1. SecurityException

  2. EnterpriseException

  3. EnterpriseSecurityException

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

EnterpriseSecurityException is the base class for all security-related exceptions in the TCS security API. It provides a common ancestor for specific security exceptions like authorization failures, validation errors, and authentication issues. SecurityException alone might not capture the enterprise context, and EnterpriseException is too broad for security-specific failures.

Multiple choice technology security
  1. Its a form of encoding

  2. Its a form of encryption

  3. Its a form of decryption

  4. Its simply the operation of reducing a possibly encoded string down to its simplest form

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Canonicalization is the process of reducing an encoded string to its simplest, unambiguous form by decoding all encoding layers. For security, this is crucial because attackers can use multiple encoding schemes (URL encoding, double encoding, mixed encoding) to hide malicious input. By canonicalizing input first, security checks can detect attacks regardless of the encoding used.

Multiple choice technology security
  1. isValidDirectory( java.lang.String context, java.lang.String input)

  2. isValidDirectory( java.lang.String context, java.lang.String input) and isValidFileName(java.lang.String context, java.lang.String input)

  3. isSafeDirectoryPath(java.lang.String context, java.lang.String input,boolean allowNull) and isSafeFileName(java.lang.String context, java.lang.String input,boolean allowNull)

  4. ValidateDirectoryPath(java.lang.String context, java.lang.String input,boolean allowNull)

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

To prevent Path Traversal attacks, TCS SAPI provides isSafeDirectoryPath() and isSafeFileName() which validate that paths don't contain dangerous patterns like '../' or absolute paths. These methods check if the input is safe for the given context before allowing file system access. Path traversal attacks attempt to access files outside the intended directory, so validating both directory paths and filenames is essential defense.

Multiple choice technology security
  1. Ounce

  2. WebInspect

  3. IBM RAD

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Ounce (Ounce Labs) is a commercial static code analyzer that identifies security vulnerabilities in source code before deployment. It analyzes code paths to find potential security issues. WebInspect is a dynamic analysis tool, IBM RAD is an IDE, making Ounce the correct static analyzer choice.

Multiple choice technology security
  1. Group based access control should be implemented to assign permissions to application users

  2. Consistent authorization checking should be performed on all application pages

  3. A set of all allowable actions should be defined for each user role and all other's denied

  4. All failed access authorization requests should be logged to a secure location for review by administrators

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The principle of least privilege means users should have only the minimum permissions necessary to perform their job functions. Option C correctly implements this by defining allowable actions for each role and denying everything else. Group-based access (A) is a method but doesn't define the principle, consistent checking (B) is about authorization implementation, and logging (D) is about audit trails.