Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I'm preparing a presentation on a security issue and want to include a demonstration. It won't be in real time, I just need to show some pictures of the results.

I have some VPSes that will perform a tcp or udp flood attack simiultanesly on another specific server (Debian/Ubuntu), all of them owned by me of course. Something like a tiny scale DDoS attack.

I want some suggestions for existing tools or new programs to be installed on the target server (Debian/Ubuntu server distro) that can monitor and produce traffic graphs and related charts so I can present the network state before and after the attack.

I don't want to mitigate or stop the attack, but to show the results of it and if possible in a fancy way.

I'd appreciate every idea and suggestion, thanks.

share|improve this question
    
You can try munin to do it, so you can see complete server graph while the attack is performed and how OS is behaving. Result depends how well have you setup your VPS. –  Andrew Smith Jul 25 '12 at 12:41
    
Etherape is nice for showing connection data. –  symcbean Jul 25 '12 at 22:35
add comment

1 Answer

PhpChart(http://phpchart.net/) if you got Apache server.


pChart(http://pchart.sourceforge.net/) if you are willing to compile php to work with graphic lib


MRTG if you just want a png / jpg files to put in simple html web page.


Simple bash script to count specific trafic with tcpdump. Send output to the file and count lines to pass to the rendering engine.

I use something like this:

#!/bin/bash


/usr/local/sbin/tcpdump -l icmp >> icmp.log &

pid=$!

# will monitor the traffic for 60 seconds 
sleep 60
kill -9 $pid &> /dev/null

packets=$( cat icmp.log | wc -l );
echo $packets
rm icmp.log

This will monitor the icmp traffic for 60 seconds then echo the number of packets. Pass the output to the file and make the chosen rendering engine generate the picture.


<?php
require_once("../phpChartX/conf.php");
?>
<!DOCTYPE HTML>
<html>
<head>
<script src="jquery.js"></script>
<script>
$(document).ready(function(){
    $("div.pg_notify").css("display","none");
});

</script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>tcpdump</title>
</head>
    <body>
        <div><span> </span><span id="info1b"></span></div>


<?php

$max=0;
$file=file_get_contents("scripts/icmp.1h");

$file=explode( "\n" , $file );

$o1=explode(" ", $file[0]);
$o2=explode(" ", $file[1]);
$o3=explode(" ", $file[2]);
$o4=explode(" ", $file[3]);
$o5=explode(" ", $file[4]);
$o6=explode(" ", $file[5]);
$o7=explode(" ", $file[6]);
$o8=explode(" ", $file[7]);
$o9=explode(" ", $file[8]);
$o10=explode(" ", $file[9]);
$o11=explode(" ", $file[10]);
$o12=explode(" ", $file[11]);
$o13=explode(" ", $file[12]);
$o14=explode(" ", $file[13]);
$o15=explode(" ", $file[14]);
$o16=explode(" ", $file[15]);
$o17=explode(" ", $file[16]);
$o18=explode(" ", $file[17]);
$o19=explode(" ", $file[18]);
$o20=explode(" ", $file[19]);
$o21=explode(" ", $file[20]);
$o22=explode(" ", $file[21]);
$o23=explode(" ", $file[22]);
$o24=explode(" ", $file[23]);

//$all=array( $o1, $o2, $o3, $o4, $o5, $o6, $o7, $o8, $o9, $o10, $o11, $o12, $o13, $o14, $o15, $o16, $o17, $o18, $o19, $o20, $o21, $o22, $o23, $o24 );
$all=array( $o24, $o23, $o22, $o21, $o20, $o19, $o18, $o17, $o16, $o15, $o14, $o13, $o12, $o11, $o10, $o9, $o8, $o7, $o6, $o5, $o4, $o3, $o2, $o1 );

for ( $i = 0; $i < 23; $i++ )
{
        if ( $all[$i][1] > $max  )
        {
                $max=$all[$i][1];
        }
}
$max=$max+2;


    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //Line 1 Example
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


    $pc = new C_PhpChartX(array(
                                array(
                                        array(24-$o1[0], $o1[1]),
                                        array(24-$o2[0], $o2[1]),
                                        array(24-$o3[0], $o3[1]),
                                        array(24-$o4[0], $o4[1]),
                                        array(24-$o5[0], $o5[1]),
                                        array(24-$o6[0], $o6[1]),
                                        array(24-$o7[0], $o7[1]),
                                        array(24-$o8[0], $o8[1]),
                                        array(24-$o9[0], $o9[1]),
                                        array(24-$o10[0], $o10[1]),
                                        array(24-$o11[0], $o11[1]),
                                        array(24-$o12[0], $o12[1]),
                                        array(24-$o13[0], $o13[1]),
                                        array(24-$o14[0], $o14[1]),
                                        array(24-$o15[0], $o15[1]),
                                        array(24-$o16[0], $o16[1]),
                                        array(24-$o17[0], $o17[1]),
                                        array(24-$o18[0], $o18[1]),
                                        array(24-$o19[0], $o19[1]),
                                        array(24-$o20[0], $o20[1]),
                                        array(24-$o21[0], $o21[1]),
                                        array(24-$o22[0], $o22[1]),
                                        array(24-$o23[0], $o23[1]),

                                )),'chart1');

    $pc->set_title(array('text'=>'icmp'));
    $pc->set_axes(array('yaxis'=> array('numberTicks'=>round(($max+1)/2),'min'=>0,'max'=>$max,'show'=>'false'),'xaxis'=> array('min'=>1,'max'=>23,'numberTicks'$
$pc->set_grid(array('background'=>'#fefbf3','borderWidth'=>2.5));
$pc->add_series(array('color'=>'rgba(68, 124, 147, 0.7)'));
$pc->set_series_default(array('fill'=>true,'shadow'=>false,'showMarker'=>false));
    $pc->draw(600,200);


?>

    </body>
</html>

This is what i use to render the data (phpChart). It has 60 markers - one for each minute. Hope this will help.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.