<?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>binpoint.com &#187; How To</title>
	<atom:link href="http://binpoint.com/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://binpoint.com</link>
	<description>A Security Blog (Stirred with Geek Life)</description>
	<lastBuildDate>Wed, 09 Jun 2010 02:02:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Network Scanning with nmap</title>
		<link>http://binpoint.com/2010/04/network-scanning-with-nmap/</link>
		<comments>http://binpoint.com/2010/04/network-scanning-with-nmap/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 05:50:17 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[nmap]]></category>
		<category><![CDATA[pentesting]]></category>
		<category><![CDATA[scanning]]></category>

		<guid isPermaLink="false">http://binpoint.com/?p=653</guid>
		<description><![CDATA[Shopping List Before we start, make sure you have the following ingredients ready to go: Fydor’s nmap – The true king of network scanners OpenVAS – The glamor queen of vulnerability assessors Start Here The first thing you need to determine is if you will be performing a black box test or a glass box [...]


Related posts:<ol><li><a href='http://binpoint.com/2008/06/thousands-of-sacrificial-lambs/' rel='bookmark' title='Permanent Link: Thousands of Sacrificial Lambs'>Thousands of Sacrificial Lambs</a></li>
<li><a href='http://binpoint.com/2008/06/writing-a-dns-sniffer/' rel='bookmark' title='Permanent Link: Writing a DNS sniffer'>Writing a DNS sniffer</a></li>
<li><a href='http://binpoint.com/2008/06/detectin-bad-tcp-sessions/' rel='bookmark' title='Permanent Link: Detecting bad TCP sessions'>Detecting bad TCP sessions</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-707" title="nmap_pic1" src="http://binpoint.com/wp-content/uploads/2010/04/nmap_pic1.png" alt="" width="367" height="212" /></p>
<p><strong>Shopping List</strong><br />
Before we start, make sure you have the following ingredients ready to go:</p>
<ul>
<li>Fydor’s <a href="http://nmap.org/">nmap</a> – The true king of network scanners</li>
<li><a href="http://www.openvas.org/">OpenVAS</a> – The glamor queen of vulnerability assessors</li>
</ul>
<p><strong>Start Here</strong><br />
The first thing you need to determine is if you will be performing a black box test or a glass box (often referred to as crystal box) test. I will only quickly go over the differences here.</p>
<p><strong>The Fairest Box of All</strong><br />
Black box testing is the &#8220;simplest&#8221; as you are only provided the IP Addresses in scope of the assessment. That’s it. You are not told how many Windows systems to expect, how many firewalls may be in your way or even if an IPS may shut down your scan if you are too aggressive with your timing options (we’ll touch on that later in this article.) It is difficult to accurately predict how long this may take as the composition of every network is different. An extreme example is if you are scanning through ocean floor fiber it could take quite some time when each packet suffers 250ms+ latency.</p>
<p>Glass box testing is typically much quicker to perform as your client will be providing architectural details of how the network is bolted together. It’s best to ask for network diagrams plus a real live human being to help you decipher them. (I mean seriously, how many UML network diagrams have you seen?) This is important not only because they may use abbreviations unknown to you or how closely the diagram aligns with reality or even all the labels they scribbled on by hand are subject to the lost art that is penmanship. Err, graphmanship.</p>
<p><strong>Scope Up!</strong><br />
Once the transparency of your target environment is agreed upon, you will need to define the scope of which portions of the target organization’s network is within scope for the assessment.</p>
<p>Ask for hosts which must NOT be scanned as they will fall over seizing due to poor IP/TCP stack implementations or other programming bugs. Place into “exclude.list”</p>
<p>Place the authorized IP address ranges and domains you were provided into “inscope.list”</p>
<p><strong>Just a Minor Technicality</strong><br />
Ok, we are now ready to dominate the world with our awesomeness! Or at the very least impress your client with a thorough report&#8230;</p>
<p>If you are scanning a class B network (10.10.X.X) or smaller, you will likely want to choose <strong>-T4</strong> for your speed setting. If you are attempting to map the Internet, stop now. <a href="http://insecure.org/presentations/BHDC08/bhdc08-slides-fyodor.pdf">Fydor has beaten you to it</a> <img src='http://binpoint.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>The Need For Speed</strong><br />
The <strong>–n</strong> switch will disable DNS lookups, reducing overall start to finish time as you no longer need to wait for all those UDP DNS request / responses to file in.</p>
<p>Setting how fast nmap chucks packets onto the network is controlled with:<br />
<strong>-T</strong>, <strong>&#8211;scan-delay</strong> and <strong>—min-hostgroup</strong><br />
<strong>-T5</strong> is balls to the wall and <strong>–T0</strong> means you never want it to finish&#8230;</p>
<p>A safe choice is <strong>–T3</strong> (the default) but again you will likely want to use <strong>-T4</strong> to save time.</p>
<p><strong>Top Heavy Servers</strong><br />
Scanning for every in-scope IP Address plus 65,535 port combinations to gather an inventory of live hosts could last longer than your contract engagement. You may need to pick 20 to 30 ports. In a perfect scenario, at least one of these ports will be open on every server that you need to find. Use <strong>-p</strong> to specify destination ports; a good starting list are the following UDP (<strong>U:</strong>) and TCP (<strong>T:</strong>) ports:<br />
<strong>-p U:53,111,137,T:21-25,80,135,139,443,445,3389,8080</strong></p>
<p>If your client has no idea what services they expect to find on their network, you now have permission to cry like a baby because they will have problems with your report regardless of what you find. T-T<br />
All seriousness aside, thanks to Fydor’s Internet mapping project I mentioned earlier, you can just substitute the defined list with Fydor’s results by adding:<br />
<strong>&#8211;top-ports 30 </strong> (where 30 is the number of ports you want to scan)</p>
<p><strong>I Know That Look&#8230;<br />
</strong>nmap is more than just a simple inventory scanner. It can also guess what the target operating system and it&#8217;s network accessible service names and versions are. It does this by looking at distinguishing features of a packet or connection (such as what the starting TTL value is or how it responds to an unsolicited RST packet sent to a closed port.) This technique is referred to as fingerprinting. If nmap is unsure about a target host, it will guess (and tell you as much) and if it is completely baffled it will politely ask you to submit a fingerprint to add to the nmap database along with what you determine the target to be (by other means.)</p>
<p><strong>-sV</strong> will attempt to match the name and version of each open network service that is discovered<br />
<strong>-O</strong> will attempt to match the operating system of target boxen</p>
<p><strong>New Implants</strong><br />
nmap has received some really neat upgrades since version 4.something such as the ability to run lua scripts during the scan process. An example:<br />
<strong>&#8211;script </strong><strong>smb-os-discovery</strong></p>
<p>Make sure you are using the latest scripts by running:<br />
<strong>nmap —script-updatedb</strong></p>
<p><strong>Putting it all Together</strong><strong><br />
</strong></p>
<p>Thus far, we have compiled the following nmap command:</p>
<p><strong>nmap –iL inscope.list —excludefile exclude.list –v –sS –n —reason –T4 —script </strong><strong>smb-os-discovery</strong><strong> –sV –O —top-ports 30</strong></p>
<p>Sweep 1: I highly recommend swapping out <strong>–sS</strong> with <strong>–sL</strong> before you run your final scan. Why? A list of hosts to be scanned is a great piece of information to include in your report to PROVE that you only touched systems that you were expressly authorized to touch. Yes, this is just feeding back information they originally provided you&#8230; Hey, this is why consultants get paid the big bucks right?</p>
<p>Sweep 2: swap out <strong>–sS</strong> with <strong>–sP</strong> to icmp scan for which hosts you are able to receive echo replies from. Consider sending this list to your client immediately to verify that your are in the ballpark prior to the &#8220;real&#8221; scan. Obviously, this can be skipped if a networking device (such as a router or firewall) is dropping all your icmp echo request probes.</p>
<p>Sweep 3: <strong>-sS</strong> for the win! This is your traditional half open SYN scan. Nmap will send out a TCP SYN packet to each IP address and port combination as you specified to determine if it returns a SYN+ACK packet, indicating an open port. If it doesn&#8217;t hear back from the target, it&#8217;s assumed to be closed. (Yes, this is where the increased timing option pays off.)</p>
<p><strong>Wrapping Up</strong></p>
<p>If you are running up against an IPS blocking your aggressive scans by sending you RSTs or dropping your packets silently, try setting <strong>–f </strong>to fragment (split up) your packets to a smaller portion of their maximum transmission unit (MTU) or size. This may just be enough to fool (or crash) that pesky IPS into letting them all pass on their merry way for total target box domination. Make sure you have permission to try this from the client first&#8230;</p>
<p>This was intended to be a pick up and go article and not dig too deep into how network scanning works nor the intricacies of nmap. If you want WAY more info than I&#8217;ve provided here, I highly recommend buying <a href="http://www.amazon.com/gp/product/0979958717?ie=UTF8&amp;tag=binpoint-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0979958717">Fydor&#8217;s nmap book</a>. If you can&#8217;t spare a few bucks, it&#8217;s also <a href="http://nmap.org/book/nse.html">available online for free</a>.</p>
<p><em>Stay tuned for Part 2, which covers <a href="http://www.openvas.org/">OpenVAS</a>.</em></p>


<p>Related posts:<ol><li><a href='http://binpoint.com/2008/06/thousands-of-sacrificial-lambs/' rel='bookmark' title='Permanent Link: Thousands of Sacrificial Lambs'>Thousands of Sacrificial Lambs</a></li>
<li><a href='http://binpoint.com/2008/06/writing-a-dns-sniffer/' rel='bookmark' title='Permanent Link: Writing a DNS sniffer'>Writing a DNS sniffer</a></li>
<li><a href='http://binpoint.com/2008/06/detectin-bad-tcp-sessions/' rel='bookmark' title='Permanent Link: Detecting bad TCP sessions'>Detecting bad TCP sessions</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://binpoint.com/2010/04/network-scanning-with-nmap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selecting Anti-Virus Software for Home</title>
		<link>http://binpoint.com/2009/09/selecting-anti-virus-software-for-home/</link>
		<comments>http://binpoint.com/2009/09/selecting-anti-virus-software-for-home/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 16:38:05 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Information Security]]></category>

		<guid isPermaLink="false">http://binpoint.com/?p=444</guid>
		<description><![CDATA[&#8220;I purchased X Anti-Virus for my Home PC last year and unimpressed, let it expire. Which anti-virus product should I purchase now?&#8221; I get asked this question a lot. I provide below how I typically answer it, hoping that someone out there will find it useful as a template for your responses to similar questions to [...]


Related posts:<ol><li><a href='http://binpoint.com/2008/11/free-osx-tools-i-use-everyday/' rel='bookmark' title='Permanent Link: Free OSX Tools I Use Everyday'>Free OSX Tools I Use Everyday</a></li>
<li><a href='http://binpoint.com/2009/03/computer-security-at-hotels/' rel='bookmark' title='Permanent Link: Computer Security At Hotels'>Computer Security At Hotels</a></li>
<li><a href='http://binpoint.com/2009/11/7-reasons-why-you-should-not-eat-breakfast/' rel='bookmark' title='Permanent Link: 7 Reasons Why You Should NOT Eat Breakfast'>7 Reasons Why You Should NOT Eat Breakfast</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><em>&#8220;I purchased X Anti-Virus for my Home PC last year and unimpressed, let it expire. Which anti-virus product should I purchase now?&#8221;</em></p>
<address></address>
<p>I get asked this question a lot. I provide below how I typically answer it, hoping that someone out there will find it useful as a template for your responses to similar questions to which you must respond.</p>
<p><span id="more-444"></span></p>
<p><strong>BEGIN EMAIL REPLY:</strong></p>
<p>Hi So and So,</p>
<p>First of all, great question.</p>
<p><em><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-style: normal; line-height: 18px; font-size: 12px; white-space: pre;">W</span><span style="font-style: normal;">hile I typically recommend home users to select security software products from well known commercial vendors, most of these are large companies that structure their pricing model to force you to repurchase their new version every year instead of simply renewing your subscription. As a consolation prize, you get any new features added each year.</span></em></p>
<p>Your customer service experience (or lack thereof) is sadly typical for large software companies; the best way to avoid outsourced call-center style support is to choose a boutique software company that hasn’t a large enough customer base to decide outsourcing customer support as viable. If customer support isn&#8217;t something you plan to use and commercial security software feels too expensive, there are a number of companies that release free home-use only versions of their software.</p>
<p>Finally, as far as how to select a new anti-virus solution, I unfortunately put a lot of trust into tech review websites such as <a title="CNET" href="http://www.cnet.com" target="_blank">CNET</a>. When selecting products, typically user reviews for software as complicated as anti-virus provide little insight to how good it really is as experiences vary from person to person. With a tech journal, you at least know they sampled many products. The downside is they only get to it every year or two, so the ratings may be based on last years version.</p>
<p>That said, here’s a <a href="http://www.cnet.com/topic-reviews/antivirus.html?tag=lia;lcol" target="_blank">link to CNET&#8217;s Anti-Virus review page</a> as a starting point.</p>
<p>Here is a <a href="http://download.cnet.com/windows/antivirus-software/?tag=mncol%3Bsort&amp;rpp=10&amp;sort=editorsRating+asc" target="_blank">link to CNET&#8217;s top rated Anti-Virus software</a> which includes free home-use products.</p>
<p>Hope that helps! Happy hunting.</p>
<p>Regards,<br />
Tom</p>


<p>Related posts:<ol><li><a href='http://binpoint.com/2008/11/free-osx-tools-i-use-everyday/' rel='bookmark' title='Permanent Link: Free OSX Tools I Use Everyday'>Free OSX Tools I Use Everyday</a></li>
<li><a href='http://binpoint.com/2009/03/computer-security-at-hotels/' rel='bookmark' title='Permanent Link: Computer Security At Hotels'>Computer Security At Hotels</a></li>
<li><a href='http://binpoint.com/2009/11/7-reasons-why-you-should-not-eat-breakfast/' rel='bookmark' title='Permanent Link: 7 Reasons Why You Should NOT Eat Breakfast'>7 Reasons Why You Should NOT Eat Breakfast</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://binpoint.com/2009/09/selecting-anti-virus-software-for-home/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Complete Unix Cron Job Crib Sheet</title>
		<link>http://binpoint.com/2009/03/complete-unix-cron-job-crib-sheet/</link>
		<comments>http://binpoint.com/2009/03/complete-unix-cron-job-crib-sheet/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 03:30:19 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[crib sheet]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[cron job]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[easy]]></category>

		<guid isPermaLink="false">http://binpoint.com/?p=276</guid>
		<description><![CDATA[Do you only use unix once in a blue moon, need to setup crontab and can&#8217;t quite remember the order? (Without peeking at the image on the left) Try out this handy cron job crib sheet which you can paste directly into your crontab as a reference each time you make a scheduled job change. [...]


Related posts:<ol><li><a href='http://binpoint.com/2009/05/auc-2-ls/' rel='bookmark' title='Permanent Link: AUC #2: ls'>AUC #2: ls</a></li>
<li><a href='http://binpoint.com/2009/03/auc-1-paste/' rel='bookmark' title='Permanent Link: AUC #1: paste'>AUC #1: paste</a></li>
<li><a href='http://binpoint.com/2010/06/quick-note-on-sorting-john-pot-files/' rel='bookmark' title='Permanent Link: Quick note on sorting john.pot files'>Quick note on sorting john.pot files</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-277 alignleft" title="cron" src="http://binpoint.com/wp-content/uploads/2009/03/cron.png" alt="cron" width="320" height="98" />Do you only use unix once in a blue moon, need to setup crontab and can&#8217;t quite remember the order? (Without peeking at the image on the left)<br />
Try out this handy cron job crib sheet which you can paste directly into your crontab as a reference each time you make a scheduled job change.</p>
<p><span id="more-276"></span>Cron is a unix program that is used to automatically run commands or scripts at predetermined times. Common uses include running nightly backups, log searching or other system resource intensive tasks when everyone is at home sleeping. Each unix user has their own crontab list. If you are new to scheduling tasks in Sun Solaris, Red Hat Enterprise Linux, Fedora, Ubuntu, Debian OS X, FreeBSD or any other flavor of unix, the following quick cron guide should help.</p>
<p>To check what is currently scheduled for execution for one user, open a terminal and type:</p>
<pre>crontab -l -u &lt;username&gt;</pre>
<p>Any task that requires root privileges will need to be put in the root uer&#8217;s crontab. Let&#8217;s add a simple backup scheduled task as an example. To open the cron file as the root user with your default text editor, type:</p>
<pre>sudo crontab -e</pre>
<p>At the top of the crontab file (or if it is empty) paste in the following:</p>
<pre># +- - - - - - minute [0-59]   | Special Entries: @reboot, @yearly, @monthly,
# | +- - - - - hour [0-23]     |                  @weekly, @midnight, @hourly
# | | +- - - - monthday [1-31]  ---------------------------------------------
# | | | +- - - month [1-12, jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec]
# | | | | +- - weekday [0-6, sun,mon,tue,wed,thu,fri,sat,sun]
# * * * * * /full/path/to/command args &gt;&gt; ~/command.log</pre>
<p>This Crib Sheet will serve as a crontab syntax reference every time you list or edit the crontab but won&#8217;t be interpreted by cron since each line starts with a poundsign (<em>#</em>) character indicating a comment line. The first five columns allow you to define the minutes, hours, days of the month, months, and weekdays that you want your job to run. The sixth column is the command or script to execute at the appointed time or times.</p>
<p>Here&#8217;s an example crontab line that runs the backup.sh script every twenty minutes on April 13th, 14th and 15th:</p>
<pre>0,20,40 * 13-15 4 * /home/tom/scripts/backup.sh &gt;&gt; /var/log/backups.log</pre>
<p>The last part may look new if you are unfamiliar with pipes. The double greaterthan signs will append the output of backup.sh into a file called backups.log located in the /var/log/ directory. While you can chain together many unix commands directly in the crontab file, I recommend using a separate file (ie: in your scripts directory) to perform more complicated tasks.</p>
<p>Here&#8217;s another cron job example that searches for files in anyones home directory modified in the last 24 hours and puts a report in your home directory:</p>
<pre>0 1 * * * /usr/bin/find /home -mtime -1 -type f -exec ls -lh {} \; &gt; \
/home/tom/new_files_report_`date +%Y-%m-%d`.txt</pre>
<p>Hope that helps! Comments welcome.</p>


<p>Related posts:<ol><li><a href='http://binpoint.com/2009/05/auc-2-ls/' rel='bookmark' title='Permanent Link: AUC #2: ls'>AUC #2: ls</a></li>
<li><a href='http://binpoint.com/2009/03/auc-1-paste/' rel='bookmark' title='Permanent Link: AUC #1: paste'>AUC #1: paste</a></li>
<li><a href='http://binpoint.com/2010/06/quick-note-on-sorting-john-pot-files/' rel='bookmark' title='Permanent Link: Quick note on sorting john.pot files'>Quick note on sorting john.pot files</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://binpoint.com/2009/03/complete-unix-cron-job-crib-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
