E11677 CSB-436 Cloud Security Lab Manual
E11677 CSB-436 Cloud Security Lab Manual
E11677 CSB-436 Cloud Security Lab Manual
LAB MANUAL
Semester: 7th
Course Name: Cloud
Security
Course Code: CSB-436
Course Coordinator: Gurpreet singh panesar
1
Department-Vision and Mission
M1: To provide relevant, rigorous and contemporary curriculum and
aligned assessment system to ensure effective learning outcomes for
engineering technologies.
M2: To provide platform for industry engagement aimed at providing
handson training on advanced technological and business skills to our
Mission students.
of the
M3: To provide opportunities for collaborative, interdisciplinary and
Departm
cutting-edge research aimed at developing solutions to real life problems
e nt
M4: To imbibe quest for innovation, continuous learning and zeal to pursue
excellence through hard work and problem-solving approach
2
To be able to work with, lead & engage big and small teams comprising
diverse people in terms of gender, nationality, region, language, culture &
PEO3
beliefs. To understand stated and unstated differences of views, beliefs &
customs in diverse & inter disciplinary team settings
To be able to continuously learn and update one’s knowledge, engage in
PEO4 lifelong learning habits and acquire latest knowledge to perform in
current work settings
To continuously strive for justice, ethics, equality, honesty, and integrity
PEO5 both in personal and professional pursuits. Able to understand and
conduct in a way that i responsible and respectful.
PSO1 The graduate student shall be able to analyze and evaluate systems
with respect to maintaining operations in the presence of risks and
threats, and also communicate the human role in security systems with
an emphasis on ethics, social engineering vulnerabilities and training.
PSO2 The graduate student shall be able to conduct an Information Security
risk assessment an Audit and troubleshoot Information Security
systems using Cryptographic measures
PSO3 The graduate student shall be able to assess the Ethical Ramification of
working in Information Security, information assurance, and cyber/
computer forensics software/tools.
PSO4 The graduate student shall be able to design and develop a security
architecture and operational and strategic cyber security strategies and
policies.
3
Program OutComes(POs)
PO5 Modern Tool Usage: Create, select and apply appropriate techniques,
resources and modern engineering and IT tools including prediction
and modeling to complex engineering activities with an understanding
of the limitations.
PO8 Ethics: Apply ethical principles and commit to professional ethics and
responsibilities and norms of engineering practice.
4
settings.
PO10 Communication: Communicate effectively on complex engineering
activities with the engineering community and with society at large,
such as being able to comprehend and write effective reports and
design documentation, make effective presentations and give and
receive clear instructions.
PO12 Life-long Learning: Recognize the need for and have the preparation
and ability to Engage in independent and life- long learning in the
broadest context of technological Change.
Course Objective
1 Assess system administration tasks and design script to automate these
tasks and solve system administration problems using a shell interface.
2 Design Complex scripts in a scripting language such as perl, python or
Ruby.
3 Develop script to a high level in powershell.
Course Outcomes
5
1 Implement enterprise governance strategies including role-based
access control, Azure policies, and resource locks.
6
Lab Experiments with CO Mapping
7
Semester End
Continuous Internal Assessment Examination
Components
(CAE) (SEE)
Marks 60 40
Total Marks 100
Course PO PO PO PO PO P P P P PO PO PO PS PS PS PSO PSO
Outcome 1 2 3 4 5 O O O O 10 1 12 O O O 4 5
6 7 8 9 1 2 3
1
CO1 1 2 2 2 2 3 2 2 2 2
CO2 1 2 2 3 2 1 3 2 3 3
CO3 1 2 2 3 2 1 3 2 3 3
CO4 1 3 3 3 2 1 2 2 3 3
CO5 1 3 3 3 2 1 3 3 2 2
8
Marks List ( Group A and B)
EXPERIMENT 1.1
AIM:-
This experiment will address the Role Based Access control in Azure.
Apparatus required:-
9
Azure Account
Theory :-
Procedure Steps:-
Step 1:
A resource group is a container that holds related resources for an Azure solution. The
resource group can include all the resources for the solution, or only those resources that
you want to manage as a group.
10
1. Select Add.
11
▪ Select Review + Create
▪ Select Refresh from the top menu to refresh the resource group list, and
then select the newly created resource group to open it. Or select
Notification(the bell icon) from the top, and then select Go to
resource group to open the newly created resource group
12
▪ Sign in to the Azure portal.
13
▪
7.
▪ Enter Lock name, Lock type, and Notes. The lock types include
14
A virtual machine may be a file, typically called an image, which behaves like an actual
computer. The top user has an equivalent experience on a virtual machine as they might
have on dedicated hardware. But in a cloud virtual machine is an operating system image
running on the server, we can use a cloud virtual machine in many ways – Development,
test servers, low-traffic web servers, databases, microservices, and basic computing.
Step 2: Now search for Free services in the given search bar.
Free Services
Step 3: Select the Create option under the Windows Virtual Machine section in order to
create a Windows VM.
15
Creating windows vm
Review+create
Step 6: After the deployment is complete, go to the virtual machine section in the newly
created virtual machine in order to connect the virtual machine to your local machine.
Virtual machine
Step 7: Next, open the start menu and search “Remote Desktop Connection”, launch the
“Remote Desktop Connection” application.
16
Step 8: Enter the public IP address and username of your Windows Virtual Machine, and
click connect.
Connect
Step 9: Enter the password to access your Windows Virtual Machine.
Password
Step 10: Proceed to connect and use your Windows Free Virtual Machine.
EXPERIMENT 1.2
Aim:- This Experiment will give a practical overview of MFA, Conditional Access
and AAD Identity Protection.
Theory:
Azure Active Directory (Azure AD) is a cloud-based identity and access management
service. This service helps your employees access external resources, such as Microsoft
365, the Azure portal, and thousands of other SaaS applications.
Procedural Steps:-
17
You can create a new user using the Azure Active Directory portal.
1. Sign in to the Azure portal in the User Administrator role for the organization.
2. Search for and select Azure Active Directory from any page.
• Name. Required. The first and last name of the new user. For example, Mary
Parker.
Groups. Optionally, you can add the user to one or more existing groups. You can also
add the user to groups at a later time.
Directory role: If you require Azure AD administrative permissions for the user, you can
add them to an Azure AD role. Y
Job info: You can add more information about the user here, or do it later.
18
Add a new user within a hybrid environment
If you have an environment with both Azure Active Directory (cloud) and Windows
Server Active Directory (on-premises), you can add new users by syncing the existing
user account data.
Delete a user
1. Sign in to the Azure portal using a User administrator account for the organization.
2. Search for and select Azure Active Directory from any page.
3. Search for and select the user you want to delete from your Azure AD tenant. For
example, Mary Parker.
The user is deleted and no longer appears on the Users - All users page. The user can be
seen on the Deleted users page for the next 30 days and can be restored during that time.
You can delete an existing user using Azure Active Directory portal.
Assign administrator and non-administrator roles to users with Azure Active Directory
In Azure Active Directory (Azure AD), if one of your users needs permission to manage
Azure AD resources, you must assign them to a role that provides the permissions they
need.
Assign roles
A common way to assign Azure AD roles to a user is on the Assigned roles page for a
user.
19
3. Select Users.
4. Search for and select the user getting the role assignment. For example, Demo.
20
5. On the Demo - Profile page, select Assigned roles. The Demo - Administrative
roles page appears.
6. Select Add assignments, select the role to assign to Alain (for example,
Application administrator), and then choose Select.
2. Select Assigned roles, select Application administrator, and then select Remove
assignment.
EXPERIMENT 1.3
Apparatus Required:-
Azure Account
Procedural Steps:-
First, create a Conditional Access policy and assign your test group of users as follows:
21
1. Sign in to the Azure portal by using an account with global administrator
permissions.
2. Search for and select Azure Active Directory. Then select Security from the menu
on the left-hand side.
3. Select Conditional Access, select + New policy, and then select Create new policy.
5. Under Assignments, select the current value under Users or workload identities.
22
6. Under What does this policy apply to?, verify that Users and groups is selected.
7. Under Include, choose Select users and groups, and then select Users and groups.
23
Since no one is assigned yet, the list of users and groups (shown in the next step)
opens automatically.
8. Browse for and select your Azure AD group, such as MFA-Test-Group, then
choose Select.
24
We've selected the group to apply the policy to. In the next section, we configure the
conditions under which to apply the policy.
25
3. Browse the list of available sign-in events that can be used. For this tutorial, select
Microsoft Azure Management so that the policy applies to sign-in events to the
Azure portal. Then choose Select.
1. Under Access controls, select the current value under Grant, and then select Grant
access.
26
2. Select Require multi-factor authentication, and then choose Select.
27
28
Activate the policy
Conditional Access policies can be set to Report-only if you want to see how the
configuration would affect users, or Off if you don't want to the use policy right now.
Because a test group of users is targeted for this tutorial, let's enable the policy, and then
test Azure AD Multi-Factor Authentication.
Clean up resources
If you no longer want to use the Conditional Access policy that you configured then
delete the policy by using the following steps:
2. Search for and select Azure Active Directory, and then select Security from the
menu on the left-hand side.
3. Select Conditional access, and then select the policy that you created, such as MFA
Pilot.
4. select Delete, and then confirm that you want to delete the policy.
29
EXPERIMENT 1.4
Aim:- Creating a Storage Account and uploading a File in the container to check the
public access.
Apparatus Required:-
Azure Account
Procedural Steps:-
Creating a Storage Account and uploading a File in the container to check public access.
2. Select Existing Resource Group or you can create a new one. ( As per your
Requirement).
6. Create
7. Once the Deployment is completed, Select the resource (Storage Account) you have
just created.
8. Create a New container (Type a name for your new container. The container name
must be lowercase, must start with a letter or number, and can include only letters,
numbers, and the dash (-) character)
30
9. Set the level of public access to the container. The default level is Private (no
anonymous access).
8. Click on the newly created Container and now you can upload file in it.
9. The container which we have created is public and so is the Url of the image.
Copy the Url and paste into a new tab and see if you can access your image or not.
10. You can also change access for the image from public to private using the change
access level option.
EXPERIMENT 2.1
Aim:- To implement the concept of Network Security Groups and Application Security G
Procedural Steps:-
31
Create and Associate a Network Security Group
Additional Resources
As an Azure user, you want to use the Azure Portal to create and use your first
virtual network.
To do this, you will log in to the Azure Portal and create a virtual network,
subnets, and a network security group.
You have been provided instructions for this lab. Follow these steps to create
and use your first Azure virtual network.
Log in to the Azure Portal
Log in to the Azure Portal with the credentials provided in the lab page to begin
the process of creating a virtual network
1. The Azure Portal will open up in the overview page for the resource group
created when your lab environment was initiated. Look for the "Location"
of your resource group, and take note of the region where your resource
group is located. Use that region when you create your other resources.
2. On the Create virtual network page, configure the following settings:
▪ Resource group: Select the pre-provisioned resource group from the
dropdown.
▪ Name: Enter "VNET1".
▪ Region: Use the same region as your resource group
3. Delete the existing range, then update the address space to 10.0.0.0/24.
4. Create the subnet:
▪ Name: Enter "default".
▪ Address range: Enter "10.0.0.0/25".
32
2. Create the second subnet with an address range of 10.0.0.128/25 and a
name of "SubnetA".
1. Use the Azure Portal to create a new network security group named
"NSG1". Use the same region as your resource group
2. Associate the Network Security Group with the subnet's default and Subnet.
33
9. In the pane that appears on the right, configure yoursubnet: ▪ In Subnet
name, enter "default".
▪ In Subnet address range, enter "10.0.0.0/25".
▪ Click the blue Add (or Save) button at the bottom.
10. On the Create virtual network page, click Next: Security.
11. Leave these settings at their defaults and click Next: Tags.
12. Click the blue Review + create button.
13. Click the blue Create button.
14. When the deployment is complete, click Go to resource to view the
information for this resource.
• Create the Secondary Subnet
1. Type "Network security group" into the search bar at the top.
2. Click Network Security Group under Services.
3. Click the Create network security group button at the bottom of the
Network security group page.
4. On the Create network security group page, configure the following
settings:
▪ In Resource group, select the pre-provisioned resource group from the
dropdown.
▪ Name: NSG1
▪ Region: select the same region as the resource group.
5. Click the Review + create button.
6. Click the Create button.
7. When the deployment is complete, click the Go to resource button.
8. In the menu on the left, under the Settings section, click Subnets.
9. Click the + Associate button.
10. On the Associate subnet side menu on the left, configure the following
settings:
34
▪ In Virtual network, select VNET1. ▪ In
Subnet, select default.
11. Click the blue OK button at the bottom.
• Attach the Security Group to the Secondary Subnet
Aim:-
Procedure Steps:-
A private endpoint is a network interface that uses a private IP address from your virtual
network. This network interface connects you privately and securely to a service that's
powered by Azure Private Link. By enabling a private endpoint, you're bringing the
service into your virtual network.
35
Additional Resources
The Company host several solutions within Azure. One of these solutions stores
confidential information in Azure Blob storage.
You have been tasked with the configuration of Azure Private Link to ensure that a
virtual machine within this solution accesses the Blob storage container using a private IP
address.
Solution:
To complete this section, you will need an RDP client to connect to the Windows server.
36
1. After the endpoint is created, click Home in the top navigation, and click on the
existing storage account.
2. From the left-side menu, under Settings, click Endpoints.
3. Copy the Blob Service FQDN, without the https:// or trailing slash / (e.g.,
azurelalab123.blob.core.windows.net). Keep this value handy to use now and in a
later section.
4. Open a terminal session.
5. Use nslookup followed by the FQDN you copied to see a public IP address.
Connect to VM1 using RDP
1. Connect to the virtual machine using the credentials provided for vm1
on the lab page.
2. On the RDP session, close the Server Manager page. Verify the Private
Endpoint from VM1
Further Reading:-
37
Research Articles:-
1.https://www.researchgate.net/publication/
221610488_Application_of_Software_Engineering_Fundamentals_A_Hands_on_Experie
nce
Experiment 2.3
Aim:-
Procedure Steps:-
• Creating COSMOS DB
Select Cosmos DB
2. Select The API Option (Application Programming Interface this means what kind of
interface for your program, your application, do you need from Cosmos.)
I have selected Core (SQL) which is a SQL-type base that is sort of a traditional database-
type interface.
38
Click OK.
• Give it an account name (you need to have a unique name for Cosmos DB
account and other resources on Azure, because you can directly use that name in a
URL to access the data from the outside.)
• Choose a location.
• Choose a capacity mode, and we want to apply the free tier discount. So make
sure you have the free tier discount. On one account, one Cosmos DB account per
subscription can have a free tier.
• Next step of this is the Global Distribution (one of the absolute benefits of
Cosmos is that it's globally scaled and distributed), So we for now just going to go
with the default. You can change this later on as well.
• Networking part is how do we want data to be accessed. Allow public IP, and
service endpoint, private and private endpoint all of it, we're going to allow in this
particular case.
• Backup policies ( Default)
• Next is encryption (Service Management).
And this is how you want to encrypt the data that is in Cosmos. So do you want the
service itself to manage it? Or do you want to provide a service-managed, customer-
managed key?
• And then we're going to go to Review + Create and we're going to create our
Cosmos DB
• So click Create when the validation is successful.
you need something in Cosmos to even be able to use it, you can either add a container,
or you can download and run your .NET app.
So once a container is, as it says, created, you can just download the sample .NET that
connects directly to it.
39
• Go to Overview
• Add a container.
• Create a new Database ID here. that's our Database ID.
And the RU/s, as you can see, that's the way that you calculate how powerful the database
is and how many queries you can use with the database and that's also how they estimate
costs.
So RU/s, you can read up on your own, But be aware that's when you see RU/s, that
means how much you paying for the database and how much you can do.
• Give it a Container ID (cosmosdemo) And then we have a Partition key, just try
and copy it and follow along.
So /userid.
And then we can just click OK on that, And that will create our new container.
You can see our Database ID on the left herein the tree view, If we expand that, you can
then see the Container ID.
There it is, cosmosdemo. And then within that, you can see the items (So the items are the
entries in our Cosmos DB database) If you click on that, you can see that there are, none,
So we're going to create a new item, just so you can see how data is stored.
Now Cosmos DB is what's called a NoSQL database (not relational) means that data is
stored as, basically, documents.
you can see you have a template here that says, id:
replace_with_new_document_id.
40
{
"id" : "1"
• click Save.
And now what happens when it saves it adds a whole bunch of other fields. As you can
see,
underscore, underscore, underscore. Those are part of how Cosmos indexes and finds the
data, so don't mess with those,just leave those as they are. They're part of how Cosmos
DB works.
So we've now created a database, a container, and an item in that container for Cosmos
DB data.
Now the real power of Cosmosis not that it's a document database, it is that it has
geographical redundancy.
So on the left here, you have Replicate Data Globally click on that, And now we can then,
with a click of a button, get data all over the world.
You can see a nice little map And you can see the Region you can then start adding
regions in wherever you want the data.
• You can also enable Multi-region writes. this means that you can now write to any
of these data centers or these regions, and the data is automatically replicated
across all of your regions in Cosmos DB, means that customers closer to those
regions will have less time waiting for you to run the data.
But you pay 4 times as much as before And free tiers do not support Multi-region
writes.
41
Experiment 3.1-
CO5 Design and develop complex scripts to automate the development and operations of
an organisation.
Theory:
Azure Key Vault is a cloud service that provides a secure store for secrets. You can
securely store keys, passwords, certificates, and other secrets. Azure key vaults may be
created and managed through the Azure portal. In this quickstart, you create a key vault,
and then use it to store a secret.
Steps:
1. To create a key vault in Azure, in the search bar, type Key Vault, and go to the Key
Vaults.
3. Give it a region, pricing tier( Standard, which is usually the one that you would use for
most purposes), Premium, which is including support is for HSM-backed keys (These
are hardware-secured management keys, So the hardware itself is secure, not just a
software by Azure and you pay a bit more for that) leave the rest as default. Click Next.
You have a secret and we're going to secure that through access policies,
who can access it. (Leave it as default).
5. Azure is going to have access to 9 selected key permissions. There are different
permissions on the keys: Get, List, Update, Create, etc.
42
6. Leave them as default for now. Click Review and Create.
And once the validation has passed for this key vault, then click Create.
• Generate a secret.
• Manual or Certificate ( Manual is the one we're going to use where you just enter
the details).
• A certificate could be uploading a certificate that you can then share such as access
to certain things that require a secure certificate.
• Give it a name.
• Value: Type a value for the secret. Key Vault APIs accept and return secret values
as strings.
• Leave the other values to their defaults. Click Create
And we now have a secret, this secret can be shared with users, and you can use access
policies to give access to this secret.
• It could be a password.
• It could be a connection string to a database.
• It could be many of the things that you want outside parties to have access to.
And then when they no longer require access, you can then remove that access policy for
that user.
Experiment 3.2
AIM:-
43
Implementation of Azure Monitor
Procedure Steps :-
Azure Monitor is used to monitoring the health and the status of your applications and
your infrastructure on Azure. But it can also show you how Azure is doing itself. How is
the platform actually performing right now?
The most common types of alert rules in Azure Monitor are metric alerts and log query
alerts.
Metric alert rules are useful for alerting when a particular metric exceeds a threshold. An
example is when the CPU of a machine is running high. The target of a metric alert rule
can be a specific machine, a resource group, or a subscription. In this instance, you can
create a single rule that applies to a group of machines.
Log alerts can measure two different things which can be used to monitor virtual
machines in different scenarios:
• Result count: Counts the number of rows returned by the query, and can be used
to work with events such as Windows event logs, syslog, application exceptions.
• Calculation of a value: Makes a calculation based on a numeric column, and can
be used to include any number of resources. For example, CPU percentage. You can
monitor multiple instances’ values with one rule using dimensions. You would use
dimensions if, for example, you want to monitor CPU usage on multiple instances
running your web site or app for CPU usage over 80%.
Step 1: Go to Alert -> Create New alert rule.
Step 2: Select the source ( It could be of any type : Application, Operating System, Azure
Resources, Subscription, Tenant or custom resources)
Step 3: Resource: Select the resource as your virtual machine (Make sure you have at
least one VM running).
Step 4: Select the location, you can also customize filters accordingly.
44
Step 5: Condition: Configure Signal logic (CPU Utilization, Memory Percentage, Logical
disk used, Network interfaces bytes received etc) any of your choices based on which you
want to trigger an alert.
Step 6: Action: create action group -> give it a name (Notify me)-> Action name (Email,
SMS any type)-> action type (mail, SMS).
Step 7: Select the Alert Rule name, give it a description, and select the severity.
Try to put some CPU load on your machine and check the alerts.
1. Version Control with Git 2e: Powerful Tools and Techniques for Collaborative Software
Experiment 3.2
CO3: Implement container security strategies including Azure Container Instances, Azure
Container Registry, and Azure Kubernetes.
CO5: Implement storage security strategies including shared access signatures, blob retention
policies, and Azure Files authentication.
Pricing Calculator
45
Step 4: you can also choose support level lets say, Standard.
Now you will get an estimated value and you can save it, and export it.
46
Marks (Group A and B)
MST Practical Questions:
Question 1: Use the Azure Portal to create and connect to an Azure virtual machine.
Question 2: Create and Manage Azure AD Users and Groups in the Portal.
Final Practical
b) Create a Azure Monitor service on your virtual machine with metric as CPU Utlization .
c) Increase the CPU utilization on your VM and show the numeric graph using Azure Monitor.
Problem Statement 2: Create a virtual network, subnets, and a network security group.
c) What will happen when you Allow and Deny the ssh port on the machine? Demonstrate.
Problem statement 3: a) Create a Storage Account and check the public and protected access of a container by uploading a file.
Problem Statement 4:: Show Multi Region Replication of data with the help of Cosmos DB.
Problem statement 5: Create a Resource Group in Azure and Deploy a Virtual Machine.
1. Create a user.
2. Delete user.
Problem Statement 7: Deploy a Web Application (Any HTML Page) using Azure Web App Service.
Problem Statement 8: Create a Storage Account in azure and upload a File using blob type storage in the a container to check the
public access.