Ad

Is There A Way To Stop Laravel Files In Phpunit Getting Infected By Trajon Virus

- 1 answer

I find unexpected files different from what i uploaded in phpunit laravel files. Even emails in cpanel are manipulated.

Some of the created files

/home/~/public_html/vendor/phpunit/phpunit/src/Util/PHP/to.php

/home/~/public_html/vendor/phpunit/phpunit/src/Util/PHP/X_Bsend.php

/home/~/public_html/vendor/phpunit/phpunit/src/Util/PHP/unit.php

/home/~/public_html/vendor/phpunit/phpunit/src/Util/PHP/tshop.php

/home/~/public_html/vendor/phpunit/phpunit/src/Util/PHP/smtpp8.php

Anyone who can help stop this Attack on laravel, please help

Ad

Answer

When you install composer dependencies use the --no-dev flag. composer install --no-dev you don't want dev dependencies in your production environment.

This will result in you not having phpunit in your vendor directory.

Disclaimer: This is not a virus fix, your vulnerablity could be elsewhere.

Ad
source: stackoverflow.com
Ad