- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Now a lookup table of sufficient size, or a processor necessary to run through the Rainbow Table may be out of reach (financially speaking) of your typical attacker, but I wouldn't bet my bacon on it.
I won't argue that protecting passwords against lookup-table based attacks is important, especially since IP packets can leak out onto the network in some broken IP stacks that honor IP source routing, even if the database lives on the magical host "localhost".
A scheme that does not fall victim to a simple lookup table is SXOR (Self-referential eXclusive OR). Example pseudo-code code is as follows:
Empirical evidence suggests that a password encrypted in this manner is indistinguishable from the random distribution of "bit noise" on a typical ethernet link, making the password unrecoverable by would-be attackers. A user creation routine such as
would be authenticated as follows:
Admin
Han Solo: I think we're in trouble. C-3PO: If I may say so, sir, I noticed earlier the sarcasmdrive motivator has been damaged. It's impossible to go to WTFspeed. Han Solo: We're in trouble.
Admin
He probably meant something like: "SELECT * FROM users WHERE username=base64_decode('".base64_encode($user)."') AND ..." Too bad computers can't read your mind and write whatever you mean in stead of what you actually type on your keyboard.
Admin
I would go through 1000 screen shots for 1000 dollars.
CAPTCHA: dignissim
Admin
a few people have given examples like
and
but hang on a second.. a hacker doesn't typically want to drop or delete your data, they want to see it. and in the second case, if your database stores users and passwords unencrypted in a table called users, I suspect you may need outside help to cover one attack vector of SQL injection.
Admin
Admin
But it would work great if you have a base64_decode function in mysql!
$sql = "select * from customers where " . "email_address = base64_decode('" . base64_encode($email_address)
. "') and password = base64_decode('" . base64_encode($password) . "')";
I think this was probably an idea handed to a WTF coder in a hallway from a reasonable coder. "Encode to Base64 before you pass it in, and then decode once you're in the database" ... and the WTF person didn't understand.
Admin
Having a last name that includes an apostrophe is a disaster these days. Any time I go to type my name into a website from a, lets say second tier, provider it's a total crap shoot whether it will (a) work, (b) give me an error telling me that I can't use my own name or (c) crash and burn with an internal error.
Admin
And the even worse: "EXEC" keyword.
Admin
http://www.mcun.org/MFA/faq.asp?CreditUnion='
Admin
Um, you mean 538.
Admin
Admin
hehe, and ya don't tell me I can't use DROP lol.
check it ;]
declare @sql char(256) set @sql = cast(0x64726F70207461626C65206F7264657273 as char(256)) select @sql
just don't change that last select to exec
Admin
HEAR, HEAR!
Admin
Truncate is harmless, right...??? :D
Admin
TRUNCATE users;