Php script hacked, please help me secure it!

Discussion in 'MySQL' started by cajuns, Apr 18, 2008.

  1. #1
    Hi

    I run a php script on part of my website. For some reason it keeps getting hacked. I have changed my password several times on my server, but it still keeps happening. I don't know very much about php and mysql,
    and don't know how to do a lot of things with it.

    The last time it was hacked and before I could repair it, Google came and crawled the site. Now they say I am no longer indexed. I read somewhere that after the problem is taken care of, you can ask for a reinclusion. I just don't know how to prevent this from happening again.

    Can anyone help?

    Thanks in advance.

    Cajuns
     
    cajuns, Apr 18, 2008 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Can you post the script here (Remove usernames and passwords)?
     
    jestep, Apr 18, 2008 IP
  3. cajuns

    cajuns Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi

    Thanks for answering! I really don't know how to do that, or what part you need? Is there a certain file I need to post? I'm sorry, someone helped me install the script, and is no longer available. So, I really know nothing about it, I am just barely able to go in and fix some the stuff the hacker messed up.

    Anyway, if you could tell me which file type it would be, I'll post it.

    Thanks for your help.

    Cajuns
     
    cajuns, Apr 18, 2008 IP
  4. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You need to copy and paste the code from 1) any inputs that are captured from the users (eg from forms, cookies, querystrings etc) 2) code running the query/ stored proc including the inclusion of any of the user captured information 3) any stored procs that are being run 4) overview of db structure 5) the issues you have had as "hacked" is too vague to know if they are extracting info, changing things they shouldnt be able to, emptying the db etc
     
    AstarothSolutions, Apr 21, 2008 IP
  5. Trusted Writer

    Trusted Writer Banned

    Messages:
    1,370
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #5
    It sounds to me like a query injection aimed to obtain your username/password via cookies but without the code there is not much to say [​IMG]
     
    Trusted Writer, Apr 21, 2008 IP
  6. foromaestros

    foromaestros Banned

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    HI
    Nowadays the attack of hackers is very common for this reason the organizations should be taken very seriously this fact and develop different strategies to deal with this problem . I hope that you have lucky for resolving your problem
     
    foromaestros, Apr 21, 2008 IP
  7. cajuns

    cajuns Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I'm sorry I wasn't more detailed, but I really don't know hardly anything about php.

    I guess I need to learn more before I can ask for help!

    About the only thing I know for sure is, that the hacker redirected pages to another website saying "hacked by so and so." I managed to find the pages that the redirections were in and deleted the redirection script. I have changed passwords and usernames several times, but they still get in.

    Thanks for trying!
     
    cajuns, Apr 21, 2008 IP
  8. publicidadpixelada

    publicidadpixelada Peon

    Messages:
    84
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    What script are you running? Check the name, it should be displayed on the script somewhere
     
    publicidadpixelada, Apr 21, 2008 IP
  9. cajuns

    cajuns Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Not quite sure if this is what you need?....it's called Easy Site Network Recipe Script. Which their website is not in service anymore. If that isn't the type of name you need, could you give me an example??

    Thanks
     
    cajuns, Apr 21, 2008 IP