How to get rid of this iframe script ?

Discussion in 'Site & Server Administration' started by bluearrow, Aug 31, 2009.

  1. #1
    I have 2 godaddy hosting accounts which infected by a iframe script. it was copied to all files there so I erased all files but still it was there. I think it has some changed file permissions.

    Whats the safest file permission for root + all files in host ?

    Also whats the best way to deal with these iframe scripts ?


    This is giving me a huge headache. looking for advice .. :(
     
    bluearrow, Aug 31, 2009 IP
  2. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #2
    Generally the code are injected using following ways:

    [1] If your FTP password is stolen using spyware, trojan in the system.
    [2] If you are using outdated version of third party scripts in your web site.
    [3] If your web site has XSS vulnerability.

    Also, the permissions depends on the server configuration and platform (Windows or Linux).

    Kailash
     
    kailash, Sep 1, 2009 IP
  3. bluearrow

    bluearrow Well-Known Member

    Messages:
    1,339
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #3
    All my SMF and WP scripts are upto date. It has to be 1 or 3 I think. If its a XSS vulnerability only way to happen this is through a WP theme.


    I have already changed my passwords. Platform is Linux so permission should be 644 ?
     
    bluearrow, Sep 2, 2009 IP
  4. SecureCP

    SecureCP Guest

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes, but permissions don't matter in a case like this. That's not the only way people can 'hack' your site. I know that you will piss and moan as numerous other customers do @ my 9-5 but you really need to look at all of the computers you've used for FTP or any other login type that you've used to upload and download files. If you have your host provide you with the logs of when the files were last updated, $20 says that they were done via FTP within less than 1 minute, ie downloaded then uploaded.

    That being said, switch to SFTP. Also, there are numerous other tools out there to scan the site, and your computer. I recommend doing both.
     
    SecureCP, Sep 2, 2009 IP
  5. bluearrow

    bluearrow Well-Known Member

    Messages:
    1,339
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #5
    thanks for all advice guys. I have deleted all files in these hosts and also change all passwords.

    I change root file permission to 644 and now all sites giving me error messages like 403 and also "Problem loading". Anyone know default Godaddy root CMOD permissions ? or which should I keep ?


    Also to get SSH to use SFTP They want to move my accounts to a different server. Is there any disadvantages using SSH ? also does it effect site performance ?
     
    bluearrow, Sep 5, 2009 IP
  6. chmdznr

    chmdznr Active Member

    Messages:
    417
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #6
    Don't forget to scan your local PC for trojan infection.
    Which file do you mean with 'root file'?
    Disadvantage? Nothing, you just get more secure and I think it doesn't affect website performance neither.
     
    chmdznr, Sep 5, 2009 IP
  7. bluearrow

    bluearrow Well-Known Member

    Messages:
    1,339
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #7
    I formatted my pc and scanned everything both safe mode and normal.

    I mean the root of the hosting account " \ "
     
    bluearrow, Sep 5, 2009 IP
  8. SecureCP

    SecureCP Guest

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    ssh will greatly help you out blue. Let me know if those scripts work out for you.
     
    SecureCP, Sep 8, 2009 IP
  9. lightstarm2k

    lightstarm2k Well-Known Member

    Messages:
    3,626
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    140
    #9
    Everything is fine now, after removing and it won't come back
     
    lightstarm2k, Sep 8, 2009 IP
  10. daredashi

    daredashi Well-Known Member

    Messages:
    667
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    120
    #10
    don't save ftp passwords in ftp application.
    keep your anti virus updated.
    if possible use linux box to upload your files. (this is can be done using virtual machine on same pc)
    this mainly infect your index files so periodically scan index files for vulnerability.
    from shell protect your index files with chatter +i command. (you have to chatter -i every time you need to update file) but this must have linux server. it doesn't work on vps.

    This will prevent future infections. :D
     
    daredashi, Sep 8, 2009 IP