2.3 The web interface 2.3.3 User side pages - Identifier creation - Bots request – will send a mail to the project administrators - Requests follow up, where the state of each bot request will be viewable - Send password or identifier through mail – in case forgotten - List of the IRC commands usable with the lent bots - Data administration, modifiable according to each user’s privileges Profile (or identifier) administration Channel administration Lent bots information - Bot withdrawal, or ownership transfer to another registered user 2.3.4 Administration module pages This module will allow administrators to modify any dataset; therefore the code in common on the user side and on the administration module will be shared in a folder and included by the 2 sides. Additionally, all duties have to be automated as much as possible, but critical decisions should always be left for human processing and ideally sum up these decisions to mouse clicks. The authentication for this module will use the Apache web server sessions. - View project’s resources at glance – ability to anticipate/detect problems - Review the bots requests - List of the registered users - List of the registered channels - List of the blacklisted channels, and forms to add/remove entries - Users’ profile and channels administration - Monitoring of the botnet, with the possibility to purge channels marked as red for too long with a single click. - Search a channel, a user or a bot in the database - Purge a channel – will send a mail to the project administrators - Add or remove web links - Rebuilt the botnet’s channel and user lists according to the database. A program will connect to the botnet (using telnet), and check the channels each bot is present on. It will then delete the botnet’s user list and rebuilt it - Add or remove an administrator. Several administrator’s tasks can be chosen, each one is bound to an access level giving access to some extra pages, depending on the administrator’s duty. Adding an administrator will perform the following : • Modify the Apache access file of the administration module. • Grant global operator access in the botnet. • Create a mail address [email protected]. • Add the mail address in the distribution list [email protected]. Additionally a tool for server monitoring with web display could be installed. Guillaume Tournand <[email protected]> September 2003 38/489 2.4 Scheduled programs These programs will be run at scheduled intervals at the operating system level. 2.4.1 Database to botnet updates. The program does not go further if another instance is already running. It will connect to the database and fetch the content of table holding the instructions needed to be dispatched in the botnet. If data is present, it connects to the botnet using telnet and for each entry: - Send the instruction to the botnet. - Wait for an acknowledgement or timeouts after a defined amount of time. - If the acknowledgement received matches the one expected - which is defined in the table, in a column - the database’s entry is deleted. Otherwise, it will be tried again at next execution. - Wait for a defined amount of time before sending the next instruction. This will prevent flood. 2.4.2 Botnet monitoring The program does not go further if another instance is already running. It will connect to the botnet using telnet, and determine which bot(s) are presently connected to the botnet. For each bot: - Detects on which channels it is present on. - Find out if the bot is op or not on each channel. - Find out how many users are present on the channels. - If a channel is registered to Cservice, are the accesses properly set for the lent bots? Since these information can be found only by questioning Cservice, it will be done using their SOAP interface first, and if unsuccessful using IRC. All these data will then be stored in a defined table, in the database. Additionally, if a channel has a problem (i.e.: an insufficient amount of users), a timestamp will be set in order to find out since how long the problem remains. This will then be used to purge channels marked as problematic for too long. 2.4.3 Botnet’s server lists update Since IRC networks are maintained by volunteers and the servers hosted for free by companies, the map of the IRC network often changes. Therefore the bots’ server list will have to be adapted to reflect the revision of the IRC network. It could be done by hand, but this operation will require to regularly check the IRC website to find out if some changes have been done or not, and if required to modify each bot’s configuration file. One program will fetch the IRC network’s webpage holding the list of their servers, and match them against those stored in the database. If some servers have been added, they are added to the database, but set as inactive. A mail will then be sent to the administrator, stating which servers have been removed from the IRC network and should be removed from the database, and which one have been added to the database and should be bound to a logical group and set as active. Until the administrator connects to the database to commit the change, nothing will be done. A copy of the second program is run for each bot and fetches a webpage (hosted in our web server) listing the active IRC servers of the database. The configuration file of the bot is then rebuilt according to the fetched page and the bot process is rehashed. 2.4.4 Blacklist synchronization Because this list holds the channels having abused our resources, it is best to share it with other bot lending projects in order to avoid them to face a similar situation. Each bot lending project willing to synchronize their list will have to publish it using a webpage, protected by a password. The program will fetch each page, compare their entries with the database, and add them if required. The removal of each entry is done using the web interface, and in order not to add removed entries, they are set as inactive in the database. 2.4.5 Daily channel log This program sends the log of the home IRC channel, each day, to the project’s administrators willing to receive it. The selection to receive it or not is done through the profile administration, using the web interface. It connects to the database and find out which administrators have set their profile to receive this mail and send them the log file of the hub bot. By doing this, each administrator will have the option of being aware of the channel activity, even when absent. Guillaume Tournand <[email protected]> September 2003 40/489 In document High speed networks and distributed systems Oxford Brookes MSc dissertation. IRC distributed bot lending platform: The Loufiz project (Page 36-40)