Archive for May, 2007

Publishing CCW Permit Lists

May 8th, 2007

Seems that down in Tennesse a local paper decided to publish a searchable database of CCW permit holders in their fair state.

Naturally, SayUncle was on it like white on rice and the list has been taken offline.

I alluded in a comment on his blog that there was something hinkey with their system, so I’ll address that now.

The first search I ran on it (just hitting submit with the defaults) came back rather slowly. I didn’t pay much attention, just filed that away and considered it proof enough that the system was a) real and b) functional.

An hour or so later something bubbled up in my head and I went back to it. I check the URL and it’s written in PHP. My thinking was pretty much: “Slow… written in PHP… by some guy at a newspaper.. I betcha…”

So I stuck in the ' character in the search box for last name and hit submit.

Yep, it blew up with your classic MySQL syntax error regarding invalid SQL. We got ourselves a SQL injection attack vector!

Now, it’s hard to explain this one to a non-IT crowd, but I’ll try.

The ' character has a special place in the land of SQL and it delimits your strings. If you want to search for somebody with the last name of O’Brian then the string you’re searching on should look like this: 'O\'Brian and not 'O'Brian'

Once the programmer makes a mistake as severe as not escaping the special characters in SQL all sorts of possibilities become possible. Just being broken by design isn’t even the start of things. You now have a vector into the system to read any and all data available in the database that the webserver is logged in as.

That means that if the system actually had address data in it, but wasn’t displaying it, it’d take an enterprising person about 20-30 minutes to snag it all, and that’s being generous.

Worse, if the webserver is logged in as a user with credentials to modify the data the we can just start inserting our own records into the DB simply by placing some creative input into that silly little last name box. It’d look something like this:

';INSERT INTO ccwholders (first_name, last_name, middle_name, city) VALUES ('George', 'Bush', 'Dubya', 'Washington DC');--

If that were possible, and in my professional opinion it quite likely was, then any random yahoo out on the internet that had sufficient knowledge of such attack vectors could have gamed the entire database.

So, not only was the publishing of their database irresponsible in my personal opinion, it was highly irreponsible in my professional opinion as they didn’t have an application at the front of it that was remotely secure. There may have been protections to keep the data from being modified but in experience that has never been the case.

Wait, What?

May 8th, 2007

Over at Ars Technica they’ve got an article on The Terrorist Hoax Improvements Act of 2007.

It’s in response to the Boston Police Department collectively shitting their pants upon finding a Lite Brite and calling in the bomb squad.

Be careful not to confuse that incident when they shit themselves again over a traffic monitoring device was found and they blew it up.

Here’s what caught my eye:

However, that did not placate city officials who remained outraged at the incident, promising to push for harsher punishments in the future for incidents that waste government resources.

Emphasis mine.

Ahem, US Senate?

Super Retarded Dog

May 7th, 2007

I saw this video Saturday over at a friend’s party. The girlfriend was sitting right next to me.

Guess what she shouted out upon the apperance of Super Retarded Do on the screen? Was it:

  1. That’s our dog!
  2. That’s Justin!

If you said #2 then get yourself a cookie.

House Progress

May 7th, 2007

Hired some painters finally to take care of the living room. It, like most of the house, was stark white when we moved in.

The living room is now “grass cloth.”

I kinda like it.

Dixie Slugs Buckshot

May 7th, 2007

Now this is some interesting stuff: Dixie Slugs.

Over at THR a user posts his experience with their buckshot load. What makes this stuff unique?

Here is our Dixie Tri-Ball II! The load consists of three (.600’) hard cast round balls (buckshot) in heavy duty plastic wad. It is legal in buckshot only states, but that is where all comparison ends. The alignment of the balls in the wad, as it leaves the barrel, give much smaller groups that any present day’s factory buckshot. Groups as small as 5”or 6” at a measured 40 yards can be attained with the Trulock .660” choke tubes!

I might have to try this stuff out sometime.

Carry Piece for $250

May 3rd, 2007

Today I was asked what would make a good carry pistol if you could only spend about $250 on it. I gave a crappy answer, and I know that person reads this blog, and I feel this information could be useful to others, so let’s take another stab at it.

My first recomendation would be a Makarov. The Bularian variants, last I checked, could be had for about $150 at your local gun show.

Don’t let the price fool you — these are not cheap pistols. Inexpensive, yes, but not cheap.

On the plus side they have going for them: All steel construction, a fixed barrel making them very accurate, they’re very simple to field strip as are most Russian designs, they’re very slim, and they come in 9x18mm which is a decent cartridge.

Not optimal, but decent, which means it’s not something people would term a “mouse gun” like .22LR or .25ACP.

What they have working against them: They’re heavy because they’re all steel. The sights are horrible. The trigger leaves a lot to be desired, but, they are quite workable. The magazine release is a European style heel release which isn’t the fastest mechanism in the world. Finally, you won’t walk into too many shops and find 9x18mm ammo, but, honestly, if you’re looking to me for gun advice then you might as well just resolve yourself to the fact that I’ll always recommend you buy a bulk lot of 500-1000 rounds of ammo when you get a new caliber.

It’s probably the best pistol you can buy for $150 out there, which is why I have one and absolutely love it. Yes, I have better pistols than the Makarov, but none of them cost anywhere near $150.

My 2nd choice was the Kel-Tec P3AT. Longtime readers might know that I purchased one of these a couple of years ago. I’m not sure what they cost these days but I got mine for $230-ish.

The pros on this one are obvious: New construction, made in America, fantastic warranty, very light, very small, and .380 is a common enough caliber.

The cons are also obvious: Too damned small to shoot comfortably, and, in my opinion that awesome warranty is necessary because so many of their pistols come out of the box with problems.

Now, on that last point I must admit that I keep hearing that Kel-Tec is getting better and better at quality control. They also continually fix problems with their designs as they learn about them.

However, the P3AT that I purchased seemd to be riddled with problems. I believe I have worked them all out, however, without the use of their warranty. I went into the purchase knowing that there was a chance that it would need some work, the shop warned me about that, and I have no problem at all with what Kel-Tec sells.

You might get a lemon from them, and if you do they will make it right, and by taking that risk you get a pistol that nobody else is selling. The closest thing to a P3AT out there in dimensions is probably the Roughar 9mm which is admittedly a much higher quality piece, and chambered in a higher pressure cartridge but that’s going to run you $1000, not $230.

That said, the Kel-Tec P3AT (and the P32) are much better suggestions for people looking for an actual pocket gun, not just another gun, a primary gun, or a carry piece. They’re not for everybody.

Now, if you bump the price constraint up a bit you can get into their 9mm models. We’re talking just shy of $300 here if my memory is serving me correctly. With those I’m going to simply say that you’re going to deal with the same shit (good and bad) but in a different caliber. I could be wrong on this. However, if you’re willing to entertain the almost $300 Kel-Tec 9mm guns then you just opened yourself up to the Bersa line!

While I’ll probably never own a Bersa gun myself they come highly recomended to me, and after fondling them in the gun shop I’m left with a rather confident feeling that they will, and do, live up to their reputation. Now, the only reason I wouldn’t go with a Bersa gun is because I’ve already got pistols that cover that area and I like them a lot. If I had bought one earlier in my life I figure I’d be quite happy with the purchase.

Now, back to cheap military surplus guns that I cannot really say much about as I don’t own them we have:

  • The Hungarian PA-63
  • CZ 82
  • CZ 83

As of this writing all of them can be found on AIM Surplus’ webpage for less than $200.

So there’s my roundup of cheap pistols that one could carry for under $250. Take it for what it is worth.

MPAA issuing DMCA takedown notices again.

May 1st, 2007

Slashdot story on the matter.

Long story made short it seems that a lone dedicated geek has managed to discover the sooper-seekrit decryption key used in the new HD-DVD format. The key is just a really big number, somewhere right around:

13,256,278,887,989,457,651,018,865,901,XXX,XXX,XXX

Read up on the techy details here.