OpenNMS API 1.2.3

org.opennms.netmgt.vulnscand
Class Vulnscand

java.lang.Object
  extended byorg.opennms.netmgt.vulnscand.Vulnscand
All Implemented Interfaces:
Fiber, PausableFiber

public class Vulnscand
extends java.lang.Object
implements PausableFiber

Vulnerability scanning daemon. This process is used to provide continual scans of target interfaces that identify possible security holes. The vulnerability scanner that this version uses to identify security flaws is Nessus 1.1.X (www.nessus.org).

This code is adapted from the capsd code because its behavior is quite similar; it continually scans the target ranges, enters the scan results into a database table, and also supports rescans whose threads are pulled from a separate thread pool so that they occur immediately.

Author:
Seth Leger , OpenNMS

Field Summary
private static java.lang.String FIBER_NAME
          The prefix for the fiber name.
private static java.lang.String LOG4J_CATEGORY
          The log4j category used to log messages.
private static java.lang.String m_address
           Contains dotted-decimal representation of the IP address where Vulnscand is running.
private static java.lang.Object m_dbSyncLock
          Database synchronization lock for synchronizing write access to the database between the SpecificScanProcessor and RescanProcessor thread pools
private  BroadcastEventProcessor m_receiver
          Event receiver.
private  RunnableConsumerThreadPool m_scheduledScanRunner
          The pool of threads that are used to executed RescanProcessor instances queued by the rescan scheduler thread.
private  Scheduler m_scheduler
          Rescan scheduler thread
private static Vulnscand m_singleton
          Singleton instance of the Vulnscand class
private  RunnableConsumerThreadPool m_specificScanRunner
          The pool of threads that are used to executed the SpecificScanProcessor instances queued by the event processor (BroadcastEventProcessor).
private  int m_status
          Current status of this fiber
 
Fields inherited from interface org.opennms.core.fiber.PausableFiber
PAUSE_PENDING, PAUSED, RESUME_PENDING
 
Fields inherited from interface org.opennms.core.fiber.Fiber
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED
 
Constructor Summary
Vulnscand()
          Constructs the Vulnscand objec
 
Method Summary
(package private) static java.lang.Object getDbSyncLock()
           
static Vulnscand getInstance()
           
static java.lang.String getLocalHostAddress()
          Used to retrieve the local host name/address.
 java.lang.String getName()
          Returns a name/id for this process
 int getStatus()
          Returns the current status
 void pause()
          This method is used to suspend a currently running Fiber.
 void resume()
          This method is used to resume a suspeneded Fiber.
 void start()
          Start the Vulnscand threads.
 void stop()
          Stop the Vulnscand threads.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG4J_CATEGORY

private static final java.lang.String LOG4J_CATEGORY
The log4j category used to log messages.

See Also:
Constant Field Values

FIBER_NAME

private static final java.lang.String FIBER_NAME
The prefix for the fiber name.

See Also:
Constant Field Values

m_singleton

private static final Vulnscand m_singleton
Singleton instance of the Vulnscand class


m_status

private int m_status
Current status of this fiber


m_dbSyncLock

private static java.lang.Object m_dbSyncLock
Database synchronization lock for synchronizing write access to the database between the SpecificScanProcessor and RescanProcessor thread pools


m_address

private static java.lang.String m_address

Contains dotted-decimal representation of the IP address where Vulnscand is running. Used when vulnscand sends events out


m_scheduler

private Scheduler m_scheduler
Rescan scheduler thread


m_receiver

private BroadcastEventProcessor m_receiver
Event receiver.


m_specificScanRunner

private RunnableConsumerThreadPool m_specificScanRunner
The pool of threads that are used to executed the SpecificScanProcessor instances queued by the event processor (BroadcastEventProcessor).


m_scheduledScanRunner

private RunnableConsumerThreadPool m_scheduledScanRunner
The pool of threads that are used to executed RescanProcessor instances queued by the rescan scheduler thread.

Constructor Detail

Vulnscand

public Vulnscand()
Constructs the Vulnscand objec

Method Detail

stop

public void stop()
Stop the Vulnscand threads.

Specified by:
stop in interface Fiber

start

public void start()
Start the Vulnscand threads.

Specified by:
start in interface Fiber

pause

public void pause()
Description copied from interface: PausableFiber
This method is used to suspend a currently running Fiber. When invoked the Fiber will begin the transition to a PAUSED status after changing its internal state, if applicable.

Specified by:
pause in interface PausableFiber

resume

public void resume()
Description copied from interface: PausableFiber
This method is used to resume a suspeneded Fiber. If the thread is already running then this method should have no effect on the current Fiber.

Specified by:
resume in interface PausableFiber

getName

public java.lang.String getName()
Returns a name/id for this process

Specified by:
getName in interface Fiber
Returns:
The name of the Fiber.

getStatus

public int getStatus()
Returns the current status

Specified by:
getStatus in interface Fiber
Returns:
The current status of the Fiber.

getLocalHostAddress

public static java.lang.String getLocalHostAddress()
Used to retrieve the local host name/address. The name/address of the machine on which Vulnscand is running.


getInstance

public static Vulnscand getInstance()

getDbSyncLock

static java.lang.Object getDbSyncLock()

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.