<?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>FILI&#039;S TECH THOUGHTS &#187; security</title>
	<atom:link href="http://blog.fili.nl/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fili.nl</link>
	<description>-- All wiyht.  Rho sritched mg kegtops awound?</description>
	<lastBuildDate>Thu, 08 Jul 2010 15:45:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>6 reasons why the Linux desktop is safer</title>
		<link>http://blog.fili.nl/articles/six-reasons-why-the-linux-desktop-is-safer/</link>
		<comments>http://blog.fili.nl/articles/six-reasons-why-the-linux-desktop-is-safer/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 14:33:47 +0000</pubDate>
		<dc:creator>fili</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[executable]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[priviledges]]></category>
		<category><![CDATA[repositories]]></category>
		<category><![CDATA[safer]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[spyware]]></category>
		<category><![CDATA[trojan]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[virus]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.fili.nl/?p=269</guid>
		<description><![CDATA[In the world of Linux a virusscanner is only used by those running a mailserver. Not to protect the machine itself, but to intercept malware going from Windows to Windows machines. Personally I've never encoutered spyware either, so there is no reason to install spyware removal software. Even a firewall is rarely needed, simply because [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.fili.nl/wp-content/uploads/2010/02/tux-758174.png"><img class="size-full wp-image-287 alignright" style="border: 0pt none;" title="tux-758174" src="http://blog.fili.nl/wp-content/uploads/2010/02/tux-758174.png" alt="" width="150" height="180" /></a>In the world of Linux a virusscanner is only used by those running a mailserver. Not to protect the machine itself, but to intercept malware going from Windows to Windows machines. Personally I've never encoutered spyware either, so there is no reason to install spyware removal software. Even a firewall is rarely needed, simply because a Linux-box is usually airtight by default (there are other reasons to run a firewall though). Isn't is nice to have all that computer power back? So where is the difference? What makes the Linux desktop environment a safer choice? I have summed up six security reasons that makes me never want to switch back to Windows ever again;</p>
<p><strong>1. Smaller audience</strong><br />
Let's start off with an easy one. There are less people using Linux and the people that do tend to be more tech savy. Therefor it is less profitable to write malware for Linux, hence there are less attempts. It had to be said and it is probably true, however it is by far the sole reason. For example; Mac OS X (being a UNIX type operating system also) has gained enormously in popularity but not in malware. Coincidence? Read on!</p>
<p><strong>2. Software Repositories<br />
</strong>The process of installing software on a Linux box is somewhat different then most people are used to. For example; on Windows one would go to the software manufacturers website and download a binary to install. Instead most Linux distributions maintain socalled <a href="http://en.wikipedia.org/wiki/Software_repository">Software Repositories</a>. Almost all software (browsers, wordprocessors, ftp-clients, mail-clients, et cetera) can be installed by simply selecting it within a package manager. The applications in the repositories are specifically built and tested for your system, which ensures that they are legitimate and contain no malware. The repositories are filled with tons of software which you might need, only in rare occasions would you have to resort to other installation methods like a manual binary install or compiling from source. Getting your software from a secured and verified place, makes it less likely that you accidentally install malware on your computer.</p>
<p><strong>3. System-wide security patches</strong><br />
Another big advantage of Software Repositories is that it also allows for system-wide security updates. It is your Linux distribution that decides which version of a particular program you can install. This sounds like a disadvantage at first, but the benefits definitely outweigh the drawbacks. For example; if a patch is needed for a specific piece of software (from kernel to browser) you would almost instantly be given the possibility to update. This way you can easily keep your system up-to-date without having to constantly keep track of new software versions and flaws. In a sense you outsource the entire software security issue to your Linux distribution, making even inexperienced users as safe as can be.</p>
<p><strong>4. User privileges</strong><br />
By default you are an underpriviledged user on your own system. You can do make/edit documents and run most application on your system. But as soon as you want to reconfigure the system or install/update software you'd first have to prove (usually by means of entering a password) that you are authorized to do so. It's a very effective way of preventing a single software flaw in becoming a systemwide security breach.</p>
<p><strong>5. Execute permissions<br />
</strong>Generally speaking, files can be documents or applications. A document (picture, video, tekst) is something you can make by using an application. In Unix environments files are treated as documents by default. Meaning, you can't run them. Suppose you accidently download some piece of malware thinking it is the latest Britney Spears hitsingle. Even tripple clicking it won't make it run. In order to make the file behave like an application you'd first have to manually set execute permissions on it. And because nearly all malware is first activated by the user himself, this simple precaution makes it that much harder for malware coders to deploy their malicious software.</p>
<p><strong>6. Open Source<br />
</strong>The <a href="http://en.wikipedia.org/wiki/Security_through_obscurity">security through obscurity</a> principle is flawed, I think most security experts would agree. Proprietary software isn't inherently less exploitable then Open Source sofware simple because the code can't be looked into. I would even argue the exact opposite. When Open Source software get's popular, the source code is inspected and tested by a global community of developers. Granted some with bad intensions, but also those trying to learn from it and better it. As a result the software tends to consist of clean and well maintained code, which is thouroughly security scrutinized and debugged freely by third party's. Collaboration leads to better software!</p>
<p><strong>Is Linux infallible?</strong><br />
Nope, not even close. But conceptually better protected then some.</p>
<p><strong>Which distribution is right for me?</strong><br />
There is not one "Linux". Literally hundreds of different flavors exist, picking the right one is something you'd have to find out for yourself. If you're interested in trying out something easygoing, I'd personally recommend <a href="http://www.ubuntu.com/">Ubuntu</a> or <a href="http://www.linuxmint.com/">Linux Mint</a>.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 828px; width: 1px; height: 1px;">http://en.wikipedia.org/wiki/Software_repository</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.fili.nl/articles/six-reasons-why-the-linux-desktop-is-safer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Audit your network using Nmap, Ndiff and cron</title>
		<link>http://blog.fili.nl/articles/audit-your-network-using-nmap-ndiff-and-cron/</link>
		<comments>http://blog.fili.nl/articles/audit-your-network-using-nmap-ndiff-and-cron/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 19:31:59 +0000</pubDate>
		<dc:creator>fili</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[audit]]></category>
		<category><![CDATA[auditing]]></category>
		<category><![CDATA[backdoors]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ndiff]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[nmap]]></category>
		<category><![CDATA[rootkits]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[trojans]]></category>
		<category><![CDATA[virusses]]></category>
		<category><![CDATA[worms]]></category>

		<guid isPermaLink="false">http://blog.fili.nl/?p=185</guid>
		<description><![CDATA[To combat the ill effects of trojans, rootkits and worms (not to forget the new H1N1 virus) one "should" regularly scan their local network for changes, preferably on a daily basis. Then again, one "should" also preferably feed the dog, greet the neighbors and clean their teeth on a daily basis. Tell me, who has [...]]]></description>
			<content:encoded><![CDATA[<p>To combat the ill effects of trojans, rootkits and worms (not to forget the new H1N1 virus) one "should" regularly scan their local network for changes, preferably on a daily basis. Then again, one "should" also preferably feed the dog, greet the neighbors and clean their teeth on a daily basis. Tell me, who has time to do all that?</p>
<p>Network auditing is a tedious task and because it's not very stimulating work, you're likely more prone to error. I too, as your fellow computer enthusiast, like to automate just about anything (and as such my dog is never hungry, my teeth never dirty and my neighbor never under-greeted).<br />
So here's how I did it this time.</p>
<p><strong>1. Nmap 5 to the rescue!<br />
</strong>Nmap is a "<em>network exploration tool and security / port scanner"</em>, commonly used by sysadmins and unanimously considered  (by me) to be an indispensable tool. Nmap version 5 was recently  (july 16th, 2009) released - bringing some <a href="http://nmap.org/5/" target="_blank">exciting new features</a>. This article focuses on Ndiff, the scan comparison tool. It's the fruit of a Google Summer of Code project in 2008.</p>
<p>Your first task is to install Nmap 5. It happily runs on Windows, Linux, and Mac OS X, however this article is written with Linux in mind. Note: earlier releases won't do, on Debian Lenny I had to obtain version 5 through the <a href="http://backports.org/dokuwiki/doku.php" target="_blank">backports repository</a>.</p>
<p><strong>2. Next, install the script</strong><br />
Make a directory somewhere only accessible by root and put the following bash script in it:</p>
<pre class="brush: bash;">
#!/bin/bash
# Simple cron-based network auditing scanner
# Requires Nmap 5+
# Related article @ http://blog.fili.nl/articles/audit-your-network-using-nmap-ndiff-and-cron/

MAILOUT=your@email.com
NETWORK=10.0.0.0/24

CWD=`dirname $0`
NMAP=/usr/bin/nmap
NDIFF=/usr/bin/ndiff
MAIL=/usr/bin/mail

if [ -f &quot;$CWD/baseline.xml&quot; ]; then
    echo &quot;Scanning network $NETWORK...&quot;
    $NMAP -n -oX &quot;$CWD/current.xml&quot; $NETWORK &gt;/dev/null

    echo -n &quot;Comparing Nmap scans using Ndiff...&quot;
    $NDIFF $CWD/baseline.xml $CWD/current.xml &gt;$CWD/last-result

    if [ $(stat -c%s &quot;$CWD/last-result&quot;) -gt 70 ]; then
        echo &quot;Changed!&quot;; echo &quot;$MAILOUT has been notified.&quot;
        cat $CWD/last-result | mail -s &quot;Alert: Network $NETWORK changed&quot; $MAILOUT
        mv $CWD/current.xml $CWD/baseline.xml
    else
        echo &quot;Ok.&quot;
        rm -f $CWD/current.xml $CWD/last-result
    fi
else
    echo &quot;First scan, generating baseline...&quot;
    $NMAP -n -oX &quot;$CWD/baseline.xml&quot; $NETWORK &gt;/dev/null
fi
</pre>
<p>Download: <a href="http://fili.nl/naudit-cron/naudit-cron.sh" target="_blank">naudit-cron.sh</a></p>
<p>It's a quite straightforward script as you can see.<br />
Here's what it does:</p>
<ol>
<li>At the first run, it makes a baseline scan of your network to compare too.</li>
<li>At subsequent runs it makes a new scan and compares that to the baseline scan. When something differs in your network (like newly opened/closed ports or computers that have appeared/disappeared) it alerts an admin.</li>
<li>Finally it updates the baseline xml-file to reflect the change.</li>
</ol>
<p><strong>3. Configure the script<br />
</strong>There are few settings to adjust, but they are important. MAILOUT obviously declares where to send the notifications to. With NETWORK you can define what you want to scan, this could be an entire subnet (in <a href="http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" target="_blank">CIDR notation</a>) or a single ip.</p>
<pre class="brush: bash;">
MAILOUT=your@email.com
NETWORK=10.0.0.0/24
</pre>
<p>Make the file executable and run it (a couple of times) to generate the baseline xml-file and to verify that everything works as expected.</p>
<p><strong>4. Finally, cron it<br />
</strong>The only step left is to automatically execute this script on a hourly/daily/weekly basis. This is kind of OS specific, on most Linux distribution you'd create a new file in /etc/cron.d/ containing:</p>
<pre class="brush: plain;">
# minute - hour - monthday - month - weekday - command
0 1 * * * root /root/naudit-cron/naudit-cron.sh &gt;/dev/null
</pre>
<p>Tweak the cron settings and you're done!</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">As your fellow computer enthusiast,</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.fili.nl/articles/audit-your-network-using-nmap-ndiff-and-cron/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
