• Home
  • Blogger
  • Github
  • Travel
  • The Tank Project
skip to main | skip to sidebar

Steven Occhipinti

Braindump - A scratchpad for the things I do. Mainly a place to dump cool tech-related snippets of information including but not limited to programming, linux and photography :)

Password management

Password management is one of those things that can always be improved. If anyone is using a single password for all their accounts in this day and age they are most likely going to experience trouble at some stage! This post is to outline my progression through some approaches I've tried starting from a very young age to present day.


Attempt #1: A tiered approach

For me, the natural progression from a single password (back in primary school) was to go with a tiered approach. I used one password for for the basic sites, spam, etc. - the stuff I don't really care about very much. I used another password for the important stuff, like Facebook, Twitter, etc. and this password was a lot stronger than the last. I had a unique and strong password for my email, as someone with access to that would most likely have the power to reset any of my other passwords. And finally I had a completely separate password for banking.

While this system is ok, it's not the best! Once upon a time, way back before I could touch type, I came to a password prompt, so I looked down at the keyboard, typed out my password, pressed enter and looked back up at the screen. In that time a friend had sent me an IM on MSN messenger (I know, old school!) and the chat window had stolen focus, so I sent my password to him. While I (mostly) trust my friend, in a panic, I frantically raced around to as many sites as I could to change the password to something else.

If I had a different password for each site, this wouldn't have been a problem. Now obviously most people wouldn't IM their passwords to their friends, but there are lots of other ways for your passwords to get out. A few simple examples are the "Anonymous" attacks on large systems like the PSN, keyloggers, people looking over your shoulder, phishing attacks and even stupid websites making dumb mistakes! Of course, this isn't even thinking about what would happen if you were the target of a good hacker! ... but that'll never happen right? ;)


Attempt #2: Patterned alterations

Ok, so if I want a different password for every site I will ever use, how will I ever remember all of them. Well one simple way would be to make careful alterations to the password based on a pattern. This pattern should not be obvious by looking at a given password, but it should be reproducible based on whatever site you are trying to log in to. For example, if your normal password is 'P@$sW0rd', one pattern could produce 'T@$sW#Er' for when you're trying to log in to Twitter and "F@$sW#Ok" for when you're trying to log in to Facebook.
I'm sure you can guess the pattern here. Everyone will have their own unique twist on patterns and this can be quite successful if executed correctly, but of course if your pattern is weak and a real person gets your Facebook password of "P@sS-facebook", they can probably guess your twitter password would be "P@sS-twitter".


Attempt #3: Stored, centralised and synchronised passwords

Alot of people think that letting your browser remember passwords is a bad thing, and while it does have particular cons, there are some pros to it too.
For one, you can have completely random passwords and not have to remember them. Also, two of the methods of disclosing a password that I mentioned earlier were keyloggers and someone looking over your shoulder. Both of these scenarios are a lot less likely if your browser does the typing for you (but of course there are other considerations with this approach). The obvious con would be that if someone gets a hold of what the browser knows, they have all your passwords!

Firefox provides a "master password" facility to encrypt all your passwords (one of my pet hates is that Chrome lacks this) so when a password is needed, you type in your master password once, and it will then autofill any field after that. (Just remember to lock your screen if you leave your pc unattended).
Special consideration to make this password super strong should obviously be taken to avoid any brute force possibilities and of course a master password can be stolen just the same, but this password is useless online and it reduces the probability of others being stolen. (1 chance to steal the master password, as opposed to many chances to steal individual passwords).

Now throw Firefox Sync into the mix. Now all your encrypted passwords are in the cloud and available on any machine running Firefox. I found this to be really handy, but it represents its own risks. This is also just limited to Firefox, what about mobile browsers? What about Chrome or your friends computer?
Again, not a perfect solution, but not too bad either.


Attempt #4: Personal vault

Some really paranoid people will say "But what if Mozilla aren't encrypting your passwords properly?", or "I don't trust other people to store my passwords regardless of encryption". Well, in that case, if you want to store all your random passwords, and ensure they are encrypted, you could always do it yourself.
I played with a nifty command line tool called "PWS" and its open source so you can see exactly how they secure your passwords. The beauty about this method is that you are in complete control. For example, I could use a central repo to store my encrypted passwords and keep this synchronised across all machines, and if I don't want to check out the repo (say, on a friends computer), I could just SSH to my VPS where I could get the password. It doesn't fill forms in browsers, but it will copy the password to the clipboard for 10 seconds so you can just paste it in the browser (which is vulnerable to clipboard monitoring software/viruses).
It even has a random password generator for new sites.
While this method is great for paranoid people, its lacking a lot of features I would expect.


Attempt #5: Hosted password services

If you were to combine the best parts of the previous methods, you would get a hosted service that provides browser plugins for form filling on any browser, is centralised and synchronised across all machines, is encrypted with a master password, has an easy way to pull out any existing passwords from a "vault" and makes it simple to sign up for new sites with a unique random password.
As it turns out there are quite a few of these services available, such as 1Password and LastPass.

1Password is quite popular, especially among Mac users and provides clients for Mac, Windows, iPhones, Androids, etc. The interface is quite polished (as you could have guessed) but it costs about $50 for a Mac licence (or $70 if you want to use it on Windows and Mac). One feature that a lot people like is that you can choose where you would like to store the passwords, for example using dropbox to synchronise across machines, but personally I don't think that provides any real advantage.
LastPass is very similar in terms of features, but they host your encrypted passwords for you and it is free! They have plugins and clients for almost every conceivable device, but the only catch is that if you want to use the mobile browser plugins, you need a premium account, which costs $12 per year.

I've been using LastPass for a little while now and one thing I like the configurable random password generator. You can choose just how complex the generated passwords are by configuring length and character set. When you sign up for a new site, you can generate a ramdom password with one click and it will get entered into the site's form and saved in your vault for future. It can fill in standard forms with your personal details (name, email address, etc.) It is accessible anyway by logging into the web interface and its all secured using a master password, which I recommend using a super strong passphrase for, something in the order of 20-30 characters would be good. Remember if someone can log in here, they can get everything!

Another layer of protection is using 2 factor authentication. They have a few varieties for this, but the one I like is the Google Authenticator method. Basically when ever a new device is used to attempt to log in with your account, either using a plugin, app or just the website, they will need to provide the email address, the password and a token. To get this token I configured the Google Authenticator app on my Android, which means that even if someone was to somehow get my super strong master password, they would also need my phone before they can do anything.
I use this approach on my Gmail account too, but Gmail's 2 factor authentication uses SMS's instead of the Google Authenticator app.


Conclusion

So far I am pretty happy with LastPass. I now type in my super strong master password once a day and the rest is filled automatically. Signing up to new sites is a breeze and uses a completely random and unique password per site. My passwords are available in Firefox and Chrome; in Linux, Mac or Windows and potentially for my mobile browsers too (if I decide to pay $1 per month). Not only is my master password really strong, but it is backed up with 2 factor authentication using my phone. I can even get to my passwords from a public computer via the web interface and my phone (without needing to go via dropbox or anything). Best of all, I get all this security and convenience with minimal effort and without paying a cent!
Posted by Steven Occhipinti at 11:46 PM 0 comments
Labels: security , websites Email This BlogThis! Share to Twitter Share to Facebook

1 year and 40 posts!

Today marks 1 year since my first blog post.
In that time I have written 40 posts and this site has received over 7000 views from all over the world!
I've had some great feedback (even from total strangers), which has been fantastic - It's a good feeling to know that my ramblings can actually be useful for others too.

I started this blog because as a fairly technical person, I am constantly learning, but one of the caveats of this constant learning culture is that some people (such as myself) find it quite hard to remember all the cool stuff we pick up over the years, so this blog's primary purpose was to act as a "memory supplement".

The idea being that when you read something new, it will only stay in your head if you keep using it (or, unlike me, if you have a really good memory), but sometimes what ever it is that we just learned won't be totally relevant or useful until much later.

One of the best ways that I have found to retain this knowledge is to use it! For example, if you are reading up on a new programming language, use it! Write little scripts, re-write other existing programs in this new language and just get used to using it regularly.
If this isn't available (or suitable) I find talking about it with other like-minded people will reinforce the knowledge too. Alot of the time, you can really reinforce your knowledge of a topic by teaching it to someone else. Meetups and groups of like minded friends are great for this.

This is part of the reason I started this blog. Once I learn something new (that I have a desire to remember) I try to write up a quick blog post as soon as I can.
Not only does this reinforce my knowledge, but if I do happen to forget, instead of using Google to re-learn it, I can simply use my blog's search to find my own post on the topic and has the convenience of being written in my own way of thinking/writing.
Even if my post is out-of-date, or not complete enough, it will still refresh my memory and give me a better foundation to start learning up on that particular topic once again.

This blog has served its purpose well and will continue to do so. If you have a similar way of thinking (or a similar memory) as me, I highly recommend starting a blog!

Thanks to everyone that has been reading so far! :-)

Posted by Steven Occhipinti at 5:07 PM 0 comments
Email This BlogThis! Share to Twitter Share to Facebook

XBMC Eden + Ubuntu

Back when I started uni, I bought a new Asus A6J laptop. It was one of the first laptops available with a dual core CPU (Core Duo, not Core 2 Duo) and decently powerful graphics (ATI X1600).
The A6J is very dated now and weighing in at 2.85kg, its not very portable by today's standard (considering my Toshiba Portege weighs just 1.13kg).
A couple of years after I bought it, I got sick of carrying it around, so I bought an Asus EeePc as a replacement for uni, so the A6J stayed at home and was rarely used - it was just a spare for a long time.

Up until recently, I was using I used it as a (stationary) desktop replacement at work but I now have a new job where I am provided a Macbook Pro so this old machine is now spare once again. This with the recent release of XBMC 11 Eden, I thought I may as well re-purpose it as a permanent HTPC.

I considered quite a few options, such as running Arch Linux, OpenElec or Ubuntu with XBMC installed, or going with the recently improved XBMCbuntu (formerly known as XBMC Live).

XBMCbuntu

I downloaded the iso and had a bit of a play. I love how it boots directly into XBMC without the need to startup Unity or anything like that, although it does let you exit to the login screen and select either "XBMCbuntu" (LXDE) or "OpenBox" which is nice.

Once it had booted, it behaved so slow! I figured it mustn't have the correct drivers installed, so I tried to use the restricted drivers from the repo and after hitting quite a few problems I consulted the AMD site.
The AMD site explains that my ATI X1600 is now "legacy" and is supported by the ATI Catalyst 9.3 proprietary linux driver.
So I downloaded that and yet again hit a bunch of other issues.

I spent a fair portion of the day battling with this and couldn't help but think back to how easy Ubuntu Desktop handled all this, so I thought I'd just give that another go.

Ubuntu Desktop + XBMC

I downloaded the Ubuntu 11.10 iso and installed that over the top of XBMCbuntu and configured the user account as 'xbmc' and to automatically login at startup.
I then followed the instructions to install XBMC from their PPA. I did a quick update, installed SSH, reconfigured grub to auto-boot in 1 second (instead of 10) and rebooted the machine.

When I launched XBMC, it was perfect! It was very snappy and there was no lag whatsoever. 
I noticed that the power menu was missing the shutdown options that were in XBMCbuntu and that the suspend option did not work.
After a bit if research, I found a wiki page that explains how to modify policykit to allow xbmc access to all the power functions.
With this change, shutdown, suspend and hibernate were all working great.

I had already configured Wake-On-Lan in the past, so all that I needed to do was setup the Android XBMC remote app on my phone. After configuring the app with the laptops IP address, MAC address, etc. I was now able to use the "Turn your XBMC's Power On" button from the mobile app to fire up the laptop.
Of course to actually allow control of XBMC I needed to go into the settings screen and enable control via HTTP, etc.

So now I can power up the laptop and shut it down from my phone, but when it boots, I am brought into a Unity environment. In the past I would add XBMC to the startup applications, but with XBMC Eden, there is a better way.
XBMC Eden adds it self to the choice of desktop environments from the login screen (in other words, you get a choice: Unity or straight into XBMC like the live cd).
Unfortunately it doesn't remember the last choice with XBMC, so if I boot straight into it and then shut it down, next time it will still automatically boot in to Unity.

I then came across an Ubuntu community page that pointed in the direction the the LightDM config file. (LightDM is the thing that manages the login screen).
I opened '/etc/lightdm/lightdm.conf' and saw this line:
user-session=ubuntu

I replaced the 'ubuntu' part of this line with 'XBMC', rebooted and low and behold, it booted straight into XBMC!

I now have a fully functional HTPC that I can completely control from my phone.
The only things left to do now are configure my media sources, install some plugins and maybe play with some new skins.
Posted by Steven Occhipinti at 8:23 PM 1 comments
Labels: ubuntu , xbmc Email This BlogThis! Share to Twitter Share to Facebook

Rooting the HTC Desire HD & Cyanogenmod 7

At the end of last year my HTC Desire HD got its firmware upgrade to the new version of HTC Sense - the same version that the HTC Sensation is running.
At the time I thought it was quite cool, having shortcuts on the lock screen is great and the new eye candy looks pretty nice too.

But there were some very unwelcome changes with this new version too... lag and poor battery life!
I generally keep my phone on charge at work, so I didn't think this would bother me, but it got so bad that if I went out after work, by the time I got home it was flat (from 6pm to later that night). Even swiping between home screens would lag! So I figured it was time for a new phone, but in the meantime I thought I may as well experiment with rooting and other OS's.

To root the Desire HD is quite simple. The first thing to do is go get the "Advanced Ace Hack Kit" from the XDA Forums. In the zip file is all the tools you need to run the hack and most importantly, the aptly named "effen-manual.html", which is very important!

The manual explains everything you need to know, but the first step is checking that the version of android that you are running can be exploited.
I had software version 3.12.405.1, which judging by the effen manual, the hack tool can automatically downgrade to version 2.50.405.2 where there exists a flaw that can be exploited to give you root access.
Keep in mind that doing this will wipe your phone, so backup everything.

The effen manual also explains how to setup your computer to enable the hack tool to work properly. There are very few steps for linux which was great!

If you follow the instructions correctly, you will then have a stock standard install of an older version of HTC Sense. There are some advantages to having root access such as apps like titanium backup, ad blockers, etc. but the real fun comes from installing new Android ROMs.

I looked at 2 third party ROMs, the first was Cyanogen Mod and the second was Android Revolution.

Android Revolution looks pretty good. Visually it looks and behaves just like HTC Sense but they have made lots of improvements under the hood which in turn increases performance and battery life. As good as this looked, I haven't actually tried this option yet. Instead, I opted to go for a bigger change of scenery and give Cyanogen Mod a go.


Cyanogen Mod does not look like HTC Sense at all. Instead it is based on stock standard Android 2.3. They have then implemented a slew of changes that come as default, such as an audio equaliser, ADWLauncher, the super-user app, a completely customisable button widget in the notification bar, customizable lock screens and a pretty cool torch app that lets you over charge the LEDs for super brightness!
This mod also lets you overclock the hardware, put limiters in place and lots of other options I was not used to seeing in the HTC Sense ROM.

The 2 most important advantages of this change are that the UI is now quick and responsive again, I now have complete control over which effects are used and things like how long the animations should last, etc. and I have the best battery life I've ever had with this phone - I can now use the phone pretty heavily all day without needing a charge until I go to bed!

Very happy with it now and it should keep me tied over until the Samsung Galaxy SIII is released :)
Posted by Steven Occhipinti at 6:10 PM 0 comments
Labels: android , hacking Email This BlogThis! Share to Twitter Share to Facebook

Spam defence

For quite a long time I used to use Yahoo! Mail.
Even though I was lucky enough to get an invite for Gmail in its early stages, Yahoo! Mail had (IMO) one killer feature: Address Guard

The idea behind Address Guard was simple, you make your primary email address, say john.smith@yahoo.com, and then a secondary "base name", such as johno007.
This base name was not just another email address, infact all mail sent to johno007@yahoo.com would get dropped.
Instead, use that base name to create an unlimited number of "disposable addresses", such as johno007-facebook@yahoo.com, etc.

The idea was that if you follow the simple 3 click process (settings -> addressGaurd -> add new address!) to create a new disposable email address every time you signed up for a new website, if ever they spammed you, you simply delete that address and they wont be able to bother you any more - brilliant!

I avoided Gmail because they didn't have the same "whitelist" approach to email addresses, but when I bought my domain name and started using Google Apps for email, I decided to use Gmail as my primary email provider.
Naturally this forced me to look for a similar way to defend again spam (albeit Gmails spam filtering is quite good).

Google Apps provides "nicknames", which works in much the same way, you can have an unlimited number of aliases for an account, except the process was a bit longer (settings -> manage domain -> users -> Your user -> Add a nickname) and I got too lazy for that after a little while.
I still use nicknames for certain things, but not for every website I sign up for.

That's when I discovered the + symbol in Gmail. Unlike Yahoo! Mail that uses the "whitelist" approach (only addresses you created will accept mail), you can use Gmail with a "blacklist" approach (all addresses accept mail unless you block them).

Assume your email address is john.smith@gmail.com, you can append a + and then any (valid) characters you like to the end, such as john.smith+facebook@gmail.com and it will still get delivered.

If some rogue website starts sending spam to john.smith+dodgysite@gmail.com, then you can go into the Gmail settings and setup a filter to delete all mail that is sent to: john.smith+dodgysite@gmail.com.

I don't think it's quite as nice as Address Guard, but it is a bit more convenient because there is no set up. The biggest downside is that quite a few websites consider an email address to be invalid if it has a + symbol in it, but most are fine.
Posted by Steven Occhipinti at 10:14 PM 0 comments
Labels: email Email This BlogThis! Share to Twitter Share to Facebook

XKCD + BeyondPod

On my Android phone, I use an app called "BeyondPod".

BeyondPod is great because unlike Google Reader and Pulse (which are other great RSS readers), BeyondPod will download video and audio podcasts on a schedule.

What this means for me, is that at 2:30 AM, my phone will use my home ADSL2's off-peak downloads and fetch a bunch of regular podcasts so when I wake up and make my way into work, I will have all the latest episodes of my favourite shows to watch and listen to on the train.

One of the feeds that I'm subscribed to is XKCD. If you look at the comics online, you probably already know that if hover your mouse over the image, you get to see an extra message about the comic.

On Google Reader, you can tap and hold the image and use the menu to get to the tooltip, but with BeyondPod, there is no such option.

This means that the tooltip is actually included in the feed, so I thought it would be pretty easy to write a little proxy that pulls out the "title=" attribute and appends it to the body.

Before I started coding, I thought that surely someone would have already done this, so after a quick Google search I came across a Yahoo! Pipe from "Benjamin Cook" that does exactly that.

Ben's Pipe appends a "<br />" and then the tooltip, but the "<br />" seems to be getting escaped, so I copied the pipe and removed the "<br />" and the end result was exactly what I wanted.

If you have a similar problem, you can add my version of the pipe to your reader and here's what it'll look like:


Posted by Steven Occhipinti at 3:10 PM 0 comments
Labels: android Email This BlogThis! Share to Twitter Share to Facebook

Git + Hub = GitHub

As mentioned in a previous post, we use GitHub-Flow at work and I really like it.
In essence, it involves doing work in feature branches, while maintaining an always deployable master branch, then opening a pull request to merge a new feature / bugfix into master, which provides a great mechanism for code review / sign-off.

So a fairly typical situation would be as follows:
  • Bug found in app
  • Create an issue on GitHub with description, assignee, etc.
  • Create a new branch off master for the fix
  • Code it up, test locally, etc.
  • Push branch to GitHub
  • Open pull request to merge back into master
  • Get review / sign-off inside of the pull request
  • Deploy
When a pull request is opened on GitHub, it automatically creates an issue for that pull request, which would normally be helpful, but we already created an issue when the bug was discovered.
So now we have 2 issues and 1 pull request. What's nice is that if I push more commits to that branch, it will appear in the pull request automatically, but not the initial issue.

After looking into this, it seems (AFAIK) GitHub do not provide a way of attaching a pull request to an existing issue via the site, but they do provide that functionality via their API.

That is when I discovered Hub.
Hub is a wrapper for git and while it adds more power to alot of the standard git commands, hub adds one command that is really useful for me:

git pull-request -i 49

This basically means "Open a pull request to merge the current branch into master and attach the pull request to issue 49".

This means that the initial bug description, the commits, the review conversation and the merge are all encapsulated in a single issue - fantastic!
I don't know why this isn't built in to the web interface (or maybe it is and I just don't know how).
Posted by Steven Occhipinti at 1:37 PM 0 comments
Labels: git , github Email This BlogThis! Share to Twitter Share to Facebook
Older Posts

Blog Archive

  • ▼  2012 (9)
    • ▼  May (1)
      • Password management
    • ►  April (2)
      • 1 year and 40 posts!
      • XBMC Eden + Ubuntu
    • ►  March (3)
      • Rooting the HTC Desire HD & Cyanogenmod 7
      • Spam defence
      • XKCD + BeyondPod
    • ►  February (3)
      • Git + Hub = GitHub
      • Copy and Paste over SSH with Xclip
      • Minecraft exception in linux
  • ►  2011 (32)
    • ►  December (1)
      • Toshiba Portege Z830
    • ►  November (3)
      • 13" Core i7 Samsung Series 9 Ultrabook
      • Removing geotag data from JPGs
      • Motion detection
    • ►  October (3)
      • Disabling the Unity global menu
      • Recursive search with vimgrep
      • Ruby + parallel port + LEDs
    • ►  September (4)
      • Git stash, diff and patch
      • Code review workflow with GitHub
      • GTalkSMS
      • Meta-contacts in Pidgin
    • ►  August (3)
      • Poweroff without a password
      • Mounting NFS in Ubuntu
      • Regex substitution 101
    • ►  July (4)
      • Search and replace in multiple files with Sed
      • ssh-copy-id with an alternative port
      • Pencil for UI design
      • Python-fu for The Gimp
    • ►  June (5)
      • Vi mode for Bash
      • PhpRemoteAdmin
      • Bash auto-complete
      • Can't open file for writing
      • Flashy Prezis @ DDD
    • ►  May (6)
      • Search and replace in multiple files with Vim
      • Cleaning up indicator-applet in Ubuntu
      • Multi monitor keyboard shortcuts in Ubuntu
      • The Tank Project!
      • DHCP fixedhosts to /etc/hosts file
      • Multiple Google accounts at once!
    • ►  April (3)
      • 24-70mm f2.8 VS 17-50mm f2.8
      • (Minecraft and) Arch Linux FTW!
      • Intro to Braindumping!

Labels

android (3) apache (1) arch linux (1) bash (9) compiz (1) design (1) diff (1) email (1) gimp (1) git (3) github (2) gnome3 (1) Google (1) hacking (1) hardware (3) htpc (1) java (1) lamp (1) linux (25) Mac (2) minecraft (2) mysql (1) netduino (1) nfs (1) parallel port (1) patch (1) photography (2) php (1) pidgin (2) programming (4) python (1) regex (5) ruby (1) Samsung Series 9 (1) security (1) sed (3) ssh (1) sudo (1) tank (2) Toshiba Portege (1) ubuntu (14) ui (2) unity (2) vim (5) webcam (1) websites (2) xbmc (1) xclip (1) xul (1)

Network

  • Louf What You Eat
    Loufy’s Ice Cream Holiday
    1 week ago
  • Diego's Brain Picks
    ADT Exception: com.android.dx.util.DexException: Multiple dex files define …
    5 months ago
  • Money Never Sleeps
    Intro
    7 months ago
  • Alex Bowe
    Failing at Google Interviews
    8 months ago
  • Anthony Sellitti
    Splunk, It's not just a dirty word...
    8 months ago
  • NoBoost
    Winton 19th August 2011 (First Event on a Race Track!)
    9 months ago
  • Michael Chandler
    Cool web dev tools - JSFiddle
    10 months ago

Twitter Updates

Total Pageviews

Sparkline
 
Copyright (c) 2010 Steven Occhipinti. Designed by Conveyancing
High Deductible Health Insurance, Purchase Beats, Download Marketing Pictures