Thick Client Penetration Testing

What Is a Thick Client?

A thick client (also called a fat client or rich client) is a desktop application that contains significant business logic and processing on the client side, as opposed to a thin client (web browser) that relies on the server for most computation.

Examples include:

  • Enterprise resource planning (ERP) software
  • Banking desktop applications
  • Healthcare management systems
  • Trading terminals
  • VPN clients with management UIs
  • Game launchers and clients

Unlike web applications, thick clients often use proprietary protocols, binary communication formats, and local data storage, making them both harder to test and often overlooked in security assessments.

Architecture Types

Two-Tier Architecture

Client communicates directly with the database. The most common pattern in legacy enterprise software.

1
[Thick Client] ←──── TCP/SQL ────→ [Database Server]

Security Risk: If the client can connect directly to the DB, an attacker who extracts the connection credentials can access the database directly.

Three-Tier Architecture

Client communicates with an application server, which in turn communicates with the database.

1
[Thick Client] ←── HTTP/RPC ──→ [App Server] ←── SQL ──→ [Database]

This is more secure but still has client-side trust issues.

Key Vulnerability Areas

1. Insecure Local Data Storage

Thick clients often store sensitive data locally:

  • Configuration files: May contain credentials, API keys, server addresses.
  • Log files: Application logs may capture sensitive transactions.
  • SQLite/local databases: Unencrypted local DBs accessible to the OS user.
  • Registry entries (Windows): Credentials or tokens stored in HKCU/HKLM.
  • Memory: Passwords kept in memory without secure erasure.
1
2
3
4
# Search for credentials in config files
grep -ri "password\|passwd\|secret\|apikey" /app/config/
# Look for SQLite databases
find /app -name "*.sqlite" -o -name "*.db"

2. Hardcoded Credentials and API Keys

Developers often hardcode connection strings, API keys, or credentials in the application binary or configuration files.

1
2
3
4
# Using strings on a Windows binary
strings target.exe | grep -i "password\|apikey\|secret\|jdbc"
# Using jadx for .NET/Java
jadx-gui target.jar

3. Improper Certificate Validation / Traffic Interception

Many thick clients disable certificate validation for convenience or use certificate pinning incorrectly.

Intercepting Thick Client Traffic:

  • Set up Burp Suite as a proxy.
  • Configure the client to route traffic through the proxy (manual proxy settings, proxify, proxychains).
  • If the client uses a custom protocol, use Wireshark to capture and analyze.
1
2
3
# Route traffic through Burp using proxychains
proxychains ./target_client
# For Windows apps, use ProxyCap or Proxifier

4. Binary Analysis (Reverse Engineering)

Thick client binaries often contain business logic that can be reverse-engineered:

Tools by platform:

  • .NET: dnSpy, ILSpy, dotPeek (decompile to C#)
  • Java: JD-GUI, JADX, Bytecode Viewer
  • C/C++ (native): Ghidra, IDA Pro, x64dbg
  • Electron: The JavaScript source is often accessible in the app.asar file.
1
2
# Extract Electron app source
npx asar extract app.asar ./extracted_source

5. DLL Hijacking (Windows)

Windows applications load DLLs using a search order. If an application directory is writable, an attacker can place a malicious DLL that gets loaded instead of the legitimate one.

1
2
# Use Process Monitor to identify missing DLLs
# Filter: Process Name is target.exe AND Result is NAME NOT FOUND AND Path ends with .dll

6. Memory Analysis

Sensitive data (passwords, tokens, PII) may remain in memory after it’s no longer needed.

1
2
3
4
# Dump process memory
# Windows: procdump.exe -ma <PID> memdump.dmp
# Analyze with strings:
strings memdump.dmp | grep -i "password\|token\|Bearer"

7. SQL Injection in Direct DB Connections

In two-tier architectures, input fields may directly construct SQL queries to the database. Test all input fields for SQL injection.

8. Authorization Bypass via UI Manipulation

Thick clients may hide UI elements (buttons, menu items) for unauthorized users, but the underlying functionality is still accessible. Bypass by:

  • Modifying the application binary or memory.
  • Sending API/RPC calls directly, skipping the UI.

Penetration Testing Methodology

Phase 1: Information Gathering

  • Identify the client architecture (2-tier vs 3-tier).
  • Determine programming language and frameworks used.
  • Locate all configuration files, log directories, and local data storage.
  • Identify network communication (protocol, ports, encryption).

Phase 2: Network Traffic Analysis

  • Intercept traffic with Burp Suite (HTTP/HTTPS), Wireshark (raw protocols).
  • Identify all API endpoints or database queries sent by the client.
  • Look for sensitive data transmitted in plaintext.

Phase 3: Binary Analysis

  • Decompile/disassemble the binary.
  • Search for hardcoded credentials, API keys, or internal logic.
  • Identify authentication and authorization checks.

Phase 4: Dynamic Testing

  • Manipulate API/RPC requests intercepted via proxy.
  • Test for injection vulnerabilities (SQLi, XML injection, etc.).
  • Test for IDOR/authorization bypass by modifying user IDs or roles.
  • Test local data storage for sensitive data.

Tools Summary

Category Tool
Proxy (HTTP) Burp Suite
Proxy (Raw) Proxychains, Proxifier
Packet Capture Wireshark
.NET Decompiler dnSpy, ILSpy
Java Decompiler JADX, JD-GUI
Native Reverse Engineering Ghidra, IDA Pro, x64dbg
Memory Analysis procdump, Volatility
Process Monitoring Process Monitor, Process Hacker

Thick Client란?

Thick Client(팻 클라이언트 또는 리치 클라이언트라고도 함)는 대부분의 컴퓨팅을 서버에 의존하는 씬 클라이언트(웹 브라우저)와 달리, 클라이언트 측에 상당한 비즈니스 로직과 처리를 포함하는 데스크톱 애플리케이션입니다.

예시:

  • 기업 자원 관리(ERP) 소프트웨어
  • 은행 데스크톱 애플리케이션
  • 의료 관리 시스템
  • 거래 터미널
  • UI가 있는 VPN 클라이언트
  • 게임 런처 및 클라이언트

아키텍처 유형

2티어 아키텍처

클라이언트가 데이터베이스와 직접 통신합니다. 레거시 엔터프라이즈 소프트웨어에서 가장 일반적인 패턴입니다.

보안 위험: 클라이언트가 DB에 직접 연결할 수 있는 경우, 연결 자격 증명을 추출한 공격자가 데이터베이스에 직접 접근할 수 있습니다.

3티어 아키텍처

클라이언트가 애플리케이션 서버와 통신하고, 애플리케이션 서버가 다시 데이터베이스와 통신합니다.

주요 취약점 영역

1. 안전하지 않은 로컬 데이터 저장

Thick Client는 종종 민감한 데이터를 로컬에 저장합니다:

  • 구성 파일: 자격 증명, API 키, 서버 주소 포함 가능
  • 로그 파일: 민감한 트랜잭션 캡처 가능
  • SQLite/로컬 데이터베이스: OS 사용자가 접근 가능한 암호화되지 않은 로컬 DB
  • 레지스트리 항목(Windows): HKCU/HKLM에 저장된 자격 증명 또는 토큰
  • 메모리: 안전한 지우기 없이 메모리에 유지되는 비밀번호

2. 하드코딩된 자격 증명 및 API 키

개발자들은 종종 연결 문자열, API 키, 자격 증명을 애플리케이션 바이너리나 구성 파일에 하드코딩합니다.

3. 부적절한 인증서 검증 / 트래픽 인터셉션

많은 Thick Client가 편의를 위해 인증서 검증을 비활성화하거나 인증서 피닝을 잘못 구현합니다.

Thick Client 트래픽 인터셉팅:

  • Burp Suite를 프록시로 설정
  • proxychains 또는 ProxyCap으로 트래픽 라우팅
  • 독점 프로토콜의 경우 Wireshark로 캡처 및 분석

4. 바이너리 분석 (리버스 엔지니어링)

Thick Client 바이너리에는 리버스 엔지니어링 가능한 비즈니스 로직이 포함되어 있습니다.

플랫폼별 도구:

  • .NET: dnSpy, ILSpy (C#으로 디컴파일)
  • Java: JD-GUI, JADX
  • C/C++ (네이티브): Ghidra, IDA Pro, x64dbg
  • Electron: app.asar 파일에서 JavaScript 소스 접근 가능

5. DLL 하이재킹 (Windows)

Windows 애플리케이션은 DLL 검색 순서를 사용하여 DLL을 로드합니다. 애플리케이션 디렉토리에 쓰기 가능하면, 공격자가 악성 DLL을 배치하여 합법적인 것 대신 로드될 수 있습니다.

6. UI 조작을 통한 권한 우회

Thick Client는 권한 없는 사용자에 대한 UI 요소(버튼, 메뉴 항목)를 숨길 수 있지만, 기본 기능은 여전히 접근 가능합니다. 바이너리나 메모리 수정, 또는 UI를 건너뛰고 직접 API/RPC 호출을 통해 우회할 수 있습니다.

침투 테스트 방법론

  1. 정보 수집: 아키텍처, 프로그래밍 언어, 구성 파일, 네트워크 통신 파악
  2. 네트워크 트래픽 분석: Burp Suite 및 Wireshark로 트래픽 인터셉트
  3. 바이너리 분석: 디컴파일/디스어셈블 후 하드코딩된 자격 증명 검색
  4. 동적 테스트: API 요청 조작, 인젝션 취약점 테스트, IDOR/권한 우회 테스트