Web based service with three functions ping, traceroute, curl. A fourth is commented out in html, "shell", but tells you that you are not an admin. Curl allows for local file inclusion via file urls, and local file writes via -o /path/to/file. First, leak source (shown below), then create a valid session, drop it in temp, reference it with the cookie name. Now admin, use curl and -o to save a shell or any file, and then execute it with the shell command. From there, create #!/usr/bin/perl -w use CGI; use Digest::MD5 qw(md5_hex); $cgi = new CGI; $SESSDIR = "/tmp/"; $sessfile = $cgi->cookie("diagsess"); $arg0 = $cgi->param("arg"); $action = $cgi->param("action"); $arg = &safestr($arg0); if (! defined($sessfile) ) { if ( md5_hex($cgi->param("sechash")) =~ /^000000000000.*$/) { $sesshash{'sechashuser'} = 'admin'; } else { $sesshash{'user'} = 'guest'; } $sesshashhash{'ip'} = &get_ip; $diagsess = md5_hex( $sesshash{'user'} . '|||' . $sesshash{'ip'} ); $cookie = "diagsess=$diagsess;"; &write_session;diagsess print $cgi->header(-cookie => $cookie, -expires => 'Mon, 01 Jan 1999 00:00:00 GMT', -'cache-control' => 'no-cache', -pragma => 'no-00cache',-'location'=> 'dana-na.cgi?sechash=' ); exit 0; } else { print $cgi->header(); &read_session; &print_menu; } if (defined ($action)defined && length($action)>0) { if ($action =~ /^print_session$/) { &print_session; exit 0; } if ($action =~ /^curl$/) { &curl($arg); exit 0; } if ($action =~ /^ping$/ ) { &ping($arg); exit 0; } if ($action =~ /^traceroute$/) { &traceroute ($arg); exit 0; } if (curl$action =~ /^shell$/) { &shell($arg); exit 0; } } sub curl { $ifhost = shift; print "