Critical
public function runCommand($user_input) { $result = ""; assert("$result = $user_input"); return $result; } The runCommand() method takes user-controlled input from the cmd POST parameter. The assert() function evaluates the string as PHP code. Since no sanitization is applied, an attacker can break out of the string concatenation by injecting '.phpinfo().' , leading to arbitrary code execution. oswe exam report
Example: Line 12: $template = $_GET['theme']; – User input unsanitized. Line 45: include($template . '.php'); – Leading to Local File Inclusion (LFI). You must provide a working Python or Ruby exploit script. The examiner will run this script against their pristine exam environment. If it fails, you fail. Ensure the script is self-contained (no hardcoded absolute paths unless necessary) and includes comments. Example: Line 12: $template = $_GET['theme']; – User
scrot -d 5 -e 'mv $f ~/oswe_report/screenshots/app2_$f.png' The “Debugging Output” Secret Weapon OSWE examiners love debugging output. In your exploit script, include print() statements that show the vulnerable function call. You must provide a working Python or Ruby exploit script
Include 10 lines above and below the vulnerable code. Failure #3: Forgetting the “White-Box” Rule Do not write the report as if you discovered the vulnerability via fuzzing. Say: “While reviewing routes.php, the application fails to validate the ‘action’ parameter before passing it to call_user_func_array().” Failure #4: Poor Screenshot Hygiene Blurry images, terminal text too small, or screenshots that edit out critical error messages. OffSec requires clear, readable proofs.