Jump to content

Malicious PHP Code?


NJT123

Recommended Posts

:confused:

 

Hi, I'm hoping someone with knowledge of PHP can swiftly put my mind at rest. Until yesterday I had not even heard of PHP, so appologis if this is completely obvious.

 

A couple of days ago my server started giving me warning summaries of recently uploaded CGI scripts that send mail from my server, alluding to the fact it may be spam. Only I have access to my server, and the FTP logs against the culprit file all give my local IP address.

 

I have read through the file, and some basic PHP, and I think it is just some sort of error log compiler that then emails the error log to someone (who I do not know).

 

I have attached the file in question below. I think its harmless, but would very much like to hear the same conclusion from a PHP expert.

 

Any input greatly appreciated!

 

NJT

 

[attachment deleted by admin]

Link to comment
Share on other sites

By itself it does nothing. It contains however some php settings, that if implemented on your server may increase it's vulnerabilty to attack from outside. Check if there are no more suspicious files or bits of code on your site.

 

There are several kinds of malware that use passwords stored in FTP clients to upload malicious code to your server. That's why you should NOT store passwords in these clients.

Link to comment
Share on other sites

Many thanks for the replies.

 

I've checked the file, and it is correct. Just to be double sure I've attached the original from the server here (I save the same file out as txt in the previous post).

 

[attachment deleted by admin]

Link to comment
Share on other sites

Above and beyond Mchl. Thank You!

 

Will have a dabble with more confidence now.

 

If you do any work on a consultancy basis / hourly rate and are happy working with x-cart and e-commerce payment systems PM me, I have plenty available. People with the right skills have proven few and far between.

Link to comment
Share on other sites

Unfortunately apart from having very little time on my hands, I've also no experience with x-cart, and it would be worse than irresponsible from me, to embark on finding and fixing possible security flaws in it.

 

Disabling allow_url_include might  fix your issue, but just as well it might not. It's just one possible vector of attack less.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.