Computer Knowledge · General Awareness

Information Security

4,143 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. SecurityException

  2. AccessException

  3. AuthenitcationException

  4. Exception

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

When a user attempts to access a resource without proper authorization in the security API, a SecurityException is thrown. This exception indicates that the authentication was successful but the user lacks the required permissions for the specific resource. AccessException is not a standard security API exception, and AuthenticationException would be thrown for authentication failures (wrong credentials), not authorization issues.

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. 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

The sign() method creates a digital signature for the provided input data and returns it as a string. Digital signatures provide authentication and integrity verification - they prove the data came from a trusted source and hasn't been modified. Unlike encryption (which hides data) or hashing (one-way), signatures are verifiable: anyone can validate the signature using the signer's public key.

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.

Multiple choice technology security
  1. XOR'ing with a cryptographically secure random number

  2. Triple DES

  3. DES-CBC 56bits

  4. Salted hash with a cryptographically secure random number

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

Triple DES (3DES) is a legitimate symmetric encryption algorithm that provides strong encryption for personal information when properly implemented. XOR with a random number (A) is not secure for encryption. DES-CBC with 56-bit keys (C) is deprecated and too weak by modern standards. Salted hash (D) is a one-way function, not encryption - you cannot recover the original data.

Multiple choice technology security
  1. Client (Browser)

  2. Database

  3. Web Application

  4. Web Server

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

Cross Site Scripting (XSS) attacks execute malicious scripts in the victim's browser, making the client the target. The attacker compromises the user's browser session, not the server, database, or application directly. The vulnerability exists in the web application, but the attack runs on the client side. The primary impact is on the user's browser environment.

Multiple choice technology security
  1. Secure

  2. Domain

  3. Expires

  4. Static

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

The Secure cookie flag ensures cookies are only transmitted over encrypted HTTPS connections, preventing them from being sent over unencrypted HTTP. This protects sensitive cookie data from interception. Domain (B) specifies which hosts receive the cookie. Expires (C) sets cookie lifetime. 'Static' (D) is not a valid cookie attribute.

Multiple choice technology security
  1. Compromise of users

  2. Loss of data integrity

  3. Destruction of data

  4. None of the above

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

The primary risk of XSS is compromising users' accounts and sessions by executing malicious scripts in their browsers. Attackers can steal session cookies, credentials, or perform actions on users' behalf. Data integrity (B) and destruction (C) are secondary concerns - the immediate target is the user's browser session, not the server's data directly.

Multiple choice technology security
  1. Equivalent to normal users

  2. Less than those of normal users as all administrators are trustworthy

  3. No authentication is required for administrators

  4. Greater than those of normal users

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

To determine the requirements for administrator authentication, the user must understand the concept of administrator accounts and their privileges.

Admin accounts have higher privileges than normal user accounts and can perform tasks that can affect the entire system. Therefore, they require greater security measures to prevent unauthorized access and misuse of their privileges.

Option A is incorrect because the authentication requirements for administrators should be greater than those of normal users.

Option B is incorrect because all administrators cannot be considered trustworthy. They may intentionally or unintentionally cause harm or damage to the system.

Option C is incorrect because no authentication for administrators would pose a significant security risk and make the system vulnerable to attacks.

Option D is correct because administrators require greater authentication requirements to ensure that only authorized personnel can access their accounts and perform tasks that can affect the system.

Therefore, the answer is: D. Greater than those of normal users.

Multiple choice technology security
  1. Cannot be treated as a secure practice

  2. Is a good way to hide passwords from hackers

  3. Is perfectly fine for internal applications

  4. Is perfectly fine for external user facing applications

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

Hard-coding credentials (passwords, API keys, secrets) in source code is never secure regardless of application type. Credentials embedded in code can be exposed through version control, code sharing, or reverse engineering. Options C and D are dangerously incorrect - internal apps often become external or face insider threats. Secure practice requires using environment variables, secret management services, or encrypted configuration files.

Multiple choice technology security
  1. Read only certain memory areas using the %s token

  2. Write only certain areas using other tokens

  3. Read and write to memory at will

  4. None of the above

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

Format string attacks occur when user input is passed as the format string to functions like printf() without validation. Using format specifiers like %s (read), %n (write), and %x (read), attackers can read arbitrary memory contents and write to arbitrary memory addresses, potentially executing arbitrary code. Options A and B are incomplete - format string attacks enable both reading and writing memory.

Multiple choice technology security
  1. Cross-Site Scripting

  2. Buffer over flows

  3. Command injection

  4. Path traversal attack

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 attacker crafts a malicious link that appears to come from a trusted source (the vulnerable website), and when victims click it, the script executes in their browsers with the site's permissions. Buffer overflows (B), command injection (C), and path traversal (D) are different vulnerability classes.

Multiple choice technology security
  1. Escape the invalid characters and continue processing the input data

  2. Accept the input data without modifying it and log the validation error

  3. Delete the invalid characters and continue processing the input data

  4. Reject the entire input data and send an error message back to the user

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

When input validation fails, the most secure response is to completely reject the input and return an error to the user. Options A (escape), B (accept and log), and C (delete) all continue processing potentially malicious data, which can lead to security vulnerabilities. Rejection prevents any chance of the attacker bypassing validation through edge cases or encoding tricks. Never try to fix invalid input - reject it entirely.

Multiple choice technology security
  1. Cross-Site Scripting

  2. SQL injection

  3. Command injection

  4. Directory traversal

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

Directory traversal (also called path traversal) attacks manipulate URL parameters to access files outside the web document root. Attackers use sequences like '../' to navigate the filesystem and read or execute arbitrary files. Options A (XSS), B (SQL injection), and C (command injection) are different vulnerabilities. Directory traversal specifically targets file system access through path manipulation.

Multiple choice technology security
  1. Hashing the password twice

  2. Encrypting the password using the private key

  3. Use an encryption algorithm you wrote your self so no one knows how it works

  4. Salting the hash

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

Salting adds unique random data to each password before hashing, which renders precomputed dictionary or rainbow table attacks ineffective since each hash must be cracked individually. Double hashing doesn't prevent dictionary attacks (it just adds computational cost), encrypting with private key is not how password storage works, and 'secret algorithms' (security by obscurity) is a dangerous practice.