Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[PHP] Possible Tricky Function Injection

I've been racking my head trying to find some sort of vulnerability with this code snippet.

The idea is that a function is specified in query string parameters and is retrieved through $_REQUEST (the $a array in this case), and then executed with the array contents as the paramter. I've been going through the standard PHP functions but the fact that an array is being passed to the function makes this difficult and tricky.

PHP Code

<?php

// someArg=value&model=function_to_call
$a = array(
 
   'someArg' => 'value',
 
   'model' => 'function_to_call');

$model = $a['model'];
$model($a);

?>

Can anybody think of a vulnerability here, or is this code practically safe?

Edit: Woops...just realized this is in the SQLi section. My bad, but I blame the misleading breadcrumbs on Hack Forums - SQL Injection Attacks 🤫


Possibly Related Threads...
Thread / Author Replies Views Last Post
by FuzzyhackerFeb 25, 2021 07:46 AM 3 133 Feb 25, 2021 07:46 AM
Last Post: account_
by godjustice555Jul 21, 2019 10:27 AM 8 388 Jul 21, 2019 10:27 AM
Last Post: boy rteis
by InjectorBoyApr 17, 2017 03:22 AM 19 1,019 Apr 17, 2017 03:22 AM
Last Post: mr.vulnerable