[Theory] P2P botnet 06-27-2014, 04:59 AM
#1
Alright, before I go balls deep and actually write this monster, I want to ask you guys if you see any flaws in it. I suggest taking several breaks. I can be wordy.
Intro-
A peer to peer network is a computer network where all computers connect to each other, there is no central server, only many many client/server connections between all the computers of the network. I want to build a Peer-to-peer virus, and I'll try to explain it below.
Stuff it should do-
Establishing connection-
Given 3 infected, unsecure computers (Alice, Bob, Charlie). Charlie's client sees a spreading opportunity. The bot from Charlie carries the addresses of Alice, Bob, and Charlie. When it gets installed on the fourth computer (Doug) It attempts to connect to Alice, Bob, or Charlie, and enter the network. If it fails, it retries hourly. If it has been unable to establish connection for more than 2 weeks, it uninstalls itself.
Connecting the network-
There are 2 "kinds" of computers in this network, "secure" peers, and "unsecured" peers. Unsecured peers are peers that do not stop a NAT punchthough, and these act as the nodes in the network. Secure clients cannot be connected to, and therefore act as clients to the nodes.
Insecure peers (nodes)-
When a secure peer wants to connect to a node, it pings the node with a malformed ping packet. When the packet is detected, the node preforms a NAT punchthrough to connect to the client.Each node has a list of a variable number of other nodes it uses to permutate combinations to give to the secure peers. Insecure peers are connected to 5 other insecure peers and a variable number secure peers. Insecure peers each generate a privatekey/publickey pair, and distribute the public key to other nodes. Nodes communicate by "broadcasting". Ex: "Give Alice this encrypted message:AkdlakjAjdkfjlIKDLBBiklSjfoOi"
Secure peers-
Each secure peer has a different set of 3 nodes to use in case the one it is connected to goes down. Additionally, insecure peers may request a new set of nodes each time that start from any of the nodes they have had before. I hope this reduces the possibility of peer poisoning. Secure peers generate a privatekye/publickey pair, and give the public key to the node they are currently connected to. Secure peers ONLY receive commands from one peer at a time (the one they gave their public key to) Nodes do not store public keys, and are given a new one upon connection from a secure peer.
Issuing commands-
The botnet admin must be one of the nodes in the network. All nodes are built with a hardcoded private key (I don't care who can decrypt the commands, only I want to be able to encrypt the commands). The botnet admin's node (admin peer) gives it's command to 5 of his connected nodes, which in turn tell connected nodes. If a node receives a duplicate broadcast(and many will) it ignores it. (to this end, i'm giving each command a "command id" so I can use the same command more than once). Some commands can be issued with a public key if they require a response. Ex: command#21:Tell everyone to ddos 127.0.0.1
Receiving data-
If the command requires a response, it is given by the secure peer to the node, which gives the information back to the computer it FIRST received the broadcast from, and so on until it reaches the botnet admin, who has the private key to decode the information.
Gosh that's a lot. If you have any questions, or see a flaw, drop a reply below. Thanks for reading.
Intro-
A peer to peer network is a computer network where all computers connect to each other, there is no central server, only many many client/server connections between all the computers of the network. I want to build a Peer-to-peer virus, and I'll try to explain it below.
Stuff it should do-
- Send commands and recive data from all slaves
- Have most computers connected to only one other, but with a list of backups it can use if the one it is currently connected to goes down.
- Use insecure computers as the nodes for secured computers
- Scan the system before downloading a specialized build of the client
- Be resilient
Establishing connection-
Given 3 infected, unsecure computers (Alice, Bob, Charlie). Charlie's client sees a spreading opportunity. The bot from Charlie carries the addresses of Alice, Bob, and Charlie. When it gets installed on the fourth computer (Doug) It attempts to connect to Alice, Bob, or Charlie, and enter the network. If it fails, it retries hourly. If it has been unable to establish connection for more than 2 weeks, it uninstalls itself.
Connecting the network-
There are 2 "kinds" of computers in this network, "secure" peers, and "unsecured" peers. Unsecured peers are peers that do not stop a NAT punchthough, and these act as the nodes in the network. Secure clients cannot be connected to, and therefore act as clients to the nodes.
Insecure peers (nodes)-
When a secure peer wants to connect to a node, it pings the node with a malformed ping packet. When the packet is detected, the node preforms a NAT punchthrough to connect to the client.Each node has a list of a variable number of other nodes it uses to permutate combinations to give to the secure peers. Insecure peers are connected to 5 other insecure peers and a variable number secure peers. Insecure peers each generate a privatekey/publickey pair, and distribute the public key to other nodes. Nodes communicate by "broadcasting". Ex: "Give Alice this encrypted message:AkdlakjAjdkfjlIKDLBBiklSjfoOi"
Secure peers-
Each secure peer has a different set of 3 nodes to use in case the one it is connected to goes down. Additionally, insecure peers may request a new set of nodes each time that start from any of the nodes they have had before. I hope this reduces the possibility of peer poisoning. Secure peers generate a privatekye/publickey pair, and give the public key to the node they are currently connected to. Secure peers ONLY receive commands from one peer at a time (the one they gave their public key to) Nodes do not store public keys, and are given a new one upon connection from a secure peer.
Issuing commands-
The botnet admin must be one of the nodes in the network. All nodes are built with a hardcoded private key (I don't care who can decrypt the commands, only I want to be able to encrypt the commands). The botnet admin's node (admin peer) gives it's command to 5 of his connected nodes, which in turn tell connected nodes. If a node receives a duplicate broadcast(and many will) it ignores it. (to this end, i'm giving each command a "command id" so I can use the same command more than once). Some commands can be issued with a public key if they require a response. Ex: command#21:Tell everyone to ddos 127.0.0.1
Receiving data-
If the command requires a response, it is given by the secure peer to the node, which gives the information back to the computer it FIRST received the broadcast from, and so on until it reaches the botnet admin, who has the private key to decode the information.
Gosh that's a lot. If you have any questions, or see a flaw, drop a reply below. Thanks for reading.
![[Image: jWSyE88.png]](http://i.imgur.com/jWSyE88.png)
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)