Commit Graph

123 Commits

Author SHA1 Message Date
Michael Rash
4880243902 [test suite] added invalid_firewd_input_chain_* files 2014-10-28 21:56:19 -04:00
Michael Rash
58d47cb385 [test suite] additional code coverage for a few areas 2014-10-24 20:39:40 -04:00
Michael Rash
22161af075 [test suite] add ipt_local_nat_fwknopd.conf 2014-10-23 08:39:42 -04:00
Michael Rash
b8f1cf6c6c make sure test suite conf files are included in Makefile.am 2014-10-21 22:49:03 -04:00
Michael Rash
56a6b7dee5 give firewalld its own namespace (can track firewalld changes independently of iptables) 2014-10-21 22:43:21 -04:00
Michael Rash
0af8faa0b3 Merge branch 'udp_listener' into execvpe 2014-10-13 20:25:14 -04:00
Michael Rash
2b5088eb76 [test suite] added use terminal test, fix up Rijndael CMD tests 2014-10-09 16:03:05 -04:00
Michael Rash
ed9e1ac236 added setgid() call for command execution along with CMD_EXEC_GROUP access.conf var 2014-10-07 16:18:14 -04:00
Michael Rash
e6d162215f [test suite] added command execution setuid() 'nobody' test 2014-10-06 22:04:20 -04:00
Michael Rash
dc9e8da702 started on UDP server tests for Rijndael mode 2014-09-28 14:54:40 -04:00
Michael Rash
50434c5c4c Use the fwknop User-Agent for wget SSL external IP resolutions
Bug fix to ensure that a User-Agent string can be specified when the
fwknop client uses wget via SSL to resolve the external IP address. This
closes issue #134 on github reported by Barry Allard. The fwknop now
uses the wget '-U' option to specify the User-Agent string with a
default of "Fwknop/<version>". In addition, a new command line argument
"--use-wget-user-agent" to allow the default wget User-Agent string to
apply instead.
2014-09-27 23:23:12 -04:00
stubbsw
2c0606f2b8 pcap of spa with Ethernet FCS
Captured with:
tcpdump -i eth0 -l -nn -s 0 -w fcs_spa.pcap udp port 62201

Generated remotely with:
LD_LIBRARY_PATH=./lib/.libs ./client/.libs/fwknop -A tcp/22 -a 127.0.0.2
-D 192.168.18.11 --no-save-args --verbose --verbose --rc-file
./test/conf/fwknoprc_default_hmac_base64_key
2014-08-21 07:04:55 -04:00
Michael Rash
655abf6f0b [test suite] WGET_CMD and RESOLVE_HTTP_ONLY fwknoprc test coverage 2014-07-28 09:46:08 -04:00
Michael Rash
7f830e0239 revert gpg trustdb.gpg update from test suite 2014-07-28 09:37:50 -04:00
Michael Rash
b06447384e [client] have autoconf resolve the absolute path to wget for SSL IP resolution 2014-07-27 22:03:58 -04:00
Michael Rash
59718f1a36 [client] Updated IP resolution mode -R to use SSL
External IP resolution via '-R' (or '--resolve-ip-http') is now done via SSL by
default. The IP resolution URL is now 'https://www.cipherdyne.org/cgi-gin/myip',
and a warning is generated in '-R' mode whenever a non-HTTPS URL is specified
(it is safer just to use the default). The fwknop client leverages 'wget' for
this operation since that is cleaner than having fwknop link against an SSL
library.
2014-07-25 17:42:06 -04:00
Michael Rash
7e1346c49a [test suite] add variable expansion and fwknopd override tests 2014-07-08 16:31:06 -05:00
Michael Rash
f0285ae2b5 [test suite] add invalid gpg sig ID list 2014-07-04 20:05:54 -04:00
Michael Rash
ffa77a9e54 [test suite] add GPG_DISABLE_SIG test 2014-07-04 19:54:56 -04:00
Michael Rash
a2ff2a396c [server] call clean_exit() upon check_dir_path() error 2014-07-03 10:31:30 -04:00
Michael Rash
43b770320a [server] Require sig ID's or fingerprints when sigs are validated
When validating access.conf stanzas make sure that one of
GPG_REMOTE_ID or GPG_FINGERPRINT_ID is specified whenever GnuPG
signatures are to be verified for incoming SPA packets. Signature
verification is the default, and can only be disabled with
GPG_DISABLE_SIG but this is NOT recommended.
2014-06-30 11:52:42 -04:00
Michael Rash
77384a904e [server] add access.conf variable GPG_FINGERPRINT_ID
Add a new GPG_FINGERPRINT_ID variable to the access.conf file
so that full GnuPG fingerprints can be required for incoming SPA packets
in addition to the appreviated GnuPG signatures listed in GPG_REMOTE_ID.
From the test suite, an example fingerprint is

GPG_FINGERPRINT_ID            00CC95F05BC146B6AC4038C9E36F443C6A3FAD56
2014-06-30 11:11:09 -04:00
Michael Rash
e41e0f5aaf [test suite] added iptables OUTPUT chain test 2014-06-24 22:54:27 -04:00
Michael Rash
2e150d47a7 restore trustdb.gpg files 2014-05-26 23:06:14 -04:00
Michael Rash
2697bd260c [test suite] fix LD_LIBRARY_PATH for fiu-run execution against fko-wrapper binaries 2014-05-26 22:53:44 -04:00
Michael Rash
0a82c68451 [test suite] add hmac_fuzzing_access.conf file 2014-05-23 18:50:47 -04:00
Michael Rash
fb21e3a575 [server] bug fix to handle SPA packets via http 2014-04-29 23:25:31 -04:00
Michael Rash
6dde30bc91 [test suite] significant test coverage update
This commit adds a lot of test coverage support as guided by gcov +
lcov.

Also added the --no-ipt-check-support option to fwknopd (this is only
useful in practice on older Linux distros where 'iptables -C' is not
available, but it helps with test coverage).
2014-04-29 20:54:01 -04:00
Michael Rash
9901d8a76a [libfko/test suite] add the FUZZING_INTERFACES macro
Add a new fko_set_encoded_data() function gated by #define
FUZZING_INTERFACES to allow encryption and authentication to be bypassed
for fuzzing purposes (and only fuzzing purposes).  The fko-wrapper code
has been extended to process data in the
test/fko-wrapper/fuzz_spa_payloads file, which is created by the new
python fuzzer.  Typical workflow is:

$ cd test/fko-wrapper
$ ../spa_fuzzer.py > fuzz_spa_payloads
$ make fuzzing

(as root):

./test-fwknop.pl  --enable-profile-coverage --enable-fuzzing-interfaces --enable-all --include wrapper

[+] Starting the fwknop test suite...

    args: --enable-profile-coverage --enable-fuzzing-interfaces --enable-all --include wrapper

    Saved results from previous run to: output.last/

    Valgrind mode enabled, will import previous coverage from:
        output.last/valgrind-coverage/

[+] Total test buckets to execute: 2

[Rijndael] [fko-wrapper] multiple libfko calls (with valgrind)......pass (1)
[Rijndael] [fko-wrapper] multiple libfko calls......................pass (2)
[profile coverage] gcov profile coverage............................pass (3)
[valgrind output] [flagged functions] ..............................pass (4)

    Run time: 5.85 minutes

[+] 0/0/0 OpenSSL tests passed/failed/executed
[+] 0/0/0 OpenSSL HMAC tests passed/failed/executed
[+] 4/0/4 test buckets passed/failed/executed
2014-04-26 23:04:44 -04:00
Michael Rash
67dd1d5bdd [server] bug fix to allow IP-formatted masks for SOURCE lines in access.conf 2014-04-12 15:21:00 -04:00
Michael Rash
2da2704d4c [test suite] fwknoprc GPG tests, more time offset tests 2014-04-03 19:30:58 -04:00
Michael Rash
3ca546092b [test suite] additional rc file code coverage tests 2014-03-29 22:23:45 -04:00
Michael Rash
22b1b2d9d2 [test suite] additional client/config_init.c code coverage test for fwknoprc file parsing 2014-03-29 21:44:24 -04:00
Michael Rash
73bc473563 [client+server] verify GnuPG signatures by default
- [server] When GnuPG is used, the default now is to require that
incoming SPA packets are signed by a key listed in GPG_REMOTE_ID for each
access.conf stanza. In other words, the usage of GPG_REQUIRE_SIG
is no longer necessary in order to authenticate SPA packets via the
GnuPG signature. Verification of GnuPG signatures can be disabled with a
new access.conf variable GPG_DISABLE_SIG, but this is NOT a
recommended configuration.
- [client+server] Add --gpg-exe command line argument and GPG_EXE
config variable to ~/.fwknoprc and the access.conf file so that the path
to GnuPG can be changed from the default /usr/bin/gpg path.
2014-03-25 19:53:13 -04:00
Michael Rash
ad512ff6e7 [test suite] added Rijndael+HMAC SPOOF_SRC fwknoprc file test 2014-03-13 21:43:51 -04:00
Michael Rash
4181b43f55 [test suite] Added Rijndael+HMAC NAT rand port via client rc file test 2014-03-13 20:10:26 -04:00
Michael Rash
83595bdabb [test suite] Added Rijndael+HMAC command execution test 2014-03-13 19:40:47 -04:00
Michael Rash
873b06b422 [test suite] added portrange bpf filter test 2014-02-07 07:49:50 -05:00
Michael Rash
509dcf93dd [android] added HMAC test along with non-legacy Rijndael test 2013-12-23 23:15:11 -05:00
Michael Rash
aeed8323f7 [test suite] multi-packet pcap test for pcap_dispatch() validation
This commit adds a new pcap file to the test suite with an SPA packet after
99 other garbage packets.  This can be used for pcap_dispatch() testing,
though this is not meant to be super instensive - it is just to ensure that
if a PCAP_DISPATCH_COUNT of, say, 10 is selected that the SPA is still seen
by fwknopd.  This commit is in support of #110.
2013-12-10 21:56:20 -06:00
Michael Rash
0319b72334 [test suite] added missing config files 2013-12-05 23:01:12 -05:00
Michael Rash
c04efc20dd [test suite] added Rijndael HMAC digest mismatch tests 2013-08-10 15:45:51 -04:00
Michael Rash
dfc2a06547 [test suite] added Rijndael HMAC + RAND_PORT test 2013-08-10 14:27:10 -04:00
Michael Rash
4775327d98 [test suite] added two GnuPG HMAC SHA512 tests 2013-08-10 13:54:03 -04:00
Michael Rash
05e7d52a5f [client] merged --stanza-list changes from Franck, closes #94 2013-08-08 20:54:07 -04:00
Michael Rash
870a08c9f5 [test suite] added invalid IPT input chain specification tests 2013-08-04 21:22:35 -04:00
Michael Rash
0200169dfd [test suite] started on SNAT tests 2013-08-03 13:36:32 -04:00
Franck Joncourt
836921a9ea * Added new test to validate --stanza-list 2013-07-30 22:54:10 +02:00
Michael Rash
dac75c0242 [server] restore backwards compatibility for Rijndael keys > 16 bytes in legacy mode by truncating (upgrading recommended of course) 2013-07-14 15:37:24 -04:00
Michael Rash
13626a2a74 [test suite] added tests for KEY synonym GPG_SIGNING_PW 2013-06-19 23:41:37 -04:00