A new piece of malware has been identified by the Foregenix DFIR team. The malware is a PHP webshell - a script, which when installed on a compromised system, presents a sophisticated administration platform. This allows the attacker to browse the filesystem of the compromised server, upload, create, edit, download or delete files or stop running processes.
It even has functionality to add a further backdoor onto the system which would allow the attacker to connect back to the server as desired. The malware, named ‘BArNEr’ within the code, appears to be present on a number of systems in the wild and may be connected to an Indonesian cyber crime collective called the ‘Indonesia HackRs’.
The code that creates the web shell is generally found “hidden” at the end of a JPEG image.
Known as a ‘dropper’, this file would first be placed on a compromised system and then activated by the attacker requesting it from the website. During analysis it was found that the code for the web shell did not work on PHP 7 (due to its use of a depreciated function) but would function as intended if the affected website was running PHP5.
Foregenix urges website owners to examine their systems for presence of this malware.
How do I detect this malware on my website?
Detection is simple with the right tools. Apply for a Website Health Check of your site and our team will scan the internal file system of your environment using FGX-Web for this malware and many others.
Alternatively, the following grep commands should reveal these files if they are present:
Ajax Harvester – Initialiser
Ajax Harvester – Harvester
grep -slrR 'file_exists\|BADUBAMM' .
grep -slr '7P15f9s4kjgO/737+ex7YDSejj12rNOH4o6nqfs+rTOdn4ciKYoSJcqk7t' .