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
-
No. Because leads to insecure storage of private information of the customer
-
Yes. Because it is a good logging practice to log all relevant information during an exception
-
Yes. Because it will help in troubleshooting specific customer problems
-
No. Because its an additional over head
A
Correct answer
Explanation
Credit card numbers are sensitive financial data that must never be logged in plaintext. Doing so violates PCI DSS compliance and creates severe security risks if logs are compromised or accessed inappropriately. 'Good logging practice' (B) and 'troubleshooting' (C) are invalid justifications - security takes precedence. The 'overhead' argument (D) is irrelevant; the issue is security, not performance.
-
XOR'ing with a cryptographically secure random number
-
Triple DES
-
DES-CBC 56bits
-
Salted hash with a cryptographically secure random number
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.
-
Pure C++
-
Any file type on a web server
-
Pure C#
-
Pure Java
A
Correct answer
Explanation
Buffer overflows occur in languages that allow direct memory manipulation and lack bounds checking, like C and C++. They happen when a program writes more data to a buffer than it can hold, overflowing into adjacent memory. Java (D) and C# (C) are managed languages with automatic bounds checking that prevent buffer overflows. 'Any file type on a web server' (B) is nonsensical in this context.
-
Client (Browser)
-
Database
-
Web Application
-
Web Server
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.
-
Secure
-
Domain
-
Expires
-
Static
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.
-
Compromise of users
-
Loss of data integrity
-
Destruction of data
-
None of the above
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.
-
Equivalent to normal users
-
Less than those of normal users as all administrators are trustworthy
-
No authentication is required for administrators
-
Greater than those of normal users
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.
-
Cannot be treated as a secure practice
-
Is a good way to hide passwords from hackers
-
Is perfectly fine for internal applications
-
Is perfectly fine for external user facing applications
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.
-
Read only certain memory areas using the %s token
-
Write only certain areas using other tokens
-
Read and write to memory at will
-
None of the above
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.
-
Cross-Site Scripting
-
Buffer over flows
-
Command injection
-
Path traversal attack
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.
-
Because the validation settings are hard coded.
-
Susceptible to bypass using various forms of character encoding
-
Because it's difficult to implement a black list filter that also takes into account data sent using the POST method
-
Because it is typically implemented using regular expressions to match known good data patterns
B
Correct answer
Explanation
Blacklist validation is weak because attackers can bypass it using various character encoding techniques: URL encoding, Unicode encoding, hex encoding, double-encoding, mixed encoding, and case variation. It's impossible to enumerate every possible malicious pattern. Options A and C are incorrect - the issue isn't about hard-coding or POST methods. Option D describes whitelist validation, not blacklist.
-
Escape the invalid characters and continue processing the input data
-
Accept the input data without modifying it and log the validation error
-
Delete the invalid characters and continue processing the input data
-
Reject the entire input data and send an error message back to the user
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.
-
Cross-Site Scripting
-
SQL injection
-
Command injection
-
Directory traversal
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.
-
Hashing the password twice
-
Encrypting the password using the private key
-
Use an encryption algorithm you wrote your self so no one knows how it works
-
Salting the hash
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.
-
Can be done as it as an internal IP
-
Can be done for internet facing servers as there are no chances of IP conflicts
-
Is a good security practice
-
Is a bad security practice
D
Correct answer
Explanation
To solve this question, the user needs to have a basic understanding of access control and network security.
Option A: Can be done as it is an internal IP
- This option is partially correct. Implementing access control based on a hard-coded IP address can be done for internal IPs, since they are less likely to change or conflict with other IPs on the network. However, this alone does not guarantee security, and other measures such as firewalls and intrusion detection systems should also be in place.
Option B: Can be done for internet-facing servers as there are no chances of IP conflicts
- This option is incorrect. Even for internet-facing servers, there are chances of IP conflicts, especially if the server is part of a larger network. Relying solely on hard-coded IP addresses for access control is not a good security practice.
Option C: Is a good security practice
- This option is incorrect. While hard-coding IP addresses for access control can be part of a larger security strategy, it is not a good practice to rely solely on this method. Attackers can spoof IP addresses or gain access to a trusted IP address through various means. A more comprehensive security approach is needed.
Option D: Is a bad security practice
- This option is partially correct. Relying solely on hard-coded IP addresses for access control is not a good security practice, as it is vulnerable to spoofing and other attacks. However, this does not mean that the practice is completely bad. It can be used in conjunction with other security measures, but should not be the only method of access control.
Therefore, the correct answer is:
The Answer is: D. Is a bad security practice