The president said Republicans "were successful against hacking," despite spending less money than the Democratic National Committee on cybersecurity.