Nmap irc-botnet-channels NSE Script


This page contains detailed information about how to use the irc-botnet-channels NSE script. For list of all NSE scripts, visit the Nmap NSE Library.

Select:
Overview
Error Messages

Script Overview


Script source code: https://github.com/nmap/nmap/tree/master/scripts/irc-botnet-channels.nse
Script categories: discovery, vuln, safe
Target service / protocol: irc
Target network port(s): 6664, 6665, 6666, 6667, 6668, 6669, 6679, 6697, 7000, 8067
List of CVEs: -

Script Description


The irc-botnet-channels.nse script checks an IRC server for channels that are commonly used by malicious botnets.

Control the list of channel names with the irc-botnet-channels.channels script argument. The default list of channels is

  • loic
  • Agobot
  • Slackbot
  • Mytob
  • Rbot
  • SdBot
  • poebot
  • IRCBot
  • VanBot
  • MPack
  • Storm
  • GTbot
  • Spybot
  • Phatbot
  • Wargbot
  • RxBot

Irc-botnet-channels NSE Script Arguments


This is a full list of arguments supported by the irc-botnet-channels.nse script:

irc-botnet-channels.channels

A list of channel names to check for.

- - -
To use this script argument, add it to Nmap command line like in this example:

nmap --script=irc-botnet-channels --script-args irc-botnet-channels.channels=value <target>

Irc-botnet-channels NSE Script Example Usage


Here's an example of how to use the irc-botnet-channels.nse script:

nmap -p 6667 --script=irc-botnet-channels <target>

nmap -p 6667 --script=irc-botnet-channels --script-args 'irc-botnet-channels.channels={chan1,chan2,chan3}' <target>

Irc-botnet-channels NSE Script Example Output


Here's a sample output from the irc-botnet-channels.nse script:

| irc-botnet-channels:
|   #loic
|_  #RxBot

Irc-botnet-channels NSE Script Example XML Output


There is no sample XML output for this module. However, by providing the -oX <file> option, Nmap will produce a XML output and save it in the file.xml file.

Authors


  • David Fifield
  • Ange Gutek

References


See Also


Related NSE scripts to the irc-botnet-channels.nse script:

Visit Nmap NSE Library for more scripts.

The irc-botnet-channels.nse script may fail with the following error messages. Check for the possible causes by using the code snippets highlighted below found in the script source code. This can often times help in identifying the root cause of the problem.

Unable to open connection.


Here is a relevant code snippet related to the "Unable to open connection." error message:

192:	  user = user or nick
193:	  commands[#commands + 1] = irc_compose_message(nil, "USER", user, "8", "*", user)
194:	
195:	  irc.sd, banner = comm.tryssl(host, port, table.concat(commands))
196:	  if not irc.sd then
197:	    return nil, "Unable to open connection."
198:	  end
199:	
200:	  irc.sd:set_timeout(60 * 1000)
201:	
202:	  -- Buffer these initial lines for irc_readline.

Could not connect


Here is a relevant code snippet related to the "Could not connect" error message:

273:	    search_channels = {search_channels}
274:	  end
275:	
276:	  irc = irc_connect(host, port)
277:	  if not irc then
278:	    stdnse.debug1("Could not connect")
279:	    return nil
280:	  end
281:	  irc_send_message(irc, "LIST", concat_channel_list(search_channels))
282:	
283:	  channels = {}

ERROR:


Here is a relevant code snippet related to the "ERROR: " error message:

305:	      break
306:	    end
307:	  end
308:	  irc_disconnect(irc)
309:	
310:	  if errorparams then
311:	    channels[#channels + 1] = "ERROR: " .. table.concat(errorparams, " ")
312:	  end
313:	
314:	  return stdnse.format_output(true, channels)
315:	end

Version


This page has been created based on Nmap version 7.92.

Go back to menu.