SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Website & Database Integrity

    My website has a search feature which is powered by PHP and MySQL, all searches are then recorded in a text file for analysis. I found that there was a lot of SQL Injection attacks within my log files. I can't actually see any damage to my website or database, but I can't be 100% sure. I was wondering if there are any tools, ideally free ones, which I can use to check the integrity of my files and/or database.

    Thanks
    AndyGB

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,633
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    There isn't anything I'm aware of that can suit everyone's custom app -- how would it know what should be in the database and what should not be in the database.

    That said, you have a vector to walk down -- check out the injections and figure out what they would be doing to your table and then you can probably narrow it down to a small enough sample to be manageable.

  3. #3
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well the file structure doesn't change, so it would be possible to hash all the files and monitor for changes, I'm just wondering if there are any tools already made for this purpose? As for the database, I will have to have a re-think.

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Andy,

    I just answered something like this yesterday and responded with a file_hash() and recording all executable scripts to a database to check the hashes daily (via CRON). You can write your own script very easily (it has been some time but I believe it took me about a half hour with testing) and then generate the CRON to run your script (preferably from a non-webspace location) frequently (and with a last run field so you know noone else has hacked into your system and run the "update the hash" script to hide their mucking about.

    BTW, files don't have to be added or deleted; they can easily be modified by a hacker to include (Java)scripts to perform their malevolence. That's why I said executable files, e.g., php, html and js come immediately to mind.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •