<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
<title>How To Remember Your TCP Flags in Security</title>
<link>http://www.dslreports.com/forum/r14246114</link>
<description></description>
<language>en</language>
<pubDate>Fri, 04 Dec 2009 10:37:55 EDT</pubDate>
<lastBuildDate>Fri, 04 Dec 2009 10:37:55 EDT</lastBuildDate>

<item>
<title>Re: How To Remember Your TCP Flags</title>
<link>http://www.dslreports.com/forum/remark,14663951</link>
<description><![CDATA[<A HREF="/useremail/u/885989"><b>Da Geek Kid</b></A> : LOL ROF... Feel like an AR$$$ ...<br><br> "I shoulda thunk a DAT" <br><br> Thanks  PetePuma <A HREF="/useremail/u/644121"><IMG SRC="http://i.dslr.net/bb/profile.gif" ALT="See Profile" BORDER=0 WIDTH=16 HEIGHT=11></A>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,14663951</guid>
<pubDate>Wed, 26 Oct 2005 16:19:47 EDT</pubDate>
</item>

<item>
<title>Re: How To Remember Your TCP Flags</title>
<link>http://www.dslreports.com/forum/remark,14663900</link>
<description><![CDATA[<A HREF="/useremail/u/644121"><b>PetePuma</b></A> : &raquo;<A HREF="http://www.rdrs.net/document/tcpdump.filters" >www.rdrs.net/document/tcpdump.filters</A>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,14663900</guid>
<pubDate>Wed, 26 Oct 2005 16:13:50 EDT</pubDate>
</item>

<item>
<title>Re: How To Remember Your TCP Flags</title>
<link>http://www.dslreports.com/forum/remark,14663825</link>
<description><![CDATA[<A HREF="/useremail/u/885989"><b>Da Geek Kid</b></A> : Just a quick update... the link to the filters is dead.. :)<br>any updates on that... <br><br>TIA...]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,14663825</guid>
<pubDate>Wed, 26 Oct 2005 16:02:47 EDT</pubDate>
</item>

<item>
<title>Re: How To Remember Your TCP Flags</title>
<link>http://www.dslreports.com/forum/remark,14247541</link>
<description><![CDATA[<A HREF="/useremail/u/168087"><b>Daniel</b></A> : Here's a nice collection of filters:<br>&raquo;<A HREF="http://www.rdrs.net/document/src/tcpdump.filters" >www.rdrs.net/document/src/tcpdump.filters</A><br><SMALL>--<br><A HREF="http://dmiessler.com">dmiessler.com</A> - grep understanding knowledge</SMALL>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,14247541</guid>
<pubDate>Mon, 29 Aug 2005 15:24:47 EDT</pubDate>
</item>

<item>
<title>How To Remember Your TCP Flags</title>
<link>http://www.dslreports.com/forum/remark,14246114</link>
<description><![CDATA[<A HREF="/useremail/u/168087"><b>Daniel</b></A> : Many people are familiar with the concept of a <A HREF="http://en.wikipedia.org/wiki/Mnemonic">mnemonic</A> [n&#601;&#712;m&#593;n&#618;k] -- a memory device that uses a phrase based on the first letter of words in a list. Perhaps the most popular of these in the field of networking is the one for the <A HREF="http://en.wikipedia.org/wiki/OSI_model">OSI Model</A>. The mnemonic is: <br><br><EM><STRONG>A</STRONG>ll <STRONG>P</STRONG>eople <STRONG>S</STRONG>eem <STRONG>T</STRONG>o <STRONG>N</STRONG>eed <STRONG>D</STRONG>ata <STRONG>P</STRONG>rocessing.</EM><br><br>Well, for those that deal with <A HREF="http://en.wikipedia.org/wiki/Transmission_Control_Protocol">TCP </A>a lot, I thought it might be helpful to have a mnemonic for the TCP flags as well. What I've come up with is: <br><br><EM><STRONG>U</STRONG>nskilled <STRONG>A</STRONG>ttackers <STRONG>P</STRONG>ester <STRONG>R</STRONG>eal <STRONG>S</STRONG>ecurity <STRONG>F</STRONG>olks</EM><br><br>Unskilled = URG <br>Attackers = ACK<br>Pester = PSH<br>Real = RST<br>Security = SYN<br>Folks = FIN<br><br>The way this helps me the most is when isolating traffic to capture using <A HREF="http://en.wikipedia.org/wiki/Tcpdump">Tcpdump</A>. It's possible, for example, to capture only SYNs (new connection requests), only RSTs (immediate session teardowns), or <EM>any</EM> combination of the six flags really. As noted in <A HREF="http://dmiessler.com/study/tcpdump">my own little Tcpdump tutorial</A>, you can capture these various flags like so:<br><br><B>Find all SYN packets</B><br>tcpdump 'tcp[13] & 2 != 0'<br><br><B>Find all RST packets</B><br>tcpdump 'tcp[13] & 4 != 0'<br><br><B>Find all ACK packets</B><br>tcpdump 'tcp[13] & 16 != 0'<br><br>Notice the SYN example has the number 2 in it, the RST the number 4, and the ACK the number 16. These numbers correspond to where the TCP flags fall on the binary scale. So when you write out:<br><br><B>U A P R S F</B><br><br>...that corresponds to:<br><br><B>32 16 8 4 2 1</B><br><br>So as you read the SYN capture (tcpdump 'tcp[<B>13</B>] & <B>2</B> != 0'), you're saying find the <B>13th</B> byte in the TCP header, and only grab packets where the flag in the <B>2</B>nd bit is not zero. Well if you go from right to left in the UAPRSF string, you see that the spot where 2 falls is where the S is, and that's how why you're capturing only SYN packets when you apply that filter.<br><br>Remembering these flags and how to isolate them can go a long way in helping low-level network troubleshooting/security work by isolating what it is you want to see and/or capture. And of course the more you can isolate what you want to see, the faster you can solve the problem. I encourage anyone not making use of this powerful feature already to go ahead and add it to their repertoire.<br><SMALL>--<br><A HREF="http://dmiessler.com">dmiessler.com</A> - grep understanding knowledge</SMALL>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,14246114</guid>
<pubDate>Mon, 29 Aug 2005 11:56:16 EDT</pubDate>
</item>

</channel>
</rss>
