1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Exploit in Wordpress theme, what is wrong?

Discussion in 'WordPress' started by postcd, Apr 8, 2014.

  1. #1
    Hello,

    it was quite surprise, i got mail from namecheap (they have exploit scanner) and they detected new .php exploit file:

    '[PHP Shell Exploit [P0297]]':    /home/myusername/public_html/wp-content/themes/forex/stcchatcc.php
    Code (markup):
    i watched the directory structure folder permissions and they are 755 from wp-content to forex folder. Is it correct folder permission?

    The wordpress theme (/forex/) used is: "forex, ValidThemes.com WordPress theme."

    i wanted to know more about that exploit so i found this source code: rstforums.com/forum/forum/leet-zone/reverse-engineering-exploit-development/82761-trojan-html-agent-vsvbn-web-shell?t=80795

    and when tried to upload it, result is: http://i.snag.gy/EKYAg.jpg

    Im quite shocked the script of this kind was able to be somehow injected into my directory structure. Please can anyone help debug the cause of this to be possible? and how to prevent?
     
    postcd, Apr 8, 2014 IP
  2. shrshr471

    shrshr471 Member

    Messages:
    7
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    Digital Goods:
    1
    #2
    hello :) , first download all your website files and scan them with your local antivirus scan ( i suggest eset )
    second remove that file for sure , the hacker can do anything with that file
    third 755 is not important if the server files able to access and write on behalf of itself your sever files do :)
    fourth : look at my video :
    and do all steps to have secure wordpress
    also open all your theme php files maybe it has option to upload files directly !
     
    shrshr471, Apr 8, 2014 IP
    postcd likes this.
  3. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    405
    Best Answers:
    21
    Trophy Points:
    295
    #3
    Nigel Lew, Apr 8, 2014 IP
  4. TIEro

    TIEro Active Member

    Messages:
    741
    Likes Received:
    177
    Best Answers:
    5
    Trophy Points:
    70
    #4
    Third party theme from a site called "ValidThemes.com"? That sounds about as trustworthy as a politician! Chances are the developer sneaked a little backdoor into their theme design, just for this purpose.
     
    TIEro, Apr 12, 2014 IP
  5. postcd

    postcd Well-Known Member

    Messages:
    1,037
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #5
    An idea on what to do can be adding .htaccess into wp-content or wp-content/themes
    with this inside:

    # disallow php execution
    <files *.php>
    Deny from all
    </files>
    so any malicious .php wont be able to execute, not sure if its enoug solution to prevent php abuse
     
    postcd, Apr 12, 2014 IP