It's possible?
speaking of IP networks in general, and the Internet in particular, although not limited to these, but also including local networks (on this side of the router)
Is there any way in which two processes/machines/even viruses can communicate other than through a domain name and an IP??
and in a certain way, the domain name has to be converted into an IP through a DNS resolution
I ask in the context of cybersecurity and mechanisms that malwares have to communicate with each other, one way is to know the IP of the C&C or the victim, and use it directly. And the other, from what I see, is to "encode" a domain type xyxyxyxxyxyx.xyxyxy.tk and use this as a bridge for the IP C&C or IP of the victim
The short answer is no. Two processes outside of the same machine can only communicate through IP addresses.
Two processes within the same machine do not need IP addresses to communicate.
Within the same network it is possible to use broadcasting to find other machines.
Keep in mind that there is no difference between your local network and a public network in terms of operation. Communication always goes from your PC to the router. The router receives where you want to go and sends that information to the next step, which can be another router or the destination machine.
In your local network, the safest thing is that it is the second case. Since each machine when connected to the internet is sending its information to the router. And therefore the router keeps a table of the local IP's that it has registered.
As for DNS, keep in mind that they are no longer an alias for an IP. When you write google.com in the browser, your router consults a table and if it already has a domain, it will have it pointing to an IP, and it does the normal process against that IP.
If it doesn't know how to resolve it, it will ask the DNS servers it has configured to resolve it for it and it will save it in a table for future use.
As for malware specifically, it depends on each programmer how they have done it and the objective of the malware.
If you are making a botnet, the most normal thing is to point to an IP or a DNS. The IP has the drawback that it will stop working if you use another server, which is why DNS is usually chosen.
They can also be somewhat more dynamic, for example always ask a specific IP but it responds with a pool of IPs with which it can interact, and therefore if one falls you can try others etc...
I guess you could use alternative protocols to IP that work at the layer 3 level... but certainly IPv4/IPv6 are the kings when it comes to interconnecting equipment. I also think you could develop your own protocol that builds on top of something layer 2... but we're talking about having a lot (lots) of free time to implement it. Additionally, you could do tricks with ssh tunnels with what you could say to someone: "use port X of the computer where your application is going to run, I'll take care of connecting to the real computer you're going to connect to", with which will save you the detail of the IP. There could be more ways, certainly, but they are the ones that occur to me as a bird's eye.
There are the MACs of the devices and the IP packets sent by the routers (which I suppose can be simulated via software) flood the network with messages so that each connected device sends its information and the router can have its tables updated.