Plugin Management

class nessus.Plugins(uri, api)
attributes()
Raises:NotImplementedError

Todo

/plugins/attributes/list

Raises:NotImplementedError

Todo

/plugins/attributes/familySearch

Raises:NotImplementedError

Todo

/plugins/attributes/pluginSearch

description(fname)

Description of a given plugin including its cross references and more.

The file name of the plugin (e.g., ping_host.nasl) must be passed as an argument.

Parameters:fname – the name of the plugin to describe (filename)

Permissions:

  • authenticated: Yes
  • administrator: No

Example:

>>> from nessus import API
>>> nessus = API('https://127.0.0.1:8834', username='user', password='pass')
>>> print nessus.plugins.description('aix_U811383.nasl')
{
  "pluginattributes": {
    "description": "The remote host is missing AIX PTF U811383 which is related to the security of the package rsct.basic.hacmp.2.3.11.0 You should install this PTF for your system to be up-to-date.",
    "plugin_version": "$Revision: 1.4 $",
    "plugin_modification_date": "2011/03/14",
    "solution": "Run ' suma -x -a RqType=Security ' on the remote system",
    "risk_factor": "High",
    "synopsis": "The remote host is missing a vendor supplied security patch",
    "plugin_publication_date": "2008/02/12",
    "plugin_type": "local"
  },
  "pluginid": "30766",
  "pluginname": "AIX 520009 : U811383",
  "pluginfamily": "AIX Local Security Checks"
}
descriptions()

List of all plugin descriptions from the Nessus server.

Permissions:

  • authenticated: Yes
  • administrator: Yes

Warning

This request returns a very large response (e.g., over 10 MB).

list(family=None)

List of plugin families loaded by the remote server.

List as well as the number of plugins of each family and list of plugins contained in the family.

Parameters:family – the plugin family to list

Permissions:

  • authenticated: Yes
  • administrator: No

Example:

>>> from nessus import API
>>> nessus = API('https://127.0.0.1:8834', username='user', password='pass')
>>> print nessus.plugins.list()
{
  "Mandriva Local Security Checks": "2871",
  "Windows : Microsoft Bulletins": "948",
  "Netware": "14",
  "Misc.": "911",
  "CGI abuses": "3127",
  "Policy Compliance": "37",
  (...)
}
>>> print nessus.plugins.list(family='AIX Local Security Checks')
[
  {
    "pluginid": "55364",
    "pluginfilename": "aix_U840865.nasl",
    "pluginname": "AIX 530011 : U840865",
    "pluginfamily": "AIX Local Security Checks"
  },
  {
    "pluginid": "54191",
    "pluginfilename": "aix_U837183.nasl",
    "pluginname": "AIX 710000 : U837183",
    "pluginfamily": "AIX Local Security Checks"
  },
  (...)
]
md5()

List of plugin file names and corresponding MD5 hashes.

Permissions:

  • authenticated: Yes
  • administrator: No

Example:

>>> from nessus import API
>>> nessus = API('https://127.0.0.1:8834', username='user', password='pass')
>>> print nessus.plugins.md5()
[
  "aix_U807831.nasl": "cfb861054ad33224cb9f76cd465cea04",
  "aix_U829081.nasl": "79159fa868a6bf266a004a2abcda08e5",
  "fedora_2004-313.nasl": "cc8281f624420f0d03a530cb015eab89",
  (...)
]
preferences()

List of plugin-defined preferences.

Permissions:

  • authenticated: Yes
  • administrator: No

Example:

>>> from nessus import API
>>> nessus = API('https://127.0.0.1:8834', username='user', password='pass')
>>> print nessus.plugins.preferences()
[
  {
    "preferencetype": "entry",
    "fullname": "ADSI Settings[entry]:Domain Controller :",
    "preferencename": "Domain Controller :",
    "pluginname": "ADSI Settings",
    "preferencevalues": null
  },
  (...)
]