Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

XAMMP, PHP, SQLi, and MySQL

Hi,
I'm an XAMPP user and after all this practicing of SQL injection on other sites for two months and learning a bit, I've decided I need to spend some quality 'defensive' time building a test site on my localhost. I intend to build a MySQL database and a PHP interface.

As an exercise I would like to build various interfaces, with each one providing a bit more security than the previous one. The lowest protected site would be vulnerable to SQLi and XSS.

Have any of you done this before? If so, do you have any suggestions? Lessons learned? I imagine you became better in attacking sites.

Here are some goals of mine.
1. Block all regular SQL injections. Duh!
2. Without using WAF, use regular expressions to detect/filter obfuscated SQLi attacks.
3. Decrease security so blind injections will work.
4. Write tools.
a. Brute force blind injection tool.
b. Analyzer that detects attacks and logs to a file.
5. Upload database and code to a host online, and invite others to give it a go.

Regards,
JJ
Simple prevention to SQL injection - prepared statements.
Look over DVWA, That's the exact same thing your thinking of
Hiring PHP developers does not contribute to the quota of employees with disabilities.
[Image: lPQX27G.png]

(May 17, 2015 08:27 PM)♕ Pimp ♕ Wrote:  you're a waste of my time and giving me cancer.
As user above said, use prepared statements and filter any and all user input that may or may not be displayed on the site (htmlentities()) it's really not too hard to protect your site from these things. The servers security should be much more worry some if you're a good developer.
(Sep 2, 2013 10:40 PM)jamesWonka Wrote:  As user above said, use prepared statements and filter any and all user input that may or may not be displayed on the site (htmlentities()) it's really not too hard to protect your site from these things. The servers security should be much more worry some if you're a good developer.

But only filter information with something like htmlentities when you're required to - e.g. displaying it.
Keep your data pure when it's stored.
(Sep 3, 2013 06:20 AM)PigBacon Wrote:  But only filter information with something like htmlentities when you're required to - e.g. displaying it.
Keep your data pure when it's stored.

I m satisfied with u , if we are saving a secure data into database when any data is entered no chance for sql injection
Hi,
Thanks for your thoughts.

One goal is to build a system that is secure...as secure as I can make it. And then "reduce security" so a blind SQLi scenario is presented. I'm really curious about creating this through 'improper/incomplete' coding.

You mention saving secure data. I had only thought about 'reading' data with SQLi. I'll add a form for a user to upload a comment or conduct a search. That will need protecting too.

Thanks again,
JJ
http://www.hackthissite.org/ Have fun :)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by SkidyDec 17, 2017 02:10 AM 3 255 Dec 17, 2017 02:10 AM
Last Post: CryptoJeeb
[PHP] by NegativeRepDec 24, 2015 07:23 AM 3 209 Dec 24, 2015 07:23 AM
Last Post: Lightning827
[PHP] by jamesgates1Jul 20, 2014 04:33 PM 8 308 Jul 20, 2014 04:33 PM
Last Post: jamesgates1