Announcement

Collapse
No announcement yet.

Malicious POST Requests - spurious files placed on server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Malicious POST Requests - spurious files placed on server

    Wasn't sure where to put this so put it here!

    Client noticed unusual behaviour and on inspection of the ftp his index.html page had been removed and an index.php page placed instead. This later page was a clone of the original but with a stack of php code above the
    Code:
    <head>
    In addition two spurious php files had appeared in the DD folder.

    The unusual behavour was that the home page encoding had changed so GBP signs were displayed as Click image for larger version

Name:	utfpound.jpg
Views:	74
Size:	2.3 KB
ID:	557778 in UTF8

    The hosting company are adamant their servers have not been hacked and did a malaware scan of the client's hosting package which was clean.

    This may be malaware that had got into the client's PC and been uploaded by Sellerdeck or it may have been due to a malicious POST request (https://perishablepress.com/protect-post-requests/)

    Client's PC clean on scanning so looking at the 'perishablepress' page so I added a header to the htaccess to stop limit POST requests based on referrer. There is a legitimate php file on the server handling the 'Ask a Question' feature on the product page so this was exempted.

    Code:
    # allow POST based on referrer
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{REQUEST_URI} /askaquestion\.php [NC]
    RewriteCond %{HTTP_REFERER} !(.*)clientdomainname.com(.*) [NC]
    # RewriteCond %{HTTP_USER_AGENT} ^$
    RewriteRule .* - [F,L]
    </IfModule>
    This seems to have done the trick and ad to cart and checkout all function as does the PSP sequence.

    Interestingly this addition to htaccess DID stop add to cart etc:

    Code:
    # deny all POST requests
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_METHOD} POST
    RewriteRule .* - [F,L]
    </IfModule>
    In addition to the malicious placing of files on the server the intruders are now adding themselves on to verified user on the client's Google account!

    This seems to give help about hacked Google accounts: https://support.google.com/accounts/.../6294825?hl=en

    Comments and input welcome

    Thank you
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    Thanks for posting this information, as the World is hacking mad and trying to access and deny websites for ransom.
    Does adding the deny POST request to .htaccess require further testing, as I don't know if Sellerdeck performs any post requests?

    Comment


      #3
      From Support

      Thanks for contacting SellerDeck software support.
      • [*=1]My question is do PSPs post to the website? Will the above code stop PSPs communicating back with the website?

      No, this will not affect the PSP communication with the site.

      All PSPs call the script that they deal with directly.

      Additionally the scripts used are Perl and not PHP. PHP is not used by the software online.
      Thanks for contacting SellerDeck software support.
      My question is do PSPs post to the website? Will the above code stop PSPs communicating back with the website?

      No, this will not affect the PSP communication with the site.

      All PSPs call the script that they deal with directly.

      Additionally the scripts used are Perl and not PHP. PHP is not used by the software online.
      Although support said that, interestingly this addition to htaccess DID stop add to cart etc:

      Code:
      # deny all POST requests
      <IfModule mod_rewrite.c>
      RewriteCond %{REQUEST_METHOD} POST
      RewriteRule .* - [F,L]
      </IfModule>
      Third party php might be affected




      Jonathan Chappell
      Website Designer
      SellerDeck Website Designer
      Actinic to SellerDeck upgrades
      Graphicz Limited - www.graphicz.co.uk

      Comment


        #4
        No, this will not affect the PSP communication with the site.

        All PSPs call the script that they deal with directly.
        This is not correct. Nothing can call a script directly, it is always via the web server. It makes no difference whether the request comes from a browser or a server.

        Some PSPs use call backs to the merchant's server. Thy do this by sending POSTed data. PayPal is one such PSP that does this. If POST is blocked then PayPal, and possibly other PSPS, will be broken.

        For the record, ClearAccept, does not use call backs but POSTs are used in communications between the desktop and the merchant's server, when adding to the cart and during checkout so blocking POSTs will break the whole site.

        Gordon Camley

        3rd Line Support
        SellerDeck.

        Comment


          #5
          This is not correct.
          Gordon - I am quoting ticket SDCS-63314 - perhaps take it up with them rather than me?

          Gary Green

          06/Feb/25 12:55 PM

          Hi,
          Thanks for contacting SellerDeck software support.
          • [*=1] [*=1]My question is do PSPs post to the website? Will the above code stop PSPs communicating back with the website?
          No, this will not affect the PSP communication with the site.
          All PSPs call the script that they deal with directly.
          Additionally the scripts used are Perl and not PHP. PHP is not used by the software online.
          Kind regards,
          Gary Green | Technical Support | SellerDeck


          Jonathan Chappell
          Website Designer
          SellerDeck Website Designer
          Actinic to SellerDeck upgrades
          Graphicz Limited - www.graphicz.co.uk

          Comment


            #6
            I have clarified the POST requirement with Gary. In the Sellerdeck installation folder you will find a Mail2hst.txt which, through a series of questions, will show that allowing POST is a requirement for the server.

            Gordon Camley

            3rd Line Support
            SellerDeck.

            Comment


              #7
              Thank you Gordon

              Please define "Sellerdeck installation folder"

              I have searched my PC and the only instances of Mail2hst.txt I have are two I had previously saved in one of my reference folders. Nothing in any of the three Sellerdeck locations - My Documents, Program Data or Program Files x86

              Notwithstanding that, are there circumstances where an external domain will need to POST or does my htaccess edit below still stand?

              Code:
              RewriteCond %{HTTP_REFERER} !(.*)clientdomainname.com(.*) [NC]
              Jonathan Chappell
              Website Designer
              SellerDeck Website Designer
              Actinic to SellerDeck upgrades
              Graphicz Limited - www.graphicz.co.uk

              Comment


                #8
                Please define "Sellerdeck installation folder"
                By default it will be "C:\Program Files (x86)\Sellerdeck\Sellerdeck v18"

                are there circumstances where an external domain will need to POST
                Yes. PayPal and V12 Finance POST back to the merchant's server, ClearAccept does not.

                Sellerdeck on the merchant's device(s) also uses POST during upload, download, some functions in Troubleshooting and possibly some extension but there will be no referrer for these requests

                For the record, some of the legacy PSPs also POST back.

                My understanding is that POST is only a risk if there is an application on the server that receives the POST and either has a vulnerability or is malicious software. If vulnerable, then the application needs fixing or removing and if malicious then it needs removing

                Gordon Camley

                3rd Line Support
                SellerDeck.

                Comment

                Working...
                X