Mohammad Mohsin
4 min readApr 14, 2021

--

Creating and Connecting to Windows Instances on AWS.

AWS-Pen-Testing

Hi Everyone,

This is the third blog in AWS PEN-TESTING series of Blogs. In my previous blog I have shown How to create Linux Instances on AWS and connect them.

In this Blog I will show How to create windows instance and connect to it on AWS. This blog is necessary to write because in my next blog I will show Environment Lab Set-up for AWS PEN-TESTING where we will create two instances i.e. Linux and Windows on AWS in the same region so they can be in the same network. Then on Linux Instance we will host some vulnerable services and on windows instance we will host some buggy apps to pentest.

Please follow below steps for Creating and Connecting to AWS Windows instance.

Step 1: Login to your AWS Account and navigate to Instances tab to create new Windows instance.

Login to AWS and Navigate to Instances TAB

Step 2: Choose below Windows Server AMI(Amazon Machine Image) from instances list which is free tier.

Choose Image

Step 3: Keep the setting default for now and click on Review and Launch.

Click on Review and Launch

Step 4: When you click on Launch finally it will ask you to create or use previous key pair to Launch the instance. If you don’t have previously generated key-pair then click on “Create a new key -pair”.

Click on Launch
Generate New Key-pair

when you follow above steps give the meaningful name to .pem file and download it and instance will Launch successfully. you can notice status that instance is running.

.pem file downloaded
Instance Status is running

Now in my previous blog I have already given steps to generate Private Key (.ppk file from .pem file using Puttygen) So that’s I am not gonna repeat over here. Please refer to below blog to follow those steps,

Blog 2: https://medium.com/p/d3902bf4c248/edit?source=your_stories_page

As Windows server does not support certificate based authentication we need to use bit different method to establish connection with our windows server. follow steps 5 to step 9 for establishing RDP connection with windows server 2019.

Step 5: Right click on instance and navigate to Security-Get Windows Password.

Get Credentials for Windows RDP

Step 6: Select the .pem file which we have downloaded earlier and then click on Decrypt Password to get Windows RDP IP, Username and Password.

Generate Windows Credentials

As shown in below screen you will get credentials for connecting windows RDP machine.

Windows Credentials

Step 7: Now, Right click on windows instance and click on Connect.

Connecting to AWS Windows Instance

Step 8: Click on RDP Client and download remote desktop file.

Connecting to AWS Windows Instance
RDP File Downloaded

Step 9: Go through following prompts and then you will be successfully able to connect AWS Windows instance.

Click on Connect
Enter Password
Click on YES
Successfully connected to AWS Windows Instance

Keep in mind, With Blog 2 and Blog 3 of AWS Pen-Testing Series I have covered Half of the Part of “Setting up Lab Environment for AWS Pen-testing”. Also I have fulfill requirement for establishing connection between this two machine by hosting them into same region.

Both Linux and Windows Instance Hosted in Same Region with Default Setting

In my next blog, I will install some vulnerable services on Linux instance and some buggy Web Apps on Windows instance for learning AWS-Pen-testing. So follow along and I will keep posting for you.

Thanks Readers!

Please provide your valuable feedback and suggestions.

--

--

Mohammad Mohsin

Director - OLF Infotech Pvt. Ltd. Ethical Hacker, Vulnerability Assessment and Penetration Tester, Bug Hunter, Security Researcher, Optimistic, Philanthropist.