Skip to content
Discussion options

You must be logged in to vote

The Perl 1 interpreter is vulnerable to an attack that has to do with temporary files. Race conditions exist when a program is passed with 'e' command line option. Here's an example traditional Hello World program.

$ ./perl -e 'print "hello, world\n";'

This creates a file like /tmp/perl-eO3gdPn that can be overwritten by an external process with another program in Perl language. It can for example print "owned by stagyrite" instead of "hello, world". There is a proof-of-example exploit named Perl Harbor. Let's observe how to use it against a Perl 1 interpreter in a sample session.

$ ./perl -e 'print "hello, world\n";'
hello, world
$ ./perl-harbor.c &
[1] 2146125
$ ./perl -e 'print "hello…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by eltikia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants