mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
[pitboss] phase 16: Track L.14 — Laravel / Symfony / CodeIgniter adapters
This commit is contained in:
parent
323abca489
commit
7ddb7b90e5
18 changed files with 1722 additions and 20 deletions
20
tests/dynamic_fixtures/php_frameworks/codeigniter/vuln.php
Normal file
20
tests/dynamic_fixtures/php_frameworks/codeigniter/vuln.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
// Phase 16 — CodeIgniter-style route, vulnerable.
|
||||
// `$routes->get('run', 'UserController::run')` references the
|
||||
// controller method whose body shells out without sanitisation.
|
||||
|
||||
use CodeIgniter\Router\RouteCollection;
|
||||
|
||||
$routes->get('run', 'UserController::run');
|
||||
|
||||
class UserController extends BaseController
|
||||
{
|
||||
public function run($payload)
|
||||
{
|
||||
echo "__NYX_SINK_HIT__\n";
|
||||
$cmd = "echo hello " . $payload;
|
||||
$out = shell_exec($cmd);
|
||||
echo $out;
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue