• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

SnortSnarf-021111.1/H05-Jul-2006-15,96711,020

Time-modules/H05-Jul-2006-

cgi/H05-Jul-2006-692423

include/H05-Jul-2006-9,5346,788

nmap2html/H05-Jul-2006-479309

sisr/H03-May-2022-2,8121,660

snfout.snort.alert/H03-May-2022-

utilities/H05-Jul-2006-294161

.snortsnarf_startH A D05-Jul-200629 21

.snortsnarf_start1H A D05-Jul-200629 21

.snortsnarf_start2H A D05-Jul-200629 21

.snortsnarf_start3H A D05-Jul-200629 21

.snortsnarf_stopH A D05-Jul-200629 21

.snortsnarf_stop1H A D05-Jul-200629 21

.snortsnarf_stop2H A D05-Jul-200629 21

.snortsnarf_stop3H A D05-Jul-200629 21

COPYINGH A D05-Jul-200617.6 KiB341281

ChangesH A D05-Jul-200619.8 KiB423356

READMEH A D05-Jul-20066.5 KiB158115

README.SISRH A D05-Jul-200611.9 KiB273203

README.nmap2htmlH A D05-Jul-20062.2 KiB6240

UsageH A D05-Jul-200617.4 KiB376305

new-annotation-base.xmlH A D05-Jul-200636 21

nohup.outH A D05-Jul-20061.4 KiB2221

quick.datH A D05-Jul-2006224

run.outH A D05-Jul-20064.6 KiB4745

snortsnarfH A D03-May-202218.1 KiB460318

snortsnarf.plH A D03-May-202218.1 KiB460318

README

1README file for SnortSnarf v1.0
2------------------------------------
3
4Welcome to the release of SnortSnarf v1.0
5(http://www.sourceforge.net/projects/snortsnarf/).  This program creates a
6set of HTML pages to allow you to quickly and conveniently navigate around
7alerts output by the Snort intrusion detection system (http://www.snort.org/).
8
9
10This release marks the revival of the development of this project after its
11creators, SiliconDefense, went defunct and their projects taken over by
12Demarc.  In coordination with Demarc, this project is now back into active
13development and is now housed on SourceForge.
14
15
16Version 1.0 is the initial re-release of the latest available code from
17SiliconDefense and will be the stating point for future development.
18
19
20The remainder of this document, as well as most other documentation in this
21release at this time, are still the originals from SiliconDefense.  Once I
22get this further along I will release a new code base that contains all
23necessary updates to code and documentation to show the current state of code
24ownership and responsible parties.
25
26
27Ed Davison
28edavison@sourceforge.net
29
30----------------------------------
31
32
33Included in this release is:
34
35snortsnarf.pl   -- the main SnortSnarf program
36Usage           -- information on using SnortSnarf
37COPYING         -- GNU General Public License (the license for this release)
38Changes         -- Changes since previous versions
39README          -- this file
40new-annotation-base.xml -- an empty annotation base
41cgi/            -- directory containing CGI scripts for SnortSnarf
42include/        -- directory containing files included by SnortSnarf
43utilities/      -- directory containing utilities for SnortSnarf
44nmap2html/      -- directory containing nmap2html files
45sisr/           -- directory containing SISR files
46sisr/cgi/       -- directory containing CGI scripts for SISR
47sisr/include/   -- directory containing files included by SISR
48sisr/modules/   -- directory containing SISR Pipeline modules
49Time-modules/   -- David Muir Sharnoff's time modules (see README to install)
50
51
52To run SnortSnarf:
53   snortsnarf.pl <options> <input1 input2 ...>
54
55Inputs can either be snort alert files or a Snort Mysql database such as
56snort:@localhost.
57
58See Usage for information about the input sources, the options, and what is
59generated.  See the top of the utility scripts for their documentation.  See
60README.nmap2html for information about nmap2html and README.SISR for
61information about SISR.
62
63This should run under most varieties of Unix.  Versions have been known to run
64on OpenBSD and RedHat Linux.
65
66snortsnarf.pl runs under Windows NT (at last report).  The CGI scripts, the
67annotation feature, IPAddrContact, and nmap2html have not been tested on
68Windows but are expected to work (let us know if you try them).  The file and
69directory utilities in the utilities directory are not especially useful under
70Windows and have not been tried.  SISR will not work under Windows.
71
72One note.  snortsnarf.pl uses alot of memory when it is running.  If it is
73taking alot of time to run for you, that probably means that you
74over-stressing available memory.  You probably want to add more (preferably
75physical) memory or segment your log file and run snortsnarf.pl on each.
76Even better than segmenting, consider using the input filters described in
77the Usage file such as -minprio, -mintime, and -maxtime. Perhaps also cut
78down on your alerts with high false positives.  As long as you have enough
79swap space, SnortSnarf will finish (eventually).
80
81
82Installation (minimal)
83----------------------
84Copy the contents of the 'include' directory to someplace where it will be
85found when snortsnarf.pl is run (e.g., your "site_perl" directory or the
86current directory).  You can also place/leave these in './include/'.  Be sure
87to move the 'include/SnortSnarf' directory there as well.
88
89You may also need to install the time modules written by David Muir Sharnoff
90(muir@idiom.com).  Version 100.010300 is included in this distribution for
91your convenience (see the Time-modules directory).  You can also grab the
92latest version from CPAN:
93
94  http://search.cpan.org/search?module=Time::JulianDay
95
96See the modules' provided README file for installation and more information.
97It should be quick and easy to install (just the usual 'perl Makefile.PL;
98make; make test; make install').  Windows users may just want to copy the
99Time directory to <perldir>\site\lib.
100
101
102Installation (annotations)
103--------------------------
104If you wish to use the annotations feature of SnortSnarf, you will need to:
105  +  follow the directions above for the minimal installation
106  +  place the contents of the cgi directory in a directory where it
107  will be executed by your web server as a CGI script, e.g., in your "cgi-bin"
108  directory.
109  +  set up a directory to store the annotations in persistently, e.g., by
110  running the setup_anns_dir.pl utility or copying new-annotation-base.xml to
111  a directory (giving it an appropriate name) and setting up the permissions
112  +  if needed, install the XML::Parser Perl module
113(See also the "Annotations" section of the Usage file.)
114
115
116Installation (SISR)
117-------------------
118Follow one of the installation directions above plus the installation
119directions in README.SISR.
120
121
122Installation (database input)
123-----------------------------
124Database input is done through SnortDBInput by Ed Davison (Ed.Davison@bus.utexas.edu).  SnortDBInput is included in this distribution, but you might find a newer version on the SnortDBInput web page:
125
126  http://www.bus.utexas.edu/services/cbacc/dbsupport/snortdbinput/
127
128Also refer to this web page for installation help.
129
130
131Mailing Lists
132-------------
133You are invited to sign up for one or both of the SnortSnarf mailing lists.
134
135SnortSnarf-users:  A list for users to talk about SnortSnarf
136  http://www.silicondefense.com/mailman/listinfo/snortsnarf-users
137  snortsnarf-users@list.silicondefense.com
138
139SnortSnarf-devel:  A gathering place for SnortSnarf developers
140  http://www.silicondefense.com/mailman/listinfo/snortsnarf-users
141  snortsnarf-devel@list.silicondefense.com
142
143You can share your questions and ideas regarding SnortSnarf on the approriate
144one of these lists.
145
146
147Contributions
148-------------
149We welcome your complaints, kudos, and especially improvements and bugfixes.
150We wish for this to be a useful as possible, so your feedback and assistance
151is important.  You may reach us at hoagland@SiliconDefense.com.
152
153Thank you and happy SnortSnarfing!
154
155-- Jim Hoagland (hoagland@SiliconDefense.com)
156   Stuart Staniford (stuart@SiliconDefense.com)
157   Joe McAlerney (joey@SiliconDefense.com)
158

README.SISR

1README file for SISR (as of SnortSnarf v021111.1)
2-------------------------------------------------
3
4This is a first attempt at documenting SISR and it is quite possible I have
5forgotten something important.  Please let me (hoagland@SiliconDefense.com)
6know if you see something I need to explain better.  Also please consider
7SISR to be experimental.
8
9
10Overview
11--------
12SISR is the SnortSnarf Incident Storage and Reporting mechanism.  Starting
13with a link in a SnortSnarf page, you can record sets of alerts, create
14"incident"s from them, and send e-mail reports based on templates from
15incidents.  It was added to SnortSnarf since we wanted a way to speed up the
16creation of reports of incidents we noticed on our clients' networks.
17
18Some features we hope you (or someone) will find useful:
19+ ability to customize the fields recorded with an incident
20+ ability to create your own report templates based on these fields
21+ ability to select the report template(s) to send for an incident
22+ ability to add notes about an incident whenever desired
23
24
25Basic Usage
26-----------
27Given some alerts you wish to create a report from, this is roughly the
28process you follow:
29
301.  From a page with the alerts, click on the link to add some fo the alerts
31to a labeled set link.  This will show you a list of the alerts on the page
32you were on.  (Actually as it does a fresh grep through the alert input
33sources you provided to snortsnarf.pl, it will show you the alerts that would
34be shown on that page if SnortSnarf were rerun on the same input.)
35
362.  Select the alerts you want included in the labeled set you are creating,
37or leave "select all alerts" checked.  Name the set and click on the
38"add/create" button.  You can repeat these two steps to add alerts found on
39multiple pages though you may end up with duplicate entries; just give the
40same set name.
41
423.  From the page displaying the labeled set you created, click on the
43"create incident" link.
44
454.  That produced a form for creating an incident.  This form contains
46several fields, some of which will be filled in with default text based on
47the set of alerts that this incident is in regards to.  Look over all these
48carefully, even those filled in already; these will be used in creating
49reports and these is currently no way to edit these later through SISR
50(though you can use a XML editor).   When done, click on the "create
51incident" button.
52
535.  From the page displaying the incident information, chose a template you
54wish to create a report from from the pop-up menu and select "create".
55
566.  This produces a form for sending e-mail.  Edit the headers and body of
57the e-mail message.  When you are ready to send the e-mail, click on "send
58mail"; this causes the e-mail to be sent out and an annotation to be added
59to the incident.  Repeat these last two steps for additional reports.
60
61To review existing labeled alert sets or incidents, click on the appropriate
62"List" link on the top of an IP page.  (You may also wish to bookmark these
63links.)
64
65
66Installation
67------------
68There are three external pieces of software you will need to install to use
69SISR, all available without cost:
70
711) XML::Parser by Larry Wall and Clark Cooper (also needed for the
72annotation feature of SnortSnarf).  Available from CPAN, e.g.,
73http://www.perl.com/CPAN-local/modules/by-module/XML/.
74
752) Mail::Sendmail by Milivoj Ivkovic (mi@alma.ch).  Available from CPAN,
76e.g., http://www.perl.com/CPAN-local/modules/by-module/Mail/.  Be sure to
77check to make sure you have the mail host set correctly at the top of the
78module.
79
803) The HTML Form Processing Modules (HFPM) and Pipeline by Jim Hoagland
81(hoagland@cs.ucdavis.edu).  (Note that this is same person as one of the
82authors of SnortSnarf but the software is not directly associated with
83Silicon Defense, which maintains and holds copyright to SnortSnarf; it is
84maintained independently.)  Be sure to indicate that you want to get on the
85HFPM announcement list as a recommended new version is forthcoming as of
86this writing and will be announced there.
87
88  http://seclab.cs.ucdavis.edu/~hoagland/hfpm/
89  http://seclab.cs.ucdavis.edu/~hoagland/pipeline/
90
91Place the CGI scripts in sisr/cgi/ in your CGI directory of your web server.
92The files in sisr/include should be placed in a directory where Perl will
93find it when executing CGI scripts, e.g., in your "site_perl" Perl lib
94directory.  Copy the sisr/modules directory to someplace reachable by the
95Pipeline CGI script when running.  Next run the
96utilities/setup_sisrdb_dir.pl script to create the directory and files that
97SISR will need to be modifying (you can put them in the same directory as
98annotations are stored in).  These are the labeled alert set file, the
99incident file, and (optionally) the default set name file.
100
101Now you will need to set up the SISR configuration file.  This file is used
102by the different parts of SISR when executing and is given to snortsnarf.pl
103with the -sisr option to cause it to generate SISR links.  An example is
104available in the distribution as sisr/ex-sisr.config.  See the next section
105for the format and semantics of your SISR config file.
106
107A couple notes regarding HFPM/Pipeline and SISR.  As distributed, the only
108part of the HFPM download that is needed (in this version of SISR) is the
109notempty.pl module and Pipeline (pipeline.pl).  You will need to configure
110Pipeline to use the modules included with SISR (in sisr/modules/ in the
111SnortSnarf distribution).  You might find the sisr/sisr_modlist list of SISR
112modules useful in configuring Pipeline.
113
114
115The SISR configuration file
116---------------------------
117The SISR configuration file is accessed by different parts of SISR at run
118time.  It contains information on how SISR is installed and used on your
119particular site.
120
121File format.  Empty lines and lines beginning with a "#" are ignored.  All
122other lines are expected to be in the format "parameter: value" or
123"parameter subparamater: value".
124
125Parameters.  All of these parameters need to be defined in the configuration
126file.  All directory and file names need to be full paths.  Here is a list:
127
128  + set-db-loc: your labeled set database file
129
130  + inc-db-loc: your incident database file
131
132  + ann-db-loc: your SnortSnarf annotations file (if defined, annotations
133  are made when creating an alert set)
134
135  + report-tmpl-dir-mail: directory containing your mail templates
136
137  + set-name-default: the default set name or a file to get it from
138
139  + module-path: module path to give to Pipeline, should include dirs for
140  HFPM and SISR modules
141
142  + ifield: the required subparamater is the name of an incident file you
143  want and the right side is a description of the field to present to the
144  user and to record with the field; this is repeated with each field you
145  wish to define
146
147  + inc-field-calc-pipe: pipeline of modules to auto-fill in incident
148    fields; see the section on filling in incident fields below
149
150
151Customizing report templates
152----------------------------
153It is pretty easy to create your own mail templates (assuming you know what
154you want to have in the e-mail :) ).  Copy and modify the example
155(sisr/ex-report.txt) for a quick start.  All files in the directory given in
156the configuration file ('report-tmpl-dir-mail' parameter) are considered
157mail templates and included on this presented list (unless the file name
158starts with a '.' or end with a '~').
159
160There are three sections to a template file: the template information
161section, the headers, and the mail body.  These are separated by one or more
162blank lines.
163
164The template information section provides information about the template.
165This is the only part of the file that is not used as the template source
166when using the template.  The format is "parameter: value".  The only
167parameter defined at present is 'Description', which is a description of the
168template.  This is shown in the pop-up menu.  All other fields are ignored.
169
170You can define arbitrary mail headers in the header section.  The format is
171"header: content".  For example "Subject: There was an incident".
172
173The body of the message and the mail header contents are filled in with the
174incident fields.  '$field1' gets replaced with the contents of the field
175with the name 'field1' and '$$' with '$'.  If for some reason you want to
176access the environmental variables of the incident creation submission, you
177can get those by prefixing their name with '%'.  For a literal '%', type
178'%%'.
179
180In addition to the text fields defined with 'ifield' in the configuration
181file, the following incident fields are available for instantiation:
182
183  + name: incident name
184  + creator: incident creator
185  + created: incident creation time
186  + event_set_name: name of the labeled alert set this incident refers to
187  + event_set_loc: URL of the database file containing that alert set
188
189
190Customizing incident fields
191---------------------------
192To add, modify, or delete the incident fields stored with an incident,
193simply edit the 'ifield' entries in the SISR configuration file.  The word
194after 'ifield' is the name of the field and the part after the colon is the
195description.  This description is the user-friendly version of the incident
196field.
197
198By design, the defined incident fields may be changed at any time without
199harming access to existing incidents.
200
201
202Customizing automatically filling in of incident fields
203-------------------------------------------------------
204The procedure followed in filling in the default values for incident fields
205is defined in the configuration file by the 'inc-field-calc-pipe' parameter.
206Consider this a pipeline for Pipeline to execute (though in reality it is
207only part of what is actually done).  See:
208
209  http://seclab.cs.ucdavis.edu/~hoagland/pipeline/
210
211and especially:
212
213  http://seclab.cs.ucdavis.edu/~hoagland/pipeline/usage.html#pipeline
214
215This arranges for several modules to be run in order.  These modules are
216used to set up the incident fields.  After this pipeline is complete, the
217default value for a field will be obtained from the field with the same
218name.  You can use SISR modules to set these up, use HFPM modules, or write
219your own modules.
220
221For those modules that require the details of alerts from the labeled set
222associated with the incident, it is available in the environmental variable
223'events'.
224
225Here is a brief summary of the SISR modules included that you can use for
226setting these fields.  For more details, see the top of the module file.
227
228  + set_field_summation.pl: summarizes the distinct values for a given alert
229  field among alerts in a labeled set
230
231  + set_flags.pl: like set_field_summation.pl, but specialized for flags
232
233  + nets_from_ips.pl: from a field with IP addresses, put the distinct
234  networks (using a certain netmask) in a new field
235
236  + earliest_latest_times.pl: extracts the earliest and latest times among
237  the alerts and stores those designated fields
238
239  + whois_lookup.pl:  uses IPAddrContact.pm to try to set a field to a
240  contact e-mail address for a given IP address using whois databases
241
242Typically, the parameters to these can be from fields and environmental
243variables defined earlier and are so included by prefixing a field name with
244a '$' and an environmental variable with a '%'.  Output location
245specification typically take pretty much the same form.  Here is an example
246module use:
247
248  nets_from_ips.pl $dip $dnet 24
249
250This will cause the module nets_from_ips.pl to be run.  Its arguments are
251'$dip', '$dnet', and '24'.  It interprets this as getting the IP address
252from the string in the field 'dip', setting the field 'dnet' to the networks
253extracted, and using a 24 bit network size.
254
255It is not that difficult to write your own custom modules.  See:
256
257http://seclab.cs.ucdavis.edu/~hoagland/pipeline/moddev.html
258
259for how to write modules.  It is probably easiest to start with an existing
260module and modify it.
261
262
263Contributions
264-------------
265We welcome your complaints, kudos, and especially improvements and bugfixes.
266We wish for this to be a useful as possible, so your feedback and assistance
267is important.  You may reach us at hoagland@SiliconDefense.com.
268
269-- Jim Hoagland (hoagland@SiliconDefense.com)
270
2716 April 2001
272
273

README.nmap2html

1This is the README file for nmap2html, by Joe McAlerney and James Hoagland,
2June 14, 2000
3
4-= Overview =-
5
6nmap2html is essentially a stripped down version of nlog [1] that has been
7modified for use with the SnortSnarf application [2]. It is a utility that
8converts nmap logs (in a flat file format) to an html file structure.  There
9is a HTML page for each IP address and an index page; these are
10cross-linked.  You may resolve the IP address in real time.
11
12-= Setup =-
13
14Included with the nmap2html utility is the essential log2db.pl script that
15converts nmap output (generated with the -oM option) to a flat file format.
16The newly created flat file, and the original nmap output file will then be
17fed into nmap2html to produce the desired html pages.  The original file
18must be used again, because certain components of it are not extracted with
19the log2db.pl utility.
20
211) Place the nmaplog-dns.pl file in your webserver's cgi-bin directory.
22From the root of your webserver, it _must_ be placed in /cgi-bin  If you
23choose not to place it in this directory, you may edit the nmap2html.pl
24file, and change the $cgidir variable value to reflect the location of the
25cgi-bin directory on your webserver.
26
272) Execute the following.
28
29# log2db.pl <nmap output file> <target file>
30# nmap2html <nmap output file> <target file>
31
32Where <nmap output file> is the file produced by nmap (with the -oM option
33remember), and <target file> is a flat file name that you specify.  <target
34file> is the same for both commands.
35
36This will pour html files into your current directory, so you may want to
37execute nmap2html in a directory that is accesable to your web server.
38
39-= Using with SnortSnarf =-
40
41nmap2html can be used stand-alone or can integrated with the SnortSnarf
42program.  To have snortsnarf.pl generate links to nmap2html output, give it
43the -nmapurl and -nmapdir options.  See that program's documentation for
44more details.
45
46-= Credits =-
47
48[1] Nlog - Author: HD Moore - http://www.secureaustin.com/nlog/
49         - pieces of nlog.pl have been borrowed.
50         - log2db.pl has been borrowed.
51         - nmaplog-dns.pl has been borrowd
52[2] SnortSnarf - Authors: Jim Hoagland, Stuart Staniford -
53    http://www.silicondefense.com/software/snortsnarf/
54
55
56
57
58
59
60
61
62