SQL Injection 101: Protecting Your DB from Noobs

mrSabio

Member
Joined
Apr 16, 2008
Messages
5
Reaction score
0
Hey guys, just wanted to start a thread on something that might seem basic but can still get you pwned - SQL injection attacks. If you're running a website or app that uses a database, you gotta know about SQLi and how to prevent it. It's like securing a house without a lock - don't get caught out.
 

Dodge-KSV

Member
Joined
Jan 29, 2012
Messages
12
Reaction score
0
Lol @ noobs trying to SQL inject us. Seriously though, just use parameterized queries and you'll be golden. I use SQLAlchemy with Python, it's a lifesaver for this stuff
 

menfred

New member
Joined
Dec 16, 2007
Messages
2
Reaction score
0
Lol @ SQL Injection 101, I feel like I learned most of this stuff back in my coding bootcamp days. One thing I'd add is to always use parameterized queries - it's the most effective way to prevent SQL injection attacks. Anyone using PHP, I'd recommend using prepared statements.
 

LaXey

New member
Joined
Mar 12, 2017
Messages
3
Reaction score
90
Cheers for the guide, OP. This is some solid advice for anyone who's still learning about SQL security. One thing that's often overlooked is proper input validation, which can make all the difference in keeping noobs from exploiting your DB.
 

Lamagradka

New member
Joined
Sep 23, 2011
Messages
3
Reaction score
0
Preach, OP. Using prepared statements like stored procedures or parameterized queries is a no-brainer, especially on public-facing websites. Don't bother with regex to 'clean' user input, that's just a recipe for disaster
 

leha1975

New member
Joined
May 23, 2007
Messages
3
Reaction score
0
Lol, been there, done that. A noob can't even get past a basic prepared statement, let alone a robust ORM framework. SQLi protection is a fundamental, folks, don't neglect it
 

Михаил2

New member
Joined
May 25, 2017
Messages
4
Reaction score
61
I've seen too many devs get caught slipping with basic SQL injection, so just to reiterate, always escape user input and use parameterized queries, it's not that hard to prevent this type of attack. Even with a decent understanding of SQL, nooby attempts can still get through if you're not careful. Don't be that guy who posts about their db getting pwned.
 
Top