<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gHacks technology news &#187; denial of service</title>
	<atom:link href="http://www.ghacks.net/tag/denial-of-service/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Tue, 24 Nov 2009 23:31:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Netstat: Quick and useful Linux network information</title>
		<link>http://www.ghacks.net/2009/07/12/netstat-quick-and-useful-linux-network-information/</link>
		<comments>http://www.ghacks.net/2009/07/12/netstat-quick-and-useful-linux-network-information/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 20:18:41 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Tutorials Advanced]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[denial of service]]></category>
		<category><![CDATA[DOS attack]]></category>
		<category><![CDATA[netstat]]></category>
		<category><![CDATA[network statistics]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=14352</guid>
		<description><![CDATA[If you use Linux (especially on a server) it is important to be able to have plenty of information at the tips of your fingers. This includes all types of information. One of the first places to look for for information is /var/log, however that can be cumbersome and doesn&#8217;t always give you the specific [...]]]></description>
			<content:encoded><![CDATA[<p>If you use Linux (especially on a server) it is important to be able to have plenty of information at the tips of your fingers. This includes all types of information. One of the first places to look for for information is <strong>/var/log</strong>, however that can be cumbersome and doesn&#8217;t always give you the specific networking information you need.</p>
<p>There is one tool that is ready to hand you much of the networking information you will need from your server. That tool? Netstat. The netstat tool prints out (on the command line) information about the Linux networking subsystem. With this tool you can get valuable information about: Open sockets, routing tables,  multicast group membership, network interfaces, masqueraded connections, and protocol statistics. Each type of information can also be narrowed with the help of options.</p>
<p>In this article you will learn how to be able to make use of the netstat tool, so you can have as much networking information as you need at your fingertips.</p>
<p><span id="more-14352"></span><strong>Basic structure</strong></p>
<p>The basic netstat command looks like:</p>
<p><em>netstat ARGUMENT OPTIONS</em></p>
<p>Where <em>ARGUMENT</em> is the type of address family you want information about and <em>OPTIONS</em> is the optional option(s) that will specify the type of information you get returned.</p>
<p>Now let&#8217;s break this command down into address families.</p>
<p><strong>Open Sockets</strong></p>
<p>This is the easiest way to use <em>netstat</em>. If you issue the command without any arguments you will get a list of all sockets that are currently listening on a system. The output would look something like:</p>
<p><code>Proto RefCnt Flags Type       State         I-Node   Path<br />
unix  3      [ ]   STREAM     CONNECTED     205824   /tmp/.X11-unix/X0<br />
unix  3      [ ]   STREAM     CONNECTED     205823<br />
unix  3      [ ]   STREAM     CONNECTED     203856   /tmp/.X11-unix/X0<br />
unix  3      [ ]   STREAM     CONNECTED     203855</code></p>
<p>As you can see, from the output above, the information isn&#8217;t terribly useful. We can make it much more useful with a few options. What we want to do is tell netstat to give us output for specific applications that are listening for tcp connections. To do this we issue the command:</p>
<p><em>netstat &#8211;tcp &#8211;listening &#8211;programs</em></p>
<p>The output for this command would look something like:</p>
<p><code>Proto Recv-Q Send-Q Local Address Foreign Address Stat    PID/Program<br />
tcp   0      0      *:ssh         *:*             LISTEN  25469/sshd<br />
tcp   0      0      *:httpd       *:*             LISTEN  26754/httpd<br />
tcp   0           0           localhost:ipp *:*             LISTEN  -<br />
</code></p>
<p>Now you can actually see some useful information. In the above output you can see that both sshd and httpd are listening for incoming connections. The above is just a snippet of what the output can look like. What is very handy about this command is it will show you if there is a command or local address listening for incoming connections that shouldn&#8217;t be listening. If you find an application that shouldn&#8217;t be listening, kill it to be safe.<br />
<strong>Route</strong></p>
<p>Netstat is able to quickly print your machines&#8217; kernel routing table with the command:</p>
<p><em>netstat -r</em></p>
<p>The output of this command will look like:</p>
<p><code>Kernel IP routing table<br />
Destination  Gateway     Genmask         Flags   MSS Window  irtt Iface</code><code> 192.168.1.0  *           255.255.255.0   U       0 0         0    eth0<br />
default      192.168.1.1 0.0.0.0         UG      0 0         0    eth0</code></p>
<p><strong>Statistics</strong></p>
<p>This is one of the handier of the netstat tools. With this you can find out exactly the statics for each protocol. The basic command structure is:</p>
<p><em>netstat &#8211;statistics</em></p>
<p>which will give you far more information than you want. Say, you only want to see statistics on the TCP protocol. For this you can issue the command:</p>
<p><em>netstat -t &#8211;statistics</em></p>
<p>The output to the above command will include information such as:</p>
<p><code>Tcp:<br />
4343 active connections openings<br />
8 passive connection openings<br />
5 failed connection attempts<br />
178 connection resets received<br />
6 connections established<br />
59075 segments received<br />
60033 segments send out<br />
76 segments retransmited<br />
0 bad segments received.<br />
303 resets sent</code></p>
<p>Or you could get information on UDP as well with the command:</p>
<p><em>netstat -u &#8211;statistics</em></p>
<p>Which would give you similar output for the UDP protocol.</p>
<p><strong>Get creative</strong></p>
<p>What if you wanted to see all unique IP addresses connected to a server? You can do that with netstat (and the help of a few other tools) like so:</p>
<p><code>netstat -nat | awk '{ print $5}' | cut -d: -f1 | sed -e '/^$/d' | uniq</code></p>
<p>The output of the above command would depend upon how much traffic your machine/server is getting. But it will include all unique IP addresses attempting to connect to your server.</p>
<p>What about checking to see if your server is under a DOS attack? You can do that with netstat like this:<br />
<code>netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n</code></p>
<p>The above command will list out the IP addresses requesting the highest amount of connections to your server. If you see a number that is far higher than it should be, you most likely are under a Denial of Service attack.</p>
<p><strong>Final thoughts</strong></p>
<p>As you can see the <em>netstat</em> command is quite useful. And its usefulness is only limited to your creativity. Have you discovered a handy use for netstat? If so, share it with your fellow ghacks readers.</p>
<p><span><span style="margin-left: 0px ! important"><code></code><code><br />
</code></span></span></p>

	Tags: <a href="http://www.ghacks.net/tag/denial-of-service/" title="denial of service" rel="tag">denial of service</a>, <a href="http://www.ghacks.net/tag/dos-attack/" title="DOS attack" rel="tag">DOS attack</a>, <a href="http://www.ghacks.net/tag/netstat/" title="netstat" rel="tag">netstat</a>, <a href="http://www.ghacks.net/tag/network-statistics/" title="network statistics" rel="tag">network statistics</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/10/18/troubleshoot-networking-problems-with-gnomes-nettools/" title="Troubleshoot networking problems with GNOME&#8217;s Nettools (October 18, 2009)">Troubleshoot networking problems with GNOME&#8217;s Nettools</a> (0)</li>
	<li><a href="http://www.ghacks.net/2008/05/30/revision3-ceo-on-dos-and-mediadefender/" title="Revision3 CEO on DOS and MediaDefender (May 30, 2008)">Revision3 CEO on DOS and MediaDefender</a> (3)</li>
	<li><a href="http://www.ghacks.net/2008/10/04/network-monitoring-software-networx/" title="Network Monitoring Software NetWorx (October 4, 2008)">Network Monitoring Software NetWorx</a> (12)</li>
	<li><a href="http://www.ghacks.net/2005/12/08/netstat-tutorial/" title="Netstat Tutorial (December 8, 2005)">Netstat Tutorial</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/07/12/netstat-quick-and-useful-linux-network-information/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Revision3 CEO on DOS and MediaDefender</title>
		<link>http://www.ghacks.net/2008/05/30/revision3-ceo-on-dos-and-mediadefender/</link>
		<comments>http://www.ghacks.net/2008/05/30/revision3-ceo-on-dos-and-mediadefender/#comments</comments>
		<pubDate>Thu, 29 May 2008 22:42:50 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[denial of service]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[media defender]]></category>
		<category><![CDATA[revision3]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=4474</guid>
		<description><![CDATA[The website and shows at Revision3 were not accessible through the Memorial Day Weekend due to a denial of service attack (DOS) against their servers. Revision3 CEO Jim Louderback wrote a well written detailed response in the company blog that explained the facts behind the attack on the servers. 
The story goes like this. Media [...]]]></description>
			<content:encoded><![CDATA[<p>The website and shows at Revision3 were not accessible through the Memorial Day Weekend due to a denial of service attack (DOS) against their servers. Revision3 CEO <a href="http://revision3.com/blog/2008/05/29/inside-the-attack-that-crippled-revision3">Jim Louderback</a> wrote a well written detailed response in the company blog that explained the facts behind the attack on the servers. </p>
<p>The story goes like this. Media Defender, the company that is regularly hired by RIAA, MIAA and other entertainment companies was using a backdoor in the Revision3 torrent tracker for their own purposes. One has to understand that the torrent tracker is being used to spread the legit releases of the company to the public. Well the service was exploited and Jim unfortunately fails to mention what Media Defender has used the service for. </p>
<p>The problems began when Revision3 discovered the activity eventually and put a stop to its use. The Media Defender server however responded in a rather irregular fashion flooding the Revision3 servers with 8000 Syn requests per second which eventually brought the server and the rest of the infrastructure down for the weekend.</p>
<p><span id="more-4474"></span>It&#8217;s hard to say if the Denial of Service attack on the server was an automatic reaction of the Media Defender servers and Jim Louderback chooses his words carefully. The FBI is investigating the incident, no word yet if Revision3 will sue Media Defender as well.</p>

	Tags: <a href="http://www.ghacks.net/tag/denial-of-service/" title="denial of service" rel="tag">denial of service</a>, <a href="http://www.ghacks.net/tag/dos/" title="dos" rel="tag">dos</a>, <a href="http://www.ghacks.net/tag/media-defender/" title="media defender" rel="tag">media defender</a>, <a href="http://www.ghacks.net/tag/revision3/" title="revision3" rel="tag">revision3</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2007/09/20/the-media-defender-story-continues/" title="The Media Defender Story continues (September 20, 2007)">The Media Defender Story continues</a> (0)</li>
	<li><a href="http://www.ghacks.net/2009/07/12/netstat-quick-and-useful-linux-network-information/" title="Netstat: Quick and useful Linux network information (July 12, 2009)">Netstat: Quick and useful Linux network information</a> (6)</li>
	<li><a href="http://www.ghacks.net/2007/09/16/media-defender-email-leak/" title="Media Defender email leak (September 16, 2007)">Media Defender email leak</a> (2)</li>
	<li><a href="http://www.ghacks.net/2006/01/23/from-doswindows-to-linux-howto/" title="From Dos/Windows to Linux Howto (January 23, 2006)">From Dos/Windows to Linux Howto</a> (2)</li>
	<li><a href="http://www.ghacks.net/2007/01/03/find-out-your-bios-password/" title="Find out your bios password (January 3, 2007)">Find out your bios password</a> (10)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/05/30/revision3-ceo-on-dos-and-mediadefender/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
