The files for the the default favicon are here:

web/assets/common/favicon

You will need to replace them one by one, because these are the full version images for favicon to be compatible with absolutely all the devices around the world ( including mobile ).
The code itself is here (we don’t advice to modify directly, this would be overwritten in the next update):

web/engine/views/layouts/main.php:23