<?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>Blog</title>
	<atom:link href="http://blog.primestudiosllc.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.primestudiosllc.com</link>
	<description>Prime Studios</description>
	<lastBuildDate>Wed, 01 Sep 2010 04:24:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Adding Google Quick-add to Anything: The Textdate PHP Class</title>
		<link>http://blog.primestudiosllc.com/web/adding-google-quick-add-to-anything-the-textdate-php-class</link>
		<comments>http://blog.primestudiosllc.com/web/adding-google-quick-add-to-anything-the-textdate-php-class#comments</comments>
		<pubDate>Wed, 01 Sep 2010 04:19:33 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.primestudiosllc.com/?p=979</guid>
		<description><![CDATA[Earlier this year we were asked by a client to create a tee time scheduling application for their golf course, and we decided it would be best to use Google Calendar within a Google Apps account as the &#8220;backend&#8221; management &#8230; <a href="http://blog.primestudiosllc.com/web/adding-google-quick-add-to-anything-the-textdate-php-class">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Earlier this year we were asked by a client to create a tee time scheduling application for their golf course, and we decided it would be best to use Google Calendar within a Google Apps account as the &#8220;backend&#8221; management tool, and the Google Calendar API to make it all tick. One of the fun late-night features we wanted to add was something to replicate <a href="http://www.google.com/support/calendar/bin/answer.py?hl=en&amp;answer=36604#text" target="_blank">Google&#8217;s &#8220;Quick-add&#8221;</a> functionality, so a golfer could just type in slang like &#8220;tomorrow at noon&#8221; or &#8220;next Tuesday at 3pm&#8221; to schedule a tee time. We created a class to do this, and think it might be useful to share.</p>
<p>This class takes a string/sentence as an input, and outputs several code-friendly values- bamb, your own quick-add. We use the Zend Gdata library to integrate with the Google Calendar API, which [lucky for us] supports creating events by the quick-add method. The basic function of this class is to retrieve start-time, end-time, and get a title for a &#8220;slang&#8221; event description.</p>
<h3>The Details of Textdate</h3>
<p>The <strong>textdate.class.php</strong> creates an event with the description you input using the Quick-add API, stores the needed details about the event, then deletes the event. We assume you will need a double opt-in system for scheduling, and don&#8217;t want to schedule an event without either the user or yourself making sure the text-to-date conversion went as planned. We have added an &#8220;add_event&#8221; function to handle the actual scheduling, which would be step two after [maybe] checking the event against a database of existing events or schedules.</p>
<h3>Setup and Use textdate.class.php</h3>
<p>You will need to download the <a href="http://framework.zend.com/download/gdata">Zend Gdata Library</a> first. For this example, I simple extracted the folder &#8220;Zend&#8221; inside the &#8220;library&#8221; folder, and uploaded that in my root directory. There are many ways to make sure the library is accessible to the class, and we take care of it opting for the simple way, but if you are using the library extensively and want to include it by default you can use a PHP include in your PHP configurations, in the .htaccess, or using a line of PHP (read the Zend &#8220;INSTALL.txt&#8221; for more info).</p>
<p>Assuming you have a Google Apps or Gmail account, you should have access to a Google Calendar, and you will share your login information in the <strong>textdate.class.php</strong> file to access the calendar API. Below is the basic usage of the class:</p>
<pre class="brush: php;">
&lt;?php
include('textdate.class.php');

$td = new Textdate;
$event_details = $td-&gt;convert('Meet Jeff tomorrow at 5pm for 3 hours');

if(!isset($event_details['error']))	{
	echo 'Title: '.$event_details['title'];
	echo '&lt;br/&gt;';
	echo 'Start: '.date('g:sa M j, Y',$event_details['start']);
	echo '&lt;br/&gt;';
	echo 'End: '.date('g:sa M j, Y',$event_details['end']);
}	else	{
	echo $event_details['error'];
}
</pre>
<p><strong>Title: Meet Jeff<br />
Start: 5:00pm Sep 1, 2010<br />
End: 8:00pm Sep 1, 2010</strong></p>
<p>We are passing around a Unix time-stamp for the &#8220;start&#8221; and &#8220;end&#8221;, we find that is easiest to start with for most development. After you run some checks, or give the user a view of some of the details to verify, you can use the &#8220;add_event&#8221; to actually put the event into the calendar:</p>
<pre class="brush: php;">
$td-&gt;add_event($event_details);
</pre>
<p>There are a couple other things you can look to add, like notes for the event, people/email addresses, where the event will be, etc. We find this should serve as a good starting point for the basic text-to-date conversion though. Here is the class itself, and a ZIP package is given below of both the class and the test file.</p>
<pre class="brush: php;">
&lt;?php
require_once 'Zend/Loader.php';
date_default_timezone_set('America/New_York');

class Textdate	{
	function convert($event_string)
	{
		$gcal = $this-&gt;load_calender();

		//add quick event
		$event = $gcal-&gt;newEventEntry();
		$event-&gt;content = $gcal-&gt;newContent($event_string);
		$event-&gt;quickAdd = $gcal-&gt;newQuickAdd('true');
		$newEvent = $gcal-&gt;insertEvent($event);

		$query = $gcal-&gt;newEventQuery();
		$query-&gt;setUser('default');
		$query-&gt;setVisibility('private');
		$query-&gt;setProjection('full');
		$query-&gt;setOrderby('lastmodified');

		//get feed, or catch error
		try {
			$feed = $gcal-&gt;getCalendarEventFeed($query);
		}
		catch(Zend_Gdata_App_Exception $e) {
			$event_details = array(
								'error'=&gt;'Error: '.$e-&gt;getResponse()
								);
			return $event_details;
		}

		//store details
		foreach($feed as $event) 	{
			$event_details = array(
								'start'=&gt;strtotime($event-&gt;when[0]-&gt;getStartTime()),
								'end'=&gt;strtotime($event-&gt;when[0]-&gt;getEndTime()),
								'title'=&gt;$event-&gt;title,
								'url'=&gt;$event-&gt;getEditLink()-&gt;href
								);
			break;
		}

		//delete event
		$event = $gcal-&gt;getCalendarEventEntry($event_details['url']);
		$event-&gt;delete();
		return $event_details;
	}

	function add_event($event_details)	{
		$gcal = $this-&gt;load_calender();

		try {
			$event = $gcal-&gt;newEventEntry();
			$event-&gt;title = $gcal-&gt;newTitle($event_details['title']);
			$when = $gcal-&gt;newWhen();
			$when-&gt;startTime = date(DATE_ATOM,$event_details['start']);
			$when-&gt;endTime = date(DATE_ATOM,$event_details['end']);
			$event-&gt;when = array($when);
			$gcal-&gt;insertEvent($event);
		} catch (Zend_Gdata_App_Exception $e) 	{
			return &quot;Error: &quot;.$e-&gt;getResponse();
		}
		return TRUE;
	}	

	function load_calender()	{
		// load library
		Zend_Loader::loadClass('Zend_Gdata');
		Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
		Zend_Loader::loadClass('Zend_Gdata_Calendar');
		Zend_Loader::loadClass('Zend_Http_Client');

		// create authenticated HTTP client for Calendar service
		$gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
		$user = &quot;YOUREMAIL&quot;;
		$pass = &quot;YOURPASSWORD&quot;;
		$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $gcal);
		return $returnCal = new Zend_Gdata_Calendar($client);
	}
}
</pre>
<p><a href="http://blog.primestudiosllc.com/wp-content/uploads/textdate-class-with-example.zip">Download the ZIP Package</a></p>
<h3>Isn&#8217;t that Neat?</h3>
<p>Google is basically awesome for letting everyone tap into their text-to-event algorithm work, and hopefully you find it at least intriguing, and maybe useful on an application down the road. We encourage you to leave a comment if you like this or need any help getting it running, happy coding ya&#8217;ll.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.primestudiosllc.com/web/adding-google-quick-add-to-anything-the-textdate-php-class/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send Time Limited Secure Logins with timebomb.it</title>
		<link>http://blog.primestudiosllc.com/security/send-time-limited-secure-logins-with-timebomb-it</link>
		<comments>http://blog.primestudiosllc.com/security/send-time-limited-secure-logins-with-timebomb-it#comments</comments>
		<pubDate>Fri, 27 Aug 2010 16:55:47 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.primestudiosllc.com/?p=903</guid>
		<description><![CDATA[Today we officially launched a new web and mobile application timebomb.it, making it easy and more secure to send confidential login information from one person to another. You can think of it as a secure URL shortener for sending logins. &#8230; <a href="http://blog.primestudiosllc.com/security/send-time-limited-secure-logins-with-timebomb-it">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Today we officially launched a new web and mobile application <a href="https://timebomb.it">timebomb.it</a>, making it easy and more secure to send confidential login information from one person to another. You can think of it as a secure URL shortener for sending logins. <strong>All it takes is one person to break into a computer or email client, or one phone to be lost for an attacker to gain access to some really confidential stuff.</strong> We bet a search for &#8220;login&#8221;, &#8220;username&#8221;, or &#8220;password&#8221; in most email boxes will come up with something useful for a hacker, and this is why we ask you to <a href="https://timebomb.it">timebomb.it</a> next time you need to send confidential information.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-964" style="margin-top: 15px; margin-bottom: 15px;" title="timebombit-screenshots-preview" src="http://blog.primestudiosllc.com/wp-content/uploads/timebombit-screenshots-preview.jpg" alt="" width="645" height="443" /></p>
<p style="text-align: center;">1) Create a Link. 2) View it, send it, blow it up.</p>
<h3>Put Hackers Against the Clock</h3>
<p>As a development company, we either require, or maintain login information for servers, mail accounts, or applications for our clients- all of which are generally secured by a username and password. So when we need login information, we get it in an email. This confidential information remains in our sent folder, the clients inbox, and maybe on some of our mobile devices (if we choose to sync them). We decided we needed a way to send confidential information, but not have it linger inside an email client. Timebomb.it creates random URL&#8217;s for logins, with the option to blow it up in 1-hour, 1-day, or 1-week. Now we just send that link over, and know that if a hacker gets a hold of our computer in a year, our email account isn&#8217;t peppered with our clients usernames and passwords.</p>
<h3>A Simple Interface, Because it Should Be</h3>
<p>Our background in mobile webapps gave us the tools to make this thing mobile-ready out of the box. Using HTML5, CSS3, and custom jQuery scripts, we are seeing sub-500ms load times on a regular internet connection. The only images used are on the <a href="https://timebomb.it/about">timebomb.it about page</a>, which is full-width for most screens, and scales seamlessly on a mobile device. We figure with some of the odd situations you could use timebomb.it for, you want it viewable on a phone, quick to access, and easy to read:</p>
<p>- You need the alarm code for your grandmas garage door (just use the password field)<br />
- You want your mom to send you the logins to your AT&amp;T account<br />
- Your co-worker emailed you asking for the credentials to the computer in the testing lab<br />
- You reset the combination-code door lock on your office building, and want to inform your employees</p>
<p>Once you have created a link, we even have the option to &#8220;Blow it Up&#8221;; not only because it is fun to blow things up, but because you might decide you no longer want the information available. Each data field uses a mix of custom Flash and Javascript enabling a cross-browser click-to-copy feature. We set out for a professional design so users trust it, and super-transparency with the presentation of information- hopefully you agree this is a &#8220;mission accomplished&#8221;.</p>
<h3>Passwords love encryption, give them some love.</h3>
<p>We use an SSL encrypted connection, or HTTPS, to transfer all information to and from timebomb.it over the internet. This means people snooping your network can&#8217;t get a hold of anything you type in, or look at. Our databases are also completely encrypted, expired links are deleted every hour, and no link is ever used twice. Our servers have brute force detection, strict firewalls, and are behind bullet proof glass with armed guards (thanks Media Temple). We currently use a 10-character alpha-numeric random string to generate links; this means there are 3,656,158,440,062,979 (3.65 quadrillion) links available. Put it this way, the odds someone winning the lottery, getting struck by lighting, and dating a supermodel in their lifetime are better than their chance of finding a timebomb.it link (remember, links must expire within a week).</p>
<h3>CIA: Confidentiality, Integrity, Availability</h3>
<p>This acronym represents the three widely accepted components of information security. We have described how we address confidentiality and integrity using some great technology, but the most important aspect is availability. Sure, random URL&#8217;s may not be a great idea to send nuclear launch codes, but its a heck of a lot better than sending them in a plain-text email. In security we make trade-offs, and we know that if a system is too hard to use, or takes too long to access, it will get scrapped. Our mission is to provide something really secure, and to force people to think about things like security and password management, while not slowing them down.</p>
<h3>Thats a Wrap, plus an API with a Wrapper</h3>
<p>We never want to leave our automation-loving, UI-enhancing developers without something neat and exciting, and this is why we made a simple API and PHP wrapper, check it out: <a href="http://blog.primestudiosllc.com/security/timebomb-it-api-and-php-wrapper-class">timebomb.it API and PHP Wrapper Class</a>. Please make sure to leave you thoughts in the comments, we hope you all enjoy this little tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.primestudiosllc.com/security/send-time-limited-secure-logins-with-timebomb-it/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>timebomb.it API and PHP Wrapper Class</title>
		<link>http://blog.primestudiosllc.com/security/timebomb-it-api-and-php-wrapper-class</link>
		<comments>http://blog.primestudiosllc.com/security/timebomb-it-api-and-php-wrapper-class#comments</comments>
		<pubDate>Fri, 27 Aug 2010 16:48:44 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.primestudiosllc.com/?p=831</guid>
		<description><![CDATA[If you haven&#8217;t read anything about our newest web and mobile app timebomb.it, make sure to stop by Send Time Limited Secure Logins with timebomb.it. Lets take a look at the simple API we made so developers can use timebomb.it &#8230; <a href="http://blog.primestudiosllc.com/security/timebomb-it-api-and-php-wrapper-class">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t read anything about our newest web and mobile app <a target="_blank" href="https://timebomb.it">timebomb.it</a>, make sure to stop by <a href="http://blog.primestudiosllc.com/security/send-time-limited-secure-logins-with-timebomb-it">Send Time Limited Secure Logins with timebomb.it</a>. Lets take a look at the simple API we made so developers can use timebomb.it for anything they please. Remember, you must have an API key to use it- just <a target="_blank" href="http://www.primestudiosllc.com">contact us</a> and we&#8217;ll shoot one right back to you.</p>
<h3>Using the API with JSON</h3>
<p>We require four pieces of information for the API to process successfully: the API key, a username, a password, and an expiration value. If you have tried out timebomb.it, this should make perfect sense. The API is accessed through the following URL structure:</p>
<p><strong>https://timebomb.it/api/json/APIKEY/USERNAME/PASSWORD/EXPIRATION</strong></p>
<p>The only somewhat non-standard entry is the EXPIRATION value. This will be set to either a 1, 2, or 3, corresponding to 1-hour, 1-day, or 1-week expiration time respectively. The output will be a JSON encoded string with the following keys:</p>
<p><strong>username</strong> : provided username<br />
<strong>password</strong> : provided password<br />
<strong>url</strong> : timebomb generated URL<br />
<strong>expiration</strong> : seconds until link expires<br />
<strong>created</strong> : unix timestamp</p>
<p>Example Input:</p>
<p><strong>https://timebomb.it/api/json/Y8dqEisNoAChS6AFmwyQ1LoJ/elvis/bluesuedeshoes/1</strong></p>
<p>Example output:</p>
<p><strong>{&#8220;username&#8221;:&#8221;elvis&#8221;,&#8221;password&#8221;:&#8221;bluesuedeshoes&#8221;,&#8221;url&#8221;:<br />
 <span style="margin-left:25px;">&#8220;https:\/\/timebomb.it\/4dewszeaoa&#8221;,&#8221;expiration&#8221;:3600,&#8221;created&#8221;:1282529729}</span></strong></p>
<p>We suggest reading the HTTP header status in order to gain details on the success or failure of the request. The following statuses are returned based on the request:</p>
<p><strong>Status = 202</strong> : Request Successful<br />
<strong>Status = 404</strong> : Request Denied, Check Data Structure<br />
<strong>Status = 500</strong> : Request Denied, Possible timebomb.it Error</p>
<h3>PHP Wrapper Class using cURL</h3>
<p>We have created a basic PHP wrapper that can be used as a standalone class, making it pretty simple to integrate timebomb.it into your application. Of course it&#8217;s not perfect, that will be subject to your application, but it will get you off the ground quickly. We are using the PHP library cURL, which you probably have if PHP is installed on your server, otherwise look at <a target="_blank" href="http://curl.haxx.se/docs/install.html">How to Install cURL for PHP</a>. Below is the standard usage for the <strong>timebomb.class.php</strong> wrapper.</p>
<pre class="brush: php;">
&lt;?php
require_once('timebomb.class.php');
$tb = new Timebomb();

$data = array(
	&quot;key&quot;=&gt;&quot;Y8dqEisNoAChS6AFmwyQ1LoJ&quot;,
	&quot;username&quot;=&gt;&quot;elvis&quot;,
	&quot;password&quot;=&gt;&quot;bluesuedeshoes&quot;,
	&quot;expiration&quot;=&gt;&quot;1&quot;
	);

$timebomb = $tb-&gt;create_link($data);

if($timebomb['success'])	{
	echo $timebomb['url'];
}	else	{
	echo $timebomb['message'];
}

/*$timebomb_data array elements
	$timebomb['success'] : TRUE or FALSE
	$timebomb['message'] : status message
	$timebomb['username'] : provided username
	$timebomb['password'] : provided password
	$timebomb['url'] : TimeBomb generated URL
	$timebomb['expiration'] : seconds until link expires
	$timebomb['created'] : unix timestamp
*/

//Use for auto-generated passwords
//$password = $tb-&gt;create_password();
</pre>
<p>We have added a simple password generator to the <strong>timebomb.class.php</strong> wrapper as well, just in case you want to produce them on the fly. The &#8220;timebomb&#8221; array returned from the class is described above in the PHP comments, and provides all the important information about the created link, or if there was an error. Below is the source for the <strong>timebomb.class.php</strong> wrapper, and we have provided both of these files in a ZIP package for convenience.</p>
<pre class="brush: php;">
&lt;?php
class Timebomb	{

	function create_link($timebomb_info)	{
		$url = implode('/',$timebomb_info);

		$ch = curl_init('https://timebomb.it/api/json/'.$url);
		curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
		curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
		curl_setopt($ch, CURLOPT_HEADER, 1);
		$curl_data = curl_exec($ch);
		$curl_info = curl_getinfo($ch);
		curl_close($ch);

		if($curl_data != FALSE)	{
			$timebomb_data['status'] = $curl_info['http_code'];

			switch ($timebomb_data['status']) {
				case 202:
					$json_data = substr($curl_data, $curl_info['header_size']);
					$timebomb_data = json_decode($json_data,TRUE);
					$timebomb_data['success'] = TRUE;
					$timebomb_data['message'] = 'Congrats, your TimeBomb link was created.';
					return $timebomb_data;
					break;
				case 404:
					$timebomb_data['success'] = FALSE;
					$timebomb_data['message'] = 'Please check your inputs and make sure you have a valid TimeBomb API key.';
					return $timebomb_data;
					break;
				case 500:
					$timebomb_data['success'] = FALSE;
					$timebomb_data['message'] = 'TimeBomb may have blown itself up, please try again.';
					return $timebomb_data;
					break;
				default:
					$timebomb_data['message'] = 'Houston, we have a problem with something, not sure who to pin it on right now.';
					$timebomb_data['success'] = FALSE;
					return $timebomb_data;
			}
		}
		$timebomb_data['message'] = 'The cURL process failed.';
		$timebomb_data['success'] = FALSE;
		return $timebomb_data;
	}

	function create_password($length=12) {
		$chars = array_merge(range('a', 'z'),range('A', 'Z'),range(0, 9));
		$password ='';
		for($i=0;$i &lt; $length;$i++) {
		   $password .= $chars[mt_rand(0,count($chars)-1)];
		}
		return $password;
	}
}
</pre>
<p><a href="http://blog.primestudiosllc.com/wp-content/uploads/timebomb-class-php-package.zip">Download the timebomb.class.php ZIP Package</a></p>
<h3>Final Remarks</h3>
<p>If you would like to contribute, collaborate, or provide feedback to our <a href="https://timebomb.it">timebomb.it</a> project, please be sure to visit the <a href="http://www.primestudiosllc.com/">Prime Studios Homepage</a>, or comment on this post. Happy coding everybody.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.primestudiosllc.com/security/timebomb-it-api-and-php-wrapper-class/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screencast: Using sFTP with SSH, and why FTP is Insecure</title>
		<link>http://blog.primestudiosllc.com/security/using-sftp-with-ssh-and-why-ftp-is-insecure</link>
		<comments>http://blog.primestudiosllc.com/security/using-sftp-with-ssh-and-why-ftp-is-insecure#comments</comments>
		<pubDate>Tue, 17 Aug 2010 16:38:48 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.primestudiosllc.com/?p=813</guid>
		<description><![CDATA[As a developer, your world might crumble without using FTP (File Transfer Protocol). Oh how we love our port 21, uploading and downloading everything in plain text. However, if you are at all worried about security and integrity of your &#8230; <a href="http://blog.primestudiosllc.com/security/using-sftp-with-ssh-and-why-ftp-is-insecure">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="635" height="357" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=14213195&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed type="application/x-shockwave-flash" width="635" height="357" src="http://vimeo.com/moogaloop.swf?clip_id=14213195&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>As a developer, your world might crumble without using FTP (File Transfer Protocol). Oh how we love our port 21, uploading and downloading everything in plain text. However, if you are at all worried about security and integrity of your (and your clients) data and information, you would be much better suited using an encrypted file transfer method like sFTP- the &#8220;s&#8221; standing for &#8220;SSH&#8221;, or &#8220;secure&#8221;.</p>
<p>In our video we talk about the importance of data encryption across the wire, as well as over the air, and show how attackers can take advantage of non-encrypted data transfer. Our alternative to FTP is sFTP, which utilizes the SSH (Secure Shell) protocol for file transfers, providing a fully [public key] encrypted path for the data to flow. We are essentially mitigating any MITM (Man in the Middle) attacks, or network sniffing; where an attacker simply jumps onto your network and steals confidential information as it flows. By using encrypted data transfer, the data can still be sniffed and logged, but it is nearly impossible to make useful. Some of our tips for using sFTP are as follows:</p>
<h3>Consider moving your primary SSH port to non-standard location and block the use of port 22.</h3>
<h3>Never use the root account to log into sFTP (or SSH). Create users with sufficient privileges for particular needs.</h3>
<h3>Use a client like <a href="http://filezilla-project.org/" target="_blank">FileZilla</a>, <a href="http://winscp.net/eng/index.php" target="_blank">WinSCP</a>, or <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank">Putty</a> for all your sFTP and SSH needs.</h3>
<p>As always, security is only as strong as the weakest link, so the first step is to not allow attackers onto you network. Use strong, randomized passwords, and if your router isn&#8217;t already using WPA2 for the encryption type, either change the setting, or get a new router! If you are [still] using WEP encryption, you will get cracked faster than a whip on a horses behind. Check the links below for some more info:</p>
<p><a href="http://shapeshed.com/journal/chroot_sftp_users_on_ubuntu_intrepid/" target="_blank">Chroot SFTP user on Ubuntu Intrepid</a></p>
<p><a href="http://www.mysql-apache-php.com/ssh-attacks.htm" target="_blank">How to Secure SSH Server from Attacks</a></p>
<p><a href="http://www.openssh.org/" target="_blank">OpenSSH</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.primestudiosllc.com/security/using-sftp-with-ssh-and-why-ftp-is-insecure/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Your Small Business Doesn’t Need an IT Guy</title>
		<link>http://blog.primestudiosllc.com/business/why-your-small-business-doesn%e2%80%99t-need-an-it-guy</link>
		<comments>http://blog.primestudiosllc.com/business/why-your-small-business-doesn%e2%80%99t-need-an-it-guy#comments</comments>
		<pubDate>Wed, 11 Aug 2010 03:04:33 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[financial]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[webapp]]></category>
		<category><![CDATA[websites]]></category>

		<guid isPermaLink="false">http://blog.primestudiosllc.com/?p=789</guid>
		<description><![CDATA[Let’s face it, your small or medium-sized business probably doesn’t need an “IT guy”. It’s 2010, not 1995, and most likely what you need is an agile web company with great support. When we speak about the IT field, things &#8230; <a href="http://blog.primestudiosllc.com/business/why-your-small-business-doesn%e2%80%99t-need-an-it-guy">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Let’s face it, your small or medium-sized business probably doesn’t need an “IT guy”. It’s 2010, not 1995, and most likely what you need is an agile web company with great support. When we speak about the IT field, things like inefficiency, legacy, and big reoccurring fees come to mind for most of us. Whether we call it a revelation, or a revolution, almost everything small businesses do, can [or will be] simple and web-based.</p>
<h3>You’re Email.</h3>
<p>Although Microsoft Outlook still holds the largest market share for email clients at around 37% (<a title="Campaign Monitor 2009 Blog Post" href="http://www.campaignmonitor.com/blog/post/3092/email-client-trends-for-2009/" target="_blank">Email client trends for 2009</a>), the trend continues to be that web-based email clients (Hotmail, Gmail) are on the rise by about six percent in 2009, and clients such as Thunderbird and Outlook are seeing drop in usage anywhere between three and nine percent. When you’re average Joe at the local flower shop wants to email someone, and is faced with options for TLS or SSL email encryption, he can go with an IT guy, or move to a simple solution like Gmail.</p>
<p style="text-align: center;"><img class="size-full wp-image-790 aligncenter" style="margin-top: 25px; margin-bottom: 25px;" title="primestudios-outlook-wtf-encryption" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-outlook-wtf-encryption.png" alt="" width="645" height="323" /></p>
<p>One better, <a title="Google Apps" href="http://www.google.com/apps/intl/en/business/index.html" target="_blank">Google Apps</a> makes it really simple to setup Gmail with your webserver, which means you can have email addresses like &#8220;you@yourdomain.com&#8221;, all controlled through the simple Gmail control panel. Your email can be accessed from anywhere in the world, it is fully encrypted, and you don’t need an IT guy to explain it because Google does a great job with tutorials. The only techy work is from a web team who change a couple things called MX records on your server, <a title="Prime Studios Homepage" href="http://www.primestudiosllc.com" target="_blank">we can do that</a>.</p>
<h3>Your Website.</h3>
<p>If you’re a young or small business, you are relying on setting yourself apart from the crowd, because if you don’t, your business will fail. You want a cool website, something that engages users and is peppered with crisp graphics and photography; we know. Unfortunately when you put this in the hands of an IT guy, he might be great at setting up servers, and maybe he took a class on HTML in college, but when it comes your online presence, he will probably screw you over. A website used to be a “coding” thing, something only geeks in basements could do, but it’s now a full-fledged marketing tool that needs everything from built-in blogging, to the hippest social media integration. There is a huge leap between those who can build websites, to those who can build websites correctly.</p>
<h3>You’re Finances.</h3>
<p>Our affinity for desktop financial software is similar to our affinity for petting cobras. The first time you open QuickBooks, you immediately realize there isn’t going to be anything quick about it. As a small business you are worried about a couple things relating to your finances, keeping it quick, and being informed. You don’t have money for an IT guy to setup your financial database, with your invoice templates, hooked to your printer, exporting to some Excel archive. Add a computer, better buy another software license, and not to mention deal a plethora of operating system and hardware requirement hurdles. Use a WebApp for your invoices, and either have a web team take an hour to show you how to use it, or take a morning and learn it yourself. Look into <a title="Freshbooks" href="http://www.freshbooks.com/" target="_blank">Freshbooks</a>, <a title="FreeAgent" href="http://www.freeagentcentral.com/tour/invoicing" target="_blank">FreeAgent</a>, or <a title="BlinkSale" href="http://www.blinksale.com/" target="_blank">Blinksale</a>.</p>
<h3>The Difference between Agile Web Teams and IT Guys</h3>
<p>The world of IT is by nature wrapped up in legacy software, and slow implementation. This might be okay for corporations, and large entities, but most small businesses need everything done five minutes ago. We [Prime Studios] can run full security audits, buy domains, and send any file from any project from our phones.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-796" style="margin-top: 25px; margin-bottom: 25px;" title="primestudios-ipone-app-lineup-web-tools" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-ipone-app-lineup-web-tools.png" alt="" width="645" height="275" /></p>
<h5>Scany, GoDaddy, and SugarSync iPhone Apps</h5>
<p>The fact is that local storage is becoming second to “the cloud”, and there is no such thing as a &#8220;workstation&#8221; for people; we work from our laptops, our phones, on airplanes, and should expect an internet connection to be enough for 95% of our business tasks. The new-age is replacing IT guys with VOIP applications like Skype and Google Voice, eliminating the need for a database guru with simple web and phone apps, and taking advantage of smart web teams who stay on top of the very best ways to make a small business grow, and not worry about the tech.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.primestudiosllc.com/business/why-your-small-business-doesn%e2%80%99t-need-an-it-guy/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Handy Camera Bag Items</title>
		<link>http://blog.primestudiosllc.com/photo/10-handy-camera-bag-items</link>
		<comments>http://blog.primestudiosllc.com/photo/10-handy-camera-bag-items#comments</comments>
		<pubDate>Wed, 28 Jul 2010 15:10:44 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Photo]]></category>

		<guid isPermaLink="false">http://blog.primestudiosllc.com/?p=96</guid>
		<description><![CDATA[1. Grocery Bag Your on a shoot and the clouds start to roll in, you feel the moisture, and you know its about to get wet. Don&#8217;t be stuck with no options, all you have to do is remember to &#8230; <a href="http://blog.primestudiosllc.com/photo/10-handy-camera-bag-items">Read more...</a>]]></description>
			<content:encoded><![CDATA[<h3>1. Grocery Bag</h3>
<p>Your on a shoot and the clouds start to roll in, you feel the moisture, and you know its about to get wet. Don&#8217;t be stuck with no options, all you have to do is remember to jam an old, used plastic bag from the grocery into that miscellaneous corner of your camera bag. Use a rubber band and poke a hole for your viewing pleasure. You do know all your buttons by heart, right?</p>
<p style="text-align: center;"><img class="size-full wp-image-770 aligncenter" title="primestudios-camera-bag-items-grocery-bag" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-camera-bag-items-grocery-bag.png" alt="" width="645" height="300" /></p>
<h3>2. Grey Paint Sample Card</h3>
<p>If you are moving a lot and really need some control over your white balance, our best suggestion is to make sure you are taking your photos in RAW (and hey, jpeg correcting is pretty effective too) and a cheap grey card. Post process in a program like Adobe Lightroom to fix all the issues. We use free paint cards from Home Depot, &#8220;Seal Grey&#8221;, and they are pretty darn effective.</p>
<p style="text-align: center;"><img class="size-full wp-image-771 aligncenter" title="primestudios-camera-bag-items-gray-card-whitebalance" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-camera-bag-items-gray-card-whitebalance.png" alt="" width="593" height="191" /></p>
<h3>3. Fake Credential</h3>
<p>Ok, were not suggesting you make a fake passport or start stealing identities, but having something that looks official with your picture on it and &#8220;PRESS ACCESS&#8221; can help you at least get better parking, or a couple inches closer to your target.</p>
<p style="text-align: center;"><img class="size-full wp-image-772 aligncenter" title="primestudios-camera-bag-items-credential" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-camera-bag-items-credential.png" alt="" width="645" height="300" /></p>
<h3>4. Outlet Accessories</h3>
<p>So you had some grand plan to use a 2 studios lights at this shoot, but guess what? There is one outlet, 30-feet away, and it doesn&#8217;t have a grounding pin. Hopefully you were wise enough to bring an extension cord, but never assume you will be presented with an ample electrical system, and prepare for the worst.</p>
<h3>5. Dust Brush</h3>
<p>This might be more common than others, but most of the time a lens or filter doesn&#8217;t need you to be wiping [scraping] the glass, it just needs the dust to be cleared. Dust can cause some horrible reflections (flaring) and make you pretty mad you didn&#8217;t pay attention to it when you start post processing at full resolution.</p>
<p style="text-align: center;"><img class="size-full wp-image-773 aligncenter" title="primestudios-camera-bag-items-dust-brush" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-camera-bag-items-dust-brush.png" alt="" width="645" height="250" /></p>
<h3>6. Level</h3>
<p>If your trekking across some uneven terrain a level can help make sure your horizon is darn close to level. Some tripods have levels built in, but they are very small and sometimes a little less responsive than we could hope for.</p>
<h3>7. Business Cards</h3>
<p>You need business cards if your in it to make money, but make good use of them in your camera bag too. We put one in each of our lens cases, a couple scattered in the bag itself, and even tapped to our equipment if we are going somewhere busy. Sure, it doesn&#8217;t stop thieves, but if a Lion on your safari drags it 100 miles to another tribe, or if it gets picked up mistakenly by the other media crew next to you, they know who to return it to!</p>
<h3>8. Food</h3>
<p>You thought this shoot was going to be an hour, in and out, right? If your selling the photos, and need the best ones, you will stay planted until you get them. Not only does it stink to be hungry, but your vision starts to get sluggish, and your reaction time goes down, so dont risk it and bring a snack.</p>
<h3>9. Rubber Bands</h3>
<p>There are a ton of situations where a rubber band could come in handy, but one great example is to make a bounce card on the fly. We personally use a couple different types of bounce cards, but kicking it old-school and making one from a piece of paper and a rubber band is just as effective (plus you can throw it out after).</p>
<p style="text-align: center;"><img class="size-full wp-image-774 aligncenter" title="primestudios-camera-bag-items-rubber-band" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-camera-bag-items-rubber-band.png" alt="" width="645" height="325" /></p>
<h3>10. Flashlight</h3>
<p>Whether you need a brighter focus beam for low-light photography, or you are getting your creative on and exploring some old broken-down buildings, a small flashlight comes in handy. Please don&#8217;t think this replaces your speed lite, or on the flip side, dont try to use your speed lite to explore broken buildings (flash.. walk 10 paces.. repeat).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.primestudiosllc.com/photo/10-handy-camera-bag-items/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>11 Things You&#8217;re Doing Wrong on Your Website (and how to fix them!)</title>
		<link>http://blog.primestudiosllc.com/business/11-things-your-doing-wrong-on-your-website-and-how-to-fix-them</link>
		<comments>http://blog.primestudiosllc.com/business/11-things-your-doing-wrong-on-your-website-and-how-to-fix-them#comments</comments>
		<pubDate>Thu, 22 Jul 2010 01:10:40 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Business]]></category>

		<guid isPermaLink="false">http://blog.primestudiosllc.com/?p=616</guid>
		<description><![CDATA[1. It is not cross-browser compatible. There is a huge list of web browsers out there and most likely you have heard of (or use) Google Chrome, Apple Safari, Internet Explorer, Firefox, or Opera- but have you made sure your website works and looks the same in all of these? You don't want the first impression of your business to be a broken website.  <a href="http://blog.primestudiosllc.com/business/11-things-your-doing-wrong-on-your-website-and-how-to-fix-them">Read more...</a>]]></description>
			<content:encoded><![CDATA[<h3>1. It is not cross-browser compatible.</h3>
<p>There is a huge list of web browsers out there and most likely you have heard of (or use) Google Chrome, Apple Safari, Internet Explorer, Firefox, or Opera- but have you made sure your website works and looks the same in all of these? You don&#8217;t want the first impression of your business to be a broken website. You can check out how your website looks in many browsers here: <a href="http://browsershots.org" target="_blank">http://browsershots.org</a></p>
<h3>2. It is hardly usable on mobile devices.</h3>
<p>Have you considered that in two years more internet connections will be made from mobile devices than full-sized computers? Not only is this a cross-browser compatibility issue, it is a content issue. A website needs to have simple navigation, fast page loads, and directed content no matter what type of device is used to view it. Imagine your computer screen at a quarter of its current size, and make sure your website is still [marginally] useable.</p>
<h3>3. It doesn&#8217;t use proper authentication for secure areas.</h3>
<p>Most communication paths for a computer start at a router, then to a modem, next to a larger hub, then off to the Internet Service Provider (ISP), yatta yatta. All it takes is an attacker to be snooping on any one of those lines to catch all your data, including passwords and personal information. Using proper authentication certificates (keywords: <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security" target="_blank">SSL or TLS</a>) utilizes &#8220;https://&#8221; web addresses, and properly encodes data so it is safe to transfer.</p>
<h3>4. It doesn&#8217;t make use of Cascading Style Sheets (CSS).</h3>
<p>You always want to make sure to use a style sheet on your website. Style sheets have been around for a while, and not only do websites often become cleaner by using them, it makes it easier for a website to be handed to another web team and still be easily modified. Search engine optimization (SEO) can also be affected if styles are &#8220;inline&#8221;, and use of CSS is not done correctly. See <a href="http://www.w3schools.com/CSS/css_howto.asp" target="_blank">W3Schools CSS Tutorial</a> for an in-depth look.</p>
<h3>5. It is a little too glossy.</h3>
<p>Sometimes we call this &#8220;Web 2.0&#8243;, the era that we began to use fades, reflections, and drop shadows on everything. These elements are [sometimes] needed for a great design, but only in small amounts. Effective web design is simple; gradients are subtle, drop shadows are not heavy, and reflections are definitely approached with caution. Make sure to not abuse this type of new-age styling, your web team should have no problem toning it down on a website if requested.</p>
<h3>6. There has not been any thought given to usability, or action placement.</h3>
<p>We can&#8217;t tell you how many times we land on a website and have to click into another page to actually see what a business does. While the &#8220;about&#8221; page is common to put company information, you want someone to understand why they would hire you, use your service, or buy your product on page one (the homepage). If there are &#8220;action&#8221; buttons, or links to important information, make sure the stand out! Consider the Gutenberg Diagram below.</p>
<p style="text-align: center;"><img class="size-full wp-image-627 aligncenter" title="primestudios-gutenberg-diagram" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-gutenberg-diagram.png" alt="" width="383" height="383" /></p>
<h3>7. Its URL structure is not SEO friendly.</h3>
<p>The URL structure refers to the individual page links, like &#8220;www.example.com/about&#8221;. These pages can have a huge impact on SEO, so you want to make sure each page has a relevant URL. For example, you might list case studies on your website, and instead of &#8220;www.example.com/casestudy1&#8243;, use something like &#8220;www.example.com/automobile-human-factors-case-study&#8221;. This is just one of the many things that can enhance SEO.</p>
<h3>8. It includes the file extension in the URL.</h3>
<p>You&#8217;ll notice on many webpages that there is a &#8220;.html&#8221; or &#8220;.php&#8221; at the end of it. This is the type of file the webpage is saved as (just like a .doc for a Word Document), and presents a couple issues. First, these extensions are not needed, pages operate the same with or without them, and they are visually distracting. Second, by listing the file extension you are giving hackers great insight into the type of files your site uses, which allows them to more easily plan an attack. To remove these extensions, contact your web team and ask them about the &#8220;.htaccess&#8221; file, or take a look at this <a href="http://eisabainyo.net/weblog/2007/08/19/removing-file-extension-via-htaccess/" target="_blank">Removing File Extensions tutorial</a>.</p>
<h3>9. It doesn&#8217;t properly use meta-tags or titles.</h3>
<p>Have you ever wondered how Google knows what to put when they link to your website, or try to describe what you do? This is contained inside the website in hidden header information, using either &#8220;meta-tags&#8221; or the title tags. Properly filling out this information is crucial for SEO; every search engine listing relies on this information being filled out correctly and to be relevant. For instance, you often see homepage titles like &#8220;Home&#8221;, &#8220;Welcome&#8221;, or &#8220;Index-1&#8243;; something more effective might be &#8220;David’s Customs | Where We Repair Custom Cars&#8221;. Now users are more informed when they scroll down their search listings for &#8220;custom car repair&#8221;.</p>
<h3>10. The on-page copy (text) is not relevant or descriptive.</h3>
<p>This problem is two-fold. First, it affects SEO a great amount, and when the Google Bot visits your website it will read through whatever text is on the page and rate your site largely by the words on there. If you talk a lot about baseball cards, you will most likely find yourself higher in search results for &#8220;baseball cards&#8221; because the search engine assumed that&#8217;s what your website offers expertise in. Second, many websites don&#8217;t properly address what users are looking for. If the about page has one stock photo and just says &#8220;We have been around since 1995 and help customers find potential in their business&#8221;, there is no reason for it to exist. If you have very little content, consider a one-page website (here&#8217;s a couple we have done: <a href="http://woodwardtheband.com" target="_blank">Woodward The Band</a>, <a href="http://oasistannorthville.com/" target="_blank">Oasis Tan Northville</a>). Consider spending just a small amount of time every week to write a little about what you do, every little bit helps!</p>
<h3>11. It does not provide any link to social media or blogging.</h3>
<p>We are definitely not advocates of having stagnant twitter accounts, or a Facebook page just to just be part of the hype, but these tools can not only help you market your business (and website), but they can help you connect with communities. Sometimes users just want to know that your company is alive and there are real people working there, and this is just one thing &#8220;micro-blogging&#8221;, or short-updates can do. Maybe you have a new product, or want to mention a new client project you&#8217;re working on, this can give outsiders some more insight into what you do and a human-level connection to your business. Also, using social media can connect you with potential clients, or like-minded experts in your field; these are people you want to have around you! Here&#8217;s a list of the <a href="http://www.webdesigndev.com/roundups/30-top-web-designers-on-twitter" target="_blank">Top Web Designers to Follow on Twitter</a>. Use Google to find people in your field.</p>
<p>If you don&#8217;t know that you are doing all of things, or would like us to help, make sure to visit the <a href="http://www.primestudiosllc.com">Prime Studios Homepage</a> and get in touch.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.primestudiosllc.com/business/11-things-your-doing-wrong-on-your-website-and-how-to-fix-them/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CSRF Protection in Code Igniter using Form Tokens</title>
		<link>http://blog.primestudiosllc.com/security/csrf-protection-in-code-igniter-using-form-tokens</link>
		<comments>http://blog.primestudiosllc.com/security/csrf-protection-in-code-igniter-using-form-tokens#comments</comments>
		<pubDate>Wed, 07 Jul 2010 20:12:17 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.primestudiosllc.com/?p=550</guid>
		<description><![CDATA[Today we are going to talk about CSRF (or Cross Site Request Forgery), otherwise known as session riding, see-surf, and XRSF, and how to built a token system in Code Igniter to mitigate any potential attacks using CSRF. <a href="http://blog.primestudiosllc.com/security/csrf-protection-in-code-igniter-using-form-tokens">Read more...</a>]]></description>
			<content:encoded><![CDATA[<object width='650' height='365'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=13159367&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id=13159367&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='650' height='365'></embed></object>
<h3>ScreenCast Commentary</h3>
<p>Today we are going to talk about CSRF (or Cross Site Request Forgery), otherwise known as session riding, see-surf, and XRSF, and how to built a token system in <a href="http://codeigniter.com/" target="_blank">Code Igniter</a> to mitigate any potential attacks using CSRF.</p>
<p>To start, the core of CSRF lies in web browsers making requests that they are “technically” authorized to do, however the user doesn’t actually know the request is being made (otherwise known as a <a href="http://en.wikipedia.org/wiki/Confused_deputy_problem" target="_blank">confused deputy attack</a>). Consider things like image tags, or iFrames, they make calls to external URL’s all the time.. if instead of a call to an actual image, the image tag calls a URL with malacious GET variables in the URL, some damage can occur.</p>
<p>One solution to this problem is the use of form tokens, or a unique and random string put into a hidden POST variable and into a cookie every time the page is loaded. This makes it nearly impossible to make a POST request from an external source because that token must be validated on the server side based on the POSTed token value and the set cookie value. Remember the same basic principle works in any PHP application, Code Igniter just makes session management a lot simpler.</p>
<p>Remember if an application vulnerable to <a href="http://blog.primestudiosllc.com/security/simple-webapp-cross-site-scripting-xss-attack" target="_self">XSS (Cross Site Scripting)</a> it could possibly navigate through the DOM and find the token value, making it possible for an automated attack. Read up on the <a href="http://namb.la/popular/tech.html" target="_blank">“samy is my hero” MySpace attack</a> for more on that.</p>
<p>End Commentary</p>
<p>CSRF with POST variables is dangerous because an attacker can setup a false form, maybe just asking for your favorite color, and then post hidden content to a form/site that you have a session on. Below is the code we used inside the Code Igniter Auth class and the main controller to implement a form token system.</p>
<pre class="brush: php;">
&lt;?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Auth 	{
	function Auth()	{
		$this-&gt;ci =&amp; get_instance();
	}

	function token()	{
		$token = md5(uniqid(rand(),true));
		$this-&gt;ci-&gt;session-&gt;set_userdata('token',$token);
		return $token;
	}
}

/* End of file Auth.php */

&lt;?php

class Welcome extends Controller {

	function Welcome()
	{
		parent::Controller();
		$this-&gt;load-&gt;model('search_model');
	}

	function index()
	{
		if($this-&gt;input-&gt;post('login'))	{
			$this-&gt;session-&gt;set_userdata('logged_in','yes');
		}
		if($this-&gt;input-&gt;post('logout'))	{
			$this-&gt;session-&gt;set_userdata('logged_in','no');
		}

		if(strcmp($this-&gt;session-&gt;userdata('logged_in'),'yes')==0)	{
			$data['logged_in'] = true;
			if($this-&gt;input-&gt;post('search'))	{
				if($this-&gt;input-&gt;post('token') == $this-&gt;session-&gt;userdata('token'))	{
					$this-&gt;search_model-&gt;add_search($this-&gt;input-&gt;post('search'));
				}
			}

		}	else	{
			$data['logged_in'] = false;
		}

		$data['token'] = $this-&gt;auth-&gt;token();
		$data['search_amt'] = $this-&gt;search_model-&gt;post_amt();
		$this-&gt;load-&gt;view('welcome_message',$data);
	}
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.primestudiosllc.com/security/csrf-protection-in-code-igniter-using-form-tokens/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebApp Security and Lock Picking: Things Aren&#8217;t That Different</title>
		<link>http://blog.primestudiosllc.com/security/webapp-security-and-lock-picking-things-arent-that-different</link>
		<comments>http://blog.primestudiosllc.com/security/webapp-security-and-lock-picking-things-arent-that-different#comments</comments>
		<pubDate>Wed, 07 Jul 2010 03:02:05 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.primestudiosllc.com/?p=455</guid>
		<description><![CDATA[Woah, application security and picking locks- sounds like the topic of lunchtime conversation at DEFCON. When it comes to exploitation, attacks, vulnerabilities, and mitigation techniques, security in any field is really all the same. Sometimes explaining web application security is difficult, but it seems when we match it with something more tangible, like the hard steel of locks, some sense comes to life. Lets start with a “hypothesis”, and then look at some worthy comparisons between 1′s &#038; 0′s, and padlocks &#038; handcuffs. <a href="http://blog.primestudiosllc.com/security/webapp-security-and-lock-picking-things-arent-that-different">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Woah, application security and picking locks- sounds like the topic of lunchtime conversation at <a href="http://www.defcon.org/" target="_blank">DEFCON</a>. When it comes to exploitation, attacks, vulnerabilities, and mitigation techniques, security in any field is really all the same. Sometimes explaining web application security is difficult, but it seems when we match it with something more tangible, like the hard steel of locks, some sense comes to life. Lets start with a &#8220;hypothesis&#8221;, and then look at some worthy comparisons between 1&#8242;s &amp; 0&#8242;s, and padlocks &amp; handcuffs.</p>
<p style="text-align: center;"><img class="size-full wp-image-481 aligncenter" title="primestudios-webapp-security-hypothesis" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-webapp-security-hypothesis.png" alt="" width="600" height="75" /></p>
<p style="text-align: left;"><img class="size-full wp-image-483 alignright" title="primestudios-lock-security-webapps" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-lock-security-webapps.png" alt="" width="225" height="156" />Before we try to explain that, lets talk a little about how a lock works. A lock has a set number of pins inside (anywhere between 5-7 pins for a normal lock), each cut to a specific height. When a key with the correct pattern is inserted all the pins line up straight and allow the lock mechanism to rotate (see more at <a href="http://home.howstuffworks.com/home-improvement/household-safety/security/lock-picking1.htm" target="_blank">How Stuff Works</a>). The problem for someone without a key is that they need to manually manipulate each pin to the correct height in order to get the lock to rotate/open.</p>
<p style="text-align: left;">So lets start with a simple comparison, we can easily see that the more pins in a lock, the harder it is to pick. Along with this, the more random the pin-heights, the harder the lock will be to pick. Sound familiar? In web application security we use bit-length (each bit is a technically &#8220;layer&#8221; of security) and randomness <strong>all the time</strong>. Consider how we encode passwords to save in a database, the most common hash&#8217;s are MD5, and SHA1, which are as a standard are a 128-bit vs. 160-bit encryption (respectively). <em>Quick Tip: Anything encoded for the US Government must be at least as secure as the SHA1 encryption, MD5 is unacceptable</em>. Lets see an example:</p>
<p style="text-align: center;"><img class="size-full wp-image-465 aligncenter" title="primestudios-sha1-vs-md5-encoding" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-sha1-vs-md5-encoding1.png" alt="" width="522" height="96" /></p>
<p style="text-align: left;">Well, indeed MD5 is a shorter encryption, and in turn less secure if we were to try to break it using &#8220;brute force&#8221;- having server upon server running automated scripts using good ole&#8217; trial and error. Lock pickers use brute force all the time, one method uses these nifty &#8220;jiggler keys&#8221;:</p>
<p style="text-align: left;"><img class="size-full wp-image-470 aligncenter" title="primestudios-jiggler-keys-webapp-security" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-jiggler-keys-webapp-security1.png" alt="" width="645" height="279" />These keys are made for car door locks. As you can see there is some randomness between each key, and the idea is that when you put that into the door lock, &#8220;jiggle and twist&#8221;, but the time you give each pattern a couple minutes you find one that works- brute force at it&#8217;s finest!</p>
<p style="text-align: left;">Handcuffs are a well-known lock that display some<strong> layers of security</strong>. Instead of six or seven pins, handcuffs have one simple lever- yes, society trusts that if you are dumb enough to get arrested, you are not smart enough to bypass a single-lever mechanism. However, consider the more transparent layers of security related to handcuffs:</p>
<p style="text-align: center;"><img class="size-full wp-image-544 aligncenter" title="primestudios-handcuff-picking-rules" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-handcuff-picking-rules1.png" alt="" width="635" height="198" /></p>
<p style="text-align: center;">
<p>Be pro-active, strip and clean anything that could damage the application. Give as little information about the way the application is built as possible; hide file extensions and handle all errors. Lastly, watch and react; if you get 100 requests from an IP address in China in 3 minutes, block it. As developers we must try our best to put the attacker at a disadvantage by using layers, remember some of these when building a web application:</p>
<p style="text-align: center;"><img class="size-full wp-image-533 aligncenter" title="primestudios-web-application-security-layers" src="http://blog.primestudiosllc.com/wp-content/uploads/primestudios-web-application-security-layers1.png" alt="" width="647" height="433" /></p>
<h3>Layers, The Future, and You.</h3>
<p style="text-align: left;">We believe one large part in the evolution of web security is summed up in agreat quote from an <a href="http://www.owasp.org/index.php/Main_Page" target="_blank">OWASP</a> Podcast we recently listened to, &#8220;If someone was throwing rocks at your house window, you wouldn&#8217;t just sit there and be happy your windows are strong, you would call the police or go after the person. We don&#8217;t do this in web application security yet.&#8221; One idea we are currently piloting at Prime Studios is a &#8220;that&#8217;s weird&#8221; database; we add a simple line to our XSS (Cross Site Scripting) filtering, our CRSF (Cross Site Request Forgery) filters, and authentication systems to monitor for anything that we would say &#8220;that&#8217;s weird&#8221; to. It doesn&#8217;t sound like much, but if we see a lot of login failures or broken form tokens over a certain time period, we can take action on a particular user, IP address, User Agent, or a mix of all of them.</p>
<p>Everyone likes elegant solutions, but unfortunately with web application security we can&#8217;t just rely on a single [Godly] plugin or framework to handle all our security needs. The first step is knowing what to look for (education), and then you can start building your own methods for a strong security policy throughout your applications (implementation). Hit up the following links for some more great web application security tips:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ff649874.aspx" target="_blank">Improving Web Application Security</a></p>
<p><a href="http://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project" target="_blank">OWASP Top Ten for 2010</a></p>
<p><a href="http://www.applicure.com/solutions/web-application-firewall" target="_self">Web Application Firewalls</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.primestudiosllc.com/security/webapp-security-and-lock-picking-things-arent-that-different/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple WebApp Cross Site Scripting (XSS) Attack</title>
		<link>http://blog.primestudiosllc.com/security/simple-webapp-cross-site-scripting-xss-attack</link>
		<comments>http://blog.primestudiosllc.com/security/simple-webapp-cross-site-scripting-xss-attack#comments</comments>
		<pubDate>Thu, 24 Jun 2010 23:10:23 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.primestudiosllc.com/?p=440</guid>
		<description><![CDATA[XSS, or Cross Site Scripting, is one of the biggest security risks that any web application developer or concerned client should have a good understanding of. XSS makes use of vulnerabilities in a website to inject [malicious] code. Websites are made up of many elements, including things like header information, HTML elements, and sometimes JavaScript elements. <a href="http://blog.primestudiosllc.com/security/simple-webapp-cross-site-scripting-xss-attack">Read more...</a>]]></description>
			<content:encoded><![CDATA[<object width='650' height='365'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=12838411&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id=12838411&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='650' height='365'></embed></object>
<p style="margin-bottom:30px; padding-top:15px">XSS, or Cross Site Scripting, is one of the biggest security risks that any web application developer or concerned client should have a good understanding of. XSS makes use of vulnerabilities in a website to inject [malicious] code. Websites are made up of many elements, including things like header information, HTML elements, and sometimes JavaScript elements. JavaScript runs on the browser, and can modify things within a webpage dynamically, and without the user actually knowing. This video explains a vulnerability on a website that includes a search box and a login form in the same view. We show how to use JavaScript to modify a form action, resulting in a complete exploit of a users credentials.</p>
<p style="color: #999">Our privacy policy: With knowledge comes power, use it wisely and in positive ways. For more information about web application security visit <a href="http://www.owasp.org/index.php/Main_Page" target="_self"><span style="text-decoration: underline;">OWASP</span></a> (Open Web Application Security Project). </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.primestudiosllc.com/security/simple-webapp-cross-site-scripting-xss-attack/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
