Module 9 Lab
Module 9 Lab
Lab Scenario
The evolution of the Internet and web technologies, combined with rapidly increasing Internet
connectivity, has led to the emergence of a new business landscape. Web applications are an
integral component of online businesses. Everyone connected via the Internet is using various
web applications for different purposes, including online shopping, email, chats, and social
networking. Web applications are becoming increasingly vulnerable to sophisticated threats and
attack vectors. An outdated or insecure application can pose a serious security threat and, in
turn, affect network security.
Hence, a security professional must manage the security of the deployed applications and
constantly monitor, patch, and upgrade the installed applications.
Lab Objective
The objective of this lab is to provide expert knowledge in implementing application security.
This includes knowledge of the following tasks:
The process of securing an application involves deploying, inserting, and testing every
component of an application. This procedure finds out all the vulnerabilities present in restricted
resources such as object, data, feature, or function of an application designed to be accessed
by only authorized users.
Lab Tasks
A cyber security professional or a security professional use numerous tools and techniques to
implement application security. Recommended labs that will assist you in learning various
identification, authentication and authorization techniques include the following:
Lab Scenario
Lab Objectives
The objective of this lab is to deploy application whitelisting on the domain network using group
policy.
Overview of AppLocker
AppLocker is an in-built Windows security program that can be used to control which
applications the users can run. When AppLocker rules are enforced, apps that are excluded
from the list of allowed apps are blocked from running. The apps include executable files,
windows installer files, and DLLs. The default executable rules are based on paths and all files
under those paths are included in the list of allowed apps. Group policy application rules can be
implemented in a domain using AppLocker.
Lab Tasks
4. The Internet Explorer page will open. Close the Internet Explorer.
Note: As per policy, employees of several organizations are barred from using Internet
Explorer. In this case, a security professional must know how to block Internet
Explorer using AppLocker.
8. The Group policy Management window will open. Expand Forest: CCT.com,
Domains, and CCT.com, navigate and select Group Policy Objects. Right-click on
the Group Policy Objects (GPO) and select New.
9. The New GPO prompt opens, type Whitelist Using AppLocker, and click on OK.
10. A new GPO named Whitelist Using AppLocker will be created in the Group Policy
Objects folder.
11. Right-click on the Whitelist Using AppLocker and select the Edit option.
12. The Group Policy Management Editor window opens, expand and follow the path:
Computer configuration -> Policies -> Windows Settings -> Security Settings,
select System Services.
13. From the list of services visible on the right side pane, double-click on Application
Identity under Service Name in the right pane.
14. The Application Identity Properties window opens, check Define this policy setting,
select Automatic, and click on Apply and OK.
15. Next, scroll down under the left sidebar and navigate to Computer configuration ->
Policies -> Windows Settings -> Security Settings -> Application Control Policies.
Expand Application Control Policies, select and click on AppLocker.
16. The AppLocker configuration option will appear in the right pane, click on the Configure
rule enforcement link under the Configure Rule enforcement tab.
17. The AppLocker Properties window appears, here, the security professional can choose
various enforcement rules to configure AppLocker. We choose the first option, that is,
Executable rules: Configured.
18. Check the Configured box and select Enforce rules from the dropdown list under the
Executable rules section. Click Apply and then click OK. (Use the tab button in case you
are having any difficulty in clicking Apply and OK button)
19. Expand AppLocker and right-click on the Executable Rules tab. Select
Automatically Generate Rules…
20. The Automatically Generate Executable Rules wizard appears, retain the default
options and click on Next.
21. Retaining the default publisher rules, click on Next.
22. Once the rules are generated, you will be able to review publisher rules. Click on Create.
Note: The number of Rules and Files might differ in your lab environment.
23. The default rule creation alert message box appears, click on Yes; this will automatically
generate the executable rules.
Note: The number of rules might differ when you perform the lab.
24. In the above list, the automatically generated rule for Internet Explorer is whitelisted.
However, our intent is to deny user's access to Internet Explorer. The below steps
demonstrate how to deny access to Internet Explorer using AppLocker.
25. Right-click on the rule from the list named Program Files: INTERNET EXPLORER and
click on Properties.
26. The Allow Properties window opens, check the Deny radio button, and click on Apply
and OK.
27. You will be able to see the Action of the last rule ID: Deny.
28. Close the Group Policy Management Editor to return to the Group Policy
Management window.
29. Right-click on cct.com under Domains and select the Link an Existing GPO… option.
30. The Select GPO window opens, select Whitelist Using AppLocker under Group Policy
Objects and click on OK.
31. Navigate to Group Policy Objects, click on Whitelist Using AppLocker and then click
on the Status tab.
Note: If you do not receive the above message, then restart the AD Domain Controller
machine and repeat Step#36.
38. Click Target_WEB SERVER to launch the Web Server machine. Click Ctrl+Alt+Del.
39. By default, the Administrator user is selected type password as admin@123 and press
Enter.
40. Open a Control Panel window and navigate to Network and Internet --> Network and
Sharing Center --> Change adapter settings. In the Network Connections window,
right-click the ethernet adapter (here, Ethernet) and select Properties from the
drop-down options. Double-click Internet Protocol Version 4 (TCP/IPv4) and change
the Default gateway address to 10.10.1.19. Click OK twice. Close the window.
41. Open File Explorer and right-click on This PC, select Properties.
42. The System window opens, click Change Settings.
43. The System Properties Window opens, click Change….
44. The Computer Name/Domain Changes sub-window opens, select the Domain radio
button, and type cct.com under the empty text box. Click OK.
45. The Window Security credential window opens, type username as cct\administrator
and type password as admin@123 and click OK
46. Wait for few seconds, the welcome to cct.com popup appears, click OK
47. The restarting confirmation popup appears, Click OK.
48. You will get back to the System Properties window. Click Close.
49. The Microsoft windows message box opens, click Restart Now button to restart the
system.
50. The system will restart, click Ctrl+Alt+Del link to login.
51. Choose Other user username as [email protected] and type password as user@123
and press Enter.
52. Navigate to C:\Program Files\Internet Explorer and try to execute iexplorer.exe.
53. As soon as you double-click on iexplorer.exe file, you will receive an error message
stating that the administrator has blocked the program.
54. Click OK. Close the open window.
55. By implementing the aforementioned steps, security professionals can implement
policies as per organizational requirements. You can apply whitelisting here. In this lab,
we have demonstrated only one policy, which can be applied by every user to deny
access to necessary resources
Note: Since administrative rights are required to proceed to the next Exercise, we will
unlink the created Whitelist Using AppLocker policy.
59. The Server manager window will open, navigate to the Tools menu, and select Group
Policy Management.
60. The Group Policy Management console opens, expand the cct.com domain, right-click
on Whitelist Using AppLocker policy, and click on the Link Enabled option to disable
the link.
61. This concludes the demonstration of showing how to implement application whitelisting
using AppLocker.
62. Close all open windows.
Lab Scenario
Most antivirus programs, spam filters and other intrusion prevention or detection systems use
the application blacklisting method. A blacklist often comprises malware, users, IP addresses,
applications, email addresses, domains, etc. Knowledge of the threats associated with
programs or applications is required to prepare an application blacklist
Security professionals must have proper knowledge regarding blocking executable files in the
network or local system in order to maintain system security.
Lab Objectives
The objective of this lab is to deploy application blacklisting using ManageEngine Desktop
Central.
Application blacklisting is threat centric. By default, it allows all applications that are not in the
blacklist to be executed. To block any program or application, the security professional must add
it in the application blacklist. There are many tools used in blacklisting applications, in this task,
we will use ManageEngine Desktop Central to demonstrate application blacklisting.
Lab Tasks
1. Now, click CCTV1 ADMIN MACHINE-1 to switch to the Admin Machine-1 machine and
click Ctrl+Alt+Del.
2. By default, the Admin user profile is selected. Click admin@123 to paste the password
in the Password field and press Enter to login.
Note: If you receive any error pop-up during installation, ignore it.
13. InstallShied Wizard Complete wizard appears, ensure that Yes, Start Desktop
Central is checked and click Finish.
14. Microsoft Edge and Internet Explorer windows appear. Maximize Internet Explorer
browser.
Note: If the Internet Explorer window does not appear, navigate to C:\Program
Files\DesktopCentral_Server\ServerStatusNotifier, right click webclient.html and
open with Internet Explorer.
15. In the Internet Explorer 11 wizard, select Don't use recommended settings checkbox
and click OK.
16. Close the tab with microsoft.com website loading on it.
17. In the first tab, UEMS Central Server website is open. Click Refresh icon ( ), present
in the top-section of the window next to the URL field.
18. A notification appears in the lower-section of the window, click Allow blocked content
button.
19. The main page of ManageEngine Desktop Central appears along with a login form.
You can observe that, by default, credentials are entered. Click Sign in to proceed.
20. ManageEngine Desktop Central dashboard appears, click Inventory option from the
top-section of the page.
21. Steps involved in Asset Management diagram appears, click X to close it.
22. Navigate to the Computers option from the left-pane. In the right-pane, click Add
Computer(s) in LAN link.
23. Add Computer(s) wizard appears, close it.
24. Observe that a blank table appears, click Download Agent button from the right-pane.
25. A pop-up appears, ensure that Windows is selected under Platform section and click
Download Agent.
26. Do you want to save LocalOffice_Agent.exe from localhost? pop-up appears in the
lower-section of the page, click Save.
27. After the completion of download, click Run to install the tool.
28. Follow the wizard driver installation to install the tool with default settings.
29. After the installation completes, click Close and refresh the page.
30. Add Computer(s) wizard appears, close it.
31. You can observe that a local computer appears in the table, as shown in the screenshot
below.
32. Now, click Inventory option again from the top-section of the page.
33. Inventory page appears, click Block Executable option from the left-pane.
34. Block Executables page appears, click + Add Policy button from the right-pane.
35. Add Policy page appears. In the Custom Group field, type All and All Computers
Group option appears, select it.
36. Click + Add Executable button. Executable Details pop-up appears, in the Application
Name field, type Google Chrome.
Note: Here, we are blocking Google Chrome application. However, you can block an
application of your choice.
37. Leave Block Rule option set to default (Path). In the Executable Name
field, type chrome.exe and click Add button.
Note:
There are two methods to block an executable/application:
Note: The name of the icon might differ when you perform the lab.
42. Minimize the browser window and double-click Google Chrome icon on the Desktop to
launch it.
43. You can observe that the application does not open up, indicating that it has been
blocked.
44. Switch back to the browser window. In the Block Executables page, click on All
Computers Group link in the policy.
45. All Computers Group policy details appears, as shown in the screenshot below.
46. Click on Execution Status option from the lower-section of the page.
47. It displays a list of machines (here, Admin Machine-1) that tried to access blocked
application, as shown in the screenshot below.
48. This concludes the demonstration showing how to block application using
ManageEngine Desktop Central.
49. You can further explore other options and features offered by the tool.
50. Close all open windows.
51. After the completion of this task, End the lab instance, re-launch it and continue with the
next lab.
Note: To End the lab instance, click on the Menu icon from the top-right corner of the
screen and click End from the options. In the Are you sure you want to end this lab?,
click Yes, end my lab.
Exercise 3: Perform Application
Sandboxing using Sandboxie
Application sandboxing is the process of running applications in a sealed container (sandbox)
so that the applications cannot access critical system resources and other programs.
Lab Scenario
In this lab, we will execute an application within a sandbox this will restrict the application's
access to the system resources and data outside the sandbox. A security professional must
have proper knowledge regarding application sandboxing in order to prevent cyber attacks on
the system applications.
Lab Objectives
The objective of this lab is to perform application sandboxing using tools such as Sandboxie.
Application sandboxing provides an extra layer of security and protects apps and the system
from malicious apps. It is often used to execute untrusted or untested programs or code from
untrusted or unverified third parties without risking the host system or OS. The protection
provided by the sandbox is not sufficiently robust against advanced malware that target the OS
kernel.
Lab Tasks
Note: If you are already logged into Admin Machine-1, then skip to Step#3.
1. Now, click CCTV1 ADMIN MACHINE-1 to switch to the Admin Machine-1 machine and
click Ctrl+Alt+Del.
2. By default, the Admin user profile is selected. Type admin@123 to paste the password
in the Password field and press Enter to login.
Note: Here, we have selected Google Chrome application. While performing the lab,
you can select any application of your choice.
13. You can observe that Google Chrome application is launched under DefaultBox link,
as shown in the screenshot below.
14. Maximize the Google Chrome window, you can browse the internet securely as the
Sandboxie tool keeps the browser isolated and blocks malicious software, viruses,
ransomware, and zero-day threats. It also prevents websites from modifying files and
folders on the system.
15. Similarly, you can execute other applications securely using Sandboxie.
16. You can further explore the various other features and options within the tool.
17. This concludes the demonstration showing how to perform application sandboxing using
Sandboxie.
18. Close all open windows.
Lab Scenario
Organizations are increasingly using web applications to provide high-value business functions
to their customers such as real-time sales, transactions, inventory management across multiple
vendors including both B-B and B-C e-commerce, workflow and supply chain management, etc.
Attackers exploit vulnerabilities in the applications to launch various attacks and gain
unauthorized access to resources.
Hence, security professionals must have proper knowledge to detect vulnerabilities in target
web applications hosted on web servers. They must scan applications for identifying
vulnerabilities and detect attack surfaces on the target applications. Performing comprehensive
vulnerability scanning can disclose security flaws associated with executables, binaries, and
technologies used in a web application. Through vulnerability scanning, security professionals
can also catalogue different vulnerabilities, prioritize them based on their threat levels, and
mitigate them, so that, they are not exploited by the attackers.
Lab Objectives
The objective of this lab is to detect web application vulnerabilities using tools such as OWASP
ZAP.
Web applications are developed as dynamic web pages, and they allow users to communicate
with servers using server-side scripts. They allow users to perform specific tasks such as
searching, sending emails, connecting with friends, online shopping, and tracking and tracing.
Furthermore, there are several desktop applications that provide users with the flexibility to work
using the Internet.
Increasing Internet usage and expanding online businesses have accelerated the development
and ubiquity of web applications across the globe. A key factor in the adoption of web
applications for business purposes is the multitude of features that they offer. Moreover, they are
secure and relatively easy to develop. In addition, they offer better services than many
computer-based software applications and are easy to install, maintain, and update.
Lab Tasks
Note: If you are already logged into Admin Machine-1, the skip to Step#3.
1. Now, click CCTV1 ADMIN MACHINE-1 to switch to the Admin Machine-1 machine and
click Ctrl+Alt+Del.
2. By default, the Admin user profile is selected. Type admin@123 to paste the password
in the Password field and press Enter to login.
Note: The risks associated with the vulnerability are categorized according to severity of
risk as Low, Medium, High, and Informational alerts. Each level of risk is represented by
a different flag color:
Lab Scenario
A security professional must have the required knowledge to test various web application
vulnerabilities such as injection vulnerability.
Lab Objectives
This lab will demonstrate how to test injection vulnerability using Burp Suite.
Attackers exploit injection flaws by constructing malicious commands or queries that result in
data loss or corruption, lack of accountability, or denial of access. Such flaws are prevalent in
legacy code and often found in SQL, LDAP, and XPath queries. They can be easily discovered
by application vulnerability scanners and fuzzers.
Attackers inject malicious code, commands, or scripts in the input gates of flawed web
applications such that the applications interpret and run the newly supplied malicious input,
which in turn allows them to extract sensitive information. By exploiting injection flaws in web
applications, attackers can easily read, write, delete, and update any data (i.e., relevant or
irrelevant to that particular application).
Lab Tasks
14. The Burp Suite main window appears; ensure that the Temporary project radio button
is selected and click the Next button, as shown in the screenshot below.
Note: In the right-pane of the tool window, you can observe the vulnerabilities in the
target website that have been detected by the tool under Issue activity. You can click on
each vulnerability to explore them one-by-one.
17. In the Proxy settings, by default, the Intercept tab opens-up. Observe that by default,
the interception is active as the button says Intercept is on. Leave it running.
Note: If you do not see the request as shown in the screenshot below, then click
Forward button until to capture it.
20. Now, keep clicking the Forward button until you are logged into the user account.
21. Switch to the browser, and observe that you are now logged into the user account, as
shown in the screenshot below.
22. Now, click the Contacts tab from the menu bar to view the user information.
23. After clicking the Contacts tab, switch back to the Burp Suite window and keep clicking
the Forward button until you get the HTTP request.
24. Switch to the browser, and observe that the Contacts tab appears, as shown in the
screenshot below.
25. Now, scroll-down and in the Comment field, type any random text (here, This is a lab
task to test injection vulnerability); then, click Submit Comment button.
26. Switch back to the Burp Suite window and you can observe that a POST request has
been captured and the comment is displayed in a plain text, as shown in the screenshot
below.
Note: If you do not see the request as shown in the screenshot below, then click
Forward button until to capture it.
27. Click the Intercept is On button to switch it off.
28. In the Burp Suite window, navigate to the HTTP history tab and locate POST request
with /contacts.aspx in the URL column, as shown in the screenshot below.
29. Right-click on the POST request and select Send to Repeater.
30. Now, navigate to the Repeater tab and expand Body Parameters section under
INSPECTOR tab..
31. Double click on txtcomment, or click on > button beside txtcomment. In the VALUE box,
replace the typed text with the following script and click on Apply changes.
32. Click on Send button at the top of the window, now expand Actions tab at the left side
and navigate to Request in browser > In original session.
33. Repeat request in browser dialog-box appears, click Copy button.
34. Switch to the browser window, open a new tab; paste the copied link and press Enter.
35. An alert displaying "You have been hacked" appears; click OK to close the pop-up.
36. This alert appears when the user visits the Contacts tab of the website. This is a Cross
Site Scripting (XSS) attack where the website allows the messages to be posted as
comments to execute an embedded script.
37. In the browser, click the Open Application menu icon in the right corner of the menu
bar and select Settings from the list. The General settings tab appears. In the Find in
Settings search bar, type proxy, and press Enter.
38. The Search Results appear. Click the Settings button under the Network Settings
option. A Connection Settings window appears; select No proxy radio-button and click
OK.
39. This concludes the demonstration showing how to test injection vulnerability using Burp
Suite.
40. Close all open windows.
Lab Scenario
A security professional must have the required knowledge to determine application-level attacks
against a Windows server machine. In this task, we will simulate an attack that utilizes CPU
memory which makes the machine slow and non-responsive. Here, first, we will load CPU by
using HeavyLoad tool and monitor the degradation in system performance by using
Performance Monitor and Process Hacker tools.
Lab Objectives
This lab will demonstrate how to identify application-level attack against a Windows server.
Organizations are increasingly using web applications to provide high-value business functions
to their customers such as real-time sales, transactions, inventory management across multiple
vendors including both B-B and B-C e-commerce, workflow and supply chain management, etc.
Attackers exploit vulnerabilities in the applications to launch various attacks and gain
unauthorized access to resources. It is commonly assumed that perimeter security controls such
as firewall and IDS systems can secure an application; however, this is not true as these
controls are not effective at defending against application layer attacks. This is because port 80
and 443 are generally open on perimeter devices for legitimate web traffic, which attackers can
use to exploit application-level vulnerabilities and get into the network.
Lab Tasks
Note: If you are already logged into the AD Domain Controller machine, then skip
to Step#3.
Note:
Note: The graphical report might differ when you perform the lab.
45. This concludes the demonstration showing how to check web application based attack
on the system.
46. Close all open windows
Lab Scenario
Lab Objectives
This lab will demonstrate how to conduct banner grabbing on a target web server using tools
such as cURL, Netcat and Wget.
The purpose of footprinting is to gather information about the security aspects of a web server
with the help of tools or footprinting techniques. Through footprinting, the web server’s remote
access capabilities, its ports and services, and other aspects of its security can be determined.
In addition, other valuable system-level data such as account details, OSs, software versions,
server names, and database schema details can be gathered. The Telnet utility can be used to
footprint a web server and gather information such as server name, server type, OSs, and
running applications running. Furthermore, footprinting tools such as Netcraft, ID Serve, and
httprecon can be used to perform web server footprinting. These footprinting tools can extract
information from the target server.
Lab Tasks
Note: If you are already logged into the Attacker Machine-2, then skip to Step#3.
Note: If a Parrot Updater pop-up appears at the top-right corner of Desktop, ignore
and close it.
Note: If a Question pop-up window appears asking you to update the machine, click No
to close the window.
3. Click the MATE Terminal icon at the top of the Desktop window to open a Terminal
window.
4. A Parrot Terminal window appears. In the terminal window, type sudo su and press
Enter to run programs as the root user.
5. In the [sudo] password for attacker field, type toor as a password and press Enter.
8. From the Server information, you can observe that the server is running
Microsoft-IIS/10.0, as shown in the screenshot below.
Note: cURL is command-line tool for transferring data using various network protocols
such as HTTP, FTP, IMAP, SFTP, SMTP, etc.
9. Type nc –vv www.moviescope.com 80 and press Enter to gather information such as
server type and version.
10. Connection open prompt appears, type GET / HTTP/1.0 and press Enter twice.
Note: Netcat is a networking utility that reads and writes data across network
connections by using the TCP/IP protocol.
11. Type wget -q -S www.moviescope.com and press Enter to gather HTTP header
response.
Note: -q: To turn off wget output, -S: To print HTTP headers.
12. You can observe the HTTP information obtained, as shown in the screenshot below.