SQL Insertion and Error Reporting
Hey, it’s another Midnight Message (finally). Sometimes I think my life is rather boring. Certainly the things that really catch my interest (and keep me up all night) are different from what interest other people. The only person I think I can talk with is Aaron, and even he has more a Linux / Open Source bent, while I focus more on PHP / web development. On the other hand, there are a lot of people like me on the Internet. It would be awesome if I stumbled into someone I met online in real life. When I get older, I’ll have to attend those conventions and things, so I can meet and get to know those with similar interests.
Anyway, it’s a Midnight Message, so I’ll recap my day in one sentence. I woke up late, had some cereal, delivered three packages via UPS at Staples, read some of Artemis Fowl, said “Hello” to William, worked on my mom’s website, bid on a copy of the Settlers of Catan [Travel Edition], ate a big dinner, and went to Christmas carolling rehearsal at church. How’s that? I think this is more for myself than for anyone else. If I don’t log what I did, it’ll be as if nothing happened, because I’m living day-to-day and really have no plans for the immediate future.
Alright, so on to the Title of this post: SQL Insertion and Error Reporting. This reminds me of some days I spent in high school, never recorded, shared only with a couple people, and easily forgotten. I think that if I don’t think about it and write about it now, it might be completely forgotten forever. So here’s my effort. I read an article on PHP security blunders at SitePoint. It discusses SQL insertion vulnerabilities. Now I realize that I’ve taken advantage of this flaw without really understanding it. I knew how SQL queries worked, sure. But using form data to exploit a simple query is not something I fully grasped. Yet, I used it to gain access to the school’s digital television broadcasting system one boring day in CompSci AP class. It was just a little incident. I didn’t do anything malicious; only poked around. I saw an administrator access the private site on one of the computers, and then I later went to another PC to check out the site myself. Of course, it was secured behind a simple login. I entered some text. It spat back an error (see “Error Reporting” in the SitePoint article). It was a Microsoft SQL error, and it told me that what I entered in the box was sent directly as an SQL query.
So I entered something like ‘ OR TRUE ‘ (SitePoint’s example is ‘ OR ‘1’=’1 — I might have used that too) in the box. And that was it — I was in! There were some options, if I recall, for scheduling videos to be shown. I couldn’t upload a custom video, though. Also, I was using a public terminal in the middle of a class session, so I was nervous about doing this too long. I soon exited the system and returned to my regular routine. If this is the sort of thing you do for fun, we should get in touch. Because at the moment, I’m starting to realize that I was actually quite lonely in high school.
Leave a Reply