I hope someone can answer this for me as I've been fairly curious about it for quite some time, haven't seemed to be able to obtain an answer though. However, I'm sure someone here will be able to as there are some very intelligent people here.
Now, to the question. I'll be using a Remote Command Execution vulnerability as an example.
<?php echo preg_replace('/(.*)/e', 'strtoupper("\\1")', $argv[1]); ?>
To exploit this the attacker would simply input {${phpinfo()}}
for example.
My questions are as follows:
- What are the braces
{}
for and why does it look like a variable? - Does it have a name of some kind? I don't believe it's a variable function since they're different, no?
Thank you!