Security talk 29/04/13

Status
Not open for further replies.

Captainnana

New Member
Jul 29, 2019
596
0
0
Hello everyone! I am captainnana one of the web developers here at FTB, today we have joined facebook, google and may other sites in adding two factor authentication to our site.

Enabling two factor authentication is easy:
  1. Install Google Authenticator on your phone
  2. Hover over your username in the bar above the bar above (be sure you are signed in) and click on two factor authentication. Add a new key
  3. Enter a description for your key.
  4. Open the Google Authenticator app.
  5. Tap menu, then tap "Set up account", then tap "Scan a barcode". (Alternatively you can enter the code manually)
  6. Your phone will now be in a "scanning" mode. When you are in this mode, scan the QRCode
  7. You now have two factor authentication enabled on your account; whenever you login in future you will need to open up the app and enter the code for Feed The Beast
If you have any issues with our site not recognising the key then click menu, settings, time correction for codes to ensure that your device is in sync.


Why do I want this?

Simple answer – It increases the security of your password so if your password were to be known by a third party (bad guy) then they wouldn't be able to login without the code from your phone as well.

Long answer – There are many ways that a miscreant could get a hold of your password, they could get it from a key logger on your computer, a phishing attack or a database hack on our servers. We take every measure possible to ensure that our servers don’t get hacked however it is always best to prepare for the worst for this reason we take several measures to make sure your passwords are secure. When you signup and enter your password we hash the password using SHA256 twice using a salt:

sha256(sha256(password) . Salt) - this is a one way hash this means that we do not know the password that you entered we can just check if your input the next time you come is the same.

The salt is unique for each user however the issue with password based key derivation is that if a miscreant were to attempt to do this hash using the salt for the user with every dictionary word with say 0-99 at the end of it they would find out a lot of users passwords! In contrast to some other websites we use a unique salt for every single user meaning that the miscreant cant simply use the dictionary table once and check to see if anyone has that hash they have to do it for each user which is very time consuming. This process can be done incredibly quickly with modern GPU's and so increasingly this is not enough, so what can be done? Well firstly a strong password can be used, the best are randomly generated ones from a service such as keepass or lastpass this ensures that you cant fall victim to these attacks; it is still possible to crack the passwords but it will take a lot of time as the miscreant has to try each password combination, in future with the speed GPU's are advancing this could well be possible. The second way to fix this problem is to use two factor authentication, this is what I have added to the site today, simply you get a key from the server and combine it with the current linux time in an algorithm to generate a pseudo random string of numbers. Because both the server and the phone know the current time and the key (that’s what you get from the QR code) they both can generate the same string and therefore we know that you are the correct user and can allow login.

Does FTB really need this? It's not like I am transferring national secrets on here!

Well to put it plainly no, but with miscreants becoming more advanced every day I want to say ahead of the game, you don’t have to opt into this system but I have put it here to be future proof, in the coming months and years you will start to see a lot more sites using this system, twitter is currently developing one and google and facebook already have it. The great thing about it is that you only need one app for everything I link to google authenticator in this post but equally you could use Microsoft authenticator or a third party one if you so choose!

Thanks for reading I'm sorry if this post was a bit technical but I found this really cool and I thought some of you might as well so I decided to share it with you.

Captainnana
 

bored

New Member
Jul 29, 2019
6
0
0
I have resisted getting an account on this site because I feel that having a proliferation of accounts and passwords is a core reason why password security is problematic, both from a usability PoV and from a security one. (It irks me to no end that I can't see attached pics on the site without having an account).

Having said that this sounds good.

One thing you should probably change is that using a simple double SHA256 is not really good enough. You should consider something like http://en.wikipedia.org/wiki/PBKDF2 which executes the hash 1000 times or more.

Salted and hashed passwords are a good start, but sophisticated attackers can still make some headway.

Here are a couple of good articles to look at

http://arstechnica.com/security/201...password-breach-is-graver-than-you-may-think/

http://arstechnica.com/security/2012/08/passwords-under-assault/

Also, the argument for having secure password storage is not that I am transferring national secrets on this site (IMO), it is that (due to the proliferation of accounts I mentioned earlier) a user is probably sharing usernames and passwords across multiple sites which means that an attack on a site you might not care much about can compromise your account on a site you do care about.
 

Captainnana

New Member
Jul 29, 2019
596
0
0
I have resisted getting an account on this site because I feel that having a proliferation of accounts and passwords is a core reason why password security is problematic, both from a usability PoV and from a security one. (It irks me to no end that I can't see attached pics on the site without having an account).

Having said that this sounds good.

One thing you should probably change is that using a simple double SHA256 is not really good enough. You should consider something like http://en.wikipedia.org/wiki/PBKDF2 which executes the hash 1000 times or more.

Salted and hashed passwords are a good start, but sophisticated attackers can still make some headway.

--snip--

Also, the argument for having secure password storage is not that I am transferring national secrets on this site (IMO), it is that (due to the proliferation of accounts I mentioned earlier) a user is probably sharing usernames and passwords across multiple sites which means that an attack on a site you might not care much about can compromise your account on a site you do care about.

To be perfectly honest PBKDF2 is only marginally better than SHA256 at this point, yes it is slower to execute but that ship sailed long ago, nowadays things that only require execution time can be computed very quickly so while it may be slower it is still doable so arguably this is better. PBKDF2 is basically about 1000 iterations of SHA-256 if I remember correctly which means it is a linear scaling system and so can easily be pipe-lined to execute at the same rate as SHA256 given the correct hardware. If I were to change the hash (Which I hope to do someday) I would use scrypt http://en.wikipedia.org/wiki/Scrypt It requires vast amounts of memory to run which slows things down dramatically because you have to put it into memory then back into execution etc so this would be the best solution but lets be honest we could argue about password hashing methods all day.

Also the national secrets thing was a comment that someone made to me while I was adding the two factor auth, I am well aware of the risks of using the same password on multiple sites and not using strong passwords but I figured that others may not be and so I would try and explain it a bit. But yes you are 100% correct sharing passwords over multiple sites is the number one way that people get hacked so be sure to use different pseudo random passwords on every site guys!


PS. You say that you are put off from signing up to sites because of the proliferation of accounts, are you using keepass/lastpass/onepass for your passwords if not then try one of them out, nowadays I have no idea what any of may passwords are I just click and they work!
 

bored

New Member
Jul 29, 2019
6
0
0
To be perfectly honest PBKDF2 is only marginally better than SHA256 at this point, yes it is slower to execute but that ship sailed long ago, nowadays things that only require execution time can be computed very quickly so while it may be slower it is still doable so arguably this is better. PBKDF2 is basically about 1000 iterations of SHA-256 if I remember correctly which means it is a linear scaling system and so can easily be pipe-lined to execute at the same rate as SHA256 given the correct hardware. If I were to change the hash (Which I hope to do someday) I would use scrypt http://en.wikipedia.org/wiki/Scrypt It requires vast amounts of memory to run which slows things down dramatically because you have to put it into memory then back into execution etc so this would be the best solution but lets be honest we could argue about password hashing methods all day.

Scrypt would be good alternative. I suggested PBKDF2 since it is well known, respected and straight forward. Bcrypt is also good

http://en.wikipedia.org/wiki/Bcrypt

However, I don't think that Scrypt makes the kind of difference you are talking about. You can trade time for space and AFAIK Scrypt won't make things less linear. But any of those should be fine.

snip...
PS. You say that you are put off from signing up to sites because of the proliferation of accounts, are you using keepass/lastpass/onepass for your passwords if not then try one of them out, nowadays I have no idea what any of may passwords are I just click and they work!

You have just outlined why I don't use such things. I have a terrible memory for such things. The only way I can remember what anything is for any site is to force myself to type it. If I make my password manager remember it for me then I am screwed if it ever fails, gets corrupted or (in the case of some products) has its license run out.

I would hope that some day we could move to a single sign-on technology that worked well. OpenID has some problems and more importantly everyone wants to be a id producer, no one wants to be an id consumer, so that may never happen. But it would be a better fix.

That's not exactly your problem though ;)
 

bored

New Member
Jul 29, 2019
6
0
0
Oh, one other thing I forgot to mention.

You should always consider pass phrases. The following xkcd comic gives the simplistic argument.

http://xkcd.com/936/

Not sure how practical that would be for you.
 

QueWhat

New Member
Jul 29, 2019
497
0
0
Great info there Captainnana, thanks for the extra work you put in so that our accounts are secure.

Bored; if you are really that concerned with security, then why not create a separate email account with a fictitious name, different password, not associated with your other emails, and use that one exclusively with FTB registration? If someone gets into your account here and obtains your email address it would lead to a fictitious name that leads to no other websites, AKA a dead end. I know it is extra work but a one time deal (and not illegal as long as you do not use to defraud anyone). If you really want to be secure then I'd be careful with Facebook and Twitter and posting pictures taken on smart phones (metadata and such), but you sound like you know what you are doing.
 
  • Like
Reactions: Ashzification

Zjarek_S

New Member
Jul 29, 2019
802
0
0
PBKDF2 is basically about 1000 iterations of SHA-256 if I remember correctly which means it is a linear scaling system and so can easily be pipe-lined to execute at the same rate as SHA256 given the correct hardware.
Now you don't use PBKDF2 with 1000 iterations, you use as many iterations as you can without making big delays. 1000 was minimum amount in 2000, taking only Moore's law into account it should be 400 000 now. Scrypt is better due to memory use (harder for GPU or specialistic systems), but PBKDF2 with sufficient number of iterations is not bad. Bcrypt also has an advantage, because it is available in PHP without need for other libraries (however native crypto library will make it faster).

Edit: QueWhat: Well, I just use 10miniutemail for every page that require arbitrary registration, like for example this forums. I think that's why my username isn't "Zjarek" (my saved password in password manager stopped working).
 
  • Like
Reactions: QueWhat

Captainnana

New Member
Jul 29, 2019
596
0
0
Scrypt would be good alternative. I suggested PBKDF2 since it is well known, respected and straight forward. Bcrypt is also good
Xenforo are going to be adding bcrypt support in their new version so hopefully we will see that fairly soon.

To be honest as long as you use random gen passwords and back them up (I use dropbox) then you are good because getting hacked on one site doesn't mean you are on them all.
 

Captainnana

New Member
Jul 29, 2019
596
0
0
Unless you are hacked on dropbox :p
Indeed as Zjarek says you dont just leave them all on there they are protected by dropbox password/security and then if anyone got past that by the AES cipher that is used to encrypt the file which has 1.1x10^27 combinations (256 bit) so to be certain to crack it it takes something like 10 million years (?) which is why AES is used by the government to secure files up to "Top Secret" level.
 
  • Like
Reactions: QueWhat

Zjarek_S

New Member
Jul 29, 2019
802
0
0
Indeed as Zjarek says you dont just leave them all on there they are protected by dropbox password/security and then if anyone got past that by the AES cipher that is used to encrypt the file which has 1.1x10^27 combinations (256 bit) so to be certain to crack it it takes something like 10 million years (?) which is why AES is used by the government to secure files up to "Top Secret" level.
They are not protected by dropbox, but by your password manager. Files on dropbox aren't encrypted using your password, so it doesn't really matter what encryption they use, you can't trust it.
 

Captainnana

New Member
Jul 29, 2019
596
0
0
They are not protected by dropbox, but by your password manager. Files on dropbox aren't encrypted using your password, so it doesn't really matter what encryption they use, you can't trust it.
I mean for a bad guy to get a hold of the file in the first place they have to bypass dropbox security ;) (and the AES is on my keepass file)
 
Status
Not open for further replies.