On finite groups whose endomorphic images are characteristic subgroups