[Sguil-cvs] sguil/web config.js,NONE,1.1 incident_categories.php,NONE,1.1 jscript_functions.php,NONE
Status: Beta
Brought to you by:
bamm
From: Michael B. <mb...@us...> - 2004-04-05 10:15:14
|
Update of /cvsroot/sguil/sguil/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15039 Modified Files: about.php alerts.php index.php sessions.php sguil_functions.php Added Files: config.js incident_categories.php jscript_functions.php menu.js std_functions.php Removed Files: tabs.php Log Message: drop'ed one of the frames to make room for a javascript menu. Added javascript menu. Put '--' if the port can't be resolved. Index: alerts.php =================================================================== RCS file: /cvsroot/sguil/sguil/web/alerts.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** alerts.php 4 Apr 2004 17:12:47 -0000 1.8 --- alerts.php 5 Apr 2004 10:02:33 -0000 1.9 *************** *** 13,16 **** --- 13,17 ---- require("sguil_functions.php"); + require("std_functions.php"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> *************** *** 30,34 **** --- 31,37 ---- printf(" <meta http-equiv=\"refresh\" content=\"" . $_REQUEST['autorefresh_interval'] . "; URL=" . $url ."\">\n"); } + include('css.php'); + jscript_topmenu_head(); ?> </head> *************** *** 36,39 **** --- 39,44 ---- <?php + navbar(); + if( $_REQUEST['aggregate'] == "" || $_REQUEST['aggregate'] == "0" ) $aggregate = 0; --- NEW FILE: std_functions.php --- <?php require("jscript_functions.php"); function navbar() { print("<br><br>"); print(" <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n"); print(" <tr>\n"); print(" <td width=\"20%\" colspan=\"0\" rowspan=\"0\" align=\"center\" valign=\"middle\">\n"); print(" <form action=\"alerts.php\" method=\"POST\" target=\"alerts\">\n"); print(" <input type=\"hidden\" name=\"query\" value=\"WHERE event.sid=sensor.sid AND event.status=0 GROUP BY src_ip,signature ORDER BY event.timestamp DESC LIMIT 50\">\n"); print(" <input type=\"hidden\" name=\"aggregate\" value=\"1\">\n"); print(" <input value=\"RealTime Events\" type=\"submit\"> \n"); print(" </form>\n"); print(" </td>\n"); print(" <td width=\"20%\" colspan=\"0\" rowspan=\"0\" align=\"center\" valign=\"middle\">\n"); print(" <form action=\"alerts.php\" method=\"POST\" target=\"alerts\">\n"); print(" <input type=\"hidden\" name=\"query\" value=\"WHERE event.sid=sensor.sid AND event.status=2 GROUP BY src_ip,signature ORDER BY event.timestamp DESC LIMIT 50\">\n"); print(" <input type=\"hidden\" name=\"aggregate\" value=\"1\">\n"); print(" <input value=\"Escalated Events\" type=\"submit\">\n"); print(" </form>\n"); print(" </td>\n"); print(" <td width=\"20%\" colspan=\"0\" rowspan=\"0\" align=\"center\" valign=\"middle\">\n"); print(" <form action=\"sessions.php\" method=\"POST\" target=\"alerts\">\n"); print(" <input type=\"hidden\" name=\"query\" value=\"\">\n"); print(" <input value=\"Session Query\" type=\"submit\">\n"); print(" </form>\n"); print(" </td>\n"); /* print(" <td width=\"20%\" colspan=\"0\" rowspan=\"0\" align=\"center\" valign=\"middle\">\n"); print(" Query Builder\n"); print(" </td>\n"); print(" <td width=\"20%\" colspan=\"0\" rowspan=\"0\" align=\"center\" valign=\"middle\">\n"); print(" <a href=\"about.php\" target=\"alerts\">About</a>\n"); print(" </td>\n"); */ print(" </tr>\n"); print(" </table>\n"); jscript_topmenu_body(); } ?> --- NEW FILE: incident_categories.php --- <?php /* * Copyright (C) 2002,2003,2004 <ba...@us...> * $Header: /cvsroot/sguil/sguil/web/incident_categories.php,v 1.1 2004/04/05 10:02:33 mboman Exp $ * * This program is distributed under the terms of version 1.0 of the * Q Public License. See LICENSE.QPL for further details. * * This program 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. */ require("std_functions.php"); ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>SGUIL Web Console :: About</title> <meta name="author" content="Michael Boman"> <meta name="copyright" content="Copyright 2004 Michael Boman <mb...@us...>. All Rights Reserved."> <?php include('css.php'); jscript_topmenu_head(); ?> </head> <body> <?php navbar(); ?> <h2>Category I: Root/Administrator Account Compromise</h2> <p>A category I event occurs when an unauthorized party gains 'root' or 'administrator' control of a client computer. Unauthorized parties include human adversaries and automated malicious code, such as a worm. On UNIX-like systems, the 'root' account is the 'super-user,' generally capable of taking any action desired by the unauthorized party. (Note that so-called 'Trusted' operating systems (OS), like Sun Microsystem's 'Trusted Solaris,' divide the powers of the root account among various operators. Compromise of any one of these accounts on a 'Trusted' OS constitutes a category I incident.) On Windows systems, the 'administrator' has near complete control of the computer, although some powers remain with the 'SYSTEM' account used internally by the OS itself. (Compromise of the SYSTEM account is considered a category I event as well.) Category I incidents are potentially the most damaging type of event.</p> <h2>Category II: User Account Compromise</h2> <p>A category II event occurs when an unauthorized party gains control of any non-root or non-administrator account on a client computer. User accounts include those held by people as well as applications. For example, services may be configured to run or interact with various non-root or non-administrator accounts, such as 'apache' for the Apache web server or 'IUSR_machinename' for Microsoft's Internet Information Services (IIS). Category II incidents are treated as though they will quickly escalate to Category I events. Skilled attackers will elevate their privileges once they acquire user status on the victim machine.</p> <h2>Category III: Attempted Account Compromise</h2> <p>A category III event occurs when an unauthorized party attempts to gain root/administrator or user level access on a client computer. The exploitation attempt fails for one of several reasons. First, the target may be properly patched to reject the attack. Second, the attacker may find a vulnerable machine, but he may not be sufficiently skilled to execute the attack. Third, the target may be vulnerable to the attack, but its configuration prevents compromise. (For example, an IIS web server may be vulnerable to an exploit employed by a worm, but the default locations of critical files have been altered.)</p> <h2>Category IV: Denial of Service</h2> <p>A category IV event occurs when an adversary takes damaging action against the resources or processes of a target machine or network. Denial of service attacks may consume CPU cycles, bandwidth, hard drive space, user's time, and many other resources.</p> <h2>Category V: Poor Security Practice or Policy Violation</h2> A category V event occurs when the MNSS operation detects a condition which exposes the client to unnecessary risk of exploitation. For example, should a MNSS analyst discover that a client domain name system server allows zone transfers to all Internet users, she will report the incident as a category V event. (Zone transfers provide complete information on the host names and IP addresses of client machines.) Violations of a client's security policy also constitutes a category V incident. Should a client forbid the use of peer-to-peer file sharing applications, detections of Napster or Gnutella traffic will be reported as category V events.</p> <h2>Category VI: Reconnaissance</h2> <p>A category VI event occurs when an adversary attempts to learn about a target system or network, with the presumed intent to later compromise that system or network. Reconnaissance events include port scans, enumeration of NetBIOS shares on Windows systems, inquiries concerning the version of applications on servers, unauthorized zone transfers, and similar activity. Category VI activity also includes limited attempts to guess user names and passwords. Sustained, intense guessing of user names and passwords would be considered category III events if unsuccessful.</p> <h2>Category VII: Virus Activity</h2> <p>A category VII event occurs when a client system becomes infected by a virus. Note the emphasis here is on the term virus, as opposed to a worm. Viruses depend on one or both of the following conditions: (1) human interaction is required to propagate the virus; (2) the virus must attach itself to a 'host' file, such as an email message, Word document, or web page. Worms, on the other hand, are capable of propagating themselves without human interaction or host files. A compromise caused by a worm would qualify as a category I or II event.</p> </body> </html> --- NEW FILE: menu.js --- //Author: Younes Bouab //Date: 03-05-01 //Title: Menu Generator: Menu.js //Copyright: Younes Bouab 2001 //Technical Support: bouaby@SUPEReDITION.com //////////////////////////////////////////// //////////////////////////////////////////// //DO NOT CHANGE ANYTHING IN THIS FILE! //"Config.js" is the file you can edit //////////////////////////////////////////// /*******************************************/ //Dreamweaver Show/Hide/Obj Layer functions /*******************************************/ function showHideLayers() { var i,p,v,obj,args=showHideLayers.arguments; for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2]; if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; } obj.visibility=v; } } function findObj(n, d) { var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); if(!x && document.getElementById) x=document.getElementById(n); return x; } function changeProp(objName,x,theProp,theValue) { var obj = findObj(objName); if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'"); } function reloadPage(init) { if (init==true) with (navigator) { if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; } } else if (innerWidth!=document.pgW || innerHeight!=document.pgH) {location.reload();} } reloadPage(true); /******************************************/ // Initialize /******************************************/ //Menu Array Menu =new Array(); //Menu[x][0]=INDEX - Menu[x][1]=PARENT - Menu[x][2]=Text - Menu[x][3]=Image - Menu[x][4]=Roll Image - Menu[x][5]=URL var i=0; var ii=0; //used in validation of Menu Array var MaxMenuIndex=0; //Default Layer Frame for IE and NS6.X var Layer="\"<div id='\"+IDLABEL+\"' class='CBORDER' Style='Position:absolute; visibility:\"+VISIBILITY+\"; left:\"+(LEFT+NS6X)+\"px; top:\"+(TOP+NS6X)+\"px; width:\"+(WIDTH+NS6X)+\"px; height:\"+(HEIGHT+NS6X)+\"px; background-color:\"+MyLayerColor+\"; z-index:\"+ZINDEX+\"; URL(\"+MyURL+\")' \""; var Layer_End="</div>"; LAYER= new Array();//Menu string FOR EACH ITEM MOUSEOVEROUT=new Array();//HOLDS THE LAYERIDs that should have OnMouseOver && OnMouseOut for each menu TOPLEFT=new Array(); //holds Top and left measures for each menu item Parent_Children_ID=new Array(); //Layers Variables var IDLABEL=""; var VISIBILITY="visible"; //default var ZINDEX=0; var MyURL=""; //Position function variables var TopParent=TOP; var LeftParent=LEFT; var ORGWIDTH=WIDTH; Parent_Child_Count=new Array(); //Counts the children of each Main Menu var Main_Parent_Count=0; //Counts the number of the Main menu //Validation Variable Error=false; SortingError=false; //NS CORRECTIONS var NS_Table_Width_Corr=0; var NS_Table_Heigth_Corr=0; var NS6X=0; if(!document.all && document.getElementById) {NS6X=-2;} /******************************************/ //Add Menu item to Menu Array /******************************************/ function AddMenu(ID, Parent_ID, Text, Image, RollImage, URL) { //Validation var valid = "0123456789"; var temp; if(ID.length==0) {alert("The Menu #"+(ii+1)+" does not have an ID assigned"); Error=true;} //check if ID is composed else { //Checking if number for(var j=0;j<ID.length;j++) { temp=ID.substring(j,j+1); if(valid.indexOf(temp)==-1) {alert("The ID of the Menu #"+(ii+1)+" should be a number value"); Error=true;} } } if(Parent_ID.length==0) {alert("The Menu #"+(ii+1)+" does not have a Parent_ID assigned"); Error=true;} //check if Parent_ID is composed of only numbers and dashes "-" else { //Checking if number for(var j=0;j<Parent_ID.length;j++) { temp=Parent_ID.substring(j,j+1); if(valid.indexOf(temp)==-1) {alert("The Parent_ID of the Menu #"+(ii+1)+" should be a number value"); Error=true;} } } if(Text.length==0 && Image.length==0) {alert("The Menu #"+(ii+1)+" should have either an image or a text assigned"); Error=true;} ii++; Menu[i] = new Array(); if(!Error) { for (var j=0; j < 6 ;j++) { if (j==0) { Menu[i][0]=ID; } if (j==1) { Menu[i][1]=Parent_ID; } if (j==2) { Menu[i][2]=Text; } if (j==3) { Menu[i][3]=Image; } if (j==4) { Menu[i][4]=RollImage; } if (j==5) { Menu[i][5]=URL; } } i++; MaxMenuIndex = i; } //Reinitialze Error Value Error=false; } /******************************************/ //Build Menus /******************************************/ function Build() { //Browser Check NS4XCorrection() //Initilize Position Variables for (var j=0;j<MaxMenuIndex;j++) { TOPLEFT[j]=new Array(); Parent_Child_Count[j]=0; MOUSEOVEROUT[j]=new Array(); Parent_Children_ID[j]=new Array(); TOPLEFT[j][0]=0; TOPLEFT[j][1]=0; } //Sort and check menu for errors if(Sort==1) {Sorting();} if(!SortingError) { //Build CSS: Layer Border if (LayerBorderSize!="") {document.writeln("<Style type=\"text/css\">"); document.writeln(".CBORDER {"); document.writeln(" width:"+WIDTH+"px;"); document.writeln(" heigth:"+HEIGHT+"px;"); document.writeln(" border: "+LayerBorderStyle+" "+LayerBorderColor+" "+LayerBorderSize+"px;"); document.writeln("}\n</style>\n"); } //Build each Menu for (i=0; i < MaxMenuIndex;i++) { //Calculates Main Positions, visibility, and determines ID CalcLayerVariables(i); //Global Properties var MyLayerColor=LayerColor; var MyLayerRollColor=LayerRollColor; //Parent Color if(Menu[i][0]==Menu[i][1]) { //BG ROLL Color if (Main_Parent_LayerColor!="" ) { MyLayerColor=Main_Parent_LayerColor; } } //Layer Code LAYER[i]=eval(Layer); } //Add samelevel mouse events SameLevelMouseEvents(); //Build for (var j=0;j<MaxMenuIndex;j++) { var MyFONT=FONT; var MyFONTCOLOR=FONTCOLOR; var MyFONTSIZE=FONTSIZE; var MyFONTSTYLE=FONTSTYLE; var MySTARTCHAR=START_CHAR; //Parent/Children FONT Properties if(Menu[j][0]==Menu[j][1]) { if(Main_Parent_FONT!="") { MyFONT=Main_Parent_FONT; } if(Main_Parent_FONTCOLOR!="") { MyFONTCOLOR=Main_Parent_FONTCOLOR; } if(Main_Parent_FONTSIZE!="") { MyFONTSIZE=Main_Parent_FONTSIZE; } if(Main_Parent_FONTSTYLE!="") { MyFONTSTYLE=Main_Parent_FONTSTYLE; } if(Main_Parent_START_CHAR!="") { MySTARTCHAR=Main_Parent_START_CHAR; } } var MOUSEOVERCODE=""; var MOUSEOUTCODE=""; for (var jj=0;jj<MaxMenuIndex;jj++) { if(MOUSEOVEROUT[j][jj]!=null) { MOUSEOVERCODE=MOUSEOVERCODE+"showHideLayers('"+MOUSEOVEROUT[j][jj]+"','','show');"; MOUSEOUTCODE=MOUSEOUTCODE+"showHideLayers('"+MOUSEOVEROUT[j][jj]+"','','hide');"; } else { MOUSEOVERCODE=MOUSEOVERCODE+"PathRoad("+j+",1)"; MOUSEOUTCODE=MOUSEOUTCODE+"PathRoad("+j+",0)"; break; } } //Linking the entire layer area document.write(LAYER[j]+" onMouseOver=\""+MOUSEOVERCODE+"\" onMouseOut=\""+MOUSEOUTCODE+"\""); if(Menu[j][5]!="") //{document.write(" class=\"location.href='"+Menu[j][5]+"';\"");} {document.write(" onClick=\"location.href='"+Menu[j][5]+"';\"");} document.write(" >"); var LINK=""; //display link if any and setup rollover image if any if(Menu[j][5]!="") { LINK="<A href=\""+Menu[j][5]+"\">"; } //Image Code var ImageCode=""; if(Menu[j][3]!="") { ImageCode=ImageCode+"<IMG Name='Image"+Menu[j][0]+"' SRC='"+Menu[j][3]+"' BORDER=0>"; } //Fonts if any var FONT_PROPERTIES=""; if(MyFONT!="") {FONT_PROPERTIES=" Type='"+MyFONT+"'";} if(MyFONTSIZE!="") {FONT_PROPERTIES=FONT_PROPERTIES+" size='"+MyFONTSIZE+"'";} if(MyFONTCOLOR!=""){FONT_PROPERTIES=FONT_PROPERTIES+" color='"+MyFONTCOLOR+"'";} if(FONT_PROPERTIES!="" ){FONT_PROPERTIES="<FONT "+FONT_PROPERTIES+">";} if(MyFONTSTYLE!=""){FONT_PROPERTIES="<"+MyFONTSTYLE+">"+FONT_PROPERTIES;} //Display IMAGE and TEXT document.write("<table border='0' WIDTH='100%' height='100%' cellpadding='0' cellspacing='0'><tr>"); if(ImageCode!="") { document.write("<td "); if(HALIGN !=""){document.write(" align='"+HALIGN+"' ");} if(VALIGN !=""){document.write(" valign='"+VALIGN+"' ");} document.write(">"); if(LINK!="") {document.write(LINK);} document.write(ImageCode); if(LINK!=""){document.write("</a>");} document.write("</td>"); } if(Menu[j][2]!="") { document.write("<td "); if(HALIGN !=""){document.write(" align='"+HALIGN+"' ");} if(VALIGN !=""){document.write(" valign='"+VALIGN+"' ");} document.write(">"); if(FONT_PROPERTIES!="") {document.write(FONT_PROPERTIES);} document.write(MySTARTCHAR); if(LINK!="") {document.write(LINK);} document.write(Menu[j][2]); if(LINK!=""){document.write("</a>");} if(FONT_PROPERTIES!="") {document.write("</FONT>");} if(MyFONTSTYLE!="") {document.write("</"+MyFONTSTYLE+">");} document.write("</td>"); } document.write("</tr></table>"); //close layer document.writeln(Layer_End); } } } /*********************************************************************************/ ////Sort in-case not ordered and check if every menu parent has a matching index /********************************************************************************/ function Sorting() { //Place all Parents before children for (i=0; i<(MaxMenuIndex-1);i++) { TheParent=Menu[i][1]; for (j=(i+1); j<MaxMenuIndex; j++) { if(Menu[j][0]==TheParent) { for(var f=0;f<6;f++) { temp=Menu[i][f]; Menu[i][f]=Menu[j][f]; Menu[j][f]=temp; } i=0; break; } } } } /******************************************/ //Netscape 4.X Correction /******************************************/ function NS4XCorrection() { if(document.layers) { Layer="\"<layer class='CBORDER' id='\"+IDLABEL+\"' position='absolute' visibility='\"+VISIBILITY+\"' left='\"+LEFT+\"' top='\"+TOP+\"' width='\"+WIDTH+\"' height='\"+HEIGHT+\"' bgcolor='\"+MyLayerColor+\"' z-index='\"+ZINDEX+\"'\" "; Layer_End="</layer>"; } NS_Table_Width_Corr=5; NS_Table_Heigth_Corr=5; } function NS4ImageCorrect(Index) { var NS4FIX=""; if(document.layers) { return "layers.Layer"+Menu[Index][0]+".document."; } return ""; } /******************************************/ //Calculates Menu Item Position /******************************************/ function CalcLayerVariables(Index) { var ID= Menu[Index][0]; var Parent_ID= Menu[Index][1]; //if Main Parent if (ID==Parent_ID) { //Menu Type if(MENU_TYPE==1) { TOP=TopParent; LEFT=(Main_Parent_Count * WIDTH)+ LeftParent - (LayerBorderSize*Main_Parent_Count); } else { TOP=(Main_Parent_Count * HEIGHT)+TopParent - (LayerBorderSize*Main_Parent_Count); LEFT=LeftParent; } TOPLEFT[Index][0]=TOP; TOPLEFT[Index][1]=LEFT; IDLABEL="Layer"+Menu[i][0]; VISIBILITY="visible"; ZINDEX=100; //on top of the first 99 layers in the page! WIDTH=((+ORGWIDTH)-(+LayerBorderSize)); Main_Parent_Count++; } //Child else { //Find Parent ChildofAParent=false; var ParentIndex=0; for (var j=0;j<MaxMenuIndex;j++) { if (Menu[j][0]== Parent_ID) { //collecting Children of Parents for (var g=0;g<MaxMenuIndex;g++) { if(Parent_Children_ID[j][g]==null) { Parent_Children_ID[j][g]=IDLABEL; break; } } if(Menu[j][0]==Menu[j][1]) {ChildofAParent=true;} ParentIndex=j; break; } } //if child of a Main Parent and Menu Type is Horizental if(ChildofAParent && MENU_TYPE==1) { Parent_Child_Count[ParentIndex] = Parent_Child_Count[ParentIndex] + 1; TOP=TopParent+(Parent_Child_Count[ParentIndex] * HEIGHT) - ((Parent_Child_Count[ParentIndex])*LayerBorderSize); LEFT=TOPLEFT[ParentIndex][1]; ZINDEX=101; //on top of the first 100 layers in the page! } //if a child of a child else { Parent_Child_Count[ParentIndex] = Parent_Child_Count[ParentIndex] + 1; TOP=(TOPLEFT[ParentIndex][0])+((Parent_Child_Count[ParentIndex]-1) * HEIGHT) - ((Parent_Child_Count[ParentIndex]-1)*LayerBorderSize) + TOP_OFFSET; LEFT=(WIDTH + TOPLEFT[ParentIndex][1]) - LEFT_OFFSET - LayerBorderSize; if(ChildofAParent){ZINDEX=101;}else{ZINDEX=102;} //on top of the first 100 layers in the page,100 is Main Parent and 101 is Parent } VISIBILITY="hidden"; IDLABEL="Layer"+Menu[Index][0]; TOPLEFT[Index][0]=TOP; TOPLEFT[Index][1]=LEFT; WIDTH=((+ORGWIDTH)-(+LayerBorderSize)); } } /******************************************/ //Generates onMouseOver Event for same //level layers // /******************************************/ function SameLevelMouseEvents() { //1 showHide Main Parent children for(var u=0;u<MaxMenuIndex;u++) { //if Main Parent if (Menu[u][0]==Menu[u][1]) { for(var y=0;y<MaxMenuIndex;y++) { //if not the one being tested and has the same parent if(y!=u && (Menu[y][1]==Menu[u][0])) { for(var z=0;z<MaxMenuIndex;z++) {if(MOUSEOVEROUT[u][z]==null) {MOUSEOVEROUT[u][z]="Layer"+Menu[y][0];break;}} } } } } //2 show hide same Parent menu items for(var u=0;u<MaxMenuIndex;u++) { if (Menu[u][1]!=Menu[u][0]) { for(var z=0;z<MaxMenuIndex;z++) {if(MOUSEOVEROUT[u][z]==null) {MOUSEOVEROUT[u][z]="Layer"+Menu[u][0];break;}} for(var y=0;y<MaxMenuIndex;y++) { //if not the one being tested and has the same parent and bot the parent menu if(y!=u && (Menu[y][1]==Menu[u][1]) && (Menu[y][0]!=Menu[y][1]) ) { for(var z=0;z<MaxMenuIndex;z++) {if(MOUSEOVEROUT[u][z]==null) {MOUSEOVEROUT[u][z]="Layer"+Menu[y][0];break;}} } } } } //3 show hide children of non Main Parent var same=""; for(var u=0;u<MaxMenuIndex;u++) { if (Menu[u][1]!=Menu[u][0]) { for(var y=0;y<MaxMenuIndex;y++) { if ((Menu[u][0]==Menu[y][1]) && (Menu[y][0]!=Menu[y][1]) && y!=u) { for(var z=0;z<MaxMenuIndex;z++) {if(MOUSEOVEROUT[u][z]==null) {MOUSEOVEROUT[u][z]="Layer"+Menu[y][0];same=z;break;}} //Pass Parent's show hide to the children for(var z=0;z<MaxMenuIndex;z++) { if(MOUSEOVEROUT[u][z]!=null) { for(var x=0;x<MaxMenuIndex;x++) { if(MOUSEOVEROUT[y][x]==null) {MOUSEOVEROUT[y][x]=MOUSEOVEROUT[u][z];break;} } } else {break;} } } } } } } /******************************/ //PathColor /******************************/ function PathRoad(Parent,flag) { AtStart=false; while (!AtStart) { //change both layer color and image if(flag==1) //Roll { //Layer's Image: Browser Check if(Main_Parent_LayerRollColor!="" && Menu[Parent][0]==Menu[Parent][1]) {MyLayerRollColor=Main_Parent_LayerRollColor;} else {MyLayerRollColor=LayerRollColor;} if(Menu[Parent][4]!="") { eval("document."+NS4ImageCorrect(Parent)+"images.Image"+Menu[Parent][0]+".src='"+Menu[Parent][4]+"'"); } //Layer Color: Browser Check if(document.layers) { eval("changeProp('Layer"+Menu[Parent][0]+"','','document.bgColor','"+MyLayerRollColor+"','LAYER')"); } else if(document.getElementById || document.all) { eval("changeProp('Layer"+Menu[Parent][0]+"','','style.backgroundColor','"+MyLayerRollColor+"','DIV')"); } } else //Origin Image and Color { //Layer's Image: Browser Check if(Main_Parent_LayerColor!="" && Menu[Parent][0]==Menu[Parent][1]) {MyLayerColor=Main_Parent_LayerColor;} else {MyLayerColor=LayerColor;} if(Menu[Parent][3]!="") { eval("document."+NS4ImageCorrect(Parent)+"images.Image"+Menu[Parent][0]+".src='"+Menu[Parent][3]+"'"); } //Layer Color: Browser Check if(document.layers){eval("changeProp('Layer"+Menu[Parent][0]+"','','document.bgColor','"+MyLayerColor+"','LAYER')");} else if(document.getElementById || document.all){eval("changeProp('Layer"+Menu[Parent][0]+"','','style.backgroundColor','"+MyLayerColor+"','DIV')");} } if(Menu[Parent][0] == Menu[Parent][1]) { AtStart=true; } Parent=INDEXof(Menu[Parent][1]); } } //Find the index of the Menu Array with the Parent: Parent function INDEXof(Parent) { for(var j=0;j<MaxMenuIndex;j++) { if(Menu[j][0]==Parent) { return (j); } } } --- NEW FILE: jscript_functions.php --- <?php function jscript_newwindow() { print("<SCRIPT LANGUAGE=\"JavaScript\">\n"); print(" <!-- Begin\n"); print(" function NewWindow(mypage, myname, w, h, scroll) {\n"); print(" var winl = (screen.width - w) / 2;\n"); print(" var wint = (screen.height - h) / 2;\n"); print(" winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'\n"); print(" win = window.open(mypage, myname, winprops)\n"); print(" if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }\n"); print(" }\n"); print(" // End -->\n"); print("</SCRIPT>\n"); } function jscript_topmenu_head() { print("<script language=\"javascript\" src=\"config.js\"></script>\n"); print("<script language=\"javascript\" src=\"menu.js\"></script>\n"); } function jscript_topmenu_body() { print("<SCRIPT LANGUAGE=\"JavaScript\">\n"); print(" <!--\n"); print(" AddMenu(\"1\" , \"1\" , \"File\" , \"\" , \"\" , \"\");\n"); print(" AddMenu(\"2\" , \"1\" , \"Show Incident Cat's\" , \"\" , \"\" , \"incident_categories.php\"); \n"); print(" AddMenu(\"3\" , \"1\" , \"About\" , \"\" , \"\" , \"about.php\");\n"); print(" AddMenu(\"4\" , \"4\" , \"Query\" , \"\" , \"\" , \"\");\n"); print(" AddMenu(\"5\" , \"4\" , \"Query Event Table\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"6\" , \"4\" , \"Query Session Table\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"7\" , \"4\" , \"Standard Queries\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"8\" , \"4\" , \"Query Builder\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"9\" , \"4\" , \"Query By Category >>\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"10\", \"9\" , \"Cat I:\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"11\", \"9\" , \"Cat II:\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"12\", \"9\" , \"Cat III:\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"13\", \"9\" , \"Cat IV:\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"14\", \"9\" , \"Cat V:\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"15\", \"9\" , \"Cat VI:\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"16\", \"9\" , \"Cat VII:\" , \"\" , \"\" , \"http://www.javascriptsource.com\"); \n"); print(" AddMenu(\"17\", \"4\" , \"Show Database Tables\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"18\", \"18\" , \"Reports\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"19\", \"18\" , \"Export to CSV >>\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"20\", \"19\" , \"Summary >>\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"21\", \"20\" , \"Normal\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"22\", \"20\" , \"Santanized\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"23\", \"19\" , \"Details >>\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"24\", \"23\" , \"Normal\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"25\", \"23\" , \"Santanized\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"26\", \"18\" , \"Email Events >>\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"27\", \"26\" , \"Summary >>\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"28\", \"27\" , \"Normal\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"29\", \"27\" , \"Santanized\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"30\", \"26\" , \"Details >>\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"31\", \"30\" , \"Normal\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"32\", \"30\" , \"Santanized\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"33\" , \"33\" , \"Database\" , \"\" , \"\" , \"\");\n"); print(" AddMenu(\"34\" , \"33\" , \"Purge Session Data\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" AddMenu(\"35\" , \"33\" , \"Optimize Tables\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); //print(" AddMenu(\"36\" , \"36\" , \"Help\" , \"\" , \"\" , \"\");\n"); //print(" AddMenu(\"37\" , \"36\" , \"About\" , \"\" , \"\" , \"http://www.javascriptsource.com\");\n"); print(" Build();\n"); print(" --> \n"); print("</SCRIPT>\n"); } Index: index.php =================================================================== RCS file: /cvsroot/sguil/sguil/web/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 4 Apr 2004 19:17:23 -0000 1.3 --- index.php 5 Apr 2004 10:02:33 -0000 1.4 *************** *** 18,23 **** <meta name="copyright" content="Copyright 2004 Michael Boman <mb...@us...>. All Rights Reserved."> </head> ! <frameset rows="50,50%,50%"> ! <frame src="tabs.php" name="tabbar"> <frame name="alerts" src="alerts.php?aggregate=1"> <frame name="lookup" src="lookup_frameset.php"> --- 18,22 ---- <meta name="copyright" content="Copyright 2004 Michael Boman <mb...@us...>. All Rights Reserved."> </head> ! <frameset rows="50%,50%"> <frame name="alerts" src="alerts.php?aggregate=1"> <frame name="lookup" src="lookup_frameset.php"> Index: sguil_functions.php =================================================================== RCS file: /cvsroot/sguil/sguil/web/sguil_functions.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** sguil_functions.php 4 Apr 2004 21:46:52 -0000 1.25 --- sguil_functions.php 5 Apr 2004 10:02:33 -0000 1.26 *************** *** 143,147 **** if ( ( getservbyport( $row['src_port'] ,getprotobynumber($row['ip_proto']))=="") || ( getprotobynumber($row['ip_proto']) != 'udp' && getprotobynumber($row['ip_proto']) != 'tcp' )) { print(" <td> " . $row['src_port'] . " </td>"); ! print(" <td> </td>\n"); } else { print(" <td> " . $row['src_port'] ." </td>"); --- 143,147 ---- if ( ( getservbyport( $row['src_port'] ,getprotobynumber($row['ip_proto']))=="") || ( getprotobynumber($row['ip_proto']) != 'udp' && getprotobynumber($row['ip_proto']) != 'tcp' )) { print(" <td> " . $row['src_port'] . " </td>"); ! print(" <td> -- </td>\n"); } else { print(" <td> " . $row['src_port'] ." </td>"); *************** *** 153,157 **** if ( (getservbyport ( $row['dst_port'] , getprotobynumber($row['ip_proto']))=="") || ( getprotobynumber($row['ip_proto']) != 'udp' && getprotobynumber($row['ip_proto']) != 'tcp' )) { print(" <td> <a href=http://www.dshield.org/port_report.php?port=" .$row['dst_port']. "&days=70 target=dshield>" . $row['dst_port'] . "</a> </td>"); ! print(" <td> </td>\n"); } else { print(" <td> <a href=http://www.dshield.org/port_report.php?port=" .$row['dst_port']. " target=dshield>" . $row['dst_port'] ." </td>"); --- 153,157 ---- if ( (getservbyport ( $row['dst_port'] , getprotobynumber($row['ip_proto']))=="") || ( getprotobynumber($row['ip_proto']) != 'udp' && getprotobynumber($row['ip_proto']) != 'tcp' )) { print(" <td> <a href=http://www.dshield.org/port_report.php?port=" .$row['dst_port']. "&days=70 target=dshield>" . $row['dst_port'] . "</a> </td>"); ! print(" <td> -- </td>\n"); } else { print(" <td> <a href=http://www.dshield.org/port_report.php?port=" .$row['dst_port']. " target=dshield>" . $row['dst_port'] ." </td>"); Index: sessions.php =================================================================== RCS file: /cvsroot/sguil/sguil/web/sessions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sessions.php 3 Apr 2004 15:50:24 -0000 1.2 --- sessions.php 5 Apr 2004 10:02:33 -0000 1.3 *************** *** 13,16 **** --- 13,17 ---- require("sguil_functions.php"); + require("std_functions.php"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> *************** *** 20,28 **** <meta name="author" content="Michael Boman"> <meta name="copyright" content="Copyright 2004 Michael Boman <mb...@us...>. All Rights Reserved."> ! <?php include('css.php'); ?> </head> <body> <?php show_sessions($_REQUEST["query"]); ?> --- 21,33 ---- <meta name="author" content="Michael Boman"> <meta name="copyright" content="Copyright 2004 Michael Boman <mb...@us...>. All Rights Reserved."> ! <?php ! include('css.php'); ! jscript_topmenu_head(); ! ?> </head> <body> <?php + navbar(); show_sessions($_REQUEST["query"]); ?> Index: about.php =================================================================== RCS file: /cvsroot/sguil/sguil/web/about.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** about.php 4 Apr 2004 17:12:49 -0000 1.2 --- about.php 5 Apr 2004 10:02:32 -0000 1.3 *************** *** 12,15 **** --- 12,17 ---- */ + require("std_functions.php"); + ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> *************** *** 19,26 **** <meta name="copyright" content="Copyright 2004 Michael Boman <mb...@us...>. All Rights Reserved."> <?php ! include('css.php'); ?> </head> <body> <h1>Credits</h1> <ul> --- 21,32 ---- <meta name="copyright" content="Copyright 2004 Michael Boman <mb...@us...>. All Rights Reserved."> <?php ! include('css.php'); ! jscript_topmenu_head(); ?> </head> <body> + <?php + navbar(); + ?> <h1>Credits</h1> <ul> --- NEW FILE: config.js --- //Author: Younes Bouab //Date: 05-02-02 //Title: Menu Configuration: Config.js // //Copyright: Younes Bouab 2001 //Technical Support: bouaby@SUPEReDITION.com // ///////////////////////////////////////////////////////////////////////////////////// //Copyright (c) 2002 Younes Bouab (www.SUPEReDITION.com) Version 1.0 // //Eperience the DHTML Menu - Get it at www.SUPEReDITION.com // //This script can be used freely as long as all copyright messages are intact. // //Menu HomePage: http://www.superedition.com/Main.asp?Page=Tutorials&query=Javascript ////////////////////////////////////////////////////////////////////////////////////// //Menu Configuration File ///////////////////////////////////////////////// /////You can change the value of a variable /////below or turn it off by making it equal "" /////to suit your needs, but you should not /////delete any variable. /////////////////////////////////////////////// /**********************************************/ //Menu Type: Do Not Change! /**********************************************/ MENU_TYPE=1; //1: Horizental //2: Vertical Sort=0; //Sort: When set to 1, the //menu items are sorted according //to the index value. This feature //can be used when a server side //language (asp. jsp. php,...) //is used to generate the menu items //from a database and they are not always //in order. /**********************************************/ //Menu Starting point /**********************************************/ TOP=3; LEFT=3; /**********************************************/ //Menu item Dimension /**********************************************/ WIDTH=132; HEIGHT=20; /**********************************************/ //Layers Alignment /**********************************************/ HALIGN="LEFT"; VALIGN="MIDDLE"; /**********************************************/ //Global Menu Settings for all /**********************************************/ //Main Menu Items LayerColor="#FFFFFF"; LayerRollColor="#CCCCCC"; FONT="verdana"; FONTSIZE="1"; FONTSTYLE="" // "": Normal, "B": Bold, "I": Italic FONTCOLOR="#000033"; ROLL_FONTCOLOR="#000000"; START_CHAR="-"; //Starting Character /**********************************************/ //Main Parent Settings: Optional // leave empty "", if you would like to use // the Global Menu Settings above /**********************************************/ Main_Parent_LayerColor=""; Main_Parent_LayerRollColor=""; Main_Parent_FONT="verdana"; Main_Parent_FONTSTYLE=""; Main_Parent_FONTSIZE=""; Main_Parent_FONTCOLOR=""; Main_Parent_ROLL_FONTCOLOR=""; Main_Parent_START_CHAR=" >> "; /**********************************************/ //Layer Border Properties /**********************************************/ LayerBorderSize="1"; LayerBorderStyle="solid"; LayerBorderColor="#000000"; /**********************************************/ //Menu Children Offsets /**********************************************/ TOP_OFFSET=0; LEFT_OFFSET=0; --- tabs.php DELETED --- |