How should a peer to peer botnet work

Hey, I was looking at how botnets work and I had a few questions. My first question is do all peer to peer botnets need to use UPnP on the client to connect to other clients. I assume you’d run a TCP websocket on the infected computer but then also scan the internet for other computers that are running a websocket socket server on a specific IP. I was also wondering how it would work having numerous infected computers on the same IP, as you can’t assign them to the same port would you just increment the starting port by one until you find one which isn’t already assigned? Finally would I have to make somewhere where infected computers would upload there IP to as scanning the entire internet to find an infected computer doesn’t seem practical on a small scale, if so wouldn’t this remove the element of decentralisation?

I also intend on using Rust, I only learnt the basics of C prior to get more familiar with the terminology.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.