[16002] in bugtraq
fingerprint data base
daemon@ATHENA.MIT.EDU (Nelson Brito)
Sat Jul 29 14:29:18 2000
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="------------CC02A50B42D9AA1EBE772563"
Message-Id: <3981E9EE.2D0266A2@sekure.org>
Date: Fri, 28 Jul 2000 17:15:42 -0300
Reply-To: Nelson Brito <nelson@SEKURE.ORG>
From: Nelson Brito <nelson@SEKURE.ORG>
X-To: nmap-hackers@insecure.org
To: BUGTRAQ@SECURITYFOCUS.COM
This is a multi-part message in MIME format.
--------------CC02A50B42D9AA1EBE772563
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I read something, sometime ago, about fingerprint data base in BUGTRAQ,
but it's only for Solaris.
Well, I made a usefull tool to create a fingerprint data base for other
OS's,
in perl, if someone want to enjoy and help me to developer more
intresting
features, please, contact me.
PS: Sorry about my poor English.
Sem mais,
--
During a meditation session, Santana said, an entity called Metatron had
announced: "We want to hook you back to the radio-airwave frequency."
"Smooth as Santana" - Newsweek's Article
--------------CC02A50B42D9AA1EBE772563
Content-Type: application/x-perl;
name="signatures.pl"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="signatures.pl"
#!/usr/bin/perl -w
##############################################################################
## File : signatures.pl
## Version : 0.1
## Author : Nelson Brito<nelson@secunet.com.br>
##############################################################################
## Este pequeno script perl tem por intuito gerar uma Base de Dados, para
## administradores de sistemas Linux e/ou UNIX, de suas assinaturas de
## arquivos(files' fingerprint).
##
## Utilizando uma tecnica bem simples, ele coleta todos os md5 checksum
## dos arquivos executaveis de seus diretorio setados no $PATH e salvando
## em um arquivo denominado "fingerprint.db".
##
## Voce pode modificar e/ou redistribuir livremente este codigo(vide GPL),
## contanto que deixe os creditos do autor e da ferramenta.
##
## Sem mais,
## --
## Nelson Brito
## Security Analyst
## Security Network AG
##############################################################################
use strict; ## confie em mim... =)
use Getopt::Std;
use Shell qw(md5sum);
my %opts;
getopts('vo:h', \%opts);
$0=~ s#.*/##;
my $good_stuff = &changed('3caet8jiv3.hm');
my $output_file = $opts{'o'} ? $opts{'o'} : "fingerprint.db";
my $verbose = 1 ? $opts{'v'} : 0;
my $version = "0.1";
my $location = $ENV{'PATH'};
my @locations = split(/:/, $location);
my $counter = 0;
($0 eq $good_stuff) or die "need more than one neuron to execute me\n";
($<==0) or die "$0: need root to execute me\n";
die "Signatures.PL v. $version - By Nelson Brito<nelson\@secunet.com.br>\n",
"Usage: $0 (options)\n",
"\t-v\t\tturn on verbose mode\t(def:off)\n",
"\t-o <file.db>\tdefine output file\t(def:$output_file)\n",
"\t-h\t\tshow usage message\n" if ($opts{'h'});
if(not($verbose)){
print "Entering in background mode...\n";
exit(0) if (fork());
}
print "Calling check_sign() function...\n" if ($verbose);
&check_sign($output_file, $verbose);
sub changed{
$_ = "$_[0]";
y/a-z0-9/gvibn9wprud2lmx8z3fa4eq15oy06sjc7kth/;
y/\2/./;
return $_;
}
sub check_sign{
open(FILE, ">" . $_[0]) or die "open($_[0]): $!\n";
print "Checking directories:\n" if ($_[1]);
while($counter < @locations){
if(-d $locations[$counter]){
my $sub_counter = 0;
print "$locations[$counter]\n" if ($_[1]);
opendir(DIR, $locations[$counter]) or die "open($locations[$counter]): $!\n";
my @files = readdir(DIR);
closedir(DIR);
while($sub_counter < @files){
if(($files[$sub_counter] eq ".") or ($files[$sub_counter] eq "..")){ }
else{
my $single_file = $locations[$counter] . "/" . $files[$sub_counter];
if((-f $single_file) and (-x $single_file)){
my $temp_print = md5sum($single_file);
print FILE $temp_print;
}
}
$sub_counter++;
}
}
$counter++;
}
close(FILE);
return $_;
}
--------------CC02A50B42D9AA1EBE772563--