Ejemplo n.º 1
0
}
$security_report = new Security_report();
if (!strcmp($target, "ip_src") || !strcmp($target, "src_ip")) {
    $title = _("TOP ATTACKER");
    $sufix = "er";
    $color = "#FF0000";
    //$color = "navy";
    //$color2 = "lightsteelblue";
    $titlecolor = "darkblue";
} elseif (!strcmp($target, "ip_dst") || !strcmp($target, "dst_ip")) {
    $title = _("TOP ATTACKED");
    $sufix = "ed";
    $color = "#FAC800";
    $titlecolor = "darkred";
}
$shared = new DBA_shared(GET('shared'));
$SS_Attack = $shared->get("SS_Attack" . $sufix . "Host{$runorder}");
$SA_Attack = $shared->get("SA_Attack" . $sufix . "Host{$runorder}");
if ($type == "event" && is_array($SS_Attack) && count($SS_Attack) > 0) {
    $list = $SS_Attack;
} elseif ($type == "alarm" && is_array($SA_Attack) && count($SA_Attack) > 0) {
    $list = $SA_Attack;
} else {
    $list = $security_report->AttackHost($target, $limit, $type, $date_from, $date_to);
}
$datax = $datay = array();
$gorientation = "h";
foreach ($list as $key => $l) {
    if ($key >= 10) {
        // ponemos un límite de resultados para la gráfica
        //break;
require_once 'av_init.php';
Session::logcheck("analysis-menu", "IncidentsReport");
$by = GET('by');
ossim_valid($by, OSS_ALPHA, OSS_SPACE, OSS_SCORE, 'illegal:' . _("Target"));
if (ossim_error()) {
    die(ossim_error());
}
// Define colors
$color_list = array('#D6302C', '#3933FC', 'green', 'yellow', 'pink', '#40E0D0', '#00008B', '#800080', '#FFA500', '#A52A2A', '#228B22', '#D3D3D3');
$conf = $GLOBALS["CONF"];
$jpgraph = $conf->get_conf("jpgraph_path");
require "{$jpgraph}/jpgraph.php";
require "{$jpgraph}/jpgraph_bar.php";
$db = new ossim_db();
$conn = $db->connect();
$shared = new DBA_shared(GET('shared'));
if ($by == "ticketsByTypePerMonth") {
    $titley = _("Month") . '-' . _("Year");
    $titlex = _("Num. Tickets");
    $title = '';
    $width = 650;
    $user = $shared->get("TicketsStatus4_user");
    $assets = $shared->get("TicketsStatus4_assets");
    $final_values = array();
    $ticket_by_type_per_month = Incident::incidents_by_type_per_month($conn, $assets, $user);
    if (is_array($ticket_by_type_per_month) && !empty($ticket_by_type_per_month)) {
        foreach ($ticket_by_type_per_month as $event_type => $months) {
            $final_values[$event_type] = implode(",", $months);
        }
        $event_types = array_keys($ticket_by_type_per_month);
    }
Ejemplo n.º 3
0
if ($runorder == 0) {
    $runorder = "";
}
$multiple_colors = intval(GET('colors'));
if (ossim_error()) {
    die(ossim_error());
}
/* hosts to show */
if (empty($limit) || $limit <= 0 || $limit > 10) {
    $limit = 10;
}
if (empty($type)) {
    $type = "event";
}
$security_report = new Security_report();
$shared = new DBA_shared(GET('shared'));
$SS_TopEvents = $shared->get("SS_TopEvents{$runorder}");
$SA_TopAlarms = $shared->get("SA_TopAlarms{$runorder}");
if ($type == "event" && is_array($SS_TopEvents) && count($SS_TopEvents) > 0) {
    $list = $SS_TopEvents;
} elseif ($type == "alarm" && is_array($SA_TopAlarms) && count($SA_TopAlarms) > 0) {
    $list = $SA_TopAlarms;
} else {
    $list = $security_report->Events($limit, $type, $date_from, $date_to);
}
$data_pie = array();
$legend = $data = array();
foreach ($list as $key => $l) {
    if ($key >= 10) {
        // ponemos un límite de resultados para la gráfica
        break;
Ejemplo n.º 4
0
$runorder = intval(GET('runorder'));
if ($runorder == 0) {
    $runorder = "";
}
if (ossim_error()) {
    die(ossim_error());
}
/* ports to show */
if (empty($limit)) {
    $limit = 10;
}
if (empty($type)) {
    $type = "event";
}
$security_report = new Security_report();
$shared = new DBA_shared(GET('shared'));
$SS_UsedPorts = $shared->get("SS_UsedPorts{$runorder}");
$SA_UsedPorts = $shared->get("SA_UsedPorts{$runorder}");
if ($type == "event" && is_array($SS_UsedPorts) && count($SS_UsedPorts) > 0) {
    $list = $SS_UsedPorts;
} elseif ($type == "alarm" && is_array($SA_UsedPorts) && count($SA_UsedPorts) > 0) {
    $list = $SA_UsedPorts;
} else {
    $list = $security_report->Ports($limit, $type, $date_from, $date_to);
}
$datax = $datay = array();
$gorientation = "h";
foreach ($list as $key => $l) {
    if ($key >= 10) {
        // ponemos un limite de resultados para la grafica
        //break;
Ejemplo n.º 5
0
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
Session::logcheck("analysis-menu", "EventsForensics");
$conf = $GLOBALS["CONF"];
$jpgraph = $conf->get_conf("jpgraph_path");
require "{$jpgraph}/jpgraph.php";
require "{$jpgraph}/jpgraph_line.php";
require "{$jpgraph}/jpgraph_scatter.php";
$geo_year = GET("year");
$geo_month = GET("month");
$user = GET("user");
$shared = new DBA_shared(GET('shared'));
$runorder = intval(GET('runorder'));
if ($runorder == 0) {
    $runorder = "";
}
$ips = $shared->get("geoips" . $runorder);
if (!is_array($ips)) {
    $ips = array();
}
#Resolution de la database:
$xdb = 620;
$ydb = 310;
# Resolution de l'image
$ximg = 1264;
$yimg = 694;
# Rapport :
Ejemplo n.º 6
0
define('COLOR9', '#FFA500');
define('COLOR10', '#A52A2A');
define('COLOR11', '#228B22');
define('COLOR12', '#D3D3D3');
require_once 'av_init.php';
require_once 'ossim_conf.inc';
Session::logcheck("analysis-menu", "EventsForensics");
$conf = $GLOBALS["CONF"];
$jpgraph = $conf->get_conf("jpgraph_path");
require_once "{$jpgraph}/jpgraph.php";
require_once "{$jpgraph}/jpgraph_line.php";
$runorder = intval(GET('runorder'));
if ($runorder == 0) {
    $runorder = "";
}
$shared = new DBA_shared(GET('shared'));
$data = $shared->get('data' . $runorder);
$legend = array();
$values = array();
foreach ($data as $k => $aux_data) {
    $legend[] = $aux_data['label'];
    $values[] = $aux_data['value'];
}
// Setup the graph.
$graph = new Graph(730, 180, "auto");
$graph->SetScale("textlin");
$graph->SetMargin(60, 50, 15, 25);
$graph->SetMarginColor("#ffffff");
$graph->xaxis->SetTickLabels($legend);
$graph->SetColor("#fafafa");
$graph->SetFrame(true, '#ffffff', 0);
Ejemplo n.º 7
0
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
****************************************************************************/
/**
* Class and Function List:
* Function list:
* Classes list:
*/
require_once 'classes/SecurityReport.inc';
require_once 'classes/Security.inc';
require_once 'classes/Util.inc';
//Session::logcheck("MenuReports", "ReportsSecurityReport");
Session::logcheck("MenuEvents", "EventsForensics");
$shared = new DBA_shared(GET('shared'));
$ips = $shared->get("geoips");
if (!is_array($ips)) {
    $ips = array();
}
$data_pie = array();
$legend = $data = array();
foreach ($ips as $country => $val) {
    $cou = explode(":", $country);
    $val = round($val, 1);
    $legend[] = $cou[1];
    $data[] = $val;
}
$total = array_sum($data);
$labels = array();
$tlabels = array();