News for hackers. Stuff that matters.
Re:Hacking Transcend WiFi SD Cards by ars on Sunday August 11, 2013 @09:37PM (#6197194)
"Perl has a nice feature when opening a file with the open() library call, because it not only opens files, but runs programs if the file path is not a path, but a shell command ending in a pipe."

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.

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".
Re:Hacking Transcend WiFi SD Cards by eCa on Monday August 12, 2013 @09:20AM (#6199009)
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.
Re:Hacking Transcend WiFi SD Cards by Moto7451 on Monday August 12, 2013 @01:25AM (#6197796)
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.

Re:Hacking Transcend WiFi SD Cards by ars on Monday August 12, 2013 @04:47AM (#6198260)
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.)