Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. (2.75 points) Write a Linux shell script that finds all files on /home that contain a given specific text string in the body of
1. (2.75 points) Write a Linux shell script that finds all files on /home that contain a given specific text string in the body of the file, and changes the permissions of each such file such that only Alice_YYourFullName> has read and execute permissions. Note that this means no one else (except Alice_ and root) has any other permissions. Additional requirements: - As with other assignments, ensure that is replaced by your actual full name (e.g., this course's TA would use "Isratlui"). - Ensure that the text string your script will search for is supplied at the script's command line. - Note that your script should handle any error conditions by printing out a descriptive error message to the shell and then exiting. - Submit your script with the filename YourFullName>_restrictfiles.sh. 2. (3.5 points) Read the following article, focusing on the registry keys it describes (e.g., Run, RunOnce, etc): http://www.symantec.com/connect/articles/are-you-infected-detecting-malware-infection. (Note: for more technical details of how these keys and others are still used currently, as optional reading, see here: https://attack.mitre.org/techniques/T1547/001/). a. (1 point) Write and submit a PowerShell script named YourFullName>_2a.ps1, which adds a value to the HKLM\SOFTWARE\Microsoft \Windows\CurrentVersion key for a benign program of your choice, where the value name contains your own name (You should see this value as one of the outputs of your part (b) code when you print the keys and values). b. (2.5 points) Write and submit a program that will print out a list of all of the values in the Run and RunOnce keys, and that of their subkeys (if present). Your code should work on any Windows 10 machine's registry (i.e., it cannot be specific to your own machine). Note that the Run and RunOnce keys appear under both HKEY_LOCAL_MACHINE and HKEY_CURRENT_USERS (under the same path). The printed list should also contain the values in the subkeys in these keys, if any are present (i.e., it needs to search recursively). You have two options for writing and submitting your program: (Option i): Write a Python program named YourFullNames_2b.py that contains a function called listRegistrystartedPrograms(), which meets the objectives outlined above in this question 2b. (OR Option ii): Write a PowerShell script named YYourFullNames_2b.ps1 that meets the objectives outlined above in this question 2b. to enable running PowerShell scripts on your Windows VM, open the PowerShell Console by ching for PowerShell, then click "Run as Administrator". In the PowerShell Console, set the execution sy with the command: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned, then press A or Y
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started