{
    "id": "b409dfc3-67f9-4aa0-93c5-8498c9dff80f",
    "name": "Configure Just-In-Time Access for a Virtual Machine",
    "slug": "configure-just-in-time-access-for-a-virtual-machine",
    "status": "published",
    "lab_type": "azure",
    "is_sample": false,
    "duration_in_seconds": 1200,
    "metadata": {},
    "session": null,
    "company": "a491bc32-c056-4946-9169-cc053387bada",
    "created": "2020-09-28T22:31:06.879196Z",
    "modified": "2023-10-03T18:58:58.343903Z",
    "is_beta": false,
    "lab_objectives": [],
    "main_learning_area": null,
    "learning_areas": [],
    "categories": [],
    "tags": [],
    "difficulty": null,
    "is_web_access": false,
    "is_lab_experience": false,
    "is_featured": false,
    "cve": null,
    "severity": null,
    "year": null,
    "classification": null,
    "is_trackable": false,
    "cpe_credits": null,
    "is_skill_check": false,
    "external_url": "https://portal.azure.com/",
    "solution_video": "55c00b88-76c1-4c1a-9f8d-4eb7b6e57a68",
    "explanation_video": null,
    "description": "# Task: Configure Just-In-Time Access for a Virtual Machine\n\n## Video: Configure VM Security\n\n**Estimated time:** 25 minutes\n\n## Goal\n\nIn this task you will provision a virtual machine and protect it with just-in-time (JIT) access through security center.  You will upgrade security center to standard tier to enable JIT virtual machine access.  You will also verify that JIT virtual machine access is performing as expected.\n\n## Pre-requisites\n\n1. Non-production Azure subscription\n\n## Requirements\n\n1. Provision a virtual machine\n2. Configure just-in-time access for the virtual machine\n3. Verify just-in-time access\n\n---\n\n## Pre-requisite setup\n\nThis task does not require any pre-requisite setup.\n\n## Requirement 1: Provision a virtual machine\n\nTo begin this task, you will provision a network security group, a virtual network, a Windows virtual machine, and a Linux virtual machine. Provision the resources with the following settings:\n\n- Network security group:\n  |Setting|Value|\n  |---|---|\n  |Resource group|**task-vmsec-rg**|\n  |Location|**East US**|\n  |Name|**vmsec-nsg**|\n  |**Inbound rule 1**||\n  |Name|**RDP**|\n  |Protocol|**TCP**|\n  |Port|**3389**|\n  |Priority|**500**|\n  |Action|**Allow**|\n  |**Inbound rule 2**||\n  |Name|**SSH**|\n  |Protocol|**TCP**|\n  |Port|**22**|\n  |Priority|**600**|\n  |Action|**Allow**|\n\n- Provision the virtual network with the following settings. Accept default values for all other settings:\n  |Setting|Value|\n  |---|---|\n  |Resource group|**task-vmsec-rg**|\n  |Location|**East US**|\n  |Name|**vmsec-vnet**|\n\n- Assign the **vmsec-nsg** to the **default** subnet of the **vmsec-vnet** virtual network.\n- Provision a Windows virtual machine with the following settings:\n\n  |Setting|Value|\n  |---|---|\n  |Resource group|**task-vmsec-rg**|\n  |Location|**East US**|\n  |Name|**vmsec-win-vm**|\n  |Image|**Windows Server 2016 Datacenter**|\n  |Size|**Standard_D2S_V3**|\n  |Username|**student**|\n  |Password|**&lt;a strong password&gt;**|\n  |OS disk|**Standard SSD**|\n  |Virtual network|**vmsec-vnet**|\n  |Subnet|**default**|\n  |Public IP|**&lt;accept default&gt;**|\n  |NIC NSG|**None**|\n\n- Provision an Ubuntu server with the following settings:\n  \n |Setting|Value|\n  |---|---|\n  |Resource group|**task-vmsec-rg**|\n  |Location|**East US**|\n  |Name|**vmsec-ubu-vm**|\n  |Image|**Ubuntu Server 18.04 LTS**|\n  |Size|**Standard_D2S_V3**|\n  |Authentication type|Password|\n  |Username|**student**|\n  |Password|**&lt;a strong password&gt;**|\n  |OS disk|**Standard SSD**|\n  |Virtual network|**vmsec-vnet**|\n  |Subnet|**default**|\n  |Public IP|**&lt;accept default&gt;**|\n  |NIC NSG|**None**|\n\n## Requirement 2: Configure just-in-time access for the virtual machine\n\nNext you will implement JIT access for the virtual machines.  To complete this requirement:\n\n- Provision a log analytics workspace with the following settings:\n  |Setting|Value|\n  |---|---|\n  |Resource group|**task-vmsec-rg**|\n  |Location|**East US**|\n  |Name|**vmsec-la**|\n- Once the log analytics workspace is provisioned, navigate to the workspace and connect **vmsec-win-vm** and **vmsec-ubu-vm** to the workspace.  If they are already connected to a different workspace (depending on your subscription settings) disconnect them first.\n- Navigate to the security center blade in the Azure portal and upgrade the security center tier for your subscription to standard. You can adjust the plan under the **Coverage** view of the blade.\n- In security center, set up JIT access for the **vmsec-win-vm** and **vmsec-ubu-vm** virtual machines. You may need to wait a few minutes for the machines to show up under **Not Configured** in the JIT windows of the **Security Center** blade.\n\n## Requirement 3: Verify just-in-time access\n\nTo complete this task, you will request access to both virtual machines.  You will observe the changes to the NSG and check the JIT audit trail.  To complete this requirement:\n\n- Navigate to the **vmsec-nsg** blade in the Azure portal and observe the inbound rules.\n- Navigate to the **vmsec-win-vm** blade and request JIT access for your IP address.\n- If you have an RDP client connect to the **vmsec-win-vm** virtual machine.\n- Navigate to the **vmsec-ubu-vm** blade and request JIT access for your IP address.\n- Establish an ssh session with **vmsec-ubu-vm**.  If you do not have an ssh client, you can use an Azure cloud shell.\n- Navigate to the **vmsec-nsg** blade in the Azure portal and observe the inbound rules.\n- Navigate to **Security Center** and view the JIT access audit trail.\n\n## Clean up\n\n- Delete the **task-vmsec-rg** resource group.\n\n## Solution\n\nHaving trouble completing this task?  View the demonstration video to see how to do it.",
    "description_html": "<h1>Task: Configure Just-In-Time Access for a Virtual Machine</h1>\n<h2>Video: Configure VM Security</h2>\n<p><strong>Estimated time:</strong> 25 minutes</p>\n<h2>Goal</h2>\n<p>In this task you will provision a virtual machine and protect it with just-in-time (JIT) access through security center.  You will upgrade security center to standard tier to enable JIT virtual machine access.  You will also verify that JIT virtual machine access is performing as expected.</p>\n<h2>Pre-requisites</h2>\n<ol>\n<li>Non-production Azure subscription</li>\n</ol>\n<h2>Requirements</h2>\n<ol>\n<li>Provision a virtual machine</li>\n<li>Configure just-in-time access for the virtual machine</li>\n<li>Verify just-in-time access</li>\n</ol>\n<hr />\n<h2>Pre-requisite setup</h2>\n<p>This task does not require any pre-requisite setup.</p>\n<h2>Requirement 1: Provision a virtual machine</h2>\n<p>To begin this task, you will provision a network security group, a virtual network, a Windows virtual machine, and a Linux virtual machine. Provision the resources with the following settings:</p>\n<ul>\n<li>\n<p>Network security group:\n  |Setting|Value|\n  |---|---|\n  |Resource group|<strong>task-vmsec-rg</strong>|\n  |Location|<strong>East US</strong>|\n  |Name|<strong>vmsec-nsg</strong>|\n  |<strong>Inbound rule 1</strong>||\n  |Name|<strong>RDP</strong>|\n  |Protocol|<strong>TCP</strong>|\n  |Port|<strong>3389</strong>|\n  |Priority|<strong>500</strong>|\n  |Action|<strong>Allow</strong>|\n  |<strong>Inbound rule 2</strong>||\n  |Name|<strong>SSH</strong>|\n  |Protocol|<strong>TCP</strong>|\n  |Port|<strong>22</strong>|\n  |Priority|<strong>600</strong>|\n  |Action|<strong>Allow</strong>|</p>\n</li>\n<li>\n<p>Provision the virtual network with the following settings. Accept default values for all other settings:\n  |Setting|Value|\n  |---|---|\n  |Resource group|<strong>task-vmsec-rg</strong>|\n  |Location|<strong>East US</strong>|\n  |Name|<strong>vmsec-vnet</strong>|</p>\n</li>\n<li>\n<p>Assign the <strong>vmsec-nsg</strong> to the <strong>default</strong> subnet of the <strong>vmsec-vnet</strong> virtual network.</p>\n</li>\n<li>Provision a Windows virtual machine with the following settings:</li>\n</ul>\n<table>\n<thead>\n<tr>\n<th>Setting</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Resource group</td>\n<td><strong>task-vmsec-rg</strong></td>\n</tr>\n<tr>\n<td>Location</td>\n<td><strong>East US</strong></td>\n</tr>\n<tr>\n<td>Name</td>\n<td><strong>vmsec-win-vm</strong></td>\n</tr>\n<tr>\n<td>Image</td>\n<td><strong>Windows Server 2016 Datacenter</strong></td>\n</tr>\n<tr>\n<td>Size</td>\n<td><strong>Standard_D2S_V3</strong></td>\n</tr>\n<tr>\n<td>Username</td>\n<td><strong>student</strong></td>\n</tr>\n<tr>\n<td>Password</td>\n<td><strong>&lt;a strong password&gt;</strong></td>\n</tr>\n<tr>\n<td>OS disk</td>\n<td><strong>Standard SSD</strong></td>\n</tr>\n<tr>\n<td>Virtual network</td>\n<td><strong>vmsec-vnet</strong></td>\n</tr>\n<tr>\n<td>Subnet</td>\n<td><strong>default</strong></td>\n</tr>\n<tr>\n<td>Public IP</td>\n<td><strong>&lt;accept default&gt;</strong></td>\n</tr>\n<tr>\n<td>NIC NSG</td>\n<td><strong>None</strong></td>\n</tr>\n</tbody>\n</table>\n<ul>\n<li>Provision an Ubuntu server with the following settings:</li>\n</ul>\n<table>\n<thead>\n<tr>\n<th>Setting</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Resource group</td>\n<td><strong>task-vmsec-rg</strong></td>\n</tr>\n<tr>\n<td>Location</td>\n<td><strong>East US</strong></td>\n</tr>\n<tr>\n<td>Name</td>\n<td><strong>vmsec-ubu-vm</strong></td>\n</tr>\n<tr>\n<td>Image</td>\n<td><strong>Ubuntu Server 18.04 LTS</strong></td>\n</tr>\n<tr>\n<td>Size</td>\n<td><strong>Standard_D2S_V3</strong></td>\n</tr>\n<tr>\n<td>Authentication type</td>\n<td>Password</td>\n</tr>\n<tr>\n<td>Username</td>\n<td><strong>student</strong></td>\n</tr>\n<tr>\n<td>Password</td>\n<td><strong>&lt;a strong password&gt;</strong></td>\n</tr>\n<tr>\n<td>OS disk</td>\n<td><strong>Standard SSD</strong></td>\n</tr>\n<tr>\n<td>Virtual network</td>\n<td><strong>vmsec-vnet</strong></td>\n</tr>\n<tr>\n<td>Subnet</td>\n<td><strong>default</strong></td>\n</tr>\n<tr>\n<td>Public IP</td>\n<td><strong>&lt;accept default&gt;</strong></td>\n</tr>\n<tr>\n<td>NIC NSG</td>\n<td><strong>None</strong></td>\n</tr>\n</tbody>\n</table>\n<h2>Requirement 2: Configure just-in-time access for the virtual machine</h2>\n<p>Next you will implement JIT access for the virtual machines.  To complete this requirement:</p>\n<ul>\n<li>Provision a log analytics workspace with the following settings:\n  |Setting|Value|\n  |---|---|\n  |Resource group|<strong>task-vmsec-rg</strong>|\n  |Location|<strong>East US</strong>|\n  |Name|<strong>vmsec-la</strong>|</li>\n<li>Once the log analytics workspace is provisioned, navigate to the workspace and connect <strong>vmsec-win-vm</strong> and <strong>vmsec-ubu-vm</strong> to the workspace.  If they are already connected to a different workspace (depending on your subscription settings) disconnect them first.</li>\n<li>Navigate to the security center blade in the Azure portal and upgrade the security center tier for your subscription to standard. You can adjust the plan under the <strong>Coverage</strong> view of the blade.</li>\n<li>In security center, set up JIT access for the <strong>vmsec-win-vm</strong> and <strong>vmsec-ubu-vm</strong> virtual machines. You may need to wait a few minutes for the machines to show up under <strong>Not Configured</strong> in the JIT windows of the <strong>Security Center</strong> blade.</li>\n</ul>\n<h2>Requirement 3: Verify just-in-time access</h2>\n<p>To complete this task, you will request access to both virtual machines.  You will observe the changes to the NSG and check the JIT audit trail.  To complete this requirement:</p>\n<ul>\n<li>Navigate to the <strong>vmsec-nsg</strong> blade in the Azure portal and observe the inbound rules.</li>\n<li>Navigate to the <strong>vmsec-win-vm</strong> blade and request JIT access for your IP address.</li>\n<li>If you have an RDP client connect to the <strong>vmsec-win-vm</strong> virtual machine.</li>\n<li>Navigate to the <strong>vmsec-ubu-vm</strong> blade and request JIT access for your IP address.</li>\n<li>Establish an ssh session with <strong>vmsec-ubu-vm</strong>.  If you do not have an ssh client, you can use an Azure cloud shell.</li>\n<li>Navigate to the <strong>vmsec-nsg</strong> blade in the Azure portal and observe the inbound rules.</li>\n<li>Navigate to <strong>Security Center</strong> and view the JIT access audit trail.</li>\n</ul>\n<h2>Clean up</h2>\n<ul>\n<li>Delete the <strong>task-vmsec-rg</strong> resource group.</li>\n</ul>\n<h2>Solution</h2>\n<p>Having trouble completing this task?  View the demonstration video to see how to do it.</p>",
    "tasks": "",
    "tasks_html": "",
    "published_date": "2020-06-16T15:32:04Z",
    "solutions": "",
    "solutions_html": "",
    "flags": [],
    "min_points_to_pass": null,
    "access_type": "default",
    "user_status": "unstarted",
    "user_lab_status": null,
    "user_status_modified": null,
    "user_flags": []
}