Web SOP
Web SOP
Web SOP
2-tier applications:
The two tier thick client application consists of the user computer and the server. In this type,
the application is installed on the client side, which directly communicates with the database on
the server. These usually involve legacy applications.
3-tier applications:
These kinds of thick client applications involve three tiers, wherein the client talks to the
application server, which in turn talks to the database. The communication in these applications
is carried out using HTTP/HTTPS. Examples of these applications involve G-Talk or Yahoo
Messenger.
Methodology:
● Information Gathering
● Client-Side Attacks
● Server-side Attacks
● Network-side Attacks
Figure 3: Thick Client testing framework
Information Gathering:
Information Gathering is a crucial step in penetration testing. In this phase, we need to gather all
the possible information about the target application.
Some of the common things that we need to do during the information gathering phase of a
thick client penetration test are as follows.
There are several tools that can aid in the process of identifying the development
language used to build the thick client application.
The following table presents a set of static tools that can be used:
3 Detect It Easy (DIE) A program for determining file types for Windows,
Linux and macOS.
4 Strings A tool that scans any files you pass it for UNICODE
or ASCII strings of a default length of three or more
UNICODE or ASCII characters.
Network Communication Between the Client and the Server:
So, now that we’ve identified the development language used to build the tested thick
client application we tested. The next step is to sniff the traffic between that thick client
application and the local/remote server. As a penetration tester, learning how to use a
network packet sniffer is essential for day-to-day operations. Whether you are trying to
understand a protocol, debug a network client or analyze traffic, you’ll always end up
needing a network sniffer.
The following table presents a set of network sniffers tools that can be used in this part:
5 Microsoft Microsoft Network Monitor 3.4 is a tool for network traffic capture
Network and protocol analysis.
Monitor 3.4
When we talk about intercepting thick client traffic, we should know the difference
between:
● Proxy aware – A thick client that has settings options in the application itself.
● Non-proxy-aware – A thick client that does not have any settings options in the
application itself and requires a different testing approach.
If the thick client application is proxy aware, it may be possible to intercept the traffic
using any proxy tool.
When the thick client is non-proxy-aware, Burp Suite’s support for invisible proxying
allows non-proxy-aware clients to connect directly to a Proxy listener.
The following table presents a set of proxy tools that can be used:
1 Burp Suite Burp Suite Professional is an advanced set of tools for testing
web security.
2 Fiddler Fiddler is a free web debugging tool which logs all HTTP(S)
traffic between your computer and the Internet.
3 Echo Mirage Echo Mirage is a versatile local proxy tool that can be used to
intercept and modify TCP payloads for local Windows
applications.
4 Charles Web Charles is an HTTP proxy that enables to view all of the HTTP
Debugging and SSL / HTTPS traffic between the local machine and the
Proxy Internet. This includes requests, responses and the HTTP
headers.
Client-Side attacks:
Files Analysis
Applications usually store information in local files and the registry. Sensitive information
that we might look for in a thick client pentest includes:
● Usernames
● Passwords
● Connection Strings
● API keys
For this step, it is crucial to know which files are being used by the tested thick client
application. We can use the Process Monitor tool from the Sysinternals Suite to collect
all the necessary information
The following table presents a set of file analysis tools that can be used in this part:
1 Process Monitor An advanced monitoring tool for Windows that shows real-
time file system, Registry and process/thread activity.
4 Process Hacker A free, powerful multi-purpose tool that helps you monitor
system resources, debug software and detect malware.
DLL hijacking is an attack that exploits the Windows search and load algorithm, allowing
an attacker to inject code into an application through disk manipulation. In other words,
simply putting a DLL file in the right place causes a vulnerable application to load that
malicious DLL.
When the thick client application tries to load a DLL, it will go through the following in
order:
To be able to escalate privileges via DLL hijacking, the following conditions need to be
in place:
The Process Monitor tool will identify if the application is trying to load any DLLs and the
actual path that the application uses when looking for the missing DLLs.
Thick client application configuration files typically contain valuable information for
pentesters such as:
● Usernames
● Passwords
● License details
● Cryptographic keys
● IP addresses and ports
The configuration files are usually readable by all operating system users, which allows
anyone who can read the file access to the compromised resources.
The following table presents a set of tools aimed for locating sensitive data storage on
files and registry:
Sno Tool Name Description
4 Process Hacker A free, powerful multi-purpose tool that helps you monitor
system resources, debug software and detect malware.
Usually, a thick client application contains several configuration files in the root folder of
the application or in a specific configuration folder.
If information is stored in cleartext, attackers could potentially read it. Even if the
information is encoded in a way that is not human-readable, certain techniques could be
used to determine which encoding is being used and then decode the information.
For this challenge, we can use a decompiler tool to retrieve the tested thick client
application’s source code of. A decompiler is a computer program that takes an
executable file as input and attempts to create a high-level source file that can be
recompiled successfully.
Binary Analysis
After we have the source code for the tested thick client, we can start searching through
the code for sensitive information, such as:
● Hard-coded credentials
● API Keys
● API Endpoints
● Comments
● Hidden functions
The following table presents a set of binary analysis tools that can be used in this
phase:
14 PE Explorer View, Edit and Reverse Engineer EXE and DLL Files.
To test for user interface vulnerabilities as a low privileged user, we will need to use
various tools to manipulate window objects in Windows, such as:
● Buttons
● Menu bars
● Text boxes
● OCX controls
Basically, anything that can be located as a child window and has an active window
handle can be manipulated with some predefined attributes.
The following table presents a set of weak GUI control tools that can be used:
1 WinSpy++ A tool whose purpose is to help you view and modify the
properties of any window in your system with great ease.
3 Windows Enabler A simple tool that lets you activate functions your thick
client application has blocked.
Memory Analysis
When testing for vulnerabilities in the tested thick client application, we should perform a
memory analysis while the thick client application runs. Thick client applications
developed in a two-tier architecture transfer sensitive information in the application’s
memory.
This is a design flaw, because every thick client application developed in a two-tier
architecture will, by default, disclose sensitive information in the application’s memory,
such as:
● Usernames
● Passwords
● Connection strings
● Hardcoded database credentials
The following table presents a set of memory analysis tools that can be used in this
phase:
1 Winhex An advanced monitoring tool for Windows that shows real-time file
system, Registry and process/thread activity.
4 Strings Strings scan any file you pass it for UNICODE or ASCII strings
with a default length of three or more UNICODE or ASCII
characters.
Server-Side Attacks
Once we have performed all the particulars of thick client testing, we can now focus on
the OWASP Top10.
The following list presents the relevant vulnerabilities for thick client testing:
● A1:2017-Injection
● A2:2017-Broken Authentication
● A3:2017-Sensitive Data Exposure
● A4:2017-XML External Entities (XXE)
● A5:2017-Broken Access Control
● A6:2017-Security Misconfiguration
● A7:2017-Cross-Site Scripting (XSS) (Not applicable for a thick client testing
if html forms are not used)
● A8:2017-Insecure Deserialization
● A9:2017-Using Components with Known Vulnerabilities
● A10:2017-Insufficient Logging Monitoring
Network test:
Here we observe and test network communication between client and server or any
Observe how data is passed over the wire. Report usage of sensitive data
Usage of weak encryption such as MD5, RC4, etc. may result in broken
Use Nmap/Nessus to find what ports and services are open on the server
along with OS version and patch level. If any unnecessary service is in use
then research further to learn if there is any vulnerability present that can be
logjam, etc. have been reported in the SSL/TLS protocols. One should check
protocols and misconfigurations. Tools that can aid in testing these are