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.
- 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 - 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 - 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 - Which Linux shell is most associated with script execution attacks in web applications?
a. Bash
b. Fish
c. Zsh
d. Csh
Answer: a. Bashbeaglesecurity - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - Malicious Bash scripts are commonly hosted in which file type?
a. .sh
b. .jpg
c. .docx
d. .mp3
Answer: a. .shwebasha - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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
- https://beaglesecurity.com/blog/vulnerability/bash-command-injection.html
- https://www.examcollection.com/blog/bash-scripting-a-key-tool-for-ethical-hackers/
- https://www.webasha.com/blog/100-bash-scripting-interview-questions-answers
- https://www.quiz-maker.com/cp-np-shell-scripting-question
- https://www.sanfoundry.com/cyber-security-questions-answers-types-cyber-attacks/
- https://examradar.com/cyber-security-mcq-set-17/
- https://www.scribd.com/document/488602565/Cyber-security-notes-MCQ-RCS-1-3
- https://www.yeahhub.com/linux-multiple-choice-questions-mcq-361-390-questions-explanation/
- https://testbook.com/objective-questions/mcq-on-owasp-top-10-vulnerabilities–5eea6a0d39140f30f369e30b
- https://www.placementpreparation.io/mcq/cyber-security/page/3/
- https://www.sanfoundry.com/cyber-security-questions-answers-bugs-vulnerabilities/
- https://www.cybrary.it/blog/the-importance-of-bash-scripting-for-ethical-hacking
- https://aticleworld.com/bash-mcq/
- https://www.yeahhub.com/cyber-security-ethical-hacking-mcq-questions-answers-part4/
- https://tcm-sec.com/bash-and-powershell-essential-tools/
- https://www.koenig-solutions.com/bash-shell-scripting-quiz-questions-answers
- https://www.uscyberrange.org/courseware/module-l-bash-scripting-for-ethical-hackers
- https://testbook.com/objective-questions/mcq-on-shell-programming–61f8d371669162b150866194
- https://github.com/PacktPublishing/Bash-Shell-Scripting-for-Pentesters
- https://www.sanfoundry.com/cyber-security-questions-answers-mcqs/