1#!/usr/bin/perl
2
3use strict;
4use warnings;
5use Test::More;
6use Storable qw(freeze thaw);
7plan tests => 1;
8
9# this original worked with the packaged exploit, but that
10# triggers virus scanners, so test for the behaviour instead
11my $x = bless \(my $y = "mt-config.cgi"), "CGITempFile";
12
13my $frozen = freeze($x);
14
15{
16    my $warnings = '';
17    local $SIG{__WARN__} = sub { $warnings .= "@_" };
18    thaw($frozen);
19    like($warnings, qr/SECURITY: Movable-Type CVE-2015-1592 Storable metasploit attack/,
20         'Detect CVE-2015-1592');
21}
22