Archive for June, 2007

Secure Doors

As you all surely know, I’m in a computer class this summer. Until a couple of days ago, I hadn’t been in Concordia’s computer labs since April. And since then, the powers that be here at the University changed something. When I noticed the change, it took me a good two days of pondering to figure it out. And when I did figure it out, I was blown away.

I’m not sure if a specific incident caused the change or not, but in the last few months, a major (yes, absolutely major) security flaw was fixed. I hadn’t even noticed this flaw was there until they changed the way the doors work. Then it all became clear. I will try my best to explain it here.

At Concordia - and probably every other college/university out there - Computer Science/Engineering students get special computer labs to themselves. I’m sure other departments do as well, actually. All of these computer labs are protected by secure doors. There are two ways to get in. The first is to use a key, which I expect only technicians and administration type people have. The second is what professors and students all tend to do. We all have a six-digit key that we can type into on a keypad on the door. It then beeps and unlocks itself for us. These keys are provided to us on a website (encs.concordia.ca) that we need a password to use. I think that’s pretty standard.

I’ll describe how the doors worked from September last year until April this year (possibly later, since I’m not sure exactly when the change occurred). As I mentioned briefly, the door codes are 6 digits long. Lets pretend, for this example, that the door code is 555876. If you were to walk up to the door and press a 5 on they keypad, you would get a green light and a happy beep. If you press a 5 after that, you would get a green light and a happy beep. If you continue pressing the keys correctly, after the sixth key you would get a long extended happy beep and green light, and could then go into the room. If, however, you pressed any of the keys incorrectly, you would get a red light and an angry beep. You would then have to start over and type in the code properly.

Do you see the flaw? I used these doors at least twice a week for eight months without realizing how awful this design is.

This has got to be the single worst lock design I have seen in my entire life. Most locks out there have flaws, but I’ve never seen anything this bad. (I know a lot of twist-style combination locks can be reduced from hundreds thousands of guesses to just a few thousand).

Now I’ll describe how they currently work. No matter what you press on the keypad, you will get a red light and an angry beep. If you put in the six correct digits, the door unlocks (you can imagine my original horror when I typed in the well-memorized code and got a bunch of angry beeps). If you put in just a single wrong digit, you won’t know until the door refuses to unlock after six key presses.

Just in case you don’t see how serious this was, I’ll outline how easy and trivial it used to be to break in to every single computer lab at Concordia. Here’s the algorithm for breaking into a door before April:

1. Walk up to a door when nobody is around (there are plenty of labs in empty, far-away-from-everything-else hallways)
2. Press the first digit.
3. Green light? Press the first digit again (we start by looking for 11XXXX).
4. Red beep from step 2? Press the second digit (we’re now looking for 12XXXX).
5. Repeat until you have all six, which shouldn’t take long.

I could be wrong about the next bit, so read carefully and please let me know if I made a mistake.

You should only need to press a maximum of 210 keys before you could gain access. You would need a maximum of 10 key presses to get each next digit, and you also need to press in the code you have so far (if you’re guessing the fourth digit, you have to press the first three and then make a maximum of ten guesses to get the fourth).

I think the math works out to 210 total presses at the worst case scenario. I get 210 from 10+20+30+40+50+60, which I think is correct. Now, the way the current system works, you would have no idea if you’ve made a mistake until the very end of punching in the six digits, which means you have to try every single combination. From good old fashioned high school combinatorics (and a quick refresher course from Wikipedia), we know that Combinatorics

Using n=10 and r=6, we get 151,200. I’ll take this number a bit further: That’s 720 times larger that the old number of 210. If we assume that a person can punch in four keys per second (I’d say that’s pretty fast), have a perfect memory, and never pause, then…

a) It would have taken them 210/4=52.5 seconds under the old system. Less than one minute to break into a lab.
b) It now takes 151,200/4=37,800 seconds, or 630 minutes, or 10.5 hours.

Of course, I assume that there is only one valid key per door, which there might not be. (I seriously hope the math above is correct.)

So there you have it! I cannot imagine any circumstance where a company thought this was a good idea. It’s like having a car that tells you how you’re doing when you’re trying to break into it.

It does make me wonder though. Did someone discover the problem and report it? Was there a break in? Did Concordia complain to the lock company? Who is the lock company?

I’m sure I could continue, but this post is probably long enough as it is.

I hope I’ve inspired some of you to check out your own university’s door locks. Are they the same as I describe? Do tell!

Music: Red Hot Chili Peppers
IBC: 66,602-72,910 (about a 100ish change)

8 comments June 29th, 2007

On the Internationalization of Cows (or: more about my job)

Prepare yourselves for a tech-heavy post. Hey, at least I wrote something.

My job here in Animal Sciences at McGill is to write a Java program that a bunch of people will hopefully be using by the end of the summer. Essentially, I’m writing a new version of an old benchmarking program that they want to ditch. It was too slow and insecure. And buggy. Very buggy.

The old program was written in Visual Basic 6 over the last few years. The code base gives the impression that the program was designed while simultaneously being coded: it ended up with thousands of lines of code in each file. It’s unmaintainable by pretty much anyone except the student who wrote it a few years back (some code is commented nicely, but some of it…well, isn’t). Anyway, what I’m getting at is that the old program works alright but is excessively sloppy. One of the worst aspects is the language handling. Since it is to be used by both French and English speakers, the application needs to be able to switch languages on the fly (not that hard of a thing to do, providing you know both the languages). This was not done properly in the old program: when you change languages, only half (ish) of the program actually gets changed.

I’ve never written a program that needed to support more than one language, but it’s definitely something I’ve thought about. In my recent research, I’ve found that the solution I had in my head was close enough to reality (text or resource files containing the strings in different languages, stored separate from the program and accessed at runtime).

So remember, internationalization and localization prevents misinterpretation! (I’d love to hear crowds of people chanting this in a protest somewhere.)

The programmer who wrote the old VB program, while probably a pretty decent coder, definitely fell into many of the traps described near the end of this posting. I really hope that in two years I don’t end up reading someone’s blog describing how painful my code is to read.

Iraq Body Count range: 66,500-72,800. (up 300ish from last post)

Music: Neil Young

Add comment June 27th, 2007

jacobsheehy.com begins

It has been quite some time since I’ve written in a blog. I’ve looked at jacob.sheehy.ca many times since I last wrote in it and decided that it sort of feels old and dead. Rather than try to revive it, I thought I’d start fresh and register a new domain. So I did.

I think I should give everyone a chance to catch up with the local happenings so that this blog doesn’t feel like it starts from nowhere. Here you are (the short version):

I have a class starting in two days at Concordia. It’s one of those condensed summer courses that only runs for six weeks. Without too much in-depth research, it appears that we’re expected to already know c++ and assembler (phew!). This should be a fun class…

I work for the Dairy Information Systems group at McGill as a Java programmer. I don’t know if they ever change that picture on the homepage, but as of the time of this writing it shows my actual workspace (I work where the purple-shirted guy is sitting). What you can’t see in the picture is the obsession with cow-related items these people have. There are cow-themed clocks, shirts, mugs and everything else imaginable.

I just got back to Montreal from a two-week visit to Vancouver. It was exactly as expected (awesome) with a couple highlights. I saw a captivating performance of Romeo and Juliet at Bard on the Beach. I went to a baseball game. I spent a nice evening on Granville Island. And most recently, I went to probably the most fantastic concert ever (that I could attend) with perfect seats: I saw Roger Waters on his Dark Side of the Moon tour.

So there you have it. With any luck, I’ll gain a readership back after my near-two-year break from blogging. If you want to be sure to never miss a post, subscribe to the RSS feed (on the right).

I’ll try to keep the some regular features from the last blog, but there will be some minor changes. Rather than an occasional update on the number of Americans dead in Iraq since ‘03, I shall point you towards some different numbers. The Iraq Body Count keeps a good tally of reported civilian deaths in Iraq. The actual number of civilian deaths, I believe, is far higher. Read about this issue for yourself. Currently the range given by IBC is 66,195-72,489.

On a lighter note, I’ll keep up with the music sides.

Music: Rush (this morning) / Pink Floyd (now)

Be seeing you!

1 comment June 24th, 2007


Categories

Links

Recent Posts

Calendar

June 2007
S M T W T F S
    Jul »
 12
3456789
10111213141516
17181920212223
24252627282930

Posts by Month

Posts by Category

Meta




trial pack levitra buy mircette no prescriptionisosorbide mononitrate soma cod buy generic imitrex online about fioricet tamiflu medication buspar withdrawal buy synalarsynthroid sildenafil oralsingulair diazepam side effects meds that react with k-dur atenolol medication ionamin no prescripton deliv cod paxil side affects prozac cartoon zyloprim drug liquid hydrocodone women on steroids ambien dosage paxil dosage what is monopril fioricet oral ambien overnight delivery vicodin dosage buy lamisil online without prescription renova silvio phenergan overdose famvir 500mg adderall paxil stopping amaryl city hotel berlin glucophage weight loss hydrocodone pictures evista xanax discount steroids in sports butalbital cod payments discount prescriptions canada valacyclovir ritalin effects actonel about tramadol no prescription renova tramadol more drug uses buy hydrocodone cod adipex without prescription buy lamisil online no prescription tenuate tablet kenalog in orabase color of tadalafil tablets nizoral benefits comprar meridia buy fioricet w codeine kenalog spray proctocream 2.5promethazine tamiflu online vaniqa lowest price cheap soma ionamin no prescription snort klonopin side effects of coreg zyrtec side effects miralax side effects buy xenical without prescription clomid and provera medroxyprogesterone acetate cheap sildenafil buy viagra alternative order vicoprofen online anusol suppositories medication cheap propeciapropoxyphene vicodin buy online ordering generic fioricet online what is meridia propecia patent phentermine pharmacy glipizide cats meridia price order bontril cephalexin side effects discount tramadol diethylpropion diet pills buy prednisone actonel dosage and side effects acyclovir herpes cold sore protopic ointment nexium prilosec buy nexium online allegra vs clarinex online pharmacy ceftin microzide medication ionamin pills nexium rebate generic vasotec buy cipro trimox buy hyzaar medication nexium generic methylprednisolone tablets cipro with overnight shipping side effects of nardil loratadine dosage cheapest generic adipex online alprazolam 2mg no prescription oxycontinpantoprazole side effects of metformin what is propoxyphene generic cialis tadalafil estradiol valerate fluoxetine metabolism how furosemide works sportsbook hydrocodone hashish buyheroin ibuprofen and pregnancy phendimetrazine no prescription buy ambien online oxycodone hcl buy adipex without prescription mmxfey softtabs cialis nortriptyline hcl erection viagra metformin and pcos buy renova online lexapro more drug interactionslipitor lotrisone lotion protopic treatment pravastatin sodium adipex review trazodone side effects clomid success stories drug naproxen naprosyn alcohol buy xalatan microzide forum nexium 40mg purchase temazepam amaryl diabetic medication ionamin for sale opium plant oxycontin online prescriptions viagra prescription oxycodone no prescription impotence lipitor avandia rosiglitazone allegra clarinex tussionex with codeine skelaxin drug levitra order levothroid side effects propecia forum phenergan abuse sildenafil citrate tabletes retin a more drug uses retin a for wrinkles tamoxifen more drug side effects dicount lamisil no prescriptionlanoxin side effects of glipizide buy glucophage cheap adipex tamiflu for sale temazepam restoril buy viagra now online gen fluconazole buy xanax on line buying valium online triamterene hctz triphasil tabs order alprazolam no prescription provigil discount cards generic remeronrenova ionamin online desloratadine alcohol paxil oral side effects hydrochlorothiazide cheap lorazepam tobradex buy nexium side affects what is macrobid levothroid weight loss ambien generic buy prevacid lipitor medication cheap zithromax online hydrocodone picture buy anabolic steroids generic phentermine flexeril generic evoxac drug generic for plavix acyclovir 400 mg tablets cheap zithromaxzocor lo ovral levaquin reaction what is amoxicillin evista concerns paxil xr adipex p didrex georgia no prescription tenuate buy aricept diazepam without a prescription generic zyprexa fosamax lawsuits famvir prescription atarax zyrtec protonix 40mg flextra interim yasmin side effects prempro generic aldara effects side seroquel withdrawal fluoxetine hydrochloride isosorbide mononitrate oral generic sildenafil phentermine 37.5 long term side effects of phentermine norvasc dosages generic for tamsulosin buy phentermine in the uk buy famvir fda warning actonel naltrexone hcl where to buy vicodin cheapest rabeprazole sodiumramipril plendil forum generic for proscar effects of phencyclidine drug aciphex no prescription oxycodone buy imitrex online what is prednisone propecia hair loss buy adderall no prescription protopic prescription online motrin side effects clomiphene buy how to preven globel warming no prescription and nordettenortriptyline buy bactroban ultram pharmacy nicotrol cheap atarax 25 mg buy nicotrol inhaler vicodin pill celexa side effects ionamin prescriptions buy sarafem clomid side effects what is lisinopril what is pravachol what is fluconazole esgic genericesomeprazole fosamax tablets drug impotence levitra generic levitra celebrex dosage ritalin alternatives order zithromax online didrex cod ionamin without a prescription oxycodone dosage prozac drug generic prozac plavix generic celebrex fioricet tablet vaniqa online pharmacy compare meridia and phentermine buy bontril pantoprazole sodium histex ultram withdrawal symptoms ditropan flomax side effects fluconazole eye drops folic acid pregnancy antidepressant paxil cheap fluoxetine signs of roxicet addiction serzone lawsuit pictures of ketamine fluconazole diflucan biaxin and sleepy viagra prices buy provigil and online pharmacyprozac actos generic premarin withdrawal provigil 200mg tab buying vicodin online buy zithromax online ziac more drug uses cheap lipitor tenuate no prescription mdma for salemeclizine selsun buy restoril temazepam no prescription prempro side effects tramadol 180 prinivil erectile buy pediatric zithromax facts on steroids naproxen 500 mg singulair medicine what are steroids buy macrobid where to buy viagra mircette pill cheap ambien no prescription doxazosin psilocyn picturesrabeprazole ketamine overdose low testosterone levels roxicet oral solution retin a and pregnancy zyban information adderall maximum dose who discovered penicillin how keppra works buy viagra now alcohol and fluoxetine what is adipex buy cheap ultram phencyclidine picture injecting steroids levaquin side effect effects of rohypnol anusol xanax for sale imitrex during pregnancy nifedipine ointment lortab hydrocodone nordette and no prescription and thailand arava nizoral hair regrowth order adderall prescription prilosec amitriptyline medication adipex online zebutal buyzestoretic fosamax law suits discount phendimetrazine buy estradiol valtrex herpes order levitra online colchicine side effects buy tamoxifen pantoprazole label carton provigil more drug side effects tadalafil online side effects of flovent cheap medroxyprogesterone online no prescription needed lasix 20 mg order aldara cream online pure mdma drug adipex side effect of pravachol what is microzide used forminocycline methylprednisolone acetate trazodone and clonazepam review of tamoxifen tretinoin side effects tricor drug buy skelaxin morphine pill extra cheap phentermine adipex ingredients order tenuate on line hydrocodone bitartrate flomax brand of tamsulosintazorac buy diovan without prescription pravastatin drug buy cialis buy transderm scope order renova viagra tamsulosin hydrocodone pharmacy online zanaflex aciphex rebate order fioricet paroxetine false positives what is lortab side effects of aciphex ketamine effect accolate maximum dose cialis adipex meth lips like morphine folic acid overdose inventor of penicillin discount lamisil no prescription side effects of acyclovir pcp effects viagra order levitra with lotrel buy nordette birth control generic for singulair lamisil tablets osteonecrosis and fosamax phentermine online men on steroids terbinafine sale buy flonase no prescription levitra n drug zanaflex ramipril buy buy hydrocodone without prescription proctocort suppository klonopin and pregnancy lexapro withdrawal symptoms alprazolam online buy valtrex online discount online phentermine zestril oral buy flonase online buy lorcet without prescriptionlortab intravenous pantoprazole guidelines histex recall nicotrol patches buy carisoprodol xr prozac and weight loss cheap discount phentermine evoxac more drug uses what is skelaxin elidel flextra caps pills hydrochlorothiazide buy order tenuate buy hydrocodone where oxycodone overdose veterinary drug depo medrol vicodin effects prevacid for infants celexa ultracet tablets macrobid medication generic plendil carisoprodol soma pepcid buy on line pharmacy fioricet with codeine buy tenuate cod usa pharmacy levitra pills medicines what is famvir meridia information symmetrel side effects elavil benefits side effects of the drug nexium levoxyl and weightloss medroxyprogesterone dangers levitra 20mg viagra pill norco windows generic mircette fioricet generic qualitest soma fioricet order relenza no prescription no prescription phentermine prozac more drug side effects anobolic steroids flomax erection finasteride proscar propecia selsun goldserevent where to inject steroids glipizide buyglucophage what is fioricet tiazac diltiazem coreg cr side effects nardil on line how to make steroids adderall withdrawal buy generic allegra fexofenadine lipitor muscle pain evista medication fioricet generic for tamsulosin side effects online tramadol pharmacy anabolic steroids for sale methamphetamine addiction cephalexin for dogs phenergan suppositories discreet online antabuse what is tretinoin vicodin high buy triphasil side effects of augmentin phendimetrazine prescription lexapro dosage biaxin nexium what is norvasc didrex overnight flomax side affects make hashish paroxetine withdrawal symptoms what is cephalexin phentermine without a prescription drug tricor online pharmacy no prescription proscar actos medication valporic acid rx fluconazole tablet soma naprosyn esgic plus effects of ketamine nizoral for sale online buy levaquin norvasc prices what is cyanocobalamin snort clonazepam generic fluoxetine buy ultracet online no prescription triamterene side effects hydrocodone lortab propoxyphene side effect flovent and pregnancy online prescription valium trimox pregnancy buy vicodin online benicar side effects nicotrol buy generic pravachol proscar forum picture of valacyclovir lorazepam and breastfeeding use for synalar medication ultracet medication ziac side effects opium poppies furosemide no prescription order xanax altace 5mg generic imitrex cialis levitra online augmentin online pharmacy cheap provigil adipex versus phentermine what is levaquin plavix more drug side effects aldactone side effects prevacid generic tamiflu online prescription oxycontin withdrawal buy hydrocodone without a prescription pictures of oxycodone ultravate cream isosorbide mononitrate imitrex overnight buy singulair buy finasteride online what is hydrochlorothiazide buy zanaflex online buy effexor tamsulosin hcl buy glyburide relenza online aldara what is folic acid buy viagra fosamax problems yasmin pills cephalaxin capsules acyclovir drop cheap proscar temazepam side effects medical acyclovir soma babes suprax overdose atenolol discussion boards drug metformin skelaxin information didrex tenuate cephalexin 500mg pink eye and patanol what is cyclobenzaprine buy propecia provigil generic gemfibrozil buyghb esomeprazole magnesium in mexico buspar paxil zoloft overdose cheap vicodin cephalexin dosage morphine sulfate allopurinol side effects schizophrenia adderall fioricet prescription atrovent nasal spray prednisone pregnancypremarin actonel generic side effects of flonase tretinoin cream fosamax 70mg where to buy steroids toprol buy acyclovir for herpes buy psilocyn generic drug for norvasc where can i buy amphetamine protopic cream glyburide oral hydrocodone acetaminophen no prescription carisoprodol what is fioricet used for trazodone pills levaquin 500mg what is synalar legalizing marijuana prozac nation buspar medicine proscar propecia tamoxifen side effects about lorazepam cheapest flonase azithromycin and pregnancy provigil cheap no perscription fast delivery viagra buy online actonel evista norco high amoxicillin side effects singulair children phencyclidine pcp buy amoxil snort ultramultravate generic rabeprazole buy ativan nifedipine er xl buy hydrocodone online without prescription serevent law zanaflex 2 mg snorting celexa mircette more drug side effects buy metrogel does valacyclovir require prescription what is estradiol what is meclizine buying generic cialis discount sertralineserzone propoxyphene without a prescription aldara side effects buy adderall foreign actos buy vicodin no prescription allegra side effects bad prescription tramadol generic fioricet without prescription adipex no precsription drug vicodin levothroid tablet spironolactone 100mg no prescription vicodin without prescription generic altace zestril 20 mg order zyban keppra in pregnancyketamine soma carisoprodol xanax effects tamiflu with no prescription glyburide more drug uses buy adipex online saturday delivery buy temazepam women steroids buy lortab online fluoxetine and pregnancy oxycodone addiction singulair mexico tenuate cod synalar and pregnancy ionamin purchase motrin sinus headache what is temazepam what is pepcidphencyclidine celexa no prescription diovan generic real steroidssumatriptan psilocybin mushroom spores alendronate tabs fluconazole overnight delivery lorazepam withdrawal flexeril pill order xenical amitriptyline side effects butorphanol side effects can you buy rohypnol adderall addiction generic pantoprazole orlistat oral ultracet drug bontril online consultation tramadol use in dogs risedronate oral buy sibutramine online generic ultram tenuate dospan buy tobradex without prescription wh