May 16, 2009

iptables browsing samba shares

NOTE: this assumes that you've read my previous post on basic iptables setup on the desktop

So I just spent the longest time trying to determine what ports I needed to browse and use samba shares. The sad answer is it's just one.


iptables -A INPUT -p udp --sport 137 -j ACCEPT


the catch with all the information I found with google was that most of it was for samba servers. I didn't want that. I just want to be able to browse my roommates network shares, and download from them. None of the information google provided suggested I need to allow the source port on the other end.

May 11, 2009

Git Presentation

I'm doing a git presentation and the Lansing Coldfusion User Group tomorrow night. Anyone who wants to is welcome to come Below are the slides for the presentation.



EDIT: I don't know why but google doesn't show all slides formatted right in mini mode. It's cut off some of the text and overlapped some things.

May 6, 2009

Jeff Atwood fails at password security

This was originally written for a class assignment and as that has not been modified (much) for the web.

Jeff Atwood's password was compromised, the following includes a summary of how it happened, and how better security policies could have avoided it. This was written for Advanced Report Writing at Baker College.

Summary of Article

On May 3, 2009, Jeff Atwood reports that his Stack Overflow password was compromised an that he received an email explaining the details. The following is an excerpt of that email, that was posted in his blog post.

How? Well, there were two pieces of the puzzle, the password and the openid provider. I had a possible password; today your blog post revealed the openid provider. I logged in, freaked out that it actually worked, then logged out. The only reason I had the password is because your password is totally inadequate for someone running a site like StackOverflow. I don't want to go into any more detail than that, but man - dictionary password! -A friend of the site (Atwood, 2009)


Jeff confirmed that the authentication logs for Stack Overflow did include a valid login from an unrecognized IP address. Although Jeff defends that his password was not a dictionary password. He also states that this particular OpenID account is for low security transactions online, and not particularly valuable. He digresses that because this account is a Stack Overflow moderation account, with special privileges, that he should have used a more secure login.

Jeff goes on to explain, the various ways which the account could have been compromised. The first method he describes is the "educated guess". An educated guess basically uses what you know about someone to guess there password. The second is "Brute force dictionary attack". Jeff describes this as an attack vulnerable to non-rate limited logins where the password is a word out of the dictionary. The third method described is "interception". This method is basically where the password was captured at some point between the user and its destination, this could be kelogger, packet sniffing, and/or simple lack of encryption. The final method was "Impersonation" where a site pretends to be a different site, and prompts you for credentials, this is also known as phishing.

Jeff presents that none of these methods were used to compromise his account.

I guess I can tell you, so you don't fall into this trap again. There's a site I help out with that doesn't salt their passwords. They're MD5 encrypted, but if you've got a dictionary password, it's very easy to use a reverse-MD5 site to get the original. I was able to figure out you were a user on the site some time back, and realized I could do this, if only I knew your openid provider... (Atwood, 2009)



Jeff then re-iterates that he is to blame, and this is a problem with programmers at large. He then suggests that programmers should get out of the business of storing credentials, if they don't want to take responsibility for it.


Evaluation of the Article


Jeff Atwood, is a fairly famous full time blogger entrepreneur, software developer and blogger, and often seen as an authority in the community. He is self admittedly not an expert and these articles truly show this. Jeff's articles will undoubtedly lead many programmers to be confused and ignorant about the types of attacks possible and the type of attack that actually took place. One good thing does come from these articles however. It increases developer awareness (and hopefully user) awareness of just how easy it is to compromise a password and how inadequate there own authentication systems may be.


Jeff seems to not understand the basics of all the attacks he's described so I will elaborate on what they really are.


1. Educated Guess: Jeff mostly has this right, however, in the article he calls this in with social engineering. It is in no way shape or form social engineering. Social Engineering generally requires convincing someone to give you information. An educated guess requires that you use information you already have to break the password. In a sense this was used to gain the login name, although it was not a guess, it was known. I once used an educated guess to break into the account of someone based on there age, gender, race, and password hint, none of which I had to gain any additional information on. note: my cracking of this account was 100% legal as it was authorized by the computer owner.

2. Brute Force: This is combined with 'dictionary attack' and although the two are often combined they are separate attacks. A brute force attack is simply generating account credentials (username password typically) with an automated computer program and sending them to the system you are attacking until it lets you in, until you are permanently blocked, or until you give up. A brute force attack is 100% successful unless somehow stopped as it will eventually try all combinations. The exception to this is when the password could be changed to a password already tried during the attack. This only works on a live system however, if the attacker manages to gain a copy of the password db they can attack at their leisure and may instead get a stale password. It can mostly be prevented by locking users out after a certain number of failed attempts.

3. Dictionary Attack: A Dictionary attack, although it does reference words from an actual dictionary, such as Webster's, it is not limited to just those words or even words. Dictionary attacks consist of lists of words which may come from any language, including fictional ones like Star Trek's Klingon, slang, names and pop culture references. Because of modern security standards they will often append, and prepend numbers to the words, and even change case around. Dictionary attacks may also include coded words such as 1337 also know as leet or l337 or l33t, etc. 1337 is a substitution cipher popularized online which substitutes letters for numbers that slightly resemble letters. A dictionary attack is usually run before a brute force as it is much faster, and has a high probability of success compared to time used. It can be mostly prevented by forcing users passwords to be compared against known dictionaries (such as cracklib) and making sure their password isn't in them, and forcing them to pick something else if it is.

4. Interception: Interception is another name for "the Man in the Middle" attack, which is
what it more commonly goes by. Jeff seems to be under the assumption that "Man in the Middle" requires the attacker to get the credentials verbatim. "Man in the Middle" basically means getting the data after the user enters it and before it reaches it's destination, this include keyloggers, screen scrapers, and packet sniffers. it may include other methods I'm forgetting. "Man in the Middle" is easily prevented by user strong 'stream encryption' in which all data sent between the client and the host is encrypted, SSL is commonly used for this on websites, note the 'lock' icon, in your browser. This is different from hash encryption which is how the password is (should be) stored as it encrypts all data being transferred including the username and password hash.

5. Impersonation: Or Phishing is a form of social engineering in which you pretend to be something you aren't and attempt to get people to give you sensitive data such as account credentials. It is most commonly done by creating a website which closely resembles the site for which you are trying to get credentials for, and then sending out emails to try to get people to log in.

6. Social Engineering: Social Engineering is simply misrepresenting yourself to get information. It can go as far as full blown fraud, or as simply as talking a person into giving me what they may not even believe is sensitive data. One could for example talk to someone, get there name, mention that they knew a woman who married a man with that last name and ask for a mother maiden name, pretending like they knew her. A mothers maiden name is a highly common question to prove identity in account verification and password resets online. People have also dressed up and walked into nuclear power plants with clipboards making themselves look like they belonged there, and were never stopped. An IT guy asking for your password may also be social engineering, as you think you should trust him. Social Engineering may be used to get account credentials or to formulate an educated guess.

7. Rainbow Tables: Rainbow Tables are databases of all possible straight password hashes up to a certain number of characters, and there corresponding passwords, these hashes may or may not be included with a dictionary attack, they typically include the full contents of a brute force. The largest Rainbow tables includes all possible combinations up to 8 characters for md5 hashes. These make reversing a hash from a password instant and easy. It still requires the attacker get the hash in the first place, this is usually done by "man in the middle", SQL Injection, or compromising the database server. This can generally be avoided by salt-ing the hash making it more difficult for the attacker to get the original password.

Jeff's Password was lost due to a combination of attacks. Firstly was public information, his 'user' credentials (OpenID) were publicly available (this isn't actually an attack), the second was "Man in the Middle", as obviously no one published the hash, so it had to be gotten somehow enroute (unless the db was cracked). The third was "Rainbow Tables" which allowed the attacker to reverse the hash into a real password. I don't believe that Atwood truly understands the attack vector's, and I don't think that people should read these articles for learning purposes. It is good though that he accepts some responsibility for lack of proper security practices on a sensitive account.

In my opinion this is what's wrong with programmers, they think they know better and instead of learning how to do it correctly and all the things that could go wrong, they just go ahead and do.

Atwood, J. (2009). I Just Logged In As You. Retrieved
May 6 2009, from Coding Horror
Web site: www.codinghorror.com/blog/archives/001262.html


Atwood, J. (2009). I Just Logged In As You: How it happened. Retrieved
May 6 2009, from Coding Horror
Web site: www.codinghorror.com/blog/archives/001263.html

EDIT: Sincerest apologies for originally spelling Atwood as Attwood and spreading misinformation about about his profession. Thanks to Stu for pointing this out. For some reason I thought those were both true, and did not check them, since I've been reading Coding Horror for at least a year.

@Grade I'll post it next week when I get it

@Spelling errors, I had reinstalled my system the morning of writing and apparently had forgotten to configure it. They should be corrected now.

@Assignment the assignment was not an essay but the evaluation of an article, and its content. It didn't require me to cite any sources for why I agree or disagree with the article.

May 5, 2009

Regen2. don't care anymore

Yep, I don't really care anymore. So much work needs to be done, I can't do it alone, but neither Gentoo, Funtoo, Sabayon, or Exherbo, are going down the right path to the salvation of the 'gentoo way'. Without help or regular feedback I lost the will to work on it. Will regen2 ever be revived? I don't know.

if you want go to Funtoo, it should be easy enough to do


git remote add funtoo git://github.com/funtoo/portage.git
git remote update
git checkout funtoo/funtoo.org
emerge -avuDN world


at this time I'm not actually using gentoo*, I'm using arch, I may also check out debian sid, or maybe some other rolling distro.

Apr 30, 2009

Arch, Funtoo, and Regen2's future

as I've been saying here recently I'm burned out, on so many angles it's not funny. I'm apathetic, I'm not really sure I care anymore. I'm actually playing with arch at the moment to see if it's a better fit. I also here debian sid might work. I don't want to maintain the tree 7 days a week anymore, and I'd like an up to date system.

I've been talking w/ drobbins lately about the possibility of a common tree with funtoo, I'm not sure he wants to do it the same way I do, which is unfortunate. doing this might take the load off me that I don't want, but it's entirely possible that it's too late for it to matter.

I'm going to take a few days and see what happens, it's entirely possible that I'm just going to give up at this point. I'll let people know in a few days what I've decided.

Apr 22, 2009

Regen2 0.9.1.0 Released

_Release Highlights_

vanilla-sources-2.6.28.9
gcc-4.3.3
glibc-2.9_20081201-r2
openrc-0.4.3-r1
baselayout-2.0.0-r2
git-1.6.2.3
perl-5.10.0
bash-4.0_p17

app-sh/dash is now included in the tarball, in the next major release I hope to make it /bin/sh please test and report any bugs with doing this. apache2 and mysql are known to have issues. openrc works fine, the average desktop system should work.

_Known Issues_

emerge --sync will not clone the tree if it does not exist in portage 2.1

so for now you'll have to work around that issue. by manually doing the git clone.

_Download_

torrents are here http://www.mininova.org/user/xenoterracide and here http://code.google.com/p/regen2/downloads/list?q=label:0.9.1.0 actual tracker is TPB

http downloads are here http://regen2.devangels.org/release/ thanks to is_null for the mirror. If you're interested in mirroring them let me know. I'll put up a proper mirror list at some point.

EDIT: Thanks to theappleman for more hosting

HTTP (Europe):
http://g.applehq.eu/files/regen2/0.9.1.0/amd64/stage3-amd64-2009.04.18.tar.bz2
http://g.applehq.eu/files/regen2/0.9.1.0/x86/stage3-x86-2009.04.18.tar.bz2

FSP (just for fun ^^, it'd take about 8-9hrs to download the x86):
fsp://fsp.applehq.eu:2009/regen2/0.9.1.0/amd64/stage3-amd64-2009.04.18.tar.bz2
fsp://fsp.applehq.eu:2009/regen2/0.9.1.0/x86/stage3-x86-2009.04.18.tar.bz2

--
Caleb Cushing

http://regen2.org

Apr 21, 2009

Looking for tree maintainers

I'd like to see multiple people merging the tree, with best case scenario being that it happens more than once a day. worst case status quo. I'm willing to write the scripts and teach anyone how to do it. I just ask that you can read an ebuild (to some degree) and have good judgement, or at least not too embarrassed to ask. Most ebuild merges are IUSE, KEYWORDS, and cvs line. the rest is really almost automated, merge (del package.mask) merge (fix ebuilds), repoman manifest, gen_metadata, commit, push. This will allow me to focus on other things hopefully, and make the distro better quality.

email the dev list if you're interested.

Apr 14, 2009

Regen2 0.9.1.0

I haven't forgotten about it. I seem to lack all motivation on Spring Break. Nothing to procrastinate on. Now that school has started I'm working in full swing, I've been learning metro the past few days. I should have the tarballs ready by the end of the week. I'm not sure on mirrors right now. Have at least one volunteer mirror, and I will be torrent-ing them. I've been seriously procrastinating on finding out how to get on the Uni mirror ring.

Mar 24, 2009

~arch will be testing again not stable

I think the idea of a meta distro on top of a stable base is the way to go, let people choose just what they want on bleeding edge. I like my kernel, gcc, and perl solid, sometimes I want firefox's beta's but that doesn't mean I want the rest of the system like that. At some point gentoo's ~arch became more stable that stable, this needs to end. Even if it means making stable a bit more unstable. I'd like to see more people running stable systems.

~arch is going to be aimed more at things that are stable enough, and pending stable. It's going to become more unstable than it is in a sense because I'm not afraid to hardmask stuff that was ~arch and is found to be broken. I'm also not afraid to release slightly broken stuff into ~arch, for example I'll release a new git into ~arch without an update noperl patch which means using -perl won't work. I won't release completely broken or overtly buggy things into ~arch though, I'm just not afraid to release with a missing patch (set) as long as it'll build and work in most cases and update later.

I've decided on a policy for stabilizing the kernel, first of regen2's kernel is vanilla-sources, if you're running another sources this doesn't apply. I will stabilize the previous kernel when the new major version is released so I will stabilize 2.6.28.x when 2.6.29 comes out, after that I will stabilize each new kernel a few days after it hits the tree (actually I may not wait), since the kernel's development model makes it highly unlikely that regressions will be introduced that late in the cycle. I may use a similar update scheme for other packages but it will be a package by package basis. But likely once a major version moves to stable it will be trivial to move new minor versions to stable.

I want to know what people use? what should be stable in regen2. 2 things I won't stabilize right now are qt-4.5 and kde-4.2. They work well enough but have too many bugs upstream, imho (should a kde developer look at this feel free to look at my buglist on your bug tracker, prtscrn must work before I'll mark kde stable, but hey at least dpms works with screensaver now). Anything else goes what do you use/need that's in ~arch and has been there for a long time. feel free to mention in comments, the dev list or the Bug tracker

Mar 23, 2009

Regen2 0.9.1.0 soon

Last night I decided I'd be rolling out the first release of Regen2 in the first week of April.

So as I'm sure everyone knows version are arbitrary they mean nothing... well ours are going to mean something. The first 2 numbers are the year, so 20(0.9).1.0. the Third number is the quarter, we are going to be mass stabilizing system once per quarter. I'm not sure that this will include new profiles. 4rth number is kinda arbitrary at this point, I'm not sure how/if I want to use it, opinions welcome. since releases will be 'stable' I could use 0 as kind of an alpha, first release. 1 as beta, 2 as rc, and 3 as final. I could also do a 0-alpha1, 0-beta1, etc. and when stage4's and other stuff are rolled out use the version number to denote updated non-system software. In other words I could do releases each month of say kde in stage4's but I wouldn't change system more than once a quarter.

So far my list of packages that'll be marked stable include.

gcc-4.3.3(maybe r1)
glibc-2.9_20081201-r2
openrc-0.4.3-r1
baselayout-2.0.0-r2
git-1.6.2.1
perl-5.10.0

I'll have to spend the next few days figuring out the rest.

I'm debating also on whether I'm locking down major or minor versions. meaning I might consider stabilizing gcc-4.3.4 in the middle of this quarter but not gcc-4.4.

I'm open to opinions on anything. This may be a dictatorship, but I still don't mind hearing from people not me, as with enough eyes all bugs are shallow.