0% found this document useful (0 votes)
7 views5 pages

Python

This assignment involves creating a website using Windows and Linux scripting languages, specifically Python and PowerShell. It includes installing IIS on Windows, creating a homepage, and demonstrating a MITM attack by spoofing a website. The final deliverable is a 10-page instruction guide with screenshots detailing the process and discussing cybersecurity implications.

Uploaded by

namidps4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views5 pages

Python

This assignment involves creating a website using Windows and Linux scripting languages, specifically Python and PowerShell. It includes installing IIS on Windows, creating a homepage, and demonstrating a MITM attack by spoofing a website. The final deliverable is a 10-page instruction guide with screenshots detailing the process and discussing cybersecurity implications.

Uploaded by

namidps4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Week 7 Assignment

Create a Website in Windows


In this assignment, we will be demonstrating the use of scripting for both Windows and Linux
with the languages Python and PowerShell) to create a website and analyze the differences.
First, we will install IIS in our Windows Server, then create a homepage for the web server.
Then, we will install Apache web server in Linux and create a homepage.
By this stage in the course, you should be getting comfortable with looking at different code and
seeing the similarities and differences in functionality between languages.

For this assignment, we will be writing detailed step-by-step


instructions showing how we did this exercise, so we need
Screenburst to take screenshots for us in the background.

Part I: Webserver in Windows


 Internet information server (IIS) is the built-in web server for Windows.
 Installation comes in two ways:
o Add roles within Server Manager, or
o Use PowerShell in the command window to install it.
 We will use PowerShell to install IIS.
 Open your Azure Lab machine.
 Turn on and open your Windows Server VM within Hyper-V.

.
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

 Type Exit to go back to the main command window.


 Open a browser and enter localhost as the address, and the default webpage appears.

 Congratulations, you’ve installed a web server in Windows!

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:

 There are really only five things happening in this code:


o Line 1 sets the HTML that we will be working with.
o Line 3 defines a batch of content.
o Lines 4-13 are actual HTML code.
o Line 16 takes the HTML code and writes it to the HTML file defined in line 1.
o Line 18 lets us know that it's done.
 Add Remarks (#) to your code that explain these 5 things.
 Run the code and check the browser address localhost to see if your changes applied.

 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.

 Ctrl+a to select everything.


 Ctrl+c to copy it.
 Go back to PowerShell, select all of the HTML code, and press the space bar.
 Press Enter a few times to give us some space.
 Ctrl+v to paste the Google code here.
 Make sure the PowerShell code is still at the bottom as shown.

 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.

A MITM (Man in the Middle) attack is where a threat actor


impersonates a device or object of authority in order to redirect or
eavesdrop communications.
Spoofing a website (similar to what we have done here) can be part
of a larger MITM attack
 User receives an email with a disguised hyperlink to Google
that looks similar to this: Google.com
 The user is redirected to the attacker's website, where the
attacker can redirect traffic to the real Google website
and/or ask for a Google password in order to gain access to
the user's Google account.

Based on your Screenburst output, create a 10-page step-by-step


instruction guide using the Step-By-Step Template. It should include 3
screenshots per page, and your instructions should be suitable for
anyone to complete the tasks in this assignment.
Include one paragraph explaining how such an exercise can be part of a
SUBMIT complicated cybersecurity attack, and one suggestion for how this attack
can be mitigated.

Powered by TCPDF (www.tcpdf.org)

You might also like