Python
Python
.
Both PowerShell and Python can be used on a terminal/command line, as
well as within the ISEs that we've already explored. You can always run
single lines of code in any of the ISEs.
There are different ways to access the scripting languages:
In Windows, you can click on the Start button and type
PowerShell and choose Windows PowerShell. A blue window will
appear and you can type your commands there.
In Windows, you can open a Command Window and type
PowerShell and a subinterface will appear that starts with PS. You
can type your commands, and when you're done, enter Exit and
you will be brought to the regular command window.
In Linux, you can open a terminal and enter Python.
Within the Windows Server VM, open a command window and type PowerShell.
Enter Install-WindowsFeature -name Web-Server -
IncludeManagementTools
2
Part II: Homepage in IIS
The homepage for your website is located in: c:\inetpub\wwwroot\iisstart.htm
For our purposes here, we will modify iisstart.htm.
Open PowerShell ISE and enter the following code:
Now, let's make this a little bit more interesting by spoofing the google website. Open a
new tab in the browser and go to Google (or any other website of your choosing).
3
Right-click on a blank space and select View Page Source.
Run the code again and refresh the browser localhost page.
4
Notice that the pictures are broken. That is easy enough for a professional hacker to fix.
Congratulations! You’ve just completed one important part of a MITM attack.