My yii2 app was injected with additional code in web/index.php like below.
<?php
echo "Zoroo";
// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
It caused all json response page is invalid and captcha is not displayed and may be a few more which I don’t notice. I don’t know the reason behind this hack caused by Yii, Web Server or etc.
Do have any idea to avoid this attack again ? TQ
Intereting stuff. Either you have your credentials leaked or there’s something that’s writing input into a file path to which is customizable and isn’t validated.
Missed this out. I thought he was complaining about the dev lines.
If he didn’t write the Zoroo thing then he better find a capable person to audit his environment