<?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>Nusuni &#187; Security</title>
	<atom:link href="http://www.nusuni.com/topics/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nusuni.com</link>
	<description></description>
	<lastBuildDate>Tue, 05 Feb 2013 01:22:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Remember To Back Up! And, Remember To Check Your Backups!</title>
		<link>http://www.nusuni.com/2012/04/remember-to-back-up-and-remember-to-check-your-backups/</link>
		<comments>http://www.nusuni.com/2012/04/remember-to-back-up-and-remember-to-check-your-backups/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 22:57:15 +0000</pubDate>
		<dc:creator>Jeremy Steele</dc:creator>
				<category><![CDATA[Guides/How-Tos]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.nusuni.com/?p=886</guid>
		<description><![CDATA[I know, I know, I&#8217;m a few days late for the whole World Backup Day craziness. But here we go anyway &#8211; remember to backup. And&#8230; remember to check your backups and archives! Every 3 months I archive my clients&#8217; emails to keep my imap mailbox nice and clean. A couple of weeks ago was [...]]]></description>
				<content:encoded><![CDATA[<p>I know, I know, I&#8217;m a few days late for the whole <a href="http://www.worldbackupday.com/">World Backup Day</a> craziness. But here we go anyway &#8211; remember to backup. And&#8230; remember to check your backups and archives!</p>
<p>Every 3 months I archive my clients&#8217; emails to keep my imap mailbox nice and clean. A couple of weeks ago was that 3 month mark. &#8220;Ok, so what&#8217;s the big deal?&#8221; you may be wondering. Well, I deleted my emails without first checking the archive to make sure they were backed up! The archive was empty!</p>
<p>Even though I&#8217;ve had mostly good clients, I still like to keep an archive of all emails for the &#8220;just in case&#8221; scenario &#8211; so I instantly panicked. I use imap for all my email accounts so the first thing was to try and grab the emails off a mail client that hadn&#8217;t yet deleted them. After a half hour of trying to get the emails I gave up &#8211; it would have taken hours to extract the needed data from the mbox files. </p>
<p>And then &#8211; a sudden stroke of genius &#8211; I keep backups of my websites&#8230; duh! I opened the tar file, went to the mbox folder for my email account, uploaded all of the missing emails back to my server and ta-da &#8211; the emails were back. Hooray &#8211; thank goodness those backups were good. </p>
<p>The only annoying bug with this &#8220;fix&#8221; is the timestamps are now off on my email clients. An easy enough problem to fix&#8230; but eh&#8230; I&#8217;m too lazy for that.</p>
<p>So there you go. While it is important to backup your data it is just as important to check your backups! Also, remember that having multiple backups is key!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nusuni.com/2012/04/remember-to-back-up-and-remember-to-check-your-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why SOPA Could Be The End Of The Modern Internet</title>
		<link>http://www.nusuni.com/2011/11/why-sopa-could-be-the-end-of-the-modern-internet/</link>
		<comments>http://www.nusuni.com/2011/11/why-sopa-could-be-the-end-of-the-modern-internet/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 22:44:18 +0000</pubDate>
		<dc:creator>Jeremy Steele</dc:creator>
				<category><![CDATA[Legal]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.nusuni.com/?p=524</guid>
		<description><![CDATA[SOPA, or the Stop Online Piracy Act, is the newest attempt by the RIAA/MPAA/Media Lobbyists Congress to control Internet piracy. The way it all works now is like this: If a site infringes on a copyright, the content owner will send in a complaint, called a DMCA (Digital Mellinium Copyright Act) Notice to the website&#8217;s [...]]]></description>
				<content:encoded><![CDATA[<p>SOPA, or the <a href="http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act">Stop Online Piracy Act</a>, is the newest attempt by the <del datetime="2011-11-18T22:27:06+00:00">RIAA/MPAA/Media Lobbyists</del> Congress to control Internet piracy. </p>
<p>The way it all works now is like this:</p>
<p>If a site infringes on a copyright, the content owner will send in a complaint, called a DMCA (Digital Mellinium Copyright Act) Notice to the website&#8217;s web host to take down the content. The host then (usually) contacts the site owner, sends them the notice, and the owner takes down the content. The owner can appeal the notice and then legal messiness ensues. Basically the ISP (web host) is protected if they follow the rules and forward the notices around. It keeps them out of legal trouble if their customers do something stupid.</p>
<p>Enter the SOPA. The SOPA removes this safe harbor that the ISPs now enjoy and gives the govt (and private parties, to an extent) the right to have a site&#8217;s DNS records blocked out. For most people this will make the site appear inaccessible. The only way for the site owner to get it back up is to literally file a lawsuit. All it takes is a simple court order to take down a site &#8211; better yet &#8211; a court order without a burden of proof. </p>
<p>This is dangerous and gives our govt the rights to block sites the same way Iran, China, and Korea do. This is such a terrible idea that many <a href="http://arstechnica.com/tech-policy/news/2011/11/strange-bedfellows-nancy-pelosi-ron-paul-join-sopa-opposition.ars">prominent politicians</a> from both sides are against it!</p>
<p>Please contact your local <a href="https://writerep.house.gov/writerep/welcome.shtml">congressperson</a> and tell them to say &#8220;No&#8221;!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nusuni.com/2011/11/why-sopa-could-be-the-end-of-the-modern-internet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Google SSL Search Is Yet Another Good Step Forward For The Industry</title>
		<link>http://www.nusuni.com/2011/11/why-google-ssl-search-is-yet-another-good-step-forward-for-the-industry/</link>
		<comments>http://www.nusuni.com/2011/11/why-google-ssl-search-is-yet-another-good-step-forward-for-the-industry/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 16:41:11 +0000</pubDate>
		<dc:creator>Jeremy Steele</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.nusuni.com/?p=491</guid>
		<description><![CDATA[Back in October Google announced that they would be enabling SSL search by default&#8230; at least for Google account owners. What this means is every ounce of information is (at least theoretically *see below) encrypted while it goes over the tubes between Google&#8217;s servers and your computer or mobile devices. Traditionally SSL was only used [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.nusuni.com/wp-content/uploads/2011/11/Google.jpg"><img src="http://www.nusuni.com/wp-content/uploads/2011/11/Google-300x125.jpg" alt="" title="Google" width="300" height="125" class="alignright size-medium wp-image-492" /></a></p>
<p>Back in October Google announced <a href="http://www.tomshardware.com/news/google-ssl-search-security-analytics,13751.html">that they would be enabling SSL search by default</a>&#8230; at least for Google account owners. What this means is every ounce of information is (at least theoretically *see below) encrypted while it goes over the tubes between Google&#8217;s servers and your computer or mobile devices. </p>
<p>Traditionally SSL was only used for high-security sites, such as bank logins, government and corporate portals, and email systems. However, thanks to the yearly increases in server performance, large-scale SSL rollouts is becoming a reality. First it was facebook, then it was twitter, and now Google is joining the party. </p>
<p>While many services such as Banks have used SSL for years, there is huge difference between encrypting something with a few million requests per month vs a few million requests per hour. That extra percent or two of CPU usage for one request really adds up at that scale. </p>
<p>Now with the increased publicity about constant security threats it would not surprise me to start seeing more readily available servers include encryption coprocessors &#8211; sort of like what a GPU is for gaming. Many manufacturers have plans to start fabbing such chips, and there are some systems that already include them &#8211; but they haven&#8217;t really taken off yet. When that starts happening I think the adoption rate of SSL for general-purpose sites (such as Google search) will really skyrocket. One of the big problems now is SSL runs strictly on the CPU&#8230; and sure CPUs these days are incredibly fast, but in servers they are usually busy with other tasks &#8211; such as running code or fetching a database row or saving something to memcache, etc. </p>
<p>The only other option I could see would be to start putting GPUs into servers. GPUs are actually amazingly fast at encrypting and decrypting data &#8211; unfortunately they are also amazingly hot and are nowhere near as efficient as a dedicated encryption processor could be. Personally, I would not want to see what would happen to a server if you could somehow shoehorn a couple of GTX 570s into it&#8230; sure it could crunch the hell out of some numbers, but the poor thing would melt. Heck, you could probably fry eggs on it.</p>
<p>I&#8217;ll go out on a limb and say in the next 5 years pretty much every server-grade system being produced will include encryption coprocessors (probably coupled with the main CPU), and at least 30% of all traffic will be encrypted, whether it is with SSL or something else. </p>
<p>(*Note: SSL is secure, however, it can be broken. Like every end-to-end solution, it is very possible (albeit difficult) to do a man in the middle attack)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nusuni.com/2011/11/why-google-ssl-search-is-yet-another-good-step-forward-for-the-industry/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Install, Setup, And Test Apache MPM-ITK And PHP In Ubuntu</title>
		<link>http://www.nusuni.com/2011/11/how-to-install-setup-and-test-apache-mpm-itk-and-php-in-ubuntu/</link>
		<comments>http://www.nusuni.com/2011/11/how-to-install-setup-and-test-apache-mpm-itk-and-php-in-ubuntu/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 23:52:50 +0000</pubDate>
		<dc:creator>Jeremy Steele</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.nusuni.com/?p=428</guid>
		<description><![CDATA[There have always been many different ways of setting up Apache and php. Whether it is with SuPHP, a multi-process-module, or simply using the Apache module, each way has pros and cons. Up until a few days ago I usually stuck with SuPHP &#8211; as it was the easiest to setup. However, I got adventurous [...]]]></description>
				<content:encoded><![CDATA[<p>There have always been many different ways of setting up Apache and php. Whether it is with SuPHP, a multi-process-module, or simply using the Apache module, each way has pros and cons. </p>
<p>Up until a few days ago I usually stuck with SuPHP &#8211; as it was the easiest to setup. However, I got adventurous and tried out the MPM-ITK module &#8211; which lets you run a virtual host under a specific username. Unlike SuPHP &#8211; ITK will also make apache run as the specified user for everything &#8211; static content or dynamic. This will let you close up your public html folders and help keep rogue scripts from editing other users&#8217; files. As an added bonus it also supports other Apache modules, such as Python. </p>
<p>Oh, I almost forgot &#8211; it is also fast. Much faster than SuPHP &#8211; since it uses the built-in apache module to run php scripts and not a cgi binary. In fact, on my dev box (a custom Intel Atom server) it went from 32 to 75 requests per second for a simple PHP script with ApacheBench (10 concurrent, 500 requests if you&#8217;re curious). My production server (the one that hosts this site) went from 100 to 350 for the same script!</p>
<p>While those are artificial benchmarks &#8211; the result is undeniable: ITK is faster than SuPHP. While code execution itself is the same &#8211; if you get a sudden burst of traffic the speed at which ITK can initialize and load in PHP is much faster than the CGI binary. </p>
<p>So now let&#8217;s get into it &#8211; how to install, setup, and test MPM-ITK in Ubuntu server:</p>
<p>First off, you have to install the programs:</p>
<pre><code>sudo apt-get install apache2-mpm-itk libapache2-mod-php5</code></pre>
<p>Well, that was easy, no? Now to test it:</p>
<pre><code>cd ~<br />
mkdir public_html<br />
cd public_html</code></pre>
<pre><code>echo "&lt;?php system('/usr/bin/id'); ?&gt;" &gt; test.php</code></pre>
<p>For this example I setup a really simple port-based virtual host:</p>
<pre><code>sudo nano /etc/apache2/sites-enabled/me.conf</code></pre>
<pre><code>Listen 8080<br /><br />
&lt;VirtualHost *:8080&gt;<br />
DocumentRoot /home/<strong>your_username</strong>/public_html<br />
AssignUserID <strong>your_username</strong> <strong>your_username</strong><br />
&lt;/VirtualHost&gt;</code></pre>
<p>Save with ctrl-o and exit with ctrl-x</p>
<pre><code>sudo service apache2 restart</code></pre>
<p>And then load it up in your browser of choice:</p>
<p><a href="http://www.nusuni.com/wp-content/uploads/2011/11/mpm-itk.png"><img src="http://www.nusuni.com/wp-content/uploads/2011/11/mpm-itk-300x213.png" alt="" title="mpm-itk" width="300" height="213" class="aligncenter size-medium wp-image-432" /></a></p>
<p>If it all went well &#8211; it should show your username. </p>
<p>To really test it, simply chmod the file as 600 so it has to be run as the user (or root) to even read it. </p>
<pre><code>chmod 600 ~/public_html/test.php</code></pre>
<p>If it still loads &#8211; then you&#8217;re all set. MPM-ITK is setup and loading both static and php files as your user. </p>
<p>Now how does it work? The magic line in all of this is &#8220;AssignUserID&#8221; &#8211; in the virtual host declaration. That forces apache to load any files for the host as a specific user and group. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.nusuni.com/2011/11/how-to-install-setup-and-test-apache-mpm-itk-and-php-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 Commonly Overlooked Web Application Security Holes And Bad Practices</title>
		<link>http://www.nusuni.com/2011/09/5-commonly-overlooked-web-application-security-holes-and-bad-practices/</link>
		<comments>http://www.nusuni.com/2011/09/5-commonly-overlooked-web-application-security-holes-and-bad-practices/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 04:40:30 +0000</pubDate>
		<dc:creator>Jeremy Steele</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.nusuni.com/?p=343</guid>
		<description><![CDATA[As you probably already know, web application security has been an increasingly hot topic over the past decade. From simple SQL injections to full-on website defacings, many websites, big or small, have been affected by lackluster security. If you use a prebuilt system such as WordPress the biggest thing you can do is update the [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.nusuni.com/wp-content/uploads/2011/09/padlock.jpg"><img src="http://www.nusuni.com/wp-content/uploads/2011/09/padlock-186x300.jpg" alt="" title="padlock" width="186" height="300" class="alignright size-medium wp-image-318" /></a>As you probably already know, web application security has been an increasingly hot topic over the past decade. From simple SQL injections to full-on website defacings, many websites, big or small, have been affected by lackluster security. If you use a prebuilt system such as WordPress the biggest thing you can do is update the system, update the system, and did I mention, update the system? However, if you are the one writing a web application then you are also the one in control of its security. </p>
<p>Here&#8217;s a few quick reminders about possible security holes and bad practices you may have been ignoring:</p>
<h2>URLs</h2>
<p><strong>The Flaw</strong></p>
<p>Depending on how your system is setup, URLs can be a <em><strong>huge</strong></em> security hole. Think about it: how often do you validate a requested URL? Of course you don&#8217;t need to since firefox and others prevent users from putting evil characters in them such as &quot;&#8230;/&quot;, right? Wrong! The fact is a black hat will not be using firefox to hack your site. Most of them will use a prebuilt tool or write up a quick HTTP client to get the job done. They can enter all sorts of nefarious characters with that. </p>
<p><strong>The Fix</strong></p>
<p>Validate and sanitize their URLs before routing the request to the appropriate code. Remove any invalid characters and <strong>don&#8217;t</strong> do crap like this:</p>
<pre><code>require($_GET['somestupidvariablesinceimtolazytoproperlycode']);</code></pre>
<p>If you do that, you will get ZERO sympathy if your site gets hacked. K?</p>
<h2>Plain Text Config Files</h2>
<p><strong>The Flaw</strong></p>
<p>Thankfully this practice is finally starting to die off, but some crappy coders still insist on using plain text files for their script configurations. The files can be viewed right inside the web browser. </p>
<p><strong>The Fix</strong></p>
<p>Use .php, .pl, .cgi, etc files for  your configuration. That in and of itself is a massive security boost over using a .ini or .txt file. If for some bizarre reason you have to use plain files you should at least use a .htaccess file to disallow access to the file &#8211; or better yet &#8211; keep the file outside the site directory. </p>
<h2>Login Forms</h2>
<p><strong>The Flaw</strong></p>
<p>I&#8217;ve worked on at least 3 projects in the past year that had excellent form validation throughout the entire system, but they didn&#8217;t validate anything from the login form except for the credentials. Stupid people.</p>
<p>A login form is still a form!</p>
<p><strong>The Fix</strong></p>
<p>In addition to doing the obvious thing of validating their authentication credentials, be sure to validate and sanitize their form data! It still contains user-inputted data, and it cannot be trusted. </p>
<h2>User-Agent (And Other Variables)</h2>
<p><strong>The Flaw</strong></p>
<p>The user agent is a variable set on the client side to identify their browser. Would you ever think to validate it? Probably not, since apache and others stick them in server variables ($_SERVER, etc); it makes it seem safer. I don&#8217;t know of a single web server on the planet that sanitizes user-agent strings. That&#8217;s a good thing too &#8211; the server mucking with our business is bad for everyone!</p>
<p><strong>The Fix</strong></p>
<p>Once again, don&#8217;t trust any client-side data. 20 lines of C code, or even a simple firefox extension, can let a black hat send all sorts of nasty code through client variables like the user-agent, cookies, etc.</p>
<p>From a security standpoint there is no different between:</p>
<pre><code>$query = &quot;select * from users where username=$_GET['username']&quot;</code></pre>
<p>and </p>
<pre><code>$query = &quot;select * from users where username=$_SERVER['HTTP_USER_AGENT']&quot;</code></pre>
<p>They are both insecure. Don&#8217;t do it, please!</p>
<h2>Being Too Trusting</h2>
<p><strong>The Flaw</strong></p>
<p>Hiring freelancers is a great way to get good quality work done for relatively low cost. I used to do quite a bit of freelance PHP work, but lately I&#8217;ve been trying to find other sources of income. The one thing that always amazed me while doing development is how trustful some people are. It is one thing if a client knew me via previous work or referrals, but it is an entirely different manner if they are complete strangers. I always found it odd how some people, even before I agreed to do the work, would provide me with file access to their servers to look over things. </p>
<p>Of course I have never once in my entire life done anything malicious with other peoples&#8217; data. Still &#8211; I found it odd. It occurred enough that I can&#8217;t imagine I&#8217;m the only coder out there to have this happen to them. </p>
<p><strong>The Fix</strong></p>
<p>Be more cautious with login data. Only provide it if completely necessary or if the person is 100% trusted. The fact is there are people out there who will purposely screw you over to better themselves. Sad, but true. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.nusuni.com/2011/09/5-commonly-overlooked-web-application-security-holes-and-bad-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Disable/Bypass The Gmail Spam Filters</title>
		<link>http://www.nusuni.com/2011/08/how-to-disablebypass-the-gmail-email-filters/</link>
		<comments>http://www.nusuni.com/2011/08/how-to-disablebypass-the-gmail-email-filters/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 21:57:19 +0000</pubDate>
		<dc:creator>Jeremy Steele</dc:creator>
				<category><![CDATA[Guides/How-Tos]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.nusuni.com/?p=233</guid>
		<description><![CDATA[One common complaint about gmail, especially for Google Apps users, is the fact you are pretty much forced to use their spam filtering. Generally I get good results with them, but to be honest I prefer sorting through emails myself. Most guides which go over how to disable their spam filter use something like a [...]]]></description>
				<content:encoded><![CDATA[<p>One common complaint about gmail, especially for Google Apps users, is the fact you are pretty much forced to use their spam filtering. Generally I get good results with them, but to be honest I prefer sorting through emails myself.</p>
<p>Most guides which go over how to disable their spam filter use something like a &#8220;to: @&#8221; filter and &#8220;never send to spam&#8221;. This is a huge mistake, and can cause some annoying bugs. For example, with that filter all emails you send will be filtered just like incoming emails (and may show up in the inbox instead of sent), and it doesn&#8217;t cover bcc or cc. </p>
<p>Luckily for us gmail lets us use the delivered-to header to filter emails as well. Delivered-to is the final email account where the email was sent, and it will even work for cc and bcc emails. It does not, however, cover emails send through forwarding addresses&#8230; but that is easy enough to fix. </p>
<ul>
<li>On the main gmail page click &#8220;Create new filter&#8221;.</li>
<li>In the <strong>&#8220;Has the words:&#8221;</strong> box enter the following: <strong>deliveredto:example@gmail.com</strong>. Make sure you put your actual email address.<br /><img src="http://www.nusuni.com/wp-content/uploads/2011/08/bypass_gmail_spam.png" alt="" title="bypass_gmail_spam" width="573" height="30" class="size-full wp-image-235" /></li>
<li>If you have multiple email addresses with that gmail account, or if you use google apps and have email aliases or alias domains, you need to use the &#8220;<strong>OR</strong>&#8221; operator: deliveredto:example@gmail.com OR deliveredto:example2@gmail.com OR deliveredto:example3@gmail.com<br />
<img src="http://www.nusuni.com/wp-content/uploads/2011/08/bypass_gmail_spam2.png" alt="" title="bypass_gmail_spam2" width="561" height="29" class="size-full wp-image-236" /></li>
<li>Click next and then select <strong>&#8220;Never send it to Spam&#8221;</strong> and click create.<br /><img src="http://www.nusuni.com/wp-content/uploads/2011/08/bypass_gmail_spam3.png" alt="" title="bypass_gmail_spam3" width="177" height="25" class="alignnone size-full wp-image-237" /></li>
</ul>
<p>Easy, no? The filter works like this: if the email is sent to one of the entered addresses ( with the to: bcc: or cc: fields) it will never send it to the spam box. The only time this may be a bit quirky is if you email yourself. </p>
<p>Did you like this tip? Leave a comment below!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nusuni.com/2011/08/how-to-disablebypass-the-gmail-email-filters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Malware And Black Hat Dictionary</title>
		<link>http://www.nusuni.com/2011/06/malware-and-black-hat-dictionary/</link>
		<comments>http://www.nusuni.com/2011/06/malware-and-black-hat-dictionary/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 21:36:57 +0000</pubDate>
		<dc:creator>Jeremy Steele</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.nusuni.com/?p=178</guid>
		<description><![CDATA[I recently began thinking about the misconceptions of the MacDefender malware for Apple&#8217;s Mac OS X operating system and I came to one big conclusion &#8211; most people don&#8217;t know nerd jargon. Reading several online forums people often mistakenly believe MacDefender is a &#8220;virus&#8221;, when in reality it is a simple static trojan. Expanding upon [...]]]></description>
				<content:encoded><![CDATA[<p>I recently began thinking about the misconceptions of the MacDefender malware for Apple&#8217;s Mac OS X operating system and I came to one big conclusion &#8211; most people don&#8217;t know nerd jargon. Reading several online forums people often mistakenly believe MacDefender is a &#8220;virus&#8221;, when in reality it is a simple static trojan. Expanding upon that thought, I began to ponder the several types of malware: rootkits, trojans, spyware, key loggers, etc, as well as general blackhat terms such as DDoS, social engineering, and phishing.</p>
<p>So that is the point of this articleÂ  &#8211; to define some nerd jargon in a way that everyone will understand. Some of the definitions are very similar because the terms are very closely related.</p>
<h3>DoS &#8211; Denial of Service Attack</h3>
<p>A  DoS is an attack in which one computer or device floods a server with so many requests that it will be unable to respond to legit requests. </p>
<h3>DDosÂ  &#8211; Distributed Denial of Service Attack</h3>
<p>A DDoS is similar to a DoS attack, but instead of one device it is multiple devices (usually hundreds). Sometimes these devices are voluntarily used, sometime they are cloud based services, but most of the time they are zombie computers which are infected with malware. The goal of a DDoS attack is simple: to take down a server or even an entire network. </p>
<h3>Adware</h3>
<p>Adware is a common type of malware that randomly spams users with ads and popups. These ads may even appear when they are not using a browser. In an infected computer that is running slow, adware is often the culprit. </p>
<h3>Virus</h3>
<p>Malware that has the ability to both self-replicate and infect a machine with little outside help. Viruses often mutate and change form to avoid malware scanners, and are usually installed via infected programs or documents. </p>
<h3>Worm</h3>
<p>A subset of a virus, worms have the ability to infect other computers with no user interaction. They abuse security holes to go through the network and attack any vulnerable computers. </p>
<h3>Trojan</h3>
<p>A trojan [horse] is a piece of software that pretends to be one thing but in reality is another. The MacDefender malware for OS X is a recent highly-publicized form of a trojan horse &#8211; it pretends to get rid of viruses but behind the scenes it is fake software that causes popups.  Trojans often install other malware. </p>
<h3>Rootkit</h3>
<p>A rootkit is a piece of software that has the ability to hide itself from process scanners and anti virus software. Rootkits are often used in conjunction with key loggers and spyware to steal user information, or even turn the machine into a zombie computer for a DDoS attack. </p>
<h3>Spyware</h3>
<p>Malware that tracks user actions, logs their passwords, etc. Spyware is a general term that includes specific software such as keyloggers, but it also covers tracking what processes the user is running, snapping pictures of their desktop, etc.  </p>
<h3>Keylogger</h3>
<p>A piece of spyware that tracks anything the user enters on a machine. They commonly gather usernames, passwords, bank URLs, and email addresses. </p>
<h3>Social Engineering</h3>
<p>In its basic form social engineering is not something only black-hat hackers do. For example, it would be social engineering to convince a girl to go out with you who may otherwise hate your guts. Sales associate also use social engineering to up-sell to customers. </p>
<p>However, when used for black-hat purposes it can be quite nefarious. A good social engineer can convince someone to give out a password, gain security access, pretend to be an employee, etc. Con men are social engineers. </p>
<h3>Phishing</h3>
<p>Phishing websites are fake sites that appear to be the real thing. The goal is almost always to gain login credentials to banking sites or email services. Nearly every new browser has a built-in phishing filter that will alert users if they are on a reported fake site. </p>
<p>And that&#8217;s it for now. If you can think of anything else to add, please leave a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nusuni.com/2011/06/malware-and-black-hat-dictionary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Password Security From A Developer&#8217;s Perspective</title>
		<link>http://www.nusuni.com/2011/05/password-security-from-a-developers-perspective/</link>
		<comments>http://www.nusuni.com/2011/05/password-security-from-a-developers-perspective/#comments</comments>
		<pubDate>Sat, 07 May 2011 22:21:01 +0000</pubDate>
		<dc:creator>Jeremy Steele</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.nusuni.com/?p=137</guid>
		<description><![CDATA[One of my biggest pet peeves has to do with password security &#8211; and why some websites still don&#8217;t take password security seriously. In this article I will go over some of the common limitations and bad decisions I&#8217;ve seen, and why there is no reason for any website to have them in place: No [...]]]></description>
				<content:encoded><![CDATA[<p>One of my biggest pet peeves has to do with password security &#8211; and why some websites still don&#8217;t take password security seriously. In this article I will go over some of the common limitations and bad decisions I&#8217;ve seen, and why there is no reason for any website to have them in place:</p>
<h3>No Special Characters</h3>
<p>Virtually all security experts agree the best way to make a secure password is by using a mixture of alphanumeric characters (A-Z and 0-1) in addition to special characters ( !@%$)&amp;^ ). So why is it so many websites still disallow special characters? It is simply mind boggling. </p>
<p>For starters, if you are properly developing your application, special characters should not matter for data that is going through a hash algorithm (you do hash your passwords, right?) The algorithms only care about bits and bytes &#8211; as far as they are concerned an A is no different than a % other than the bit values they represent. </p>
<h3>Length Limits</h3>
<p>One of the financial sites I use on a regular basis limits passwords to 10 characters. While yes, a 10 character password is a lot better than 90% of the passwords used on a daily basis by most people, it is still insecure. But that is an argument for another day.</p>
<p>My point is, why have such a low limit? I do agree a limit is needed (after all, you don&#8217;t need people sending a megabyte of data every time they log in), but the limit can be fairly high. Theoretically a hashed password will always be the same size in the database &#8211; whether the original text was &#8220;abc&#8221; or &#8220;123456789012345678901234567890&#8243; &#8211; it doesn&#8217;t matter. So please, stop it with the annoyingly low limits. </p>
<h3>Not Hashing The Passwords</h3>
<p>This is just plain stupid. There is no reason in the entire universe to ever store plain-text passwords in your database.</p>
<p>&#8211; Once Again &#8211;</p>
<p><strong>There is no reason in the entire universe to ever store plain-text passwords in your database.</strong></p>
<p>Get it? It sickens me how many services out there still literally email your password, in plain text, when you use their &#8220;forgot my password&#8221; function. Just stop it. Please hash the password and if they forget it, have a verification test set up, and if they pass it let them make a new password. </p>
<p>Otherwise you&#8217;re just asking for a script-kiddie to cause trouble. </p>
<p>Oh, and do use <a href="http://en.wikipedia.org/wiki/Salt_%28cryptography%29">password salts</a>. </p>
<h3>Change Password Fields</h3>
<p>One of the best security measures you can put in place is requiring the user to enter their password to change their login name (email/username/whatever) or to change their password. The reason being &#8211; what if someone intercepts a cookie? </p>
<p>Without requiring a password they can steal the account very easily. By requiring a password it makes it much more difficult. And that leads me onto my next point&#8230;</p>
<h3>Cookies</h3>
<p>And last but not least is cookies. No &#8211; not the edible delicious treats &#8211; but those little bits of text that let you store session data. </p>
<p>A login cookie should never have your password (even hashed) in it. When a user logs in an id should be generated &#8211; unique to this session &#8211; which will be used to identify the user. That id will then be stored in the database and in the cookie and will only be valid for as long as the cookie is valid. Heck, you can even do a mixture of a user id and the session id.</p>
<p>Either way if the cookie gets intercepted a malicious user will still be able to get in &#8211; but at least this way their password is safe. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.nusuni.com/2011/05/password-security-from-a-developers-perspective/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Simple SQL Injection That Is Easy To Miss</title>
		<link>http://www.nusuni.com/2011/04/a-simple-sql-injection-that-is-easy-to-miss/</link>
		<comments>http://www.nusuni.com/2011/04/a-simple-sql-injection-that-is-easy-to-miss/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 05:13:41 +0000</pubDate>
		<dc:creator>Jeremy Steele</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.nusuni.com/?p=125</guid>
		<description><![CDATA[SQL Injections are evil. Plain and simple. They are easy to miss, but a major one can cripple an otherwise highly secure application. For the most part, a sql injection would look something like this: In this example the otherwise simple query would fetch all rows in that table. The malicious user could use it [...]]]></description>
				<content:encoded><![CDATA[<p>SQL Injections are evil. Plain and simple. They are easy to miss, but a major one can cripple an otherwise highly secure application. For the most part, a sql injection would look something like this:</p>
<pre><code><br />
$input = "' or 1='1";<br /><br />
$ret = mysql_query("select * from users where user_name='$user_input'");<br />
</code></pre>
<p>In this example the otherwise simple query would fetch all rows in that table. The malicious user could use it to get secure information such as password hashes (which, if they are not salted and are poorly hashed could lead to the actual user passwords). </p>
<p>One other major source of sql injections I have noticed has to do with not properly quoting data you get from the database. What if your code looks like this:</p>
<pre><code><br />
$ret = mysql_query("select * from users where user_id=5");<br />
$row = mysql_fetch_assoc($ret);<br /><br />
//do a bunch of crap<br />
$ret = mysql_query("select * from users where user_name='" .$row['user_name'] . "'");<br />
</code></pre>
<p>The top part is pretty simple, it gets the user info for the user with the id of 5. Then lets say your app does a bunch of &#8220;crap&#8221;, and then for some odd reason you fetch data from the table again but use the user_name column? Again, not a problem, right? Why quote it if the data is from the database?</p>
<p>Well, what if the user name is equal to &#8220;&#8216; or 1=&#8217;1&#8243; ? You guessed it &#8211; it returns every users&#8217; data. </p>
<p>While this is a bit of a stretch &#8211; you&#8217;d be surprised how often I see code similar to that in projects that I work on. Heck, I&#8217;m even guilty of it. The biggest fault here is not quoting and not sanitizing strings. And lazy coding. </p>
<p>The point of this post is simple: quote ANY data that goes into your query (unless you know for darn sure you don&#8217;t need to), and not just user-inputted data. Never trust any data, never. Always validate, always sanitize, and don&#8217;t be afraid to show an error 503 page if something seems fishy. It is better to be safe than sorry, especially when you are dealing with user data. </p>
<p>Nothing would be worse than having to send out thousands of emails apologizing for a security breach, knowing full-well it could have been easily avoided. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.nusuni.com/2011/04/a-simple-sql-injection-that-is-easy-to-miss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
