Probe (MetaCoretex API)
Keywords: com.securitycentric.metacoretex.interfaces.Probe interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.securitycentric.metacoretex.interfaces
Interface Probe

All Superinterfaces:
  java.lang.Runnable

All Known Subinterfaces:
  AuthProbe, CommandProbe, DatabaseProbe, VersionProbe

All Known Implementing Classes:
  AbstractAuthProbe, AbstractCommandProbe, AbstractDatabaseProbe, AbstractProbe, AbstractVersionProbe

public interface Probe
extends java.lang.Runnable

This class defines the interface which must be implemented by all probes

Version:
  $Id: Probe.java,v 1.7 2003/10/02 02:20:44 visigoth_6 Exp $
Author:
  visigoth

Method Summary
`void` | `addDepends(java.lang.String name)` This method adds an element to the underlying implementations list of depends for this probe.
`void` | `addOption(java.lang.String name, java.lang.String value)` This method adds a key->value pair to the options table for this probe.
`void` | `addProvides(java.lang.String name, java.lang.String descr)` This method adds an element to the underlying implementations list of resources this probe provides.
`void` | `addReport(java.lang.String rep)` This method concats the specified string to the end of the existing report string and appends a newline.
`java.util.Vector` | `depends()` Return a vector of the KB keys this probe requires to run.
`java.util.Properties` | `dumpOptions()` This method provides the probe handling subsystems with a way to get a reference to the Properties objec which stores the configuration options for this probe.
`java.lang.String` | `getCopyright()` Get the copyright string for the current probe.
`ProbeException` | `getException()`
`java.lang.String` | `getFamily()` The getFamily() method should return a string representing what interface this probe implements.
`java.lang.String` | `getHelp()` Return the Help String for this probe
`java.lang.String` | `getHost()` The getHost() method wraps the current Target's getHost() method to allow the probe to know who it's supposed to poke.
`java.lang.String` | `getName()` The getName() method should return a short unique name for the probe to use in descriptions.
`java.lang.String` | `getOption(java.lang.String name)` This method returns the value of the specified option key.
`java.util.Vector` | `getOptionKeys()` This function returns a Vector of the keys in the Properties table which represents this probe's configuration options
`int` | `getProbeId()` Each probe will have a unique ID assigned.
`java.lang.String` | `getReport()` This method returns a String which represents the current reportable information in the probe.
`int` | `getSeverity()` This method returns the severity (0-3) of the report the probe would like to make.
`Target` | `getTarget()` Return this probe's target
`int` | `getTimeout()` Get the timeout in milliseconds that this probe should use when running.
`java.lang.String` | `getVersion()` Get the version string for this probe.
`boolean` | `hasSafe()` This function should return true ONLY if the function probeSafe() is capable of detecting the specified vuln.
`boolean` | `isEnabled()` Checks to see if the current probe is enabled.
`boolean` | `isReportable()`
`java.lang.Object` | `kbGet(java.lang.String key)` The kbGet() method wraps the kbGet() method for the currently set target.
`boolean` | `kbHas(java.lang.String key)` This method wraps the underlying Target's kbHas() method to determine if the current Target has the specified key in it's current KB.
`void` | `kbPut(java.lang.String key, java.lang.Object obj)` The kbPut() method wraps the underlying Target kbPut() method to allow probes access to Target KB's regardless of implementaion.
`void` | `probe()` Carry out the probe.
`void` | `probeSafe()` Carry out the _safe_ version of the probe.
`java.util.Hashtable` | `provides()` Return a Hashtable of the KB keys this probe provides sets and their descriptions.
`void` | `replaceOptions(java.util.Properties prop)` This method is used by the scan configuration loader to override the default configuration options for the probe.
`void` | `setCopyright(java.lang.String crght)` Set the copyright string for this probe which is reported in the Help->about probes.
`void` | `setEnabled(boolean bol)` Sets the boolean enabled status of this probe
`void` | `setFamily(java.lang.String newFam)` Use the setFamily() method to set the family (more importantly the tab in the UI) for this probe.
`void` | `setHelp(java.lang.String help)` Set the String value returened by the getHelp() method (used by the UI
`void` | `setName(java.lang.String myname)` Set the name of this probe.
`void` | `setProbeId(int x)` Set the probeId of the probe.
`void` | `setReport(java.lang.String rep)` This method sets (overwrites) the current report String value.
`void` | `setReportable(boolean x)` Set the probe to be reportable, which makes the attacker threads add it's report to the target upon probe completion
`void` | `setSeverity(int x)` This method sets the severity of the report which the probe will return to the attacker threads.
`void` | `setTarget(Target targ)` Give the probe it's target
`void` | `setTimeout(int timeout)` Set the timeout in milliseconds that this probe should use when running.
`void` | `setVersion(java.lang.String ver)` Set the version string for this probe.

Methods inherited from interface java.lang.Runnable
`run`

Method Detail

### getProbeId

    public int getProbeId()

  Each probe will have a unique ID assigned. Get it.

  Returns:
    int probeId

### setProbeId

    public void setProbeId(int x)

  Set the probeId of the probe. Each probe should call this upon initialization

  Parameters:
    `x` - int which will be used to uniquely identify each probe

### getFamily

    public java.lang.String getFamily()

  The getFamily() method should return a string representing what interface this probe implements. Most probes can just rely on their underlying abstract probe to report this correctly.

  Returns:
    String representing the family of probes this probe belongs to.

### setFamily

    public void setFamily(java.lang.String newFam)

  Use the setFamily() method to set the family (more importantly the tab in the UI) for this probe. Family names are used for ONLY the GUI rendering..

  Parameters:
    `newFam` - String name of the new probe family

### getName

    public java.lang.String getName()

  The getName() method should return a short unique name for the probe to use in descriptions.

  Returns:
    String with a short descriptive name for this probe

### setName

    public void setName(java.lang.String myname)

  Set the name of this probe. This should likely be a setter for a string held in the probe implemntation.

  Parameters:
    `myname` - String representation of the name of this probe

### hasSafe

    public boolean hasSafe()

  This function should return true ONLY if the function probeSafe() is capable of detecting the specified vuln.

  Returns:
    boolean which is true if this probe's probeSafe() method is capable of detecting the issue

### probe

    public void probe()
               throws ProbeException

  Carry out the probe. Throw a ProbeException only if test cannot determine (possibly due to network failure or other).

  Throws:
    `ProbeException` - These exceptions are thrown when failure causes the probe to be unable to determine weather or not the target is vulnerable.

### probeSafe

    public void probeSafe()
                   throws ProbeException

  Carry out the _safe_ version of the probe. These activities should not be likely to hurt the target. If whole test is safe, probeSafe() is encouraged to call probe()

  Throws:
    `ProbeException` - These exceptions are thrown when failure causes the probe to be unable to determine weather or not the target is vulnerable.

### setTarget

    public void setTarget(Target targ)

  Give the probe it's target

  Parameters:
    `targ` - set the com.securitycentric.metacoretex.lib.Target object this probe will use to carry out attacks

### getTarget

    public Target getTarget()

  Return this probe's target

  Returns:
    Return a reference to this probe's current Target

### isEnabled

    public boolean isEnabled()

  Checks to see if the current probe is enabled.

  Returns:
    Return true if this probe is enabled, false if not.

### setEnabled

    public void setEnabled(boolean bol)

  Sets the boolean enabled status of this probe

  Parameters:
    `bol` - Set the enabled status of this probe

### depends

    public java.util.Vector depends()

  Return a vector of the KB keys this probe requires to run.

  Returns:
    Vector of the KB keys this probe depends upon

### provides

    public java.util.Hashtable provides()

  Return a Hashtable of the KB keys this probe provides sets and their descriptions. This is mostly used by the dependency resolver which orders the probe for firing

  Returns:
    Hashtable of the KB's this probe provides

### getOptionKeys

    public java.util.Vector getOptionKeys()

  This function returns a Vector of the keys in the Properties table which represents this probe's configuration options

  Returns:
    Vector of the keys (names) of the configuration options for this probe.

### dumpOptions

    public java.util.Properties dumpOptions()

  This method provides the probe handling subsystems with a way to get a reference to the Properties objec which stores the configuration options for this probe.

  Returns:
    Properties object of the configuration options for this probe

### replaceOptions

    public void replaceOptions(java.util.Properties prop)

  This method is used by the scan configuration loader to override the default configuration options for the probe.

  Parameters:
    `prop` - New Properties object for this probe to use.

### addDepends

    public void addDepends(java.lang.String name)

  This method adds an element to the underlying implementations list of depends for this probe. Used by the dep. resolver later. Each probe should call this method to specify any KB resources upon which they depend.

  Parameters:
    `name` - String representation of the KB key for the value this probe depends upon.

### addProvides

    public void addProvides(java.lang.String name,
                            java.lang.String descr)

  This method adds an element to the underlying implementations list of resources this probe provides. Used by the dep. resolver later. Each probe should call this method to specify any KB resources which they provide.

  Parameters:
    `name` - String representation of the KB key which this
    `descr` - String description of the provided KB key probe provides.

### getReport

    public java.lang.String getReport()

  This method returns a String which represents the current reportable information in the probe. Used later by Attacker threads to fill in ProbeReport objects.

  Returns:
    String of what the probe has to report

### setReport

    public void setReport(java.lang.String rep)

  This method sets (overwrites) the current report String value. Abstract implementations should take care of this automagically.

  Parameters:
    `rep` - String of report data

### addReport

    public void addReport(java.lang.String rep)

  This method concats the specified string to the end of the existing report string and appends a newline. Makes it easier for probes which often are adding single lines of info.

  Parameters:
    `rep` - String string to be concated to current report string

### addOption

    public void addOption(java.lang.String name,
                          java.lang.String value)

  This method adds a key->value pair to the options table for this probe. Any probes which add options upon instantiation will be able to receive user config options by their use later.

  Parameters:
    `name` - String representation of the Properties key (name) for this option
    `value` - String representation of the value for this configuration option.

### getOption

    public java.lang.String getOption(java.lang.String name)

  This method returns the value of the specified option key.

  Parameters:
    `name` - String representation of the key for the key->value pair.
  Returns:
    String value of the specified configuration option.

### setVersion

    public void setVersion(java.lang.String ver)

  Set the version string for this probe.

  Parameters:
    `ver` - String version

### getVersion

    public java.lang.String getVersion()

  Get the version string for this probe.

  Returns:
    String version

### kbGet

    public java.lang.Object kbGet(java.lang.String key)

  The kbGet() method wraps the kbGet() method for the currently set target. This allows probes to access the current Target KB regardless of the implementation. Probes should call this method to retreive any Objects from the KB upon which they depend.

  Parameters:
    `key` - String representation of the key (name) of the option in the Target KB
  Returns:
    Object which is the value of the Target KB key

### kbPut

    public void kbPut(java.lang.String key,
                      java.lang.Object obj)

  The kbPut() method wraps the underlying Target kbPut() method to allow probes access to Target KB's regardless of implementaion. Probes should use this method to set any Objects into the Target KB which they declaired they provide (addProvides())

  Parameters:
    `key` - String key for the Target KB
    `obj` - Object to insert into the KB

### kbHas

    public boolean kbHas(java.lang.String key)

  This method wraps the underlying Target's kbHas() method to determine if the current Target has the specified key in it's current KB.

  Parameters:
    `key` - String key to test for in the KB
  Returns:
    boolean specifying weather or not the specified key is in the KB

### getHost

    public java.lang.String getHost()

  The getHost() method wraps the current Target's getHost() method to allow the probe to know who it's supposed to poke.

  Returns:
    String of the hostname/IP of the current Target

### getSeverity

    public int getSeverity()

  This method returns the severity (0-3) of the report the probe would like to make.

  Returns:
    int value represents the severity (0-3) where: 0 - Informational 1 - Low Risk 2 - Medium Risk 3 - High Risk

### isReportable

    public boolean isReportable()

### setReportable

    public void setReportable(boolean x)

  Set the probe to be reportable, which makes the attacker threads add it's report to the target upon probe completion

### getException

    public ProbeException getException()

### setSeverity

    public void setSeverity(int x)

  This method sets the severity of the report which the probe will return to the attacker threads.

  Parameters:
    `x` - int representation of the severity (see getSeverity() for definitions)

### setHelp

    public void setHelp(java.lang.String help)

  Set the String value returened by the getHelp() method (used by the UI

  Parameters:
    `help` - String help/config information

### getHelp

    public java.lang.String getHelp()

  Return the Help String for this probe

  Returns:
    String help string

### setCopyright

    public void setCopyright(java.lang.String crght)

  Set the copyright string for this probe which is reported in the Help->about probes.

### getCopyright

    public java.lang.String getCopyright()

  Get the copyright string for the current probe.

  Returns:
    String copyright string

### getTimeout

    public int getTimeout()

  Get the timeout in milliseconds that this probe should use when running.

### setTimeout

    public void setTimeout(int timeout)

  Set the timeout in milliseconds that this probe should use when running. Leave this value alone unless you know what you are doing!

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD