Blog

MCQs

Disclaimer:

Educational Use Only:

The website links provided are to be used strictly for educational and knowledge-gaining purposes only.

No Misuse:

Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.

Respect for Websites and Businesses:

Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.

Acknowledge Value of Knowledge:

Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.

No Endorsement:

The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.

User Responsibility:

By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.


  1. What is a Bash script execution attack primarily designed to exploit?
    a. Vulnerabilities allowing arbitrary commands to be run in the Bash shell
    b. Weak file permissions
    c. Outdated network devices
    d. Invalid digital certificates
    Answer: a. Vulnerabilities allowing arbitrary commands to be run in the Bash shellbeaglesecurity
  2. Which application component is MOST likely to expose a system to Bash command injection?
    a. Web forms that interact with system shells
    b. Static HTML pages
    c. Image file converters
    d. PDF readers
    Answer: a. Web forms that interact with system shellsbeaglesecurity
  3. What is typically the root cause of a Bash command injection vulnerability?
    a. Insufficient input validation
    b. Excess bandwidth
    c. Buffer overflow
    d. Outdated SSL certificates
    Answer: a. Insufficient input validationbeaglesecurity
  4. Which Linux shell is most associated with script execution attacks in web applications?
    a. Bash
    b. Fish
    c. Zsh
    d. Csh
    Answer: a. Bashbeaglesecurity
  5. What could an attacker achieve using a successful Bash script execution attack?
    a. Execute arbitrary system commands
    b. Install mobile apps
    c. Update web browsers
    d. Encrypt network traffic
    Answer: a. Execute arbitrary system commandsbeaglesecurity
  6. Which type of input could most likely lead to Bash command injection?
    a. Unsanitized user inputs
    b. Encrypted server keys
    c. Default config files
    d. Secure SFTP logs
    Answer: a. Unsanitized user inputsbeaglesecurity
  7. What type of privilege would increase the impact of a Bash command injection attack?
    a. Root or administrative
    b. Guest
    c. Read-only
    d. Temporary
    Answer: a. Root or administrativebeaglesecurity
  8. How does the Bash shell interpret command separators such as “;” or “&&”?
    a. As instructions to execute multiple commands
    b. As syntax errors
    c. As static comments
    d. As log entries
    Answer: a. As instructions to execute multiple commandsbeaglesecurity
  9. If a web app concatenates user input into a shell command without proper validation, what is threatened?
    a. System security
    b. Application speed
    c. Wireless connectivity
    d. Local visualization
    Answer: a. System securitybeaglesecurity
  10. Which of the following is a real-world consequence of Bash command injection?
    a. Unauthorized data exfiltration
    b. Improved server performance
    c. Faster input/output operations
    d. Lower disk fragmentation
    Answer: a. Unauthorized data exfiltrationbeaglesecurity
  11. What is a typical first step in a Bash command injection attack?
    a. Supplying crafted input to a vulnerable function
    b. Brute-forcing login pages
    c. Overloading network switches
    d. Bypassing web proxies
    Answer: a. Supplying crafted input to a vulnerable functionbeaglesecurity
  12. What kind of Bash script action can an attacker automate post-exploitation?
    a. Data harvesting and exfiltration
    b. Upgrading CPU firmware
    c. Defragmenting the hard drive
    d. Syncing email clients
    Answer: a. Data harvesting and exfiltrationexamcollection
  13. An example of a Bash command injection payload includes:
    a. Adding “; whoami” to input
    b. Replacing HTML tags
    c. Increasing MTU size
    d. Encrypting disk at rest
    Answer: a. Adding “; whoami” to inputbeaglesecurity
  14. Which of these mitigates Bash execution attacks effectively?
    a. Input validation and sanitization
    b. Lowering refresh rates
    c. Downloading updates via FTP
    d. Formatting partitions
    Answer: a. Input validation and sanitizationbeaglesecurity
  15. In Bash command injection, what does “command expansion” refer to?
    a. Shell interpreting special characters as new commands
    b. Appending logs
    c. File compression
    d. User account creation
    Answer: a. Shell interpreting special characters as new commandsbeaglesecurity
  16. Why is user-controlled input in shell commands dangerous?
    a. Allows arbitrary command execution
    b. Increases CPU temperature
    c. Syncs with public NTP
    d. Decreases power supply
    Answer: a. Allows arbitrary command executionbeaglesecurity
  17. What environment is most susceptible to Bash script attacks?
    a. Systems that execute shell commands based on user input
    b. Closed embedded devices
    c. Offline gaming consoles
    d. Read-only SD cards
    Answer: a. Systems that execute shell commands based on user inputbeaglesecurity
  18. What does “Chaining” commands in Bash mean to an attacker?
    a. Executing multiple commands in sequence
    b. Copying directories only
    c. Deleting unused files
    d. Compressing log folders
    Answer: a. Executing multiple commands in sequencebeaglesecurity
  19. What Linux process enables the execution of user-supplied Bash scripts?
    a. Shell interpreter
    b. Hypervisor
    c. Boot loader
    d. Print spooler
    Answer: a. Shell interpreterwebasha
  20. A Bash reverse shell script could allow an attacker to:
    a. Maintain remote control of a compromised machine
    b. Speed up bash completion
    c. Reduce log entries
    d. Encrypt swap partitions
    Answer: a. Maintain remote control of a compromised machineexamcollection
  21. In automation, Bash scripts can manage which aspect critical for security?
    a. User accounts and permissions
    b. GUI scaling
    c. Virtual address space
    d. Bluetooth drivers
    Answer: a. User accounts and permissionswebasha
  22. What forensic artifact could reveal Bash injection attempts?
    a. Unusual entries in system logs
    b. Invalid SSL chains
    c. Outdated browser executables
    d. Read-only media
    Answer: a. Unusual entries in system logswebasha
  23. Which Bash command is used to automate scheduled tasks that might be leveraged in attacks?
    a. cron
    b. cp
    c. sudo
    d. mv
    Answer: a. cronexamcollection
  24. Bash script attacks that add new user accounts target:
    a. System persistence
    b. Network latency
    c. Speaker volume
    d. File system journaling
    Answer: a. System persistenceexamcollection
  25. Which command-line utility could an attacker use to transfer data in a Bash script execution attack?
    a. curl
    b. top
    c. df
    d. passwd
    Answer: a. curlexamcollection
  26. Malicious Bash scripts are commonly hosted in which file type?
    a. .sh
    b. .jpg
    c. .docx
    d. .mp3
    Answer: a. .shwebasha
  27. To escalate privileges using a Bash script, which vector might be abused?
    a. Sudo misconfiguration
    b. DNS over TLS
    c. GnuPG invalid keys
    d. L2TP tunnels
    Answer: a. Sudo misconfigurationwebasha
  28. What does “trap” in Bash scripting help with in the context of attack detection?
    a. Error handling and script termination logging
    b. File permission changes
    c. Compressing temp files
    d. Increasing screen timeout
    Answer: a. Error handling and script termination loggingwebasha
  29. A web server vulnerable to Bash code execution might be exploited using:
    a. Crafted HTTP headers or form data
    b. Bluetooth beacons
    c. Audio signal replay
    d. Print job injection
    Answer: a. Crafted HTTP headers or form databeaglesecurity
  30. Why should sensitive system scripts never be writable by regular users?
    a. Prevent unauthorized modification and execution
    b. Save disk space
    c. Increase DNS query speed
    d. Reduce network jitter
    Answer: a. Prevent unauthorized modification and executionwebasha
  31. What benefit does logging all Bash executions provide to defenders?
    a. Detects suspicious script activity
    b. Saves energy
    c. Increases hard-drive speed
    d. Enhances color rendering
    Answer: a. Detects suspicious script activitywebasha
  32. A successful Bash script execution attack can grant which outcome?
    a. Complete system compromise
    b. Lower screen brightness
    c. Reduce running processes
    d. Expand memory by 2 GB
    Answer: a. Complete system compromisebeaglesecurity
  33. What Linux configuration reduces the risk of unintended Bash execution?
    a. Disabling unnecessary shell access
    b. Deleting image cache
    c. Disabling SATA controllers
    d. Clearing browser cookies
    Answer: a. Disabling unnecessary shell accesswebasha
  34. What is the result of using “set -euo pipefail” in Bash?
    a. Safer script execution environment
    b. System shutdown
    c. Volume increase
    d. Manual disk defrag
    Answer: a. Safer script execution environmentquiz-maker
  35. Why is Bash favored for post-exploitation by attackers?
    a. Widely available and highly scriptable
    b. Highest graphics performance
    c. Supports non-volatile RAM
    d. Redirects sound output
    Answer: a. Widely available and highly scriptableexamcollection
  36. What is the function of the “whoami” command when injected?
    a. Reveals current user identity
    b. Expands laptops’ battery
    c. Changes screen background
    d. Updates system BIOS
    Answer: a. Reveals current user identitybeaglesecurity
  37. A key purpose of Bash script obfuscation in attacks is to:
    a. Evade detection
    b. Store large files
    c. Increase protocol overhead
    d. Lower dashboard speed
    Answer: a. Evade detectionwebasha
  38. What script operation signals suspicious Bash activity?
    a. Creation of hidden directories
    b. Frequent DNS requests
    c. Larger packet size
    d. More mobile logins
    Answer: a. Creation of hidden directorieswebasha
  39. For incident response, what tool is effective against Bash script threats?
    a. File integrity monitoring (FIM)
    b. Changing font size
    c. Uninstalling drivers
    d. Rotating display orientation
    Answer: a. File integrity monitoring (FIM)webasha
  40. What is the risk of allowing bash script files in world-writable directories?
    a. Tampering and unauthorized execution
    b. SSD cell wear
    c. Kernel version drift
    d. Aging CRLs
    Answer: a. Tampering and unauthorized executionwebasha
  41. To limit Bash execution attack scope, what should privileged scripts implement?
    a. Principle of least privilege
    b. Load driver updates
    c. Disable RAM parity
    d. Update NTP servers
    Answer: a. Principle of least privilegewebasha
  42. When should a system deny execution permission for Bash scripts?
    a. For untrusted files and directories
    b. For high-value backups
    c. For completed downloads
    d. For archived projects
    Answer: a. For untrusted files and directorieswebasha
  43. How can cron jobs contribute to Bash security risk?
    a. Automated execution of malicious scripts
    b. Regulate display brightness
    c. Disable IPv6 tunnels
    d. Switch RAM modules
    Answer: a. Automated execution of malicious scriptsexamcollection
  44. Which is a recommended proactive defense against Bash injection in hosted applications?
    a. Restrict shell command usage from web inputs
    b. Enable remote USB access
    c. Increase SSH keepalive
    d. Switch FTP logins
    Answer: a. Restrict shell command usage from web inputsbeaglesecurity
  45. A script with “chmod 777” set is dangerous because:
    a. It allows any user to modify and execute it
    b. It runs faster during night time
    c. It loads device drivers
    d. It disables USB
    Answer: a. It allows any user to modify and execute itwebasha
  46. Static code analysis is useful in Bash script security because it:
    a. Helps find vulnerable code constructs
    b. Alters DNS settings
    c. Boosts battery health
    d. Prunes old syslogs
    Answer: a. Helps find vulnerable code constructswebasha
  47. Why should environment variable handling matter in Bash security?
    a. They can be vectors for indirect attacks
    b. They expand swap space
    c. They rebuild bootloaders
    d. They wipe browser cache
    Answer: a. They can be vectors for indirect attackswebasha
  48. Which of these is NOT recommended when securing Bash scripts?
    a. Embedding static passwords in plaintext
    b. Sanitizing external inputs
    c. Validating script dependencies
    d. Restricting user permissions
    Answer: a. Embedding static passwords in plaintextwebasha
  49. When would disabling interactive shells shrink attack surface?
    a. When limiting remote access points
    b. When increasing firmware speed
    c. When updating disk sectors
    d. When deleting email attachments
    Answer: a. When limiting remote access pointswebasha
  50. Bash script auditing should include checks for:
    a. Unexpected external command calls
    b. Monitor disk throughput
    c. Lower WiFi channels
    d. Reset USB ports
    Answer: a. Unexpected external command callswebasha

 

  1. https://beaglesecurity.com/blog/vulnerability/bash-command-injection.html
  2. https://www.examcollection.com/blog/bash-scripting-a-key-tool-for-ethical-hackers/
  3. https://www.webasha.com/blog/100-bash-scripting-interview-questions-answers
  4. https://www.quiz-maker.com/cp-np-shell-scripting-question
  5. https://www.sanfoundry.com/cyber-security-questions-answers-types-cyber-attacks/
  6. https://examradar.com/cyber-security-mcq-set-17/
  7. https://www.scribd.com/document/488602565/Cyber-security-notes-MCQ-RCS-1-3
  8. https://www.yeahhub.com/linux-multiple-choice-questions-mcq-361-390-questions-explanation/
  9. https://testbook.com/objective-questions/mcq-on-owasp-top-10-vulnerabilities–5eea6a0d39140f30f369e30b
  10. https://www.placementpreparation.io/mcq/cyber-security/page/3/
  11. https://www.sanfoundry.com/cyber-security-questions-answers-bugs-vulnerabilities/
  12. https://www.cybrary.it/blog/the-importance-of-bash-scripting-for-ethical-hacking
  13. https://aticleworld.com/bash-mcq/
  14. https://www.yeahhub.com/cyber-security-ethical-hacking-mcq-questions-answers-part4/
  15. https://tcm-sec.com/bash-and-powershell-essential-tools/
  16. https://www.koenig-solutions.com/bash-shell-scripting-quiz-questions-answers
  17. https://www.uscyberrange.org/courseware/module-l-bash-scripting-for-ethical-hackers
  18. https://testbook.com/objective-questions/mcq-on-shell-programming–61f8d371669162b150866194
  19. https://github.com/PacktPublishing/Bash-Shell-Scripting-for-Pentesters
  20. https://www.sanfoundry.com/cyber-security-questions-answers-mcqs/

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!