Using modded APKs is not illegal. You can find all the necessary APKs on the Play Store itself. It depends on your website from where you are downloading the APKs. If you are downloading from a browser, make sure to use a trusted site.