🎓 BookMCQ
← Back to 15. Security

📝 Passwords and User Authentication (10 MCQs)

Password Credentials in Operating System Login

Passwords are knowledge-based credentials used by operating systems to authenticate users before creating an interactive or remote session. The system compares a submitted password against protected verification data associated with the account. Password authentication is widely supported because it is inexpensive and familiar, but its security depends on password quality, storage practices, and resistance to guessing or theft.

Why Passwords Need Secure Verification

Passwords can be guessed, reused across services, observed, or captured through phishing and malware. Storing them as readable text would expose every account after a database breach. Systems therefore store salted password hashes using password-specific derivation functions, making large-scale guessing more expensive than a fast general-purpose hash.

Login Verification and Session Creation

The user supplies an account name and password. The authentication service retrieves the stored salt and derived verifier, applies the same password hashing procedure, and compares the result securely. A successful match establishes an authenticated session or token. Authorisation then determines which files, devices, and services that session can access.

Example of Password Verification

A user enters a password for account sam. The operating system retrieves the account's salt and stored password verifier, derives a value from the submitted password, and compares the results. A match permits authentication; a mismatch rejects the login and may contribute to rate-limiting or lockout policy.

Usability, Strength and Account Protection

Long, unique passwords reduce guessing and credential-reuse risks. Password managers, multi-factor authentication, rate limits, and secure recovery processes improve protection. Strict complexity rules can encourage predictable substitutions, while excessive lockouts can create denial-of-service opportunities. Organisations should prioritise length, uniqueness, breached-password screening, and secure storage.

Misconceptions About Password Authentication

'Passwords are stored as encrypted readable text in every system' is false because secure systems store salted verifiers. 'A complex password can safely be reused everywhere' ignores credential stuffing. 'A successful password check grants all system permissions' confuses authentication with authorisation.

Exam Focus: Password Storage and Login Decisions

Trace the stages of account lookup, salt retrieval, password derivation, comparison, and session establishment. Explain why salts prevent identical passwords from producing identical stored values. Questions may compare authentication with authorisation or examine password length, reuse, rate limiting, and multi-factor authentication.

Key Terms of Password Authentication

  • Password - Secret knowledge used to authenticate.
  • Salt - Random value added before password hashing.
  • Password hash - Derived verifier stored for checking.
  • MFA - Authentication using multiple factor categories.
  • Credential stuffing - Reusing stolen passwords across services.
2
Easy
5
Medium
3
Hard

📝 All Passwords and User Authentication MCQs

Q1. A user inserts a new USB flash drive into a computer that is infected with a boot‑sector virus. Which of the following actions is most likely to prevent the virus from infecting the removable disk?

A.Disable the operating system’s auto‑run feature for removable media ✅
B.Increase the computer’s RAM size
C.Change the BIOS clock to a future date
D.Use the disk as a read‑only device without any write protection
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Disabling auto‑run stops the system from automatically executing code stored in the boot sector of a newly inserted device. A boot‑sector virus relies on this automatic execution to copy itself onto the removable disk. Adding RAM, changing the BIOS clock, or using a read‑only disk does not stop the virus from writing to the disk when auto‑run is enabled. By turning off auto‑run, the user blocks the infection pathway, keeping the USB drive clean.

Q2. Which definition best describes a polymorphic virus?

A.A virus that encrypts its payload
B.A virus that spreads only via network shares
C.A virus that rewrites its code each time it infects a new host while preserving functionality ✅
D.A virus that resides only in the boot sector
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: A polymorphic virus changes its internal code on each infection, creating a new signature while keeping the same behavior. This makes signature‑based detection difficult. It does not merely encrypt its payload (that's an encrypted virus), nor is it limited to network shares or the boot sector. Understanding that the key feature is code mutation helps students recognize why polymorphic viruses evade traditional antivirus methods.

Q3. Why does an encrypted virus include decryption code that runs before the payload?

A.To hide its code from signature‑based scanners by storing encrypted bytes that are only visible after decryption at runtime ✅
B.To increase its execution speed
C.To reduce memory usage
D.To allow it to infect only encrypted files
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Encrypted viruses store their malicious code in an encrypted form, making static signatures ineffective. The decryption stub runs when the virus is executed, revealing the payload only in memory, where many scanners cannot inspect it easily. Speed, memory, or file‑type restrictions are not the primary reasons for the decryption step. Recognizing this technique explains why many modern antiviruses use behavioral analysis in addition to signature matching.

Q4. Which mitigation is most effective against a tunneling virus that installs itself in the interrupt‑handler chain?

A.Disable all USB ports
B.Run a disk defragmenter daily
C.Install a firewall
D.Enforce signed driver loading and regularly verify interrupt vector tables ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Tunneling viruses hijack interrupt vectors, so the strongest defense is to ensure only trusted code can modify those vectors. Signed driver loading and periodic verification of the interrupt‑handler chain prevent unauthorized code from inserting itself. Simply disabling USB ports or running a defragmenter does not address the root cause, and a firewall protects network traffic but not low‑level interrupt manipulation.

Q5. A macro virus spreads through spreadsheet files. Which user practice most reduces the risk of infection?

A.Always enable macros for convenience
B.Disable macros or set them to prompt before execution ✅
C.Use only .txt files
D.Install more RAM
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Macro viruses rely on the host application executing embedded macros. By disabling macros or configuring the program to prompt before running them, users block the automatic execution path that the virus needs. Using plain text files avoids macro-capable formats, but the core protective measure is controlling macro execution. Adding RAM does not affect macro behavior, and always enabling macros guarantees infection if a malicious file is opened.

Q6. How does a stealth virus modify the read system call to hide its infection?

A.It intercepts the read call and returns the original uninfected bytes when the infected file is read, while keeping the infected version in memory ✅
B.It deletes the read call entirely
C.It encrypts the file system
D.It changes file extensions
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A stealth virus hooks the read system call, checking if the requested file is one it has altered. If so, it supplies the original clean bytes to the requesting program, while the infected version remains hidden in memory. This tricks detection tools that compare on‑disk data with what is read. Deleting the call, encrypting the whole file system, or merely renaming files would not provide the selective concealment described.

Q7. A boot‑sector virus copies the original boot sector to an unused location X and replaces the active boot block. Which forensic step is most likely to reveal the infection?

A.Scan only the active boot sector with antivirus
B.Reformat the disk without analysis
C.Compare the contents of the active boot sector, the copy at location X, and a known good boot sector; look for discrepancies and unexpected executable code ✅
D.Check only the operating system logs
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: By extracting both the active boot sector and the copy stored at location X, investigators can directly compare them to a known clean boot sector. Differences such as hidden executable code or altered jump addresses indicate infection. Scanning only the active sector may miss the hidden copy, and reformatting destroys evidence. Logs rarely capture low‑level boot modifications, making the comparative analysis the most reliable detection method.

Q8. When comparing polymorphic and encrypted viruses, which type is more likely to evade heuristic analysis?

A.Polymorphic viruses are easier to detect because they change signatures frequently
B.Encrypted viruses are more likely to evade heuristic analysis because the decryption stub can be small and appear benign ✅
C.Both are equally detectable by static analysis
D.Polymorphic viruses cannot change their code
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Heuristic analysis looks for suspicious behavior patterns. Encrypted viruses often contain a tiny decryption routine that appears innocuous, allowing the bulk of the payload to remain hidden from static heuristics. Polymorphic viruses, while changing signatures, still exhibit characteristic mutation patterns that many heuristics can flag. Therefore, the subtle decryption stub of an encrypted virus gives it a higher chance of slipping past heuristic detection.

Q9. A logic bomb is set to activate on a specific future date. Which response timeline best limits damage?

A.Wait until the date passes to see if anything happens
B.Immediately delete all files on the system
C.Disable network connectivity but keep the system running
D.Isolate the affected system, preserve volatile memory, collect logs, and schedule a controlled remediation before the trigger date ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: Isolating the machine prevents the bomb from spreading or interacting with other systems, while preserving volatile memory and logs captures evidence for analysis. Planning remediation before the trigger date allows security teams to neutralize the payload safely. Waiting is risky, mass deletion may destroy critical evidence, and merely cutting network access does not stop the bomb from executing locally.

Q10. How does a boot‑sector virus typically affect a computer’s physical memory?

A.The virus increases available memory by freeing space
B.The virus decreases physical memory by reserving a hidden region above the new limit, which can cause performance degradation ✅
C.The virus does not affect memory at all
D.The virus only affects the hard disk, not RAM
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: When a boot‑sector virus loads, it often reserves a hidden memory region beyond the operating system’s reported limit, effectively reducing the amount of usable RAM. This hidden allocation can lead to slower performance and unexpected crashes. It does not free memory, nor is it limited to storage devices; the impact on RAM is a key symptom that helps administrators recognize a boot‑sector infection.

🔗 Related Topics (MCQs)