#  This software was derived from SATAN 1.1.1 by Dan Farmer and Wietse Venema
#  (http://www.porcupine.org/satan).
#
require 'config/paths.pl';
require 'perl/menu.pl';
require 'perl/misc.pl';
if (-f $NMAP){
foreach (keys %ENV) {
   $nmap_flag=$ENV{SARA_NMAP};
}
if ($nmap_flag) {
 $nmap="<LI>OS fingerprinting: SARA will support NMAP OS detection (could cause target problems)<BR>\n";
 } else {
 $nmap="<LI>OS fingerprinting: NMAP OS detection disabled.  Refer to docs/INSTALL.<BR>\n";
}
}
if (-f $SMBCLIENT){
 $smbclient="<LI>SMB Processing: SAMBA will provide SMB support<BR>\n";
} else {
 $smbclient="<LI>SMB Processing: No SAMBA system found.  Refer to docs/INSTALL.<BR>\n";
}

if ($OPENSSL) {
 $netssleay="<LI>HTTPS Processing: OpenSSL will support https processing<BR>\n";
} else {
 $netssleay="<LI>HTTPS Processing: OpenSSL required.  Refer to docs/INSTALL.<BR>\n";
}
if (-e 'bin/sssh') {
 $sssh="<LI>SARA SSH: sssh is available for ssh analyses<BR>\n";
} else {
 $sssh="<LI>SARA SSH: sssh was not built.  Refer to docs/INSTALL.<BR>\n";
}
if (-e 'bin/sqlanlz') {
 $sql="<LI>SARA SQL: SARA SQL is available for SQL analyses<BR>\n";
} else {
 $sql="<LI>SARA SQL: SARA SQL was not built.  Refer to docs/INSTALL.<BR>\n";
}
print <<EOF;
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
  function movepic(img_name,img_src) {
  document[img_name].src=img_src;
}
</SCRIPT>
<LINK REV="made" HREF="mailto:sara\@arc.com">
</HEAD>
<BODY>
EOF
if ($pi_menu) {
  $screen = &$pi_menu;
} else {
  $screen = print_menu();
}
$screen =~ s/\\n/\n/g;
print $screen;
print "</TD><TD valign=top>\n";
if ($pi_home) {
  $screen =&$pi_home;
  $screen =~ s/\\nn/\n/g;
  print $screen;
  print "</TD></TR></TABLE>\n";
}else {
print <<EOF;
<TABLE BORDER="0" WIDTH="650">
<TR><TD BGCOLOR="#000000">
<FONT Color="#FFFFFF">
<H2><Center>
Security Auditor's Research Assistant (SARA)
</Center></H2>
</TD><TR></TABLE>
<UL>
The Security Auditor's Research Assistant (SARA) is a third generation
network oriented security analysis and reporting tool developed by the
Advanced Research Corporation. SARA is widely used in the U.S. Government
and commercial communities.  As such, it has been in-the-field validated on
the current security exploits of Unix (Sun, SGI, AIX, Linux) and Microsoft
Windows XX.  Historically, we have been updating SARA once  a month with emergency updates as required.
<P>
<UL>
<A HREF="$HTML_SERVER/cve/cve-sara.html"
onmouseover="movepic('button10','/dots/greendot.gif')"
onmouseout="movepic('button10','/dots/bluedot.gif')">
<IMG NAME="button10" SRC="/dots/bluedot.gif" Border = 0 ></A>
Hundreds of UNIX and Windows vulnerability probes (indexed by CVE)<BR>
<A HREF="http://nvd.nist.gov"
onmouseover="movepic('button12','/dots/greendot.gif')"
onmouseout="movepic('button12','/dots/bluedot.gif')">
<IMG NAME="button12" SRC="/dots/bluedot.gif" Border = 0 ></A>
Integrated with the National Vulnerability Database<BR>
<A HREF="/docs/sara_daemon.html"
onmouseover="movepic('button13','/dots/greendot.gif')"
onmouseout="movepic('button13','/dots/bluedot.gif')">
<IMG NAME="button13" SRC="/dots/bluedot.gif" Border = 0 ></A>
Server mode for controlled enterprise access<BR>
<A HREF="/docs/reportwriter.pl"
onmouseover="movepic('button14','/dots/greendot.gif')"
onmouseout="movepic('button14','/dots/bluedot.gif')">
<IMG NAME="button14" SRC="/dots/bluedot.gif" Border = 0 ></A>
SARA ReportWriter (tm)<BR>
<A HREF="/docs/sara_corrections.pl"
onmouseover="movepic('button15','/dots/greendot.gif')"
onmouseout="movepic('button15','/dots/bluedot.gif')">
<IMG NAME="button15" SRC="/dots/bluedot.gif" Border = 0 ></A>
SARA Report Corrections and Drops<BR>
<A HREF="$HTML_SERVER/docs/sara_plugins.pl"
onmouseover="movepic('button16','/dots/greendot.gif')"
onmouseout="movepic('button16','/dots/bluedot.gif')">
<IMG NAME="button16" SRC="/dots/bluedot.gif" Border = 0 ></A>
SARA Plugins<P>
<A HREF="http://www-arc.com/sara/overview/sld001.htm"
onmouseover="movepic('button17','/dots/greendot.gif')"
onmouseout="movepic('button17','/dots/bluedot.gif')">
<IMG NAME="button17" SRC="/dots/bluedot.gif" Border = 0 ></A>
Briefing Overview of SARA<BR>
<A HREF="http://www-arc.com/sara"
onmouseover="movepic('button18','/dots/greendot.gif')"
onmouseout="movepic('button18','$HTML_SERVER/dots/bluedot.gif')">
<IMG NAME="button18" SRC="/dots/bluedot.gif" Border = 0 ></A>
Additional Information on SARA<P>
</UL>
<P>
EOF
print <<EOF;
SARA has supported the SANS Top 10/20 list since 2000.  However Version 6
of the Top 20 is limited in its list of network testable vulnerabilities.  
We will continue to strive to support those Top 20 items that are truly 
testable from a remote platform.  However, SARA has dropped its support
as SANS test tool.
<P>
SARA is controlled by the <A HREF="/docs/copyright.html">SATAN license</A> 
which provides public use of the product.  Also, SARA agressively pursues 
external Open Source interfaces to improve product performace<P>
<P>
<HR>
SARA has enabled the following optional tests:
<UL>

$nmap $smbclient $netssleay $sssh $sql
</UL>
</UL>
<P>
<UL>
<p>
</UL>
</UL>
</TD></TR></TABLE>
</BODY>
</HTML>
EOF
}
A

