Docsity

Internetwork Security - Lab 20: Internet Relay Chat | ECE 4893, Lab Reports of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE 4893 Internetwork Security
Lab XX: Internet Relay Chat (IRC)
Group Number:_____________
Member Names: ______________________ _______________________
Date Assigned: XX/XX/XX
Date Due: XX/XX/XX
Last Edited: 12/2/2004
Please read the entire lab and any extra materials carefully before starting. Be sure to
start early enough so that you will have time to complete the lab. Answer ALL questions
and be sure you turn in ALL materials listed in the Turn-in Checklist ON or BEFORE
the Date Due.
Goal
This lab will introduce you to the concepts of Internet Relay Chat (or IRC).
You will learn how to set up an IRC server and then connect to it using a client
application. You will learn a few of the admin chat commands and also send and receive
files over IRC both on a single one-on-one basis and as a “file server” using IRC to send
files to many users. You will also set up and use a “chat bot” which can be configured to
do many different things, including admin tasks if you have to leave the chat server for
some reason, but want to keep tabs on your chat channel. We will see how these can be
applied in harmful ways as well.
Background and Theory
IRC is a protocol by which people can connect to a server to chat. Each IRC server has
various “channels” or “rooms” that people can connect to so people with similar interests
can join similar rooms for their chats. People have nick names which is how they are
known in the channel. Once in a channel, these people can chat, have private
conversations, and transfer files.
In general, one connects to a public IRC server, which contains thousands of channels.
However, because our computer is on MiniNet we don’t have Internet access so we will
be connecting to a chat server locally.
In general, one follows the procedure below to join a channel:
1. Download and configure an IRC client application
a. list of public servers
b. nickname settings
c. file transfer settings
2. Join a chat server using an IRC client application
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Internetwork Security - Lab 20: Internet Relay Chat | ECE 4893 and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity!

ECE 4893 Internetwork Security

Lab XX: Internet Relay Chat (IRC)

Group Number:_____________ Member Names: ______________________ _______________________ Date Assigned: XX/XX/XX Date Due: XX/XX/XX Last Edited: 12/2/ Please read the entire lab and any extra materials carefully before starting. Be sure to start early enough so that you will have time to complete the lab. Answer ALL questions and be sure you turn in ALL materials listed in the Turn-in Checklist ON or BEFORE the Date Due.

Goal

This lab will introduce you to the concepts of Internet Relay Chat (or IRC). You will learn how to set up an IRC server and then connect to it using a client application. You will learn a few of the admin chat commands and also send and receive files over IRC both on a single one-on-one basis and as a “file server” using IRC to send files to many users. You will also set up and use a “chat bot” which can be configured to do many different things, including admin tasks if you have to leave the chat server for some reason, but want to keep tabs on your chat channel. We will see how these can be applied in harmful ways as well.

Background and Theory

IRC is a protocol by which people can connect to a server to chat. Each IRC server has various “channels” or “rooms” that people can connect to so people with similar interests can join similar rooms for their chats. People have nick names which is how they are known in the channel. Once in a channel, these people can chat, have private conversations, and transfer files. In general, one connects to a public IRC server, which contains thousands of channels. However, because our computer is on MiniNet we don’t have Internet access so we will be connecting to a chat server locally. In general, one follows the procedure below to join a channel:

  1. Download and configure an IRC client application a. list of public servers b. nickname settings c. file transfer settings
  2. Join a chat server using an IRC client application
  1. Join a channel on the server “/join #”
  2. If the channel you try to join does not exist then it will be created and you COULD be the operator of that channel. Once in the channel, there are various levels of administrative privileges. For example, an operator (like admin or root) has the ability to kick a user out of the channel, control all the user settings for non-operators in the channel, the environment of the chat room, etc. Some commands that can be used are below: (taken from http://www.mirc.com/cmds.html) / Recalls the previous line entered in the current window. /! Recalls the last command typed in any window. /action {action text} Sends the specifed action to the active channel or query window. /ame {action text} Sends the specifed action to all channels which you are currently on. /amsg {text} Sends the specifed message to all channels which you are currently on. /auser {level} {nick|address} Adds a user with the specified access level to the remote users list. /auto [on|off|nickname|address] Toggles auto-opping of a nick or address or sets it on or off totally. /away {away message} Sets you away leave a message explaining that you are not currently paying attention to IRC. /away A plain away sets you being back. /ban [#channel] {nickname} [type] Bans the specified nick from the curent or given channel. /beep {number} {delay} Locally beeps 'number' times with 'delay' inbetween the beeps. /channel Pops up the channel central window (only works in a channel). /clear Clears the entire scrollback buffer of the current window. /clearall Clears all text in all open windows. /ctcp {nickname} {ping|finger|version|time|userinfo|clientinfo} Does the given ctcp request on nickname. /ctcps [on|off] Sets the Tools/Remote/ section (not) to listen to CTCP commands. Or checks its status. /closemsg {nickname} Closes the query window you have open to the specified nick. /creq [ask | auto | ignore] Sets your DCC 'On Chat request' settings in DCC/Options. /dcc send {nickname} {file1} {file2} {file3} ... {fileN} Sends the specified files to nick. /dcc chat {nickname} Opens a dcc window and sends a dcc chat request to nickname. /dde [-r] {service} {topic} {item} [data] Allows DDE control between mIRC and other applications. /ddeserver [[on [service name] | off] To turn on the DDE server mode, eventually with a givem service name. /describe {#channel} {action text} Sends the specifed action to the specified channel window. /disable {#groupname} De-activates a group of commands or events. /disconnect Forces a hard and immediate disconnect from your IRC server. Use it with care. /dlevel {level} Changes the default user level in the remote section. /dns {nickname | IP address | IP name} Uses your providers DNS to resolve an IP address. /echo [nickname|#channel|status] {text} Displays the given text only to YOU on the given place in color N. /enable {#groupname} Activates a group of commands or events. /events [on|off] Sets the Tools/Remote/ section (not) to listen to ON .. Events. Or checks its status. /exit Forces mIRC to closedown and exit. /finger {nick|address} Does a finger on a users address. /flood [{numberoflines} {seconds} {pausetime}] Sets a crude flood control method. /flush [levels] Clears all nicknames from the Remote/users list that are currently not on your channels. /font Activates the font selection dialog. /fsend [on|off] Shows fsends status and allows you to turn dcc fast send on or off. /fserve {nickname} {maxgets} {homedirectory} [welcome text file] Opens a fileserver. /groups [-e|d] Shows all (enabled or disabled) groups defined in the remote sections.

Before we proceed with this lab, lets just sum up some of the functionality of IRC servers today:  casual chatting  private messaging  file transfers (including searching for files, queuing files for download) o This has traditionally been used to download mp3s, movies, etc.  Common method of communication for potentially elicit use. Section I: Configuring the Chat Server As mentioned earlier, since MiniNet is not connected to the Internet, we don’t have access to the public IRC servers that would regularly be available on the Internet. Therefore, we will setup our own IRC server on Windows XP. NOTE: This lab will use both your Windows XP virtual machines. SERVER will refer to your first Windows XP virtual machine and CLIENT will refer to the Windows XP Copy virtual machine. The IRC server we have chosen to use is DICE.


the following is from the DICE homepage at http://exe.adam.ne.jp/dice/index.html DICE is multi-protocol hybrid server that offers simultaneous connectivity from IRC clients, opennap clients, and HTTP clients (WWW browsers). IRC is the medium of pure chat experience, while opennap is directory-publishing service accompanied by chat rooms. HTTP is the best known protocol on the internet to deliver contents to the users. Opennap-compliant system implemented in DICE is called VirtualDirectory. HTTP service in DICE can host .NET application. In the same way as general web servers offer public interface to file-system, DICE publishes those three unique interfaces to access one object, which is conference space - called channels - shared between users who can communicate one another by their different protocols mutually translated by DICE. Its base framework is totally multi-threaded/multiprocessor-ready and fully optimized to Microsoft Windows® 2000 / Windows® XP / Windows® Server 2003 platforms with scalable asynchronous I/O. It runs as Windows Service in background. Though it lacks server-link facility seen in standard IRC or opennap servers, its monolithic and compact design produces enough scalability for most cases. According to test results, stand-alone DICE can host over 2 thousands of opennap clients with ease on standard DSL connection, and can handle 10,000 concurrent opennap connections on broader uplinks such as T1 and higher. For IRC connection that requires very little

bandwidth compared to opennap, the stats reach even higher, well beyond 10, concurrent connections. As HTTP service DICE supports HTTP/1.1 keep-alive connection and when possible sends files directly from OS file cache to achieve high availability Typical Usage Scenarios What can you do with DICE , then?  Open up chat rooms to which people can connect with both IRC and opennap clients  Set up a private hub where users can search and transfer files each other with opennap clients  Open up a chat server and browse / post in channels with a web browser by publishing them in HTTP service  Set up a web site via HTTP service, and build your dynamic web pages with .NET framework languages, including C# and VisualBasic.NET You can do all these thing with one DICE running in your PC. Features  RFC 1459/2812 compliant IRC clients connectivity (See here for the list of intentional deviation from RFC)  Opennap -compliant directory-publishing service ("VirtualDirectory")  HTTP (RFC2616)-compliant WWW service  Interoperability of IRC clients and opennap clients in chat channels  IRC user-shell that provides single-signon to registered user / channel management  IRC host-spoof scanner (SOCKS4/5/Wingate/HTTP)  Secure remote administration via GUI shell (DICEAdminShell) over internet  Customizable multi-locale string resources in XML  Unique hostname masking  Binding TCP/IP ports to multiple NIC

  1. Go back to Edit > Options then click “Service” in the left pane.
  2. For the server name, choose “ECE4112”.
  3. Now click “Advanced Configuration”
  4. In the text editor that opens up, find the line “<defaultBlockSettings ctcp=”false” privatemessage=”false” dcc=”true”… and change the value for dcc=”true” to dcc=”false”. a. Note: DCC is the protocol used to send and receive files over IRC, and DICE blocks it by default, so we are unblocking this useful protocol.
  5. Now, save the text file, then close it.
  6. Now click the “save” button in the DICE administrative shell –options window.
  7. Click “save”. Then click “ok” on the pop-up.
  8. Now click “OK” to hide the configuration.
  9. To see our changes, we need to restart the server, so click Shell > Stop Local DICE. Wait for the process to stop for a few moments, then Shell > Start Local DICE. Our server is now set up and running. Take a screenshot showing the DICE service starting. (Screenshot #1) Section II: Configuring the Clients Now, copy to both your Windows SERVER AND CLIENT the PolarisXv111.exe installer. Polaris is a more feature filled IRC client based on the popular mIRC program. In addition to the common IRC functionality, Polaris allows us to setup automated file servers. Polaris can be downloaded from http://www.polaris-central.com. Do this for both server and client:
  10. Double-click PolarisXv111.exe to start the installer
  11. Click “Next” at the intro screen
  12. Click “I Agree” and “Next” again
  13. Click “Next” to install to default location.
  14. Click “Next” to create the shortcut folder.
  15. Finally click “Next” to actually start the installation.
  16. Click “Finish” Now to run it:
  17. Double-click the polaris icon on your desktops.
  18. Enjoy the handsomeness of the original author of mIRC.
  19. Now File > Select server
  20. Click “Add”
  21. In the new pop-up, type in “ECE4112” for the description
  1. In the “IRC Server” put the IP address of the WinXP server running the DICE IRC server.
  2. Click “add”
  3. Click OK
  4. Be sure “All” is chosen for the IRC nework and “ECE4112” is chosen for the IRC server.
  5. Select “Connect” from the left pane and change your nickname (For SERVER change it to your group number, (group4) and on your WINDOWS XP CLIENT, change it to “hacker.”)
  6. Select “Local Info” from the left pane and clear out any values for “Local Host” and “IP Address.” Change the “Lookup Method” to Normal.
  7. Click OK.
  8. Now run File >> Connect We have now connected to our DICE IRC server. Upon connecting, you will see some server information fly by. We will join a channel by typing “/join #security “. BE SURE TO DO THIS FIRST ON YOUR WINXP SERVER (THE ONE WITH THE NICKNAME GROUPX). Notice that groupx was the first person to enter the room, so there is a @ in front of the name. This means that you are the moderator. The “hacker” does not have this @ and is thus just a regular user in the channel. At anytime, an operator can give operator privileges to another use. As the groupx user type “/mode #security +o hacker” Notice how the hacker is now an op. To remove the operator privileges from the hacker now type “/mode #security –o hacker” Generally, the first person in a room will automatically be the operator, but some channels are registered with the server, so that only certain people can be the operators. On your WINXP SERVER, select PolarisX Menu >>File Serving >> XDCC Server. Click the button to “Enable XDCC Server.” Select the tab “Channels” and then click “Add.” For the channel name put “#security” click OK and then for the Network Name put “ECE4112”. Now click the “Serving Tab” and and click “Add Dir” and add a directory to share. Now click the “Advertise Button” and then “Close.” On your WINXP CLIENT, follow the directions and request a file. Take a screenshot showing this file being received and turn it in with your answer sheet. (Screenshot #2) We used XDCC to transfer the files. However, more advanced file servers can be used within IRC. Another common method is fserver. Fserver works by setting a trigger for the file server. In the channel, a user simply activates the trigger (this can be as simple as typing “files” in the channel) and is then sent directions on using the file server. Oftentimes, once this connection is established, a shell is created and the user can

After being installed, there will be a “Start WinBot” icon on your desktop. Double-click it. A new window will open. This is the interface for our bot. First we need to do the initial setup for it.

  1. In the top row of tabs, click “Configure” in the second row, choose “Basic Configuration”
  2. Change the nickname to “Bot”
  3. Now click the “Connections” tab in the second row.
  4. Click “Add Server”
  5. Type anything in “Network”, “ECE4112” in “Name:”, your WindowsXP server’s IP address in “Hostname/Address”, and leave the port as 6667.
  6. Now click “Connect All”. You should now be connected to the IRC server
  7. Now click “Channels” tab in the top row.
  8. In the drop-down field, type in “#security” then click “add” right next to it. This will have the bot automatically join that channel for whatever server we will connect to. The bot should connect to that channel now. Take a Screenshot of your WinBot window with the completed connection and joining of channel #security in the lower window pane. (Screenshot #3) Now the bot is in the #security channel, but isn’t doing much besides just observing what is happening in the room. Let’s have it do some fun, useful stuff.
  9. Click the “scripts” tab in the top row.
  10. Click “Edit and Execute” tab in the lower row of tabs.
  11. Click the “open folder” icon.
  12. Open “Moose.wbs”
  13. Select Moose’s listing from “Current Scripts” pane.
  14. Click the Green Triangle “Play” button. Now, the Moose.wbs script is running. Using Polaris-X on either your client or server windows machine, log into your IRC server and /join #security. You should see your bot in the room. Type the line “My favorite animal is the moose.” Q. 4.1. What did the bot do after you typed “My favorite animal is the moose.”? This is quite possibly the most simple action a bot can do. Let’s modify it slightly to see how it is done, and hopefully inspire some cool functionality.
  15. Return to the WinBot window.
  16. Click “Scripts” tab, then “Edit and Execute” tab again.
  17. Click the “moose” listing. You will see some event listings on the right. Double click the listing with moose in it.
  1. Click the drop-down under “Do this event...”
  2. Look at ALL the actions available for the bot to respond to. Q. 4.2. Using this window, have the bot do something else that can be “useful” in some way. Explain what you did, what triggers and responses the bot will have now in the IRC channel, and why it will be useful.

Q. 4.1. What did the bot do after you typed “My favorite animal is the moose.”? Q. 4.2. Using this window, have the bot do something else that can be “useful” in some way. Explain what you did, what triggers and responses the bot will have now in the IRC channel, and why it will be useful. How long did it take you to complete this lab? Was it an appropriate length lab? What corrections and or improvements do you suggest for this lab? Please be very specific and if you add new material give the exact wording and instructions you would give to future students in the new lab handout. You may cross out and edit the text of the lab on previous pages to make corrections/suggestions. Note that part of your lab grade is what improvements you make to this lab. You need to be very specific and provide details. Caution as usual: only extract and use the tools you downloaded in the safe and approved environment of the network security laboratory.

Turn-in Checklist

 Answer Sheet

 Screenshot #1 of DICE server starting

 Screenshot #2 of file transfer

 Screenshot #3 of WinBot logged in and signed

into #security channel of IRC server