Commit a2897223 authored by Mati's avatar Mati

Imported Upstream version 2.10b

parents
This diff is collapsed.
This diff is collapsed.
#
# skipfish - Makefile
# -------------------
#
# Author: Michal Zalewski <lcamtuf@google.com>,
# Niels Heinen <heinenn@google.com>
#
# Copyright 2009, 2010, 2011 by Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
PROGNAME = skipfish
VERSION = 2.10b
SRCDIR = src
SFILES = http_client.c database.c crawler.c analysis.c report.c \
checks.c signatures.c auth.c options.c
IFILES = alloc-inl.h string-inl.h debug.h types.h http_client.h \
database.h crawler.h analysis.h config.h report.h \
checks.h signatures.h auth.h options.h
OBJFILES = $(patsubst %,$(SRCDIR)/%,$(SFILES))
INCFILES = $(patsubst %,$(SRCDIR)/%,$(IFILES))
CFLAGS_GEN = -Wall -funsigned-char -g -ggdb -I/usr/local/include/ \
-I/opt/local/include/ $(CFLAGS) -DVERSION=\"$(VERSION)\"
CFLAGS_DBG = -DLOG_STDERR=1 -DDEBUG_ALLOCATOR=1 \
$(CFLAGS_GEN)
CFLAGS_OPT = -O3 -Wno-format $(CFLAGS_GEN)
LDFLAGS += -L/usr/local/lib/ -L/opt/local/lib
LIBS += -lcrypto -lssl -lidn -lz -lpcre
all: $(PROGNAME)
$(PROGNAME): $(SRCDIR)/$(PROGNAME).c $(OBJFILES) $(INCFILES)
$(CC) $(LDFLAGS) $(SRCDIR)/$(PROGNAME).c -o $(PROGNAME) \
$(CFLAGS_OPT) $(OBJFILES) $(LIBS)
@echo
@echo "See doc/dictionaries.txt to pick a dictionary for the tool."
@echo
@echo "Having problems with your scans? Be sure to visit:"
@echo "http://code.google.com/p/skipfish/wiki/KnownIssues"
@echo
debug: $(SRCDIR)/$(PROGNAME).c $(OBJFILES) $(INCFILES)
$(CC) $(LDFLAGS) $(SRCDIR)/$(PROGNAME).c -o $(PROGNAME) \
$(CFLAGS_DBG) $(OBJFILES) $(LIBS)
@echo
@echo "The debug build prints runtime information to stderr. You"
@echo "probably want to redirect this output to a file. like:"
@echo
@echo " $ ./skipfish [.option.] 2> debug.log"
@echo
clean:
rm -f $(PROGNAME) *.exe *.o *~ a.out core core.[1-9][0-9]* *.stackdump \
LOG same_test
rm -rf tmpdir
same_test: $(SRCDIR)/same_test.c $(OBJFILES) $(INCFILES)
$(CC) $(SRCDIR)/same_test.c -o same_test $(CFLAGS_DBG) $(OBJFILES) $(LDFLAGS) \
$(LIBS)
publish: clean
cd ..; rm -rf skipfish-$(VERSION); \
cp -pr skipfish-release skipfish-$(VERSION); \
tar cfvz ~/www/skipfish.tgz skipfish-$(VERSION); \
chmod 644 ~/www/skipfish.tgz
This diff is collapsed.
Icons used in HTML reports are copyrighted by the Crystal Project, and
distributed under terms and conditions of the GNU Lesser General Public
License. See http://www.everaldo.com/crystal/ for details.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
This diff is collapsed.
######################################
## Reporting options
##################################
# Output to this directory
output = CHANGEME
# Toggle mixed content reporting
log-mixed-content = false
# Toggle logging of all external URLs
log-external-urls = false
# Enable extra cache related logging
log-cache-mismatches = false
# Turn off console statistics reporting
#quiet = false
# Increase verbosity of runtime reporting
#verbose = false
######################################
## Crawler user agent options
##################################
# Pretend that 'domain' resolves to 'IP'
#host = domain=IP
# Specify header values that will be send with every request
#header = headername=value
#header = X-Scanner=skipfish
# Specify which one of the pre-defined user agents to use (i|p|f).
user-agent = i
# Set cookie value and send it with every request
#cookie = name1=value1
#cookie = name2=value3
# Reject any new cookies
reject-cookies = false
######################################
## Authentication options
##################################
# Specify the location of the login form
#auth-form = http://example.org/login.php
# Specify the username and password that you want to authenticate
# with. It's advised to use throw away (test) accounts.
#auth-user = myuser
#auth-pass = mypass
# Specify the credential field names when not detected by skipfish.
#auth-user-field = user-field-name
#auth-pass-field = pass-field-name
# The URL to test is the scan is authenticated.
#auth-verify-url = http://example.org/show-profile.php
# In some cases, you might have to specify the location to which the
# form data has to be submitted.
#auth-form-target
# Specify credentials for basic HTTP authentication
#auth = user:pass
######################################
## Crawler scope / depth options
##################################
# Maximum crawl tree depth
max-crawl-depth = 16
# Maximum children to index per node
max-crawl-child = 512
# Maximum descendants to index per branch
max-crawl-descendants = 8192
# Max total number of requests to send
max-request-total = 100000000
# Max requests per second
#max-request-rate = 200
# Node and link crawl probability
crawl-probability = 100
# Repeat probabilistic scan with given seed
#seed = 0xXXXXXX
# Only follow URLs matching 'string'
#include-string = /want/
# Exclude URLs matching 'string'
#exclude-string = /want-not/
# Crawl cross-site links to another domain
#include-domain = scan.also.example.org
# Trust, but do not crawl, another domain
#trust-domain = .google-analytics.com
# Do not parse HTML, etc, to find new links
#no-html-parsing = false
# Do not descend into 5xx locations
skip-error-pages = false
# Add new form auto-fill rule
#form-value = field=value
######################################
## Dictionary management
##################################
# The read-only wordlist that is used for bruteforcing
wordlist = dictionaries/medium.wl
# The read-write wordlist and where learned keywords will be written
# for future scans.
#rw-wordlist = my-wordlist.wl
# Disable extension fuzzing
no-extension-brute = false
# Disable keyword learning
no-keyword-learning = false
######################################
## Performance options
##################################
# Max simultaneous TCP connections, global
max-connections = 40
# Max simultaneous connections, per target IP
max-host-connections = 10
# Max number of consecutive HTTP errors
max-failed-requests = 100
# Total request response timeout
request-timeout = 20
# Individual network I/O timeout
network-timeout = 10
# Timeout on idle HTTP connections
idle-timeout = 10
# Response size limit in bytes
response-size = 400000
# Do not keep binary responses for reporting
discard-binary = true
# Flush request / response data immediately to disk
flush-to-disk = false
# Stop scanning after the given duration h:m:s
#scan-timeout = h:m:s
######################################
## Detection / inject options
##################################
# Specify the signatures file location. To disable signatures, specify /dev/null.
signatures = signatures/signatures.conf
# Enable or disable specific injection tests
#checks-toggle
# Disable all injection tests which means the scan will focus on crawling,
# bruteforcing and passively detect security issues via signatures.
no-injection-tests = false
# Ignore this parameter in the scan
#skip-parameter = search
# Do not submit forms
no-form-submits = false
This diff is collapsed.
#ro
e 1 1 1 7z
e 1 1 1 as
e 1 1 1 asmx
e 1 1 1 asp
e 1 1 1 aspx
e 1 1 1 bak
e 1 1 1 bat
e 1 1 1 bin
e 1 1 1 bz2
e 1 1 1 c
e 1 1 1 cc
e 1 1 1 cfg
e 1 1 1 cfm
e 1 1 1 cgi
e 1 1 1 class
e 1 1 1 cnf
e 1 1 1 conf
e 1 1 1 config
e 1 1 1 core
e 1 1 1 cpp
e 1 1 1 cs
e 1 1 1 csproj
e 1 1 1 csv
e 1 1 1 dat
e 1 1 1 db
e 1 1 1 dll
e 1 1 1 do
e 1 1 1 doc
e 1 1 1 dump
e 1 1 1 ep
e 1 1 1 err
e 1 1 1 error
e 1 1 1 exe
e 1 1 1 fcgi
e 1 1 1 gif
e 1 1 1 gz
e 1 1 1 htm
e 1 1 1 html
e 1 1 1 inc
e 1 1 1 ini
e 1 1 1 jar
e 1 1 1 java
e 1 1 1 jhtml
e 1 1 1 jpg
e 1 1 1 js
e 1 1 1 jsf
e 1 1 1 jsp
e 1 1 1 key
e 1 1 1 lib
e 1 1 1 log
e 1 1 1 lst
e 1 1 1 manifest
e 1 1 1 mdb
e 1 1 1 meta
e 1 1 1 msg
e 1 1 1 nsf
e 1 1 1 o
e 1 1 1 old
e 1 1 1 ora
e 1 1 1 orig
e 1 1 1 out
e 1 1 1 part
e 1 1 1 pdf
e 1 1 1 pem
e 1 1 1 pfx
e 1 1 1 php
e 1 1 1 php3
e 1 1 1 phtml
e 1 1 1 pl
e 1 1 1 pm
e 1 1 1 png
e 1 1 1 ppt
e 1 1 1 properties
e 1 1 1 py
e 1 1 1 rar
e 1 1 1 rb
e 1 1 1 rhtml
e 1 1 1 rss
e 1 1 1 rtf
e 1 1 1 save
e 1 1 1 sh
e 1 1 1 shtml
e 1 1 1 so
e 1 1 1 sql
e 1 1 1 stackdump
e 1 1 1 svn-base
e 1 1 1 swf
e 1 1 1 tar
e 1 1 1 tar.bz2
e 1 1 1 tar.gz
e 1 1 1 temp
e 1 1 1 test
e 1 1 1 tgz
e 1 1 1 tmp
e 1 1 1 tpl
e 1 1 1 trace
e 1 1 1 txt
e 1 1 1 vb
e 1 1 1 vbs
e 1 1 1 war
e 1 1 1 ws
e 1 1 1 xls
e 1 1 1 xml
e 1 1 1 xsl
e 1 1 1 xslt
e 1 1 1 yml
e 1 1 1 zip
This diff is collapsed.
This diff is collapsed.
This document describes 3 different methods you can use to run
authenticated skipfish scans.
1) Form authentication
2) Cookie authentication
3) Basic HTTP authentication
-----------------------
1. Form authentication
----------------------
With form authentication, skipfish will submit credentials using the
given login form. The server is expected to reply with authenticated
cookies which will than be used during the rest of the scan.
An example to login using this feature:
$ ./skipfish --auth-form http://example.org/login \
--auth-user myuser \
--auth-pass mypass \
--auth-verify-url http://example.org/profile \
[...other options...]
This is how it works:
1. Upon start of the scan, the authentication form at /login will be
fetched by skipfish. We will try to complete the username and password
fields and submit the form.
2. Once a server response is obtained, skipfish will fetch the
verification URL twice: once with the new session cookies and once
without any cookies. Both responses are expected to be different.
3. During the scan, the verification URL will be used many times to
test whether we are authenticated. If at some point our session has
been terminated server-side, skipfish will re-authenticate using the
--auth-form (/login in our example) .
Verifying whether the session is still active requires a good verification
URL where an authenticated request is going to get a different response
than an anonymous request. For example a 'profile' or 'my account' page.
Troubleshooting:
----------------
1. Login field names not recognized
If the username and password form fields are not recognized, skipfish
will complain. In this case, you should specify the field names using
the --auth-user-field and --auth-pass-field flags.
2. The form is not submitted to the right location
If the login form doesn't specify an action="" location, skipfish
will submit the form's content to the form URL. This will fail in some
occasions. For example, when the login page uses Javascript to submit
the form to a different location.
Use the --auth-form-target flag to specify the URL where you want skipfish
to submit the form to.
3. Skipfish keeps getting logged out
Make sure you blacklist any URLs that will log you out. For example,
using the " -X /logout"
-------------------------
2. Cookie authentication
-------------------------
Alternatively, if the site relies on HTTP cookies you can also feed these
to skipfish manually. To do this log in using your browser or using a
simple curl script, and then provide skipfish with a session cookie:
$ ./skipfish -C name=val [...other options...]
Other session cookies may be passed the same way, one per each -C option.
The -N option, which causes new cookies to be rejected by skipfish,
is almost always a good choice when running cookie authenticated scans
(e.g. to avoid your precious cookies from being overwritten).
$ ./skipfish -N -C name=val [...other options...]
-----------------------------
3. Basic HTTP authentication
-----------------------------
For simple HTTP credentials, you can use the -A option to pass the
credentials.
$ ./skipfish -A user:pass [...other options...]
This diff is collapsed.
-----------------
1. Introduction
-----------------
With skipfish signatures it is possible to find interesting content,
or even vulnerabilities, in server responses. The signatures follow
a Snort-like syntax and most keywords behave similarly as well.
Signatures focus on detecting web application vulnerabilities, information
leaks and can recognize interesting web applications, such as phpmyadmin
or phpinfo() pages.
Signatures could also detect vulnerable software packages (e.g. old
WordPress instances) but this is a task that fits vulnerability scanners,
like Nessus and Nikto, better.
-----------------
2. Contributing
-----------------
The current signature list is nice but far from complete. If you have
new signatures or can optimize existing ones, please help out by reporting
this via our issue tracker:
https://code.google.com/p/skipfish/issues/entry?template=Content%20signatures
-----------------------