<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-31775789</id><updated>2011-09-26T18:30:07.558-07:00</updated><category term='fork bomb'/><category term='10_28_2007'/><category term='struct ipt_match'/><category term='struct ip_conntrack'/><category term='enum ip_conntrack_info'/><category term='Regex and Promiscuous Mode'/><category term='Kernel space code and Verfiy sample&apos;s data collecting'/><category term='python'/><category term='SNIPHER_12_09_07'/><category term='SNIPHER_11_22_07'/><category term='SNIPHER_11_26_07'/><title type='text'>SNIPHER</title><subtitle type='html'>SNIPHER : Packet Sniffer Module
&lt;hr&gt;
(Lots of things are shamelessly stolen from netfilter &amp;amp;&amp;amp; l7-filter)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://younick.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-31775789.post-6833901848094706766</id><published>2011-04-20T02:09:00.000-07:00</published><updated>2011-04-20T02:09:57.582-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>A Note On Practice And Persistence</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: justify;"&gt;While you are studying programming, I’m studying how to play guitar. I practice it every day for at least 2 hours a day. I play scales, chords, and arpeggios for an hour at least and then learn music theory, ear training, songs and anything else I can. Some days I study guitar and music for 8 hours because I feel like it and it’s fun. To me repetitive practice is natural and just how to learn something. I know that to get good at anything you have to practice every day, even if I suck that day (which is often) or it’s difficult. Keep trying and eventually it’ll be easier and fun.&lt;br /&gt;As you study this book, and continue with programming, remember that anything worth doing is difficult at first. Maybe you are the kind of person who is afraid of failure so you give up at the first sign of difficulty. Maybe you never learned self-discipline so you can’t do anything that’s “boring”. Maybe you were told that you are “gifted” so you never attempt anything that might make you seem stupid or not a prodigy. Maybe you are competitive and unfairly compare yourself to someone like me who’s been programming for 20+ years.&lt;br /&gt;Whatever your reason for wanting to quit, keep at it. Force yourself. If you run into an Extra Credit you can’t do, or a lesson you just do not understand, then skip it and come back to it later. Just keep going because with programming there’s this very odd thing that happens.&lt;br /&gt;At first, you will not understand anything. It’ll be weird, just like with learning any human language. You will struggle with words, and not know what symbols are what, and it’ll all be very confusing. Then one day BANG your brain will snap and you will suddenly “get it”. If you keep doing the exercises and keep trying to understand them, you will get it. You might not be a master coder, but you will at least understand how programming works.&lt;br /&gt;If you give up, you won’t ever reach this point. You will hit the first confusing thing (which is everything at first) and then stop. If you keep trying, keep typing it in, trying to understand it and reading about it, you will eventually get it.&lt;br /&gt;But, if you go through this whole book, and you still do not understand how to code, at least you gave it a shot. You can say you tried your best and a little more and it didn’t work out, but at least you tried. You can be proud of that.&lt;br /&gt;&lt;br /&gt;By Zed A. Shaw from his book "Learning Python The Hard Way"&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-6833901848094706766?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/6833901848094706766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=6833901848094706766' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/6833901848094706766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/6833901848094706766'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2011/04/note-on-practice-and-persistence.html' title='A Note On Practice And Persistence'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-5956584163415660292</id><published>2010-06-30T17:55:00.000-07:00</published><updated>2010-06-30T17:56:41.392-07:00</updated><title type='text'>An introduction to services, runlevels, and rc.d scripts</title><content type='html'>A coOl link explaining about Linux's /etc/rc* and /etc/inittab subsystem architecture. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linux.com/news/enterprise/systems-management/8116-an-introduction-to-services-runlevels-and-rcd-scripts"&gt;http://www.linux.com/news/enterprise/systems-management/8116-an-introduction-to-services-runlevels-and-rcd-scripts&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-5956584163415660292?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/5956584163415660292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=5956584163415660292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/5956584163415660292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/5956584163415660292'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2010/06/introduction-to-services-runlevels-and.html' title='An introduction to services, runlevels, and rc.d scripts'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-6748655012787834549</id><published>2010-05-05T21:33:00.000-07:00</published><updated>2010-05-05T21:35:29.387-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fork bomb'/><title type='text'>fork() bomb</title><content type='html'>Coding can never become more interesting than this !!! &lt;br /&gt;-------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Understanding :(){ :|:&amp;amp; };: fork() bomb code&lt;/h2&gt;&amp;nbsp;:() - It is a function name. It accepts no arguments at all.&lt;br /&gt;&lt;br /&gt;Generally, bash function is defined as follows:&lt;br /&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;foo(){&lt;br /&gt; arg1=$1&lt;br /&gt; echo ''&lt;br /&gt; #do_something on $arg argument&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;fork() bomb is defined as follows: &lt;br /&gt;&lt;pre&gt;&lt;span style="color: red;"&gt;:()&lt;/span&gt;{&lt;br /&gt; &lt;span style="color: #996633;"&gt;  :|:&amp;amp;&lt;/span&gt;&lt;br /&gt;};:&lt;/pre&gt;&lt;br /&gt;:|: - Next it call itself using programming technique called recursion and pipes the output to another call of the function ':'. The worst part is function get called two times to bomb your system.&lt;br /&gt;&lt;br /&gt;&amp;amp; - Puts the function call in the background so child cannot die at all and start eating system resources.&lt;br /&gt;&lt;br /&gt;; - Terminate the function definition&lt;br /&gt;&lt;br /&gt;: - Call (run) the function aka set the fork() bomb.&lt;br /&gt;&lt;br /&gt;Here is more human readable code:&lt;br /&gt;&lt;br /&gt;bomb() {&lt;br /&gt;bomb | bomb &amp;amp;&lt;br /&gt;}; bomb&lt;br /&gt;&lt;br /&gt;Properly configured Linux / UNIX box should not go down when fork() bomb sets off. &lt;br /&gt;&lt;br /&gt;REFERENCE : http://www.cyberciti.biz/faq/understanding-bash-fork-bomb/&lt;br /&gt;WIKI : http://en.wikipedia.org/wiki/Fork_bomb&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-6748655012787834549?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/6748655012787834549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=6748655012787834549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/6748655012787834549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/6748655012787834549'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2010/05/fork-bomb.html' title='fork() bomb'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-7996961652730443840</id><published>2010-04-22T12:37:00.001-07:00</published><updated>2010-05-08T11:34:11.930-07:00</updated><title type='text'>OProfile manual</title><content type='html'>1. OProfile Manual by John Levon &lt;br /&gt;&lt;a href="http://oprofile.sourceforge.net/doc/index.html" target="blank"&gt;http://oprofile.sourceforge.net/doc/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;2. OProfile Tutorial&lt;br /&gt;&lt;a href="http://linuxtips.pbworks.com/Oprofile-Tutorial" target="blank"&gt;http://linuxtips.pbworks.com/Oprofile-Tutorial&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-7996961652730443840?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/7996961652730443840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=7996961652730443840' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/7996961652730443840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/7996961652730443840'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2010/04/how-oprofile-works.html' title='OProfile manual'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-3908815498080100993</id><published>2010-03-23T11:10:00.000-07:00</published><updated>2010-03-23T11:12:02.828-07:00</updated><title type='text'>Insight into GNU/Linux boot process</title><content type='html'>A very detailed description of what happens during Linux boot process&lt;br /&gt;&lt;br /&gt;&lt;a href="http://unixbhaskar.blogspot.com/2010/03/insight-into-gnulinux-boot-process.html" target=blank&gt; http://unixbhaskar.blogspot.com/2010/03/insight-into-gnulinux-boot-process.html &lt;/a&gt;&lt;br /&gt;Author : Bhaskar Chowdhury&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-3908815498080100993?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/3908815498080100993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=3908815498080100993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/3908815498080100993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/3908815498080100993'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2010/03/insight-into-gnulinux-boot-process.html' title='Insight into GNU/Linux boot process'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-4916775537158884597</id><published>2008-07-28T11:26:00.000-07:00</published><updated>2008-07-28T11:36:30.016-07:00</updated><title type='text'>WHAT IFs</title><content type='html'>1. What if I can use any webpage as my personal notebook ? It simply means a notebook made of &lt;br /&gt;webpages. Index them, browse them, edit them, print them, share them. Even an eraser to erase those filthy ads on your personal selected page.&lt;br /&gt;&lt;br /&gt;2. Eliminate mouse usage on webpages. Think if your mouse suddenly stopped working when you are in the middle of net surfing ! What would you do ? All on the web is links, and zillions of links. How would you access them if your lovely mouse isn't there. Dude..... the key combinations ALT + DIGITS (Numbers 1, 2. ... N) have never been used. You press ALT, all the links on the webpage will be parsed and assigned a unique number. You hit the number(digits) and your link is clicked !&lt;br /&gt;&lt;br /&gt;3. Entertainment business. It attracts a lot of money.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-4916775537158884597?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/4916775537158884597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=4916775537158884597' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/4916775537158884597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/4916775537158884597'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2008/07/what-ifs.html' title='WHAT IFs'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-3811543342418779509</id><published>2007-12-09T01:20:00.000-08:00</published><updated>2011-08-16T19:13:12.956-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SNIPHER_12_09_07'/><title type='text'>JOB WELL DONE !</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: justify;"&gt;Dec 9 2007 is the date when I am not working on my project! It's been couple of days ! The University deadline was Dec 7 2007 and somehow I made it ... no no no... WE MADE IT TOGETHER. (Thanks buddy, like every time you came to rescue me and made me through)  "If He will get you to it then He will get you through it".  I am always on the verge of giving up and somehow you put me back.&lt;br /&gt;&lt;br /&gt;It wasn't somehow though. I remember the time when I was there. I can feel it from that hunger, that aching back, those sleepless nights and the crashing drowsiness, the confusion, the stress, the race to beat the deadline, hours of constant stare on the computer screen, repetitive efforts to attain something with perfection and all amidst millions of distractions. It may not be the best thing in the world but somehow it was the best thing for me. I remember coming out of the graduate studies office after submitting my project report. That feeling, that momentary happiness, that smile on my face coming out from deep within the heart(!). Nobody was watching me. Nobody was there to greet me. I just stretched my hand to Thank You and you greeted me well. In the best possible way anyone ever could.&lt;br /&gt;&lt;br /&gt;These words are written to flatter you with the desire of having this time again and again. But all I can say is YOU KNOW THE BEST.  I tried and I failed but what I received in the end was and will ever be a precious gift. I will make an effort not to stop this journey here. I still have a long way to go and I want to tell you I will try to do my best. You know that I includes 'YOU' too ! THANK YOU... THANK YOU.&lt;br /&gt;&lt;br /&gt;And yea, some things left are &lt;span style="color: red;"&gt;fine tuning the code&lt;/span&gt;, &lt;span style="color: red;"&gt;testing the working of Telnet&lt;/span&gt;, &lt;span style="color: red;"&gt;SSH and SMTP Protocols&lt;/span&gt;, and&lt;span style="color: red;"&gt; understanding Linux Network Stack&lt;/span&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-3811543342418779509?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/3811543342418779509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=3811543342418779509' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/3811543342418779509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/3811543342418779509'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2007/12/job-well-done.html' title='JOB WELL DONE !'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-3937447097864939448</id><published>2007-11-27T00:49:00.000-08:00</published><updated>2011-04-07T14:08:56.224-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SNIPHER_11_26_07'/><title type='text'>Project Report Submission Deadline</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: justify;"&gt;Today was a "tentative" deadline to submit a project report to department.&lt;br /&gt;I am pretty much done with that, not completely though.&lt;br /&gt;&lt;br /&gt;The last thing Dr Ouyang told me was to GET THE RIGHT THING RIGHT!&lt;br /&gt;I have to compare the performance of SNIPHER with Wireshark and tcpdump. Some perfect quantitative data having user understandable form !&lt;br /&gt;&lt;br /&gt;I have got '&lt;span style="color: #000099;"&gt;vmstat&lt;/span&gt;' at work and I will get it done tomorrow.&lt;br /&gt;I need to measure &lt;span style="color: red;"&gt;Memory usage&lt;/span&gt;, &lt;span style="color: red;"&gt;CPU usage&lt;/span&gt;, and &lt;span style="color: red;"&gt;Network Latency&lt;/span&gt;, in the sense difference in the RTT.&lt;br /&gt;&lt;br /&gt;Anything left is FINE TUNING THE CODE ! &lt;span style="color: red; font-weight: bold;"&gt;WE ARE GOING TO DO IT, TOGETHER &lt;/span&gt;" . . Thank you Father . . .&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-3937447097864939448?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/3937447097864939448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=3937447097864939448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/3937447097864939448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/3937447097864939448'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2007/11/project-report-submission-deadline.html' title='Project Report Submission Deadline'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-2255988864255205109</id><published>2007-11-22T10:42:00.000-08:00</published><updated>2007-11-22T10:52:10.197-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SNIPHER_11_22_07'/><title type='text'>SNIFFING THE PARSED DATA</title><content type='html'>At this point of time SNIPHER is not an exact sniffer!! or I think so.&lt;br /&gt;Regular expressions are specified for originating (IP_CT_NEW)connection and I track ONLY those ones.&lt;br /&gt;Other connections will simply pass through.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;I need to do something like &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1) REGEXes on the NEW connection.&lt;br /&gt;&lt;br /&gt;2) On matching connections, it will MARK that connection using conntrack (I dont know how, at this time&lt;br /&gt;   !!) and SNIFF all the data on marked connection only.&lt;br /&gt;&lt;br /&gt;--&gt; Some thoughts like Creating a HASHTABLE using 4 fields [src_ip, src_port, dst_ip, dst_port].&lt;br /&gt;     I believe it will give a unique value on some operation and storing the data in that hashtable !!&lt;br /&gt;&lt;br /&gt;3) Once this is done, also look for the utilities online which let you QUANTIFY PERFORMANCE !!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-2255988864255205109?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/2255988864255205109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=2255988864255205109' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/2255988864255205109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/2255988864255205109'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2007/11/sniffing-data.html' title='SNIFFING THE PARSED DATA'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-9056553073105821823</id><published>2007-11-19T04:33:00.000-08:00</published><updated>2007-11-19T04:35:50.714-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Regex and Promiscuous Mode'/><title type='text'>SNIPHER : 11_19_07</title><content type='html'>32. All these days I've been working on my Project Report and ya I was done with that &lt;span style="color: rgb(255, 0, 0);"&gt;REGEX&lt;/span&gt; thing.&lt;br /&gt;&lt;br /&gt;    I successfully wrote a REGEX for the http GET request, that was "GET .*HTTP/(0.9|1.0|1.1)"&lt;br /&gt;    I still have &lt;span style="color: rgb(255, 0, 0);"&gt;ftp, Telnet, ssh, SMTP&lt;/span&gt; regexes to write !!&lt;br /&gt;&lt;br /&gt;    OK, now after sticking on the same stuff for two days, I finally found (Thanks Master) why iptables wasn't working on the monitoring ports !! It wasn't able to track the data the data passing by for other machines ( I mean promiscuous mode)&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(255, 0, 0);"&gt;YES, iptables DOESNT WORK IN PROMISCUOUS mode !! Want to know why ???&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    the data is delivered to the skb from ip_input.c --&gt; ip_rcv(), which has a piece of code which looks like&lt;br /&gt;&lt;br /&gt;   &lt;span style="color: rgb(0, 0, 153);"&gt; /* When the interface is in promisc. mode, drop all the crap&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     * that it receives, do not try to analyse it.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     */&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     if (skb-&gt;pkt_type == PACKET_OTHERHOST)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;         goto drop;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     .&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     .&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     .&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     drop:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        kfree_skb(skb);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;     --&gt; NO skb for the packets of other host !!&lt;br /&gt;&lt;br /&gt;     *** The next task is to make a change in the above function and make it accept all the packets and then test the code...&lt;br /&gt;         I am working on it, lets see how it goes!&lt;br /&gt;&lt;br /&gt;     And ya &lt;span style="color: rgb(255, 0, 0);"&gt;REPORT IS DUEEEEEE... !&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;33. include/linux/if_packet.h&lt;br /&gt;&lt;br /&gt;    /* Packet types */&lt;br /&gt;&lt;br /&gt;    #define PACKET_HOST             0               /* To us                */&lt;br /&gt;    #define PACKET_BROADCAST        1               /* To all               */&lt;br /&gt;    #define PACKET_MULTICAST        2               /* To group             */&lt;br /&gt;    #define PACKET_OTHERHOST        3               /* To someone else      */&lt;br /&gt;    #define PACKET_OUTGOING         4               /* Outgoing of any type */&lt;br /&gt;    /* These ones are invisible by user level */&lt;br /&gt;    #define PACKET_LOOPBACK         5               /* MC/BRD frame looped back */&lt;br /&gt;    #define PACKET_FASTROUTE        6               /* Fastrouted frame     */&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Packet is made to be one of these types by the Device Driver&lt;br /&gt;&lt;br /&gt;                                                                                                                                        11/19/07 || 04:35&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-9056553073105821823?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/9056553073105821823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=9056553073105821823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/9056553073105821823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/9056553073105821823'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2007/11/snipher-111907.html' title='SNIPHER : 11_19_07'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-1935811112887278166</id><published>2007-11-01T01:31:00.000-07:00</published><updated>2007-11-19T04:38:24.914-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='struct ipt_match'/><category scheme='http://www.blogger.com/atom/ns#' term='enum ip_conntrack_info'/><category scheme='http://www.blogger.com/atom/ns#' term='struct ip_conntrack'/><title type='text'>SNIFFER_11_01_2007 Some Useful Data Structures</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;27. struct ip_conntrack&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  /usr/src/linux-2.4.18.2-34/include/linux/ip_conntrack.h&lt;br /&gt;&lt;br /&gt;  struct ip_conntrack&lt;br /&gt;  {&lt;br /&gt;      /* Usage count in here is 1 for hash table/destruct timer, 1 per skb,&lt;br /&gt;         plus 1 for any connection(s) we are `master' for */&lt;br /&gt;      struct nf_conntrack ct_general;&lt;br /&gt;&lt;br /&gt;      /* Have we seen traffic both ways yet? (bitset) */&lt;br /&gt;      unsigned long status;&lt;br /&gt;&lt;br /&gt;      /* Timer function; drops refcnt when it goes off. */&lt;br /&gt;      struct timer_list timeout;&lt;br /&gt;&lt;br /&gt;  #ifdef CONFIG_IP_NF_CT_ACCT&lt;br /&gt;      /* Accounting Information (same cache line as other written members) */&lt;br /&gt;      struct ip_conntrack_counter counters[IP_CT_DIR_MAX];&lt;br /&gt;  #endif&lt;br /&gt;      /* If we were expected by an expectation, this will be it */&lt;br /&gt;      struct ip_conntrack *master;&lt;br /&gt;&lt;br /&gt;      /* Current number of expected connections */&lt;br /&gt;      unsigned int expecting;&lt;br /&gt;&lt;br /&gt;      /* Unique ID that identifies this conntrack*/&lt;br /&gt;      unsigned int id;&lt;br /&gt;&lt;br /&gt;      /* Helper, if any. */&lt;br /&gt;      struct ip_conntrack_helper *helper;&lt;br /&gt;&lt;br /&gt;      /* Storage reserved for other modules: */&lt;br /&gt;      union ip_conntrack_proto proto;&lt;br /&gt;&lt;br /&gt;      union ip_conntrack_help help;&lt;br /&gt;  #ifdef CONFIG_IP_NF_NAT_NEEDED&lt;br /&gt;      struct {&lt;br /&gt;              struct ip_nat_info info;&lt;br /&gt;              union ip_conntrack_nat_help help;&lt;br /&gt;  #if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \&lt;br /&gt;      defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE)&lt;br /&gt;              int masq_index;&lt;br /&gt;  #endif&lt;br /&gt;      } nat;&lt;br /&gt;  #endif /* CONFIG_IP_NF_NAT_NEEDED */&lt;br /&gt;&lt;br /&gt;  #if defined(CONFIG_IP_NF_CONNTRACK_MARK)&lt;br /&gt;      u_int32_t mark;&lt;br /&gt;  #endif&lt;br /&gt;&lt;br /&gt;  #ifdef CONFIG_IP_NF_CONNTRACK_SECMARK&lt;br /&gt;      u_int32_t secmark;&lt;br /&gt;  #endif&lt;br /&gt;&lt;br /&gt;      /* Traversed often, so hopefully in different cacheline to top */&lt;br /&gt;      /* These are my tuples; original and reply */&lt;br /&gt;      struct ip_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX];&lt;br /&gt;&lt;br /&gt;  #if defined(CONFIG_IP_NF_MATCH_LAYER7) || defined(CONFIG_IP_NF_MATCH_LAYER7_MODULE)&lt;br /&gt;      struct {&lt;br /&gt;              char * app_proto; /* e.g. "http". NULL before decision. "unknown" after decision if no match */&lt;br /&gt;              char * app_data;  /* application layer data so far.  NULL after match decision */&lt;br /&gt;              unsigned int app_data_len;&lt;br /&gt;      } layer7;&lt;br /&gt;  #endif&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;28. In ip_tables.h&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  #define ipt_match xt_match&lt;br /&gt;  #define ipt_target xt_target&lt;br /&gt;  #define ipt_table xt_table&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;29. Definition of struct ipt_match (i.e. xt_match) is in&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  /usr/src/linux-2.6.18.2-34/include/linux/netfilter/x_tables.h&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  struct xt_match&lt;br /&gt;  {&lt;br /&gt;      struct list_head list;&lt;br /&gt;&lt;br /&gt;      const char name[XT_FUNCTION_MAXNAMELEN-1];&lt;br /&gt;&lt;br /&gt;      /* Return true or false: return FALSE and set *hotdrop = 1 to&lt;br /&gt;         force immediate packet drop. */&lt;br /&gt;      /* Arguments changed since 2.6.9, as this must now handle&lt;br /&gt;         non-linear skb, using skb_header_pointer and&lt;br /&gt;         skb_ip_make_writable. */&lt;br /&gt;      int (*match)(const struct sk_buff *skb,&lt;br /&gt;                   const struct net_device *in,&lt;br /&gt;                   const struct net_device *out,&lt;br /&gt;                   const struct xt_match *match,&lt;br /&gt;                   const void *matchinfo,&lt;br /&gt;                   int offset,&lt;br /&gt;                   unsigned int protoff,&lt;br /&gt;                   int *hotdrop);&lt;br /&gt;&lt;br /&gt;      /* Called when user tries to insert an entry of this type. */&lt;br /&gt;      /* Should return true or false. */&lt;br /&gt;      int (*checkentry)(const char *tablename,&lt;br /&gt;                        const void *ip,&lt;br /&gt;                        const struct xt_match *match,&lt;br /&gt;                        void *matchinfo,&lt;br /&gt;                        unsigned int matchinfosize,&lt;br /&gt;                        unsigned int hook_mask);&lt;br /&gt;&lt;br /&gt;      /* Called when entry of this type deleted. */&lt;br /&gt;      void (*destroy)(const struct xt_match *match, void *matchinfo,&lt;br /&gt;                      unsigned int matchinfosize);&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;      /* Called when userspace align differs from kernel space one */&lt;br /&gt;      void (*compat_from_user)(void *dst, void *src);&lt;br /&gt;      int (*compat_to_user)(void __user *dst, void *src);&lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;      /* Set this to THIS_MODULE if you are a module, otherwise NULL */&lt;br /&gt;      struct module *me;&lt;br /&gt;&lt;br /&gt;      char *table;&lt;br /&gt;      unsigned int matchsize;&lt;br /&gt;      unsigned int compatsize;&lt;br /&gt;      unsigned int hooks;&lt;br /&gt;      unsigned short proto;&lt;br /&gt;&lt;br /&gt;      unsigned short family;&lt;br /&gt;      u_int8_t revision;&lt;br /&gt;  };&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;30. enum ip_conntrack_info&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  enum ip_conntrack_info&lt;br /&gt;  {&lt;br /&gt;      /* Part of an established connection (either direction). */&lt;br /&gt;      IP_CT_ESTABLISHED,&lt;br /&gt;&lt;br /&gt;      /* Like NEW, but related to an existing connection, or ICMP error&lt;br /&gt;         (in either direction). */&lt;br /&gt;      IP_CT_RELATED,&lt;br /&gt;&lt;br /&gt;      /* Started a new connection to track (only&lt;br /&gt;         IP_CT_DIR_ORIGINAL); may be a retransmission. */&lt;br /&gt;      IP_CT_NEW,&lt;br /&gt;&lt;br /&gt;      /* &gt;= this indicates reply direction */&lt;br /&gt;      IP_CT_IS_REPLY,&lt;br /&gt;&lt;br /&gt;      /* Number of distinct IP_CT types (no NEW in reply dirn). */&lt;br /&gt;      IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1&lt;br /&gt;  };&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-1935811112887278166?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/1935811112887278166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=1935811112887278166' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/1935811112887278166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/1935811112887278166'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2007/11/sniffer11012007-some-useful-data.html' title='SNIFFER_11_01_2007 Some Useful Data Structures'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-2116700699191454704</id><published>2007-11-01T01:27:00.001-07:00</published><updated>2007-11-19T04:39:04.959-08:00</updated><title type='text'>HOW TO DO REGEX on APP LAYER DATA 11_01_2007</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;SHARED HEADER FILE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; struct ipt_sample {&lt;br /&gt;     ---&lt;br /&gt;     ---&lt;br /&gt;     char *proto;&lt;br /&gt;     char *pattern;&lt;br /&gt; };&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;USER SPACE MODULE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;--&gt; iptables .... -m sample .... --proto [http|ftp] ...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--&gt; switch(proto)&lt;br /&gt; {&lt;br /&gt; case http :&lt;br /&gt;     info-&gt;proto = http;&lt;br /&gt;     info-&gt;pattern  = REGEX Pattern for http&lt;br /&gt;     break;&lt;br /&gt; case ftp :&lt;br /&gt;     info-&gt;proto = ftp;&lt;br /&gt;     info-&gt;pattern  = REGEX Pattern for ftp&lt;br /&gt;     break;&lt;br /&gt; default :&lt;br /&gt;     info-&gt;proto = null;&lt;br /&gt;     info-&gt;pattern = null;&lt;br /&gt;     break;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;KERNEL SPACE MODULE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;--&gt; COLLECT DATA&lt;br /&gt;--&gt; REGULAR EXPRESSION (proto and pattern)&lt;br /&gt;--&gt; if matches --&gt; Print/Write the data to the file&lt;br /&gt; else skip the packet&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-2116700699191454704?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/2116700699191454704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=2116700699191454704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/2116700699191454704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/2116700699191454704'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2007/11/how-to-do-regex-on-app-layer-data.html' title='HOW TO DO REGEX on APP LAYER DATA 11_01_2007'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-4818470087272092169</id><published>2007-10-31T02:06:00.000-07:00</published><updated>2011-04-07T14:10:04.138-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Kernel space code and Verfiy sample&apos;s data collecting'/><title type='text'>SNIFFER_10_31_2007</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;23. I have gone through the USER SPACE code of libipt_layer7.c and got the idea of how it functions.&lt;br /&gt;&lt;br /&gt;24. NEXT TASK is to understand the KERNEL SPACE code and make ipt_sample adapt the methodology.&lt;br /&gt;&lt;br /&gt;25. RULES&lt;br /&gt;&lt;br /&gt;iptables -A OUTPUT -t mangle -m layer7 --l7proto ftp&lt;br /&gt;iptables -A OUTPUT -t mangle -m sample --src-ip &lt;my-ip&gt; --dst-ip &lt;any-ip&gt; -j ACCEPT&lt;br /&gt;&lt;br /&gt;26 . from looking at my code, I THINK MY FETCHING OF DATA IS NOT CORRECT ! Will confirm&lt;br /&gt;it tonight.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;Thanks Master !!! Let's see how it goes !&lt;/span&gt;&lt;/any-ip&gt;&lt;/my-ip&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-4818470087272092169?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/4818470087272092169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=4818470087272092169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/4818470087272092169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/4818470087272092169'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2007/10/sniffer10312007.html' title='SNIFFER_10_31_2007'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-3163770927693493305</id><published>2007-10-28T23:36:00.000-07:00</published><updated>2007-11-19T04:41:27.594-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='10_28_2007'/><title type='text'>SNIFFER_10_28_2007</title><content type='html'>22. For Application Layer Data sniffing give support to APP protocols one by one. http, telnet, ftp, ssh. These are widely used protocols.&lt;br /&gt;&lt;br /&gt;-&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Study their PROTOCOL FORMAT and scan the HEADER&lt;/span&gt; and look for the application/agent information if the protocol is including it in there !!?&lt;br /&gt;&lt;br /&gt;-&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Use REGEX as the L7-FILTER is using (or something else like HASH or MD5 HASH?!!! )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  -&gt; for WRITING the sniffed data try to implement them as &lt;span style="color: rgb(255, 0, 0);"&gt;THREADS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[THREAD1] --------&gt; [SHARED BUFFER ] &lt;---------- [THREAD2] sniffs------------------------critical section-----------------------write to file  -&gt;Take help of Prof. Dick Smith..... (how to go for application layer data sniffing !!)&lt;br /&gt;&lt;br /&gt;                                          10/28/07||23:33&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-3163770927693493305?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/3163770927693493305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=3163770927693493305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/3163770927693493305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/3163770927693493305'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2007/10/sniffer10282007_28.html' title='SNIFFER_10_28_2007'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-4553996210513294845</id><published>2007-10-28T23:34:00.000-07:00</published><updated>2007-11-19T04:48:07.890-08:00</updated><title type='text'>TILL SNIFFER_10_27_2007</title><content type='html'>1. libipt_sample.c is done.&lt;br /&gt;&lt;br /&gt;2. &lt;span style="color: rgb(255, 0, 0);"&gt;Error&lt;/span&gt; in compilation of ipt_sample.c (also take care of ipt_sample.h**) Did I include it or saved it where it should be?&lt;br /&gt;                                      07/23/07||23:56&lt;br /&gt;&lt;br /&gt;3. Definitions of the functions used in ipt_sample is changed. MAKE CHANGES ACCORDINGLY.&lt;br /&gt;                                      07/25/07||23:32&lt;br /&gt;&lt;br /&gt;4. I checked all header files regarding the code which is not commented out. &lt;span style="color: rgb(255, 0, 0);"&gt;The thing is it's not being compiled, and I doubt its because I have to put it in the Kernel, make changes in Config file and then have to go for make or something. Try this steps first before continuing anything.  Then work on it later.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;"There is nothing what you and I together can't do !" ...toink!&lt;/span&gt;&lt;br /&gt;                                      08/06/07||23:46&lt;br /&gt;&lt;br /&gt;5. Trying to compile kernel source. I think (not sure) may be something else to compile iptables source only.... but may be not, I guess. WIll do it tomorrow.&lt;br /&gt;                                      08/08/07||00:56&lt;br /&gt;&lt;br /&gt;6.Compiled ipt_sample.c successfully. Not its not taking into &lt;span style="color: rgb(255, 0, 0);"&gt;'insmod'&lt;/span&gt; giving error, FATAL : Module ipt_sample not found. Try to work on it tomorrow night.&lt;br /&gt;                                      08/09/07||00:25&lt;br /&gt;&lt;br /&gt;7. &lt;span style="color: rgb(255, 0, 0);"&gt;insmod worked after "su -"&lt;/span&gt;. Now packets are not being dropped&lt;br /&gt;                                      08/16/07||22:45&lt;br /&gt;&lt;br /&gt;8. Netfilter's kernel modules should be kept here after compiling.&lt;br /&gt; /lib/modules/2.6.18.2-34-default/kernel/net/ipv4/netfilter&lt;br /&gt;&lt;br /&gt;9. iptables -I PREROUTING -t mangle -m sample --src-ip 127.0.0.1 --dst-ip 127.0.0.1 -j ACCEPT&lt;br /&gt;                                      08/22/07||00:39&lt;br /&gt;&lt;br /&gt;10. struct iphdr(and others)is defined in /include/linux/&lt;br /&gt;&lt;br /&gt;11. include/linux/in.h&lt;br /&gt;  ****&lt;br /&gt;/* Standard well-defined IP protocols.  */&lt;br /&gt;enum {&lt;br /&gt;IPPROTO_IP = 0,               /* Dummy protocol for TCP               */&lt;br /&gt;IPPROTO_ICMP = 1,             /* Internet Control Message Protocol    */&lt;br /&gt;IPPROTO_IGMP = 2,             /* Internet Group Management Protocol   */&lt;br /&gt;IPPROTO_IPIP = 4,             /* IPIP tunnels (older KA9Q tunnels use 94) */&lt;br /&gt;IPPROTO_TCP = 6,              /* Transmission Control Protocol        */&lt;br /&gt;IPPROTO_EGP = 8,              /* Exterior Gateway Protocol            */&lt;br /&gt;IPPROTO_PUP = 12,             /* PUP protocol                         */&lt;br /&gt;IPPROTO_UDP = 17,             /* User Datagram Protocol               */&lt;br /&gt;IPPROTO_IDP = 22,             /* XNS IDP protocol                     */&lt;br /&gt;IPPROTO_DCCP = 33,            /* Datagram Congestion Control Protocol */&lt;br /&gt;IPPROTO_RSVP = 46,            /* RSVP protocol                        */&lt;br /&gt;IPPROTO_GRE = 47,             /* Cisco GRE tunnels (rfc 1701,1702)    */&lt;br /&gt;&lt;br /&gt;IPPROTO_IPV6   = 41,          /* IPv6-in-IPv4 tunnelling              */&lt;br /&gt;&lt;br /&gt;IPPROTO_ESP = 50,            /* Encapsulation Security Payload protocol */&lt;br /&gt;IPPROTO_AH = 51,             /* Authentication Header protocol       */&lt;br /&gt;IPPROTO_PIM    = 103,         /* Protocol Independent Multicast       */&lt;br /&gt;&lt;br /&gt;IPPROTO_COMP   = 108,                /* Compression Header protocol */&lt;br /&gt;IPPROTO_SCTP   = 132,         /* Stream Control Transport Protocol    */&lt;br /&gt;&lt;br /&gt;IPPROTO_RAW    = 255,         /* Raw IP packets                       */&lt;br /&gt;IPPROTO_MAX&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;12.&lt;br /&gt;  iptables -D &lt;rule&gt;&lt;br /&gt;  rmmod ipt_sample&lt;br /&gt;&lt;br /&gt;13. latest ipt_sample module got SUCCESSFULLY compiled with all 3 protocols support ICMP, TCP, UDP.&lt;br /&gt;  Now all I need is copy it to the kernel modules directory and insmod and write some good chains and SEE THE &lt;span style="color: rgb(255, 0, 0);"&gt;MAGIC&lt;/span&gt; !!&lt;br /&gt;&lt;br /&gt;                                          08/26/2007||01:51&lt;br /&gt;&lt;br /&gt;14.&lt;br /&gt;  iptables -F PREROUTING -t mangle&lt;br /&gt;  iptables -L PREROUTING -t mangle&lt;br /&gt;&lt;br /&gt;  iptables -I PREROUTING -t mangle -m sample --src-ip 127.0.0.1 --dst-ip 130.86.241.250 -j ACCEPT&lt;br /&gt;&lt;br /&gt;15. &lt;span style="color: rgb(255, 0, 0);"&gt;Jumbopacket&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   Sniffing the data &gt;= 9000 Bytes which current sniffers dont provide.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;16. One more thing, I think the iptables or skb has to be configured to get packets from Wifi Card !! I think it supports only Ethernet card ! &lt;span style="color: rgb(255, 0, 0);"&gt;Double check on this thing.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                                          09/05/07||21:13&lt;br /&gt;&lt;br /&gt;17. Made changes in the options. Can skip either of the IPs for src/dst and that works great, but it only takes "ping localhost"&lt;br /&gt;  and not any remote IP like "ping google.com". I think skb is configured to use Ethernet and not Wifi(I guess!!). and trying to find the net_device structure to get the info about the Device skb is using.&lt;br /&gt;                                          09/07/07||01:19&lt;br /&gt;&lt;br /&gt;18. &lt;span style="color: rgb(255, 0, 0);"&gt;Module ipt_sample can track all traffic ICMP, UDP, TCP. The problem is I was inserting the chain on the wrong table.&lt;/span&gt;&lt;br /&gt;   iptables -I &lt;span style="color: rgb(255, 0, 0);"&gt;PREROUTING&lt;/span&gt; -t mangle -m sample --src-ip 127.0.0.1 --dst-ip 127.0.0.1 -j ACCEPT can track "ping localhost" but it can't track "ping google.com" as ping request for google.com arises from local machine so it appears on OUTPUT chain first and it doesnt go through PREROUTING. The reply can be matched as PREROUTING but it has the SRC and DST addresses altered.&lt;br /&gt;  To track "ping google.com" the correct rule should be "iptables -I POSTROUTING -t mangle -m sample --src-ip &lt;host&gt; --dst-ip &lt;google.com&gt; -j ACCEPT.&lt;br /&gt;&lt;br /&gt;  Now at this point of time everything works for ACCEPT and DROP target too!!! &lt;span style="color: rgb(0, 0, 153);"&gt;HURRAYYYYYYYYYY.....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;   one thing came in my mind... "There is nothing what you and I together can't do!"&lt;/span&gt;&lt;br /&gt;                                          09/12/07||01:14&lt;br /&gt;&lt;br /&gt;19. Installed L7-Filter&lt;br /&gt;  I got L7-Filter to apply Regex on Application Layer Data to classify traffic.&lt;br /&gt;  I got three patch files to apply patch to the kernel and to the iptables&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;   1.  netfilter-layer7-v2.13&lt;/span&gt;&lt;br /&gt;  --&gt; Applied patch "kernel-2.6.18-2.6.19-layer7-2.9.patch" to the kernel using&lt;br /&gt;&lt;br /&gt;      Copied the patch file to the "/usr/src/linux-2.6.18.2-34" directory and then&lt;br /&gt;      #cd /usr/src/linux-2.6.18.2-34&lt;br /&gt;          #patch -p1 &lt;&gt; Applied patch "iptables-for-kernel-pre2.6.20-layer7-2.13.patch" to the iptables using&lt;br /&gt;&lt;br /&gt;      Copied the patch file to the directory "/root/Desktop/iptables-1.3.6" and then&lt;br /&gt;          #cd /root/Desktop/iptables-1.3.6&lt;br /&gt;          #patch -p1 &lt;&gt; Then I did&lt;br /&gt;          #chmod +x extensions/.layer7-test"&lt;br /&gt;&lt;br /&gt;      --&gt;Installed the iptables-1.3.6&lt;br /&gt;         #cd /root/Desktop/iptables-1.3.6/&lt;br /&gt;         #make KERNEL_DIR=/usr/src/linux-2.6.18.2-34&lt;br /&gt;         #make install KERNEL_DIR=/usr/src/linux-2.6.18.2-34&lt;br /&gt;&lt;br /&gt;  2. l7-protocols-2007-07-27.tar.gz&lt;br /&gt;&lt;br /&gt;      #tar -C /etc/ -xvf l7-protocols-2007-07-27.tar.gz&lt;br /&gt;      #cd /etc/&lt;br /&gt;      #mv l7-protocols-2007-07-27 l7-protocols&lt;br /&gt;&lt;br /&gt;20.  And compiled the kernel again&lt;br /&gt;&lt;br /&gt;      #cd /usr/src/linux-2.6.18.2-34&lt;br /&gt;      #make&lt;br /&gt;      Choose option N when asked for layer7 module ! &lt;br /&gt;&lt;br /&gt;      It seems like it got successfully installed as it displayed help message on&lt;br /&gt;      #iptables -m layer7 -h&lt;br /&gt;&lt;br /&gt;      Now let start working on Matching APPLICATION LAYER DATA&lt;br /&gt;&lt;br /&gt;                                           09/14/07||21:28&lt;br /&gt;21. Figure out how you can apply REGEX on Layer 7 Data. Its been a long time (See the date above)! Now get it done withing 2-3 weeks and start working on Report and HUNTING JOB!&lt;br /&gt;&lt;br /&gt;                                          10/19/07||02:05&lt;br /&gt;&lt;br /&gt;21. For Application Level data I am thinking of doing something like&lt;br /&gt;&lt;br /&gt;  iptables -A POSTROUTING -t mangle&lt;br /&gt;       -m sample --src-ip SRCIP --sport SPORT --dst-ip DSTIP --dport DPORT --app APPLICATION -j ACCEPT&lt;br /&gt;&lt;br /&gt;  Where I can do a REGEX on APPLEVEL DATA and Sniff the traffic accordingly, something like packet matchingthe IPs and PORTs will scan the APPLICATION LAYER DATA or APPLIATION LAYER PROTOCOL and will do the sniffing!!&lt;br /&gt;&lt;br /&gt;  Keep it in mind and talk to Dr Ouyang !&lt;br /&gt;&lt;br /&gt;                                          10/22/07||00:00&lt;br /&gt;&lt;br /&gt;&lt;/google.com&gt;&lt;/host&gt;&lt;/rule&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-4553996210513294845?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/4553996210513294845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=4553996210513294845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/4553996210513294845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/4553996210513294845'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2007/10/sniffer10282007.html' title='TILL SNIFFER_10_27_2007'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31775789.post-116228404329495874</id><published>2006-10-31T00:39:00.000-08:00</published><updated>2007-11-19T04:48:53.870-08:00</updated><title type='text'>RESERVED</title><content type='html'>I reserved this name &amp;amp; space for something about Linux !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31775789-116228404329495874?l=younick.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://younick.blogspot.com/feeds/116228404329495874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31775789&amp;postID=116228404329495874' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/116228404329495874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31775789/posts/default/116228404329495874'/><link rel='alternate' type='text/html' href='http://younick.blogspot.com/2006/10/reserved.html' title='RESERVED'/><author><name>Tapan</name><uri>http://www.blogger.com/profile/01275520336591678487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_b6gtybsPKWg/RYOuQP59McI/AAAAAAAAAAo/qxIHLXiGisw/s320/Me+n+ME.jpg'/></author><thr:total>0</thr:total></entry></feed>
