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. Shell environment variables

  2. Data received via encrypted network channels

  3. argv[0] can only have either null or program name

  4. no external input must be trusted

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

In secure programming, a fundamental principle is that NO external input should be blindly trusted. Even encrypted network data can be malicious or corrupted. Shell environment variables can be manipulated by attackers. argv[0] is not guaranteed to be just the program name - it can be set to arbitrary values by the calling process. Only option D correctly states that no external input must be trusted without validation.

Multiple choice technology security
  1. DNS Spoofing

  2. Command Injection

  3. Path Traversal

  4. Command Injection AND Path Traversal

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

This question is poorly worded and incomplete - it references code that isn't shown. However, the intended answer appears to be that certain code vulnerabilities can lead to multiple attack types. Buffer overflows can enable command injection (by overwriting return addresses to inject shellcode) and path traversal (by manipulating string parameters). The question asks what else can go wrong given buffer overflow vulnerability.

Multiple choice technology security
  1. XSS

  2. Arc Injection

  3. Buffer Overflow

  4. Arc Injection AND Buffer Overflow

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

The code has multiple vulnerabilities: (1) Buffer overflow - strcpy() without bounds checking on buffer1 and buffer2 can overflow the 5-byte buffers. (2) Arc injection - FILE *file[2] creates an array of 2 FILE pointers but the code attempts to use file[x] where x can be manipulated. (3) The second strcpy uses buffer1 instead of buffer2 - this is a bug that copies argv[1] into buffer1 twice. Option D correctly identifies both arc injection and buffer overflow.

Multiple choice technology security
  1. Cross Site Scripting

  2. SQL Injection

  3. Improper Resource Release

  4. Option 1 AND Option 2

  5. Option 1 AND Option 2 AND Option 3

  6. Option 2 AND Option 3

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

This code has SQL injection vulnerability (user inputs concatenated directly into SQL statement on the 'INSERT' line). It also has XSS potential because unvalidated user input flows to output. Resources (con, stmt) may leak if exceptions occur before close() - only in catch block, no finally. Thus all three vulnerabilities are present.

Multiple choice technology security
  1. Information Leakage

  2. Cross Site Scripting

  3. Cross Site Tracing

  4. Option 1 AND Option 2

  5. Option 1 AND Option 3

  6. Command Injection

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

Line 6 directly outputs the 'searchID' parameter from the request without HTML encoding, allowing XSS injection (attacker can craft malicious searchID). The commented text also leaks implementation details (developer name, date, logic flow) which is information leakage. Both vulnerabilities coexist.

Multiple choice technology security
  1. Request Redirection is vulnerable and not a good practice

  2. Exception is not logged

  3. Input parameter “language” is not validated

  4. Option 1 AND Option 2

  5. Option 1 AND Option 3

  6. Option 2 AND Option 3

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

The code is vulnerable because it uses an unvalidated input parameter ('language') directly in a 'sendRedirect' call, which can lead to Open Redirection attacks. Additionally, the exception is caught but not logged, making debugging and security auditing impossible.

Multiple choice technology security
  1. Line 5

  2. Line 4

  3. Line 11

  4. Line 18

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

Line 18 logs the username and password values when login fails. While proper parameterized queries prevent SQL injection, logging credentials in plaintext is an information leakage vulnerability - logs can be accessed by administrators or attackers who compromise the system. The code structure itself (lines 4-6) correctly uses prepared statements and is not vulnerable.

Multiple choice technology security
  1. Race Condition

  2. Command Injection

  3. Denial of Service

  4. Cross Site Request Forgery

  5. HTML Injection

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

The code directly concatenates user-controlled input (the path parameter) into a system command without validation or sanitization. Attackers can inject malicious commands through the path parameter to execute arbitrary system commands on the server.

Multiple choice technology security
  1. auto-complete ON

  2. Improper usage of HTTP Method

  3. Developer Comments

  4. Option 2 AND Option 3

  5. Option 1 AND Option 3

  6. All

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

The code exhibits multiple security issues: sensitive credentials are left in developer comments, the form uses the GET method (exposing passwords in the URL), and autocomplete is not disabled on password fields.

Multiple choice technology security
  1. Content Spoofing

  2. HTTP Response Splitting

  3. Directory Listing

  4. Option 1 AND Option 2

  5. Option 2 AND Option 3

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

Unvalidated user input in a redirect allows Content Spoofing by manipulating the redirect location to arbitrary URLs, and HTTP Response Splitting by injecting CRLF characters (%0d%0a) to craft arbitrary response headers or body content.

Multiple choice technology security
  1. Line # 4

  2. Line # 13 & 20

  3. Line # 7 & 8

  4. None of the above

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

Lines 7 and 8 contain hardcoded database credentials ('admin'/'admin') and use an outdated, insecure JDBC-ODBC bridge driver, presenting a significant security vulnerability.

Multiple choice technology security
  1. Code is vulnerable as Resource is not released in the “finally” block

  2. Code is vulnerable as Resource is not released at all

  3. Code has no vulnerability

  4. Option 1 AND Option 2

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

If an exception occurs before close() calls, resources leak. Proper Java resource management requires finally blocks or try-with-resources to guarantee cleanup regardless of exceptions.

Multiple choice technology security
  1. True

  2. False

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

If an exception occurs during transaction, closeConnection() is never called, causing resource leaks. Repeated failures exhaust connection pools, creating Denial of Service.

Multiple choice technology security
  1. Create a hash of the document and encrypt the resulting hash using the signer's private key

  2. Encrypt the document using the signer's private key

  3. Encrypt the document using the signer's private key and create a hash of the encrypted document

  4. Encrypt the document using the signer's public key

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

Digital signatures work by creating a hash of the original document, then encrypting that hash with the signer's private key. This creates a fixed-size signature that can be verified by decrypting with the public key and comparing against a newly computed hash. The document itself isn't encrypted (options B, C, D) - digital signatures provide authenticity and integrity, not confidentiality.

Multiple choice technology security
  1. 1 AND 4

  2. 1 AND 2

  3. 1 AND 2 AND 3

  4. 1 AND 2 AND 3 AND 4

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

All data originating from the client side—including parameters, query strings, cookies, and headers—can be easily manipulated by an attacker and must be thoroughly validated before use.