Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm doing an assignment with poweshell somethings messed up in the code because i need to get access granted to get the password and keep

I'm doing an assignment with poweshell somethings messed up in the code because i need to get access granted to get the password and keep getting access denied. Anyone know whats wrong with the code and please explain how and where i could fix it.
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Wir Dow Wir Pow 32 First, you will need variable with a list of cont commonly used passwords to trate through when trying to hack the user's password. 33 # Create a variable that stores the content from the most commonly used password file 34 #Important Use the file paths 20 most-como-passwords.txt 35 YOUR COOG BELOW HERS 36 Scommon PasswordList - Get-content\203-most common passwordil.txt 38 59 + Seconde variable is needed that stores the victim's usernare. HINTE 40 YOUR CODE BELOW HERE 41 Svitin "Luce Now you are ready to design your function 4 Your function name will need parentes 45 * One for the usernane and one for the password list 4 YOUR COOCELOW MERE function Brutforce usern, Scootwordt) 49 50 Now you are ready to begin testing och password for your bruteforce attack #write foredoop wethod to treate through ach child 12 Hint You should be calling the variable that contain a sword) 51 YOUR CODE BELOW GRE 54 foreach (Scootwordt) 56 You will need to build an army oferred to attack with 5 Centra 4 ACCESS Demned Add statement that will return award once a watch is found YOUR CODE BELOW HERE Hello ACCES Denied - First, you will need a variable with a list of most commonly used passwords to iterate through when trying to hack the user's password. # Create a variable that stores the content from the most commonly used password file. 34 #Important. Use the file path\10k-most-common passwords.txt # YOUR CODE BELOW HERE 36 Scommon PasswordList - Get-Content .\104-most-common-asswords.txt 37 38 39 . Second, a variable is needed that stores the victim's username HINT: Luke! 40 #YOUR CODE BELOW HERE 41 Svictim "Luke" 42 43 # Now you are ready to design your function. 44 #Your function name will need 2 parameters 45 #One for the username and one for the password list 46 # YOUR CODE BELOW HERE 47 function brutforce (Susername, Scoon Passwordlist) 48 49 50 # Now you are ready to begin testing each password for your heute force attack! 51 # Write foreach loop method to treate through each common password in the password file 52 # (Hint: You should be calling the variable that contains all passwords) 53 YOUR CODE BELOW HERE foreach (Spas in Scoon Passwordist) 55 56 You will need to build an array of user credentials to attack with 57 #1. Create an enoty arrav. Access Denied # Add a statement that will return password once a match is found YOUR CODE BELOW HERE Access Denied En Cor Assignmentzips 56 57 58 59 60 61 62 63 64 65 66 67 # You will need to build an array of user credentials to attack with #1. Create an empty array # 2. Add your victim's username variable to the array. HINTI To add itens to an array you must use operator # 3. Add a potential password to the array # YOUR CODE BELOW HERE Sarr -60 Sarr - Svictim Sarr + Spass 69 70 21 72 23 74 75 76 ** DO NOT MODIFY ## write-Host The Invoke-Expression cmdlet is used to call other powershell scripts * Below will invoke Login.pst and pass a username and password: Your job is to pass the user credential array created above. Reneaber user credential array variables will need to be replaced with variable name. Example: Sarr # YOU MUST MODIFY LINE BELOW Invoke-Expression "& Login.psi Sarn Out Variable out 79 81 82 # Now, you have submitted a usernane and password to the login screen. next is to find out if we had a match. # write an if-statement that will let you know a match has been found. Access Denied # Add a statement that will return password once a match is found # YOUR CODE BELOW HERE Hello Access Denied ent.pl # Now, you have submitted a username and password to the login screen, next is to find out if we had a match. # Write an if-statement that will let you know a match has been found. # (HINT: The Sout varialbe will equal either "Access Denied" or "Access Granted" IF # Add a statement that will return password once a match is found # YOUR CODE BELOW HERE Ww Pow BO 81 82 83 34 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 102 104 Brutforce "Luke' scommon Passwordlist Fid - [Execution) # Finally, you are ready to execute your function! Good Luck + Example. [function name) Svictim Scommon PasswordsList # One final hint, password match should happen around 15 seconds :) # YOUR CODE BELOW HERE Access Denied # Add a statement that will return password once a match is found YOUR CODE BELOW HERE Hello Access Denied Wir Dow Wir Pow 32 First, you will need variable with a list of cont commonly used passwords to trate through when trying to hack the user's password. 33 # Create a variable that stores the content from the most commonly used password file 34 #Important Use the file paths 20 most-como-passwords.txt 35 YOUR COOG BELOW HERS 36 Scommon PasswordList - Get-content\203-most common passwordil.txt 38 59 + Seconde variable is needed that stores the victim's usernare. HINTE 40 YOUR CODE BELOW HERE 41 Svitin "Luce Now you are ready to design your function 4 Your function name will need parentes 45 * One for the usernane and one for the password list 4 YOUR COOCELOW MERE function Brutforce usern, Scootwordt) 49 50 Now you are ready to begin testing och password for your bruteforce attack #write foredoop wethod to treate through ach child 12 Hint You should be calling the variable that contain a sword) 51 YOUR CODE BELOW GRE 54 foreach (Scootwordt) 56 You will need to build an army oferred to attack with 5 Centra 4 ACCESS Demned Add statement that will return award once a watch is found YOUR CODE BELOW HERE Hello ACCES Denied - First, you will need a variable with a list of most commonly used passwords to iterate through when trying to hack the user's password. # Create a variable that stores the content from the most commonly used password file. 34 #Important. Use the file path\10k-most-common passwords.txt # YOUR CODE BELOW HERE 36 Scommon PasswordList - Get-Content .\104-most-common-asswords.txt 37 38 39 . Second, a variable is needed that stores the victim's username HINT: Luke! 40 #YOUR CODE BELOW HERE 41 Svictim "Luke" 42 43 # Now you are ready to design your function. 44 #Your function name will need 2 parameters 45 #One for the username and one for the password list 46 # YOUR CODE BELOW HERE 47 function brutforce (Susername, Scoon Passwordlist) 48 49 50 # Now you are ready to begin testing each password for your heute force attack! 51 # Write foreach loop method to treate through each common password in the password file 52 # (Hint: You should be calling the variable that contains all passwords) 53 YOUR CODE BELOW HERE foreach (Spas in Scoon Passwordist) 55 56 You will need to build an array of user credentials to attack with 57 #1. Create an enoty arrav. Access Denied # Add a statement that will return password once a match is found YOUR CODE BELOW HERE Access Denied En Cor Assignmentzips 56 57 58 59 60 61 62 63 64 65 66 67 # You will need to build an array of user credentials to attack with #1. Create an empty array # 2. Add your victim's username variable to the array. HINTI To add itens to an array you must use operator # 3. Add a potential password to the array # YOUR CODE BELOW HERE Sarr -60 Sarr - Svictim Sarr + Spass 69 70 21 72 23 74 75 76 ** DO NOT MODIFY ## write-Host The Invoke-Expression cmdlet is used to call other powershell scripts * Below will invoke Login.pst and pass a username and password: Your job is to pass the user credential array created above. Reneaber user credential array variables will need to be replaced with variable name. Example: Sarr # YOU MUST MODIFY LINE BELOW Invoke-Expression "& Login.psi Sarn Out Variable out 79 81 82 # Now, you have submitted a usernane and password to the login screen. next is to find out if we had a match. # write an if-statement that will let you know a match has been found. Access Denied # Add a statement that will return password once a match is found # YOUR CODE BELOW HERE Hello Access Denied ent.pl # Now, you have submitted a username and password to the login screen, next is to find out if we had a match. # Write an if-statement that will let you know a match has been found. # (HINT: The Sout varialbe will equal either "Access Denied" or "Access Granted" IF # Add a statement that will return password once a match is found # YOUR CODE BELOW HERE Ww Pow BO 81 82 83 34 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 102 104 Brutforce "Luke' scommon Passwordlist Fid - [Execution) # Finally, you are ready to execute your function! Good Luck + Example. [function name) Svictim Scommon PasswordsList # One final hint, password match should happen around 15 seconds :) # YOUR CODE BELOW HERE Access Denied # Add a statement that will return password once a match is found YOUR CODE BELOW HERE Hello Access Denied

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

User Defined Tensor Data Analysis

Authors: Bin Dong ,Kesheng Wu ,Suren Byna

1st Edition

3030707490, 978-3030707491

More Books

Students also viewed these Databases questions

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago