Project

General

Profile

Start Here » History » Version 1

Luke Murphey, 04/02/2010 10:54 AM

1 1 Luke Murphey
h1. Installing NSIA
2 1 Luke Murphey
 
3 1 Luke Murphey
h2. Prerequisites
4 1 Luke Murphey
NSIA requires [http://java.sun.com/javase/downloads/index.jsp Java runtime environment (JRE)] 1.6 or later.
5 1 Luke Murphey
6 1 Luke Murphey
Note that some Linux operating systems (such as Ubuntu) include GCJ instead of Sun Java. GCJ is not currently supported and should not be used for running the V. On Ubuntu, run the following command to install Java:
7 1 Luke Murphey
8 1 Luke Murphey
{{{
9 1 Luke Murphey
sudo apt-get install sun-java6-jre
10 1 Luke Murphey
}}}
11 1 Luke Murphey
12 1 Luke Murphey
Otherwise, go to Sun Microsystems’ website to [http://java.sun.com/javase/downloads/index.jsp download the Java 6 JRE].
13 1 Luke Murphey
14 1 Luke Murphey
h2. Installation Methods
15 1 Luke Murphey
NSIA has two installation methods: Windows installer and the archive method (no installer).
16 1 Luke Murphey
17 1 Luke Murphey
h3. Windows Installer
18 1 Luke Murphey
The installer only works on Windows. In addition to installing the application, the installer will install NSIA as a service. By default, it uses the internal database. An external database can be configured by updating the config.ini file (see below).
19 1 Luke Murphey
20 1 Luke Murphey
h3. Archive Method (No Installer)
21 1 Luke Murphey
The zip archive should be used on non-Windows platforms (but can also be used on Windows). After unzipping the archive, run install.sh (on Unix/Linux) or install.bat (on Windows) to create the default user and initialize the database.
22 1 Luke Murphey
23 1 Luke Murphey
h3. Configuring Java Runtime
24 1 Luke Murphey
You may need to change the amount of memory that the Java runtime uses. The JVM settings can be configured in etc/config.ini. The config.ini file will be loaded by the ThreatFactor binaries (such as ThreatFactor NSIA.exe) and user to configure the Java runtime. Note that the settings in this file won't affect NSIA if you run it directly by calling Java.
25 1 Luke Murphey
26 1 Luke Murphey
Below is an example of the a configuration file:
27 1 Luke Murphey
28 1 Luke Murphey
{{{
29 1 Luke Murphey
#!sh
30 1 Luke Murphey
# This sets the arguments sent to the Java virtual machine
31 1 Luke Murphey
JVM.Arguments=-Xmx512m
32 1 Luke Murphey
}}}
33 1 Luke Murphey
34 1 Luke Murphey
h3. Configuring Database
35 1 Luke Murphey
36 1 Luke Murphey
h3. Creating the Initial User Account
37 1 Luke Murphey
38 1 Luke Murphey
39 1 Luke Murphey
h3. Running as a Service / Daemon
40 1 Luke Murphey
It you want NSIA st start every time the host starts, then it will need to be installed as a daemon (Unix) or service (Windows).
41 1 Luke Murphey
42 1 Luke Murphey
h2. Installing as a Daemon (Linux/Unix)
43 1 Luke Murphey
On Linux, you can use one of the init scripts to have NSIA start when thehost boots. The init scripts are provided with zipped archive version of NSIA. Copy the init script into the /etc/init.d/ directory. You’ll need to create symlinks in the appropriate run levels for NSIA to start automatically on startup. On Ubuntu, you can use update-rc.d to create the symlinks for you:
44 1 Luke Murphey
{{{
45 1 Luke Murphey
sudo update-rc.d -f nsia defaults
46 1 Luke Murphey
sudo chmod 755 /etc/init.d/nsia
47 1 Luke Murphey
}}}
48 1 Luke Murphey
49 1 Luke Murphey
The init script assumes that NSIA is installed in /opt/nsia; edit the init script if it is installed in another location. Additionally, you will need to edit the init script if you want to change the command-line arguments that are sent to NSIA (for example, if you wish to specify the amount of memory that the Java runtime allocates, set the location of the config file, etc.).
50 1 Luke Murphey
51 1 Luke Murphey
Note that NSIA should start after networking since it will try to initiate scanning after starting.
52 1 Luke Murphey
53 1 Luke Murphey
h2.  Installing as a Service (Windows)
54 1 Luke Murphey
On Windows, NSIA needs to be installed as a service to automatically run every time the system starts. To do this, install the included Win32 service using sc.exe:
55 1 Luke Murphey
{{{
56 1 Luke Murphey
sc create "nsia" DisplayName= "Threatfactor NSIA" binPath= "C:\Program Files\ThreatFactor.com\NSIA\bin\ThreatFactor NSIA Service.exe"
57 1 Luke Murphey
}}}
58 1 Luke Murphey
59 1 Luke Murphey
The above command assumes that NSIA is installed in "C:\Program Files\ThreatFactor.com\NSIA\bin\ThreatFactor NSIA Service.exe"; change the arguments as necessary. Additionally, make sure that the ''ThreatFactor NSIA Service.exe'' file is in the same path as the ''nsia.jar'' file (it won't be able to find it otherwise).