Overview
These files are known to be bad and are the ones that you want to
know about if they are in the image you are analyzing. For example,
this database would include hashes of known attacker tools, rootkits,
or photographs.
EOF
print "
Details
\n";
if ($Caseman::alert_db eq "") {
print "Location: Not Configured
\n";
}
elsif (-e "$Caseman::alert_db") {
print "Location: $Caseman::alert_db
\n";
if (-e "$Caseman::alert_db" . "-md5.idx") {
print "Status: MD5 Index File Exists
\n";
}
else {
print "Status: Database has not been MD5 indexed
\n";
}
# Index Button
print "
"
. ""
. "\n";
# Lookup Button
if (-e "$Caseman::alert_db" . "-md5.idx") {
print "
Lookup
"
. "
Overview
These files are known to be good and are the ones that you
can ignore if they are found in the image you are analyzing. For
example, this database would include hashes of known system binaries
and other documents that you do not want to waste time on when running
'sorter' or files that you want to confirm were not modified by an
attacker.
EOF2
print "
Details
\n";
if ($Caseman::exclude_db eq "") {
print "Location: Not Configured
\n";
}
elsif (-e "$Caseman::exclude_db") {
print "Location: $Caseman::exclude_db
\n";
if (-e "$Caseman::exclude_db" . "-md5.idx") {
print "Status: MD5 Index File Exists
\n";
}
else {
print "Status: Database has not been MD5 indexed
\n";
}
# Index Button
print "
"
. ""
. "\n";
# Lookup Button
if (-e "$Caseman::exclude_db" . "-md5.idx") {
print "
Lookup
"
. "
Overview
These files are known to be good and bad. It is currently
difficult to distinguish between known good and known bad and therefore
the NSRL is no longer used much in Autopsy until a better solution can
be found.
EOF3
print "
Details
\n";
if ($::NSRLDB eq "") {
print "Location: Not Configured
\n";
}
elsif (-e "$::NSRLDB") {
print "Location: $::NSRLDB
\n";
if (-e "$::NSRLDB" . "-md5.idx") {
print "Status: MD5 Index File Exists
\n";
}
else {
print "Status: Database has not been MD5 indexed
\n";
}
# Index Button
print "
"
. ""
. "\n";
# Lookup Button
if (-e "$::NSRLDB" . "-md5.idx") {
print "
Lookup
"
. "
![]() |
![]() |
\n"; index_md5sum($Caseman::exclude_db); } if ( (exists $Args::args{'hash_alert'}) && ($Args::args{'hash_alert'} == 1) && ($Caseman::alert_db ne "")) { Print::log_host_info("Alert Database Re-Indexed"); print "
\n"; index_md5sum($Caseman::alert_db); } if ( (exists $Args::args{'hash_nsrl'}) && ($Args::args{'hash_nsrl'} == 1) && ($::NSRLDB ne "")) { Print::log_host_info("NSRL Database Re-Indexed"); print "
\n"; index_nsrl(); } print "
Indexing Complete
\n"
. "
\n\n"
. "\n";
Print::print_html_footer();
return 0;
}
# Lookup hashes in database
sub db_lookup {
Print::print_html_header("Hash Database Lookup");
unless ((exists $Args::args{'md5'})
&& ($Args::args{'md5'} =~ /^$::REG_MD5$/o))
{
Print::print_err("Invalid MD5 Argument");
}
if ( (exists $Args::args{'hash_nsrl'})
&& ($Args::args{'hash_nsrl'} == 1)
&& ($::NSRLDB ne ""))
{
print "
\n";
if (-e "$::NSRLDB") {
local *OUT;
Exec::exec_pipe(*OUT,
"'$::TSKDIR/hfind' '$::NSRLDB' $Args::args{'md5'}");
print "$_
\n" while ($_ = Exec::read_pipe_line(*OUT));
close(OUT);
Print::log_host_inv("NSRL Lookup ($Args::args{'md5'})");
}
else {
print "NSRL Database Missing
\n";
Print::log_host_inv(
"NSRL Lookup ($Args::args{'md5'}) - Database Missing");
}
}
if ( (exists $Args::args{'hash_exclude'})
&& ($Args::args{'hash_exclude'} == 1)
&& ($Caseman::exclude_db ne ""))
{
print "
\n";
if (-e "$Caseman::exclude_db") {
local *OUT;
Exec::exec_pipe(*OUT,
"'$::TSKDIR/hfind' '$Caseman::exclude_db' $Args::args{'md5'}");
print "$_
\n" while ($_ = Exec::read_pipe_line(*OUT));
close(OUT);
Print::log_host_inv("Exclude Database Lookup ($Args::args{'md5'})");
}
else {
print "Exclude Database Missing
\n";
Print::log_host_inv(
"Exclude Database Lookup ($Args::args{'md5'}) - Database Missing"
);
}
}
if ( (exists $Args::args{'hash_alert'})
&& ($Args::args{'hash_alert'} == 1)
&& ($Caseman::alert_db ne ""))
{
print "
\n";
if (-e "$Caseman::alert_db") {
local *OUT;
Exec::exec_pipe(*OUT,
"'$::TSKDIR/hfind' '$Caseman::alert_db' $Args::args{'md5'}");
print "$_
\n" while ($_ = Exec::read_pipe_line(*OUT));
close(OUT);
Print::log_host_inv("Alert Database Lookup ($Args::args{'md5'})");
}
else {
print "Alert Database Missing
\n";
Print::log_host_inv(
"Alert Database Lookup ($Args::args{'md5'}) - Database Missing"
);
}
}
print "
\n" . "If any of the hash databases need to be re-indexed, use the " . "Hash Database Manager
"
. "\n"
. "\n";
Print::print_html_footer();
return 0;
}
############ INTEGRITY CHECKS ##################
# Special view for printing integrity check menu
# We show any file that we have a reference for
# pass the md5 hash (from md5.txt) and then the sorted array
sub int_menu_print {
my %md5s = %{$_[0]};
my @sort = @{$_[1]};
for (my $i = 0; $i <= $#sort; $i++) {
print
"