Sorta. Not all IP addresses have a domain name associated with them. And if malicious software is actually using raw IP addresses rather than domain names, that makes it easier to stop them because you could just block those IP addresses. This is why that approach is rarely taken -- with domain names, if the IP address is blocked, you can just associate the domain name with a different one.