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. 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 requiring both password and accountName parameters allows for account-specific salting, which improves security by preventing the same password from hashing identically across different accounts. The single-parameter versions would be less secure. Option C is incorrect due to incorrect method naming convention (lowercase 'p').

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 is a void method, meaning it performs validation and likely throws an exception or sets internal state rather than returning a value. This is common for validation methods that enforce security policies by throwing exceptions when requirements aren't met.

Multiple choice technology security
  1. String

  2. boolean

  3. Integer

  4. void

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

The isAuthorizedForData() method checks whether the current user is authorized to access or modify a specific data object. It returns a boolean value (true if authorized, false otherwise). It does not return text, numeric identifiers, or a void type, as authorization is a binary status check.

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 can be embedded in forms or HTTP headers. The getCSRFToken() method returns a String token value, not numeric types like Integer or BigInteger, which would be unsuitable for token representation.

Multiple choice technology security
  1. Creates a seal that binds a set of data and includes an expiration timestamp

  2. Encodes the data

  3. Hashes the data

  4. Scrambles the data

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

The seal() method creates a cryptographic seal that binds data together with an expiration timestamp, providing tamper evidence and time-based validity. Unlike simple encoding, hashing, or scrambling, sealing provides integrity protection with temporal constraints.

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

Cross Site Scripting (XSS) attacks inject malicious scripts into web pages viewed by other users. The most effective defense combines input validation (rejecting malicious input) and output encoding (converting special characters to HTML entities). Authentication and cryptography protect against different threats, not XSS.

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 in the security API accepts a single String parameter (data) and throws SecurityException. Options A and B incorrectly include a key parameter, while option C is missing the required exception declaration that security operations typically need.

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 requires both data and timestamp parameters and throws SecurityException. Options C and D are missing the required timestamp parameter that seal operations need, while option B throws the wrong exception type.

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

Encode only the user input parameter, not the entire URL. Option C correctly encodes just the dangerous input. Option A uses JavaScript encoding (wrong context). Option B encodes the entire URL including the path, which breaks it.

Multiple choice technology security
  1. SecurityException

  2. AccessException

  3. AuthenitcationException

  4. Exception

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

When users attempt unauthorized access, the security API throws SecurityException. AccessException (B) is not the standard exception here. AuthenticationException (C) would be for identity verification failures, not authorization.

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 when validation fails. ValidationException (A) is not the standard exception name, and Encoding/Encryption exceptions (C, D) are for different operations.

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

In exception hierarchies, a base exception class provides common properties and methods for all related exceptions. EnterpriseSecurityException serves as the parent class for specific security exceptions, allowing consistent error handling across different security failure scenarios.

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 converting data to a standard or canonical form. For security, it means reducing encoded strings (like %3C for <) to their simplest representation before validation. This prevents attackers from bypassing validation using double-encoding or alternate encoding schemes.

Multiple choice technology security
  1. Encrypts the input and returns the encrypted string

  2. Encodes the data

  3. Hashes the data

  4. Create a digital signature for the provided input data and return the signature in a string

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

Digital signatures provide authentication, integrity, and non-reputation for digital data. The sign() method creates a cryptographic signature using a private key, allowing recipients to verify the data originated from the claimed source and hasn't been tampered with using the corresponding public key.