| 1 |
$Id: BOTNET,v 1.24 2010/01/03 13:27:22 pseudo Exp $ |
| 2 |
|
| 3 |
Botnet Sharing and Linking |
| 4 |
Last revised: June 4, 2002 |
| 5 |
_____________________________________________________________________ |
| 6 |
|
| 7 |
Botnet Sharing and Linking |
| 8 |
|
| 9 |
|
| 10 |
The purpose of this document is to show you what a botnet is and how it |
| 11 |
could be useful to you. It also covers botflags userfile sharing. |
| 12 |
|
| 13 |
Contents: |
| 14 |
1. Terms |
| 15 |
2. What is a botnet? |
| 16 |
3. Adding and linking bots |
| 17 |
4. Using botflags |
| 18 |
5. Making bots share user records |
| 19 |
|
| 20 |
|
| 21 |
1. Terms |
| 22 |
|
| 23 |
The following are some common terms used in this document: |
| 24 |
|
| 25 |
|
| 26 |
Botnet |
| 27 |
A botnet consists of one or more bots connected together. |
| 28 |
|
| 29 |
|
| 30 |
Link |
| 31 |
Link is the term used to describe a bot connecting to another bot. |
| 32 |
|
| 33 |
|
| 34 |
Hub |
| 35 |
A bot is described as a hub-bot if one or more bots are linked to |
| 36 |
it. |
| 37 |
|
| 38 |
|
| 39 |
Leaf |
| 40 |
A leaf is a non-hub bot connecting to a hub-bot. A leaf has only |
| 41 |
one other bot connected to it, its hub. Leaf bots can be assigned |
| 42 |
the "l" botflag to prevent other bots from linking to them. |
| 43 |
|
| 44 |
|
| 45 |
Link Bot |
| 46 |
A link-bot is a bot that is linked to another bot. It may or may not |
| 47 |
be a hub-bot. |
| 48 |
|
| 49 |
|
| 50 |
Share |
| 51 |
Share is the term used to describe the sharing of user records. |
| 52 |
|
| 53 |
|
| 54 |
Share Bot |
| 55 |
A share-bot is a bot which shares user records with one or more |
| 56 |
linked bots. |
| 57 |
|
| 58 |
|
| 59 |
Aggressive Share |
| 60 |
Aggressive share is a term used to describe the direction of sharing |
| 61 |
user-files. Aggressive share bots will SEND userfiles to another passive |
| 62 |
bot. |
| 63 |
|
| 64 |
|
| 65 |
Passive Share |
| 66 |
Passive share is a term used to describe the direction of sharing |
| 67 |
user-files. Passive share bots will accept userfiles from an aggressive |
| 68 |
share bot. |
| 69 |
|
| 70 |
Example bottree: |
| 71 |
|
| 72 |
BotA |
| 73 |
|-+BotB |
| 74 |
`-+BotC |
| 75 |
|
| 76 |
BotB is linked to a master sharebot, BotA, and a slave sharebot, |
| 77 |
BotC. BotB shares passively with [receives from] BotA and shares |
| 78 |
aggressively with [sends to] BotC. |
| 79 |
|
| 80 |
|
| 81 |
Bot Flags |
| 82 |
Flags are attributes that determine what a bot can or is allowed to do. |
| 83 |
Flags can be either global (such as +s) or channel specific (such as |
| 84 |
|+s #lamest). See '.help botattr' for help with setting these flags. |
| 85 |
|
| 86 |
The following is a list of valid bot flags: |
| 87 |
|
| 88 |
s share aggressively (SEND userfile to a passive bot) |
| 89 |
p share passively (ACCEPT userfile from an aggressive bot) |
| 90 |
g global share (share all channels) |
| 91 |
h hub (automatically link to this bot) |
| 92 |
a alternate (automatically link to this bot if the hub bot can't be |
| 93 |
linked) |
| 94 |
l leaf (bot is not allowed to link in other bots) |
| 95 |
r reject (bot will not be allowed to link) |
| 96 |
i isolate (isolate the party line across a bot link) |
| 97 |
0-9 user defined flags |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
Address |
| 102 |
The physical address, containing the address and port of the bot. |
| 103 |
For example: lame.org:3333. You can change a bot's address with |
| 104 |
".chaddr <botname> <hostaddress:botport[/userport]>". |
| 105 |
|
| 106 |
|
| 107 |
Relay Port |
| 108 |
The relay port number of the bot is defined in the config file. Note |
| 109 |
that you can define one port for bots and another for user connections. |
| 110 |
|
| 111 |
|
| 112 |
Relay |
| 113 |
A relay connection is used to relay (jump) to another bot via telnet |
| 114 |
or DCC chat. You can relay to another bot even if the remote bot is |
| 115 |
not linked. You can use ".relay <botname>" to relay to another bot. |
| 116 |
|
| 117 |
|
| 118 |
Port |
| 119 |
The telnet port is used by the bot to communicate with other bots |
| 120 |
and/or users. Note that you can define separate ports for user and |
| 121 |
bot connections. |
| 122 |
|
| 123 |
|
| 124 |
2. What is a botnet? |
| 125 |
|
| 126 |
A botnet consists of one or more bots linked together. This can allow |
| 127 |
bots to op each other securely, control floods efficiently, and share |
| 128 |
user lists, ban lists, exempt/invite lists, and ignore lists (if sharing |
| 129 |
is enabled). |
| 130 |
|
| 131 |
|
| 132 |
3. Adding and linking bots |
| 133 |
|
| 134 |
With the common terms out of the way, we can start with the process of |
| 135 |
linking two bots. Before you start, you need to know the address and |
| 136 |
port of each bot you wish to link. |
| 137 |
|
| 138 |
Here is an example scenario: |
| 139 |
|
| 140 |
BotA is on lame.org listening on port 3333, and BotB is on irc.org |
| 141 |
listening on port 4444. First, you have to add each Bot to the other's |
| 142 |
userfile. On BotA, you would type '.+bot BotB irc.org:4444'. If BotB is |
| 143 |
on a common channel with BotA, BotB's hostmask is automatically added. |
| 144 |
Otherwise, you have to add the hostmask manually with the '.+host' |
| 145 |
command. On BotB, you would type '.+bot BotA lame.org:3333'. |
| 146 |
|
| 147 |
At this point, you can link the two bots by typing '.link BotA' on BotB (or |
| 148 |
'.link BotB' on BotA). The bots will now give themselves random passwords |
| 149 |
which are *not* stored encrypted in the userfile. Note that you can link as |
| 150 |
many bots as you wish to your botnet. |
| 151 |
|
| 152 |
|
| 153 |
4. Using botflags |
| 154 |
|
| 155 |
Botflags are needed to assign special functions and tasks to your bots. |
| 156 |
Bot flags are set with the '.botattr' command. See '.help botattr' for |
| 157 |
help with this command. The following is a list of botflags and their |
| 158 |
functions: |
| 159 |
|
| 160 |
"h" (hub) |
| 161 |
If you want your bot(s) to automatically link/relink, you can assign |
| 162 |
the +h botflag each bot's hub. Note that if you set multiple bots +h, |
| 163 |
the bot only attempts to link to one. |
| 164 |
|
| 165 |
|
| 166 |
"a" (alternate) |
| 167 |
If your bots are, for some reason, unable to link to their hub, they |
| 168 |
will attempt to connect to an alternate hub. You can assign a bot as |
| 169 |
an alternate hub by giving it the +a botflag. |
| 170 |
|
| 171 |
|
| 172 |
"l" (leaf) |
| 173 |
This flag, assigned to a link bot, will prevent the link bot from linking |
| 174 |
other bots to your botnet. |
| 175 |
|
| 176 |
|
| 177 |
"r" (reject) |
| 178 |
If you assign this flag to a link bot, the link bot will not be allowed |
| 179 |
to link to the botnet. |
| 180 |
|
| 181 |
|
| 182 |
"i" (isolate) |
| 183 |
This flag isolates a link bot's partyline from the rest of the botnet. |
| 184 |
Anything said on the link bot's partyline won't appear on the rest of |
| 185 |
the botnet. |
| 186 |
|
| 187 |
|
| 188 |
"s" (SEND userfile to) |
| 189 |
+s Giving a link bot this flag will make the bot share aggressively |
| 190 |
with the link bot. See 'Aggressive Share' in section 2 of this |
| 191 |
document for more information on aggressive sharing. |
| 192 |
|
| 193 |
|s +s bots need this flag for each channel you want to share. |
| 194 |
|
| 195 |
|
| 196 |
"p" (ACCEPT userfile from) |
| 197 |
Giving a link bot this flag will make the bot share passively with |
| 198 |
the link bot. See 'Passive Share' in section 2 of this document for |
| 199 |
more information on passive sharing. |
| 200 |
|
| 201 |
|
| 202 |
"g" (global share) |
| 203 |
This flag allows the sharing of all channels with a link bot. |
| 204 |
|
| 205 |
|
| 206 |
"0-9" (user-defined) |
| 207 |
These 10 flags are user-defined can be used by scripters. |
| 208 |
|
| 209 |
|
| 210 |
5. Making bots share user records |
| 211 |
|
| 212 |
Before you start preparing your bots for sharing, make sure that |
| 213 |
you've loaded the transfer and share modules. You also have to ensure |
| 214 |
that each channel you wish to share is set +shared (see '.help |
| 215 |
chanset' and '.help chaninfo'). |
| 216 |
|
| 217 |
By using specific botflags, you can cause your bot to share |
| 218 |
aggressively with some link bots, and passively with others. For |
| 219 |
sharing to work, flags must be set properly on both the passive and |
| 220 |
the aggressive bots. An aggressive bot will not share userfiles with |
| 221 |
another aggressive bot; a passive bot will not share userfiles with |
| 222 |
another passive bot. |
| 223 |
|
| 224 |
First off, let's say we have two bots we want to link. We will |
| 225 |
call one Lamestbot, and the other Lameshare. The first thing that needs |
| 226 |
to be done is each bot needs the other bot added to its user record. |
| 227 |
Your botnet should have a hub bot. This will have them connect |
| 228 |
automatically whenever they are started. Without a hub, you would have to |
| 229 |
manually link them with the .link command. For this situation we will |
| 230 |
make Lamestbot the hub for our small botnet. Let's also use a channel |
| 231 |
called #eggdrop as the one we want to share user channel flags with. Do |
| 232 |
the following: |
| 233 |
|
| 234 |
On Lamestbot: |
| 235 |
|
| 236 |
.+bot Lameshare eggdrop.com:3333 (This command adds a user record to |
| 237 |
Lamestbot for Lameshare. Lameshare is running from eggdrop.com and is |
| 238 |
on port 3333. If Lameshare were to have a separate port for users/relays |
| 239 |
we would just add a '/' and the port number, i.e. 3333/5555.) |
| 240 |
|
| 241 |
.botattr Lameshare +s (This tells us that Lamestbot will only send |
| 242 |
user files to Lameshare; Lameshare will not send them to it.) |
| 243 |
|
| 244 |
.botattr Lameshare |s #eggdrop (this sets up sharing of the channel |
| 245 |
flags for #eggdrop between the bots. Without this, they will not share |
| 246 |
channel flags only global flags for the users.) |
| 247 |
|
| 248 |
On Lameshare: |
| 249 |
|
| 250 |
.+bot Lamestbot best.com:3333/5555 (Again this will add a user on |
| 251 |
Lameshare called Lamestbot with the domain of best.com. The bot has |
| 252 |
two ports, 3333 for bot communications and 5555 for users/relays.) |
| 253 |
|
| 254 |
.botattr Lamestbot +hp (This command sets Lamestbot as the hub and |
| 255 |
also as a passive share, which means Lameshare will accept user files |
| 256 |
from Lamestbot. |
| 257 |
|
| 258 |
.botattr Lamestbot |s #eggdrop (This sets #eggdrop as a share channel.) |
| 259 |
|
| 260 |
Our botnet: |
| 261 |
|
| 262 |
Lamestbot |
| 263 |
`-+Lameshare |
| 264 |
|
| 265 |
Let's add a third bot called beldin to this scenario: |
| 266 |
|
| 267 |
On Lamestbot: |
| 268 |
|
| 269 |
.+bot beldin llama.com:3333 |
| 270 |
|
| 271 |
.botattr beldin s|s #eggdrop (Notice how i piped (the | character) |
| 272 |
the channel flag also saving time.) |
| 273 |
|
| 274 |
Also note that you don't have to add beldin on Lameshare. Since |
| 275 |
they are already sharing, it was added automatically. The one thing that |
| 276 |
you should note is that no bot flags will be shared. If you set beldin as |
| 277 |
+s (Aggressive share) on the hub (Lamestbot) he will not be set on the |
| 278 |
other bots as that. The same with the channel +s flag. All other flags |
| 279 |
will be shared such as the o, f, etc. Now that we have three bots, we |
| 280 |
can also set up one as an alternate hub. The alternate hub is the bot |
| 281 |
that the bots will auto-connect to in the event the hub goes down or |
| 282 |
is unreachable. |
| 283 |
|
| 284 |
Let's make beldin an alternate hub for our little botnet. |
| 285 |
|
| 286 |
On Lameshare: |
| 287 |
|
| 288 |
.botattr beldin +a |
| 289 |
|
| 290 |
That's all there is to it. Again, since bot flags are not shared, |
| 291 |
you would have to add the bot flag +a for beldin on them all. The only |
| 292 |
ones you would not have to do this on are beldin and the hub (Lamestbot). |
| 293 |
Of course, if you had more bots, you would have to add beldin as a +a on |
| 294 |
them, but you would not do it on the hub or beldin. |
| 295 |
|
| 296 |
Our botnet: |
| 297 |
|
| 298 |
Lamestbot |
| 299 |
|-+beldin |
| 300 |
`-+Lameshare |
| 301 |
_____________________________________________________________________ |
| 302 |
|
| 303 |
Copyright (C) 1999 - 2011 Eggheads Development Team |