Week 5 Assignment Programming

CYBR 525 – Week 4 Assignment

Name:

Get Your Custom Essay Written From Scratch
We have worked on a similar problem. If you need help click order now button and submit your assignment instructions.
Just from $13/Page
Place an Order

Instructions: Complete one of the exercises below.

PowerShell Exercise

Get Assignment Writing Help

Our experts are ready to complete your assignment, course work. essay, test, dissertation, research paper, quiz

Get Started

Note: You need to complete this exercise on a Windows system.

1.  Read the Microsoft PowerShell Tutorial found in the weekly assignments.

2.  Run PowerShell console. Review the following commands and run them from the console.  If the command scrolls, you can use ‘| more’ to restrict the output to one page at a time.  Under each command, include a screenshot and an explanation of what information is provided by the command.

a.Get-Help

b.Get-Command

c.Get-Host

d.Alias

e.Get-ChildItem env:

f.echo Hello $env:username

3.  Redirecting output to a file is a method of saving information provided by a shell command.  There are two methods to do this in PowerShell:

·  Use the Out-File cmdlet as in ‘ | Out-File C:filename.txt’

·  To overwrite a file use ‘ > filename ’.  To append to an existing file use   â€˜ >> filename ’.

Re-run the ‘ Get-ChildItem env: ‘ cmdlet and output to a file.  Show the results below and explain the benefit as part of system testing.

4.  Run PowerShell ISE.  Create a script that does the following:

a.  Starts with a comment explaining the script.  Include your name, class and date.

b.  Print a line greeting the user. To do this, you can use the following command: echo Hello $env:username

c.  Outputs the system information to a file in your home folder.

Get-ChildItem env: > $HOMEsysteminfo.txt

d.Output all of the users on the PC to a file in your home folder.

Get-WmiObject –Class Win32_UserAccount | Out-File $HOMEUserAccounts.txt

e.  Include one additional PowerShell command of your choice. Include a description of the command in your explanation.

f.  Show the history of all the commands you have typed.

Save your script in your home folder and run it.  Confirm it completes successfully.

Include your script with this exercise.

Provide an explanation of your script and the output it provides. Include how it could be used by system testers.

PERL Exercise

The instructions are for Windows, but it can be completed on Linux as well.

1.  Complete Activity 7-4, pages 181-184 in your textbook.

a.  You can either use the Cybersecurity Virtual Sandbox or your own PC. If you login to the virtual lab, then you don’t need to download ActivePerl.

b.  For your own PC, you will need to install and use the latest version of ActivePerl, which is available from http://www.activestate.com/activeperl.

c.  If you need more information about programming in Perl, refer to the online book by Simon Cozens, Beginning Perl available at http://www.perl.org/books/beginning-perl/.

d.  You may use any text editor you may have, or use notepad (step 12).

Once you get the initial program running, copy and paste the output here:

2.  Complete Activity 7-6, pages 194-195. Do not complete step 10. Once you have the program running, select an additional Win32 API function from the table of page 193. 

Copy and paste the output here:

3.  Explain in 2-3 paragraphs how PERL could be used by security penetration testers.  Include at least two examples.

4.  Based on your experience with PERL, what would be the minimum functions you’d include to get the most useful information about the system upon which this script would be run?

Linux Bash Shell Exercise

Note: You will need to run a Linux Operating System in a virtual environment in order to complete this exercise.

1.  Read the Linux Bash shell scripting Tutorials found in the weekly assignments.

2.  Start a Linux operating system of your choice (Ubuntu, Fedora, CentOS, Linux MINT, etc.). Review the following commands and run them from the terminal.  If the command scrolls, you can use ‘| more’ to restrict the output to one page at a time.  Under each command, include a screenshot and an explanation of what information is provided by the command.

a.man man

b.man -?

c.uname -a

d.Alias

e.env

f.cat /etc/passwd

g.ls -la

h.echo Hello $USER

3.  Redirecting output to a file is a method of saving information provided by a shell command.  To overwrite a file use ‘ > filename ’.  To append to an existing file use   â€˜ >> filename ’.

Re-run the ‘env‘ command and output to a file.  Show the results below and explain the benefit as part of system testing.

4.  Explain the differences between the following methods of viewing / editing files: more, less, cat, gedit, and vi.

5.  Create a shell script that does the following:

a.  Starts with a comment explaining the script.  Include your name, class and date.

b.  Print a line greeting the user. To do this, you can use the following command: echo Hello $USER

c.  Outputs the system information to a file in your home folder.

env > $HOMEsysteminfo.txt

d.Output all of the users on the PC to a file in your home folder.

cat /etc/passwd > $HOMEUserAccounts.txt

e.  Include one additional shell command of your choice. Include a description of the command in your explanation.

Save your script in your home folder and run it.  [Note1: To run a shell script, you may need to .include the local path (e.g., ./script).] Confirm it completes successfully. [Note2: When you create a shell script in Linux, you need to ensure the permissions are set to be able to execute it. See the chmod command for more information.] 

Include your script with this exercise.

Provide an explanation of your script and the output it provides. Include how it could be used by system testers.

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Order Over WhatsApp Place an Order Online

"Do you have an upcoming essay or assignment due?


Get any topic done in as little as 6 hours

If yes Order Similar Paper

All of our assignments are originally produced, unique, and free of plagiarism.

Stuck with a Question?

Get it solved from our top experts within 8 hrs!

Ask Your Question Now!

"Are you looking for a similar assignment? if yes, we are ready to help"

Order New Solution

You will get 100% plagiarism free and professional written paper.