Malware in /tmp/nginx_client

The software maldet, discovered some malware in the the
directory, like this:

{HEX}php.cmdshell.unclassed.357 : /tmp/nginx_client/0050030641
{HEX}php.cmdshell.unclassed.357 : /tmp/nginx_client/0060442670

I did some research, and found out that indeed, there were some
code in them.

I did a extensive search in the sites, and nothing malicious was found,
including the code that appeared in the tmp files.

Around the time the files were created, there were similar requests, to
existent Worpress plugins, and to a file of the Worpres backend.

Digging up a little, I found this:

Basically an exploit for a Wordpress plugin vulnerability, (it doesn’t
affect my sites, though), that do similar requests to the ones I found.

One of those, is a post request that includes an attacker’s php, file
thanks to this vulnerability will be uploaded to the site and it can be
by the attacker.

So what it seems to be happenning is that nxing is caching post requests
with malicious code, that later is found by the antimalware software.

Could this be the case? I read and seems that Nginx does’t cache post
request by default, so it seems odd.

Is there a way to know if that tmp files are caching internal or

I will be thankful for any info about it.

Nginx is working as reverse proxy only.

This is a bit of another file that was marked as malware:

Content-Disposition: form-data; name=“uploader_url”

Content-Disposition: form-data; name=“uploader_uid”

Content-Disposition: form-data; name=“uploader_dir”

Content-Disposition: form-data; name=“files[]”; filename=“SFAlTDrV.php”
Content-Type: application/octet-stream

Posted at Nginx Forum:,259948,259948#msg-259948

It’s not harmful that they’re there, but you could simply exclude the
/tmp/nginx_client folder from maldet,

It’s due to the option client_body_in_file_only being set to on in your
nginx.conf (Sounds like you’re using for cpanel)

Yes, I think I will do that. So they are indeed cached requests?

Posted at Nginx Forum:,259948,259960#msg-259960

It’s not cached requests:

It’s just temporary files that isn’t deleted, if you set it to ‘clean’
instead of ‘on’ - I think you can even put it off as default… I don’t
know why it’s actually enabled.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs