TESSA Security

Penetration Test Report

Prepared For:

Fictional Client Inc.

Date: October 26, 2024

CONFIDENTIAL DOCUMENT

Executive Summary

Between October 21, 2024, and October 25, 2024, TESSA Security conducted a penetration test of Fictional Client Inc.'s external web application. The assessment identified several security vulnerabilities, including one critical-risk issue that could lead to a full system compromise. This report provides a detailed analysis of these findings and actionable recommendations for remediation.

Vulnerability Summary

CriticalHighMediumLow01234

Scope & Methodology

The test focused on the main web application located at `app.fictional-client.com`. The methodology followed industry best practices, including the OWASP Top 10 and the Penetration Testing Execution Standard (PTES), involving reconnaissance, scanning, vulnerability assessment, exploitation, and reporting phases.

Detailed Findings

CS-2024-001: SQL Injection in Login Form

Critical

Description

The login form at `/login` is vulnerable to a boolean-based blind SQL injection attack. By manipulating the `username` parameter with crafted SQL queries, it is possible to bypass authentication and gain unauthorized access to the application.

Proof of Concept

An attacker can use a payload like ' OR '1'='1' -- in the username field to bypass authentication. This payload evaluates to true, logging the attacker in as the first user in the database, often an administrator.

Business Impact

An attacker can gain complete control over the application, including access to all user data, administrative functions, and potentially the underlying server.

Remediation Steps

Implement parameterized queries (prepared statements) for all database interactions. Sanitize and validate all user-supplied input before it is used in database queries. Use an Object-Relational Mapping (ORM) library which often handles this automatically.

CS-2024-002: Stored Cross-Site Scripting (XSS) in User Profile

High

Description

The 'bio' field in the user profile section is vulnerable to stored XSS. Malicious JavaScript can be injected into this field, which is then stored in the database and executed in the browser of any user who views the profile.

Proof of Concept

A user can set their bio to <script>alert('XSS')</script>. This script will execute for any user, including administrators, who visits the malicious user's profile page.

Business Impact

Attackers can steal session cookies, perform actions on behalf of other users, deface the website, or redirect users to malicious websites.

Remediation Steps

Implement strong output encoding (e.g., HTML entity encoding) for all user-supplied content before rendering it in the browser. Use a Content Security Policy (CSP) to restrict the execution of inline scripts.

CS-2024-003: Insecure Direct Object Reference (IDOR) in Invoices

High

Description

The application uses sequential, predictable identifiers for invoices (e.g., /invoices/101, /invoices/102). There is no authorization check to ensure a user can only access their own invoices.

Proof of Concept

A logged-in user who can access their own invoice at /invoices/101 can simply change the URL to /invoices/102, /invoices/103, etc., to view invoices belonging to other users.

Business Impact

An attacker can access and download sensitive financial data belonging to all other users of the application.

Remediation Steps

Implement access control checks on every request to ensure the logged-in user is authorized to access the requested resource. Use non-sequential, random identifiers (like UUIDs) for sensitive objects to make enumeration difficult.