Re:Hacking Transcend WiFi SD Cards
by username42 on Monday August 12, 2013 @04:24AM
(#6198205)
Perl has the three argument open that is safe. The issue is well known by perl developers and well explained in the popular free book "Modern Perl".
And the three argument open has been in Perl since at least 5.6, which was released 13 years ago. No reason to use anything else.
I believe it's enabled under mod_perl. If that someone was allowing user input to make it to an open, system, or back tick call unfiltered then this is just one thing to worry about. It's as bad or worse than taking unfiltered input and building an SQL query with it.
Moreover, this isn't a Perl issue. I can think of ways to do similarly I'll advised things with C#'s process.start or C/C++'s System command.
I don't know what they did, it's not my code, but they are not experienced and I suspect they don't know to watch out for this.
> Moreover, this isn't a Perl issue. I can think of ways to do similarly I'll advised things with C#'s process.start or C/C++'s System command.
Obviously every language has ways to cause this. It's just that open is the default command. This extra functionality should be in a openshell command or something, and the regular open not have it. (And yes I'm aware it's way too late to change it.)
I thought only PHP did things like that :)
I hope this is disabled in mod_perl? Because if not I need to let someone know they need to audit their code.
PS. I get how useful this is, and it's well documented, but this functionality should be in the ancillary function (i.e. used when needed), not in the default one.