Commit Graph

99 Commits

Author SHA1 Message Date
Michael Rash
5daaca01ea merged master 2.0.3 changes 2012-08-31 21:43:55 -04:00
Michael Rash
4832312e6d added filesystem permissions test 2012-08-29 23:12:56 -04:00
Michael Rash
a60f05ad44 file permissions and client buffer overflow fix
- [client+server] Fernando Arnaboldi from IOActive found that strict
filesystem permissions for various fwknop files are not verified.  Added
warnings whenever permissions are not strict enough, and ensured that
files created by the fwknop client and server are only set to user
read/write.
- [client] Fernando Arnaboldi from IOActive found a local buffer overflow
in --last processing with a maliciously constructed ~/.fwknop.run file.
This has been fixed with proper validation of .fwknop.run arguments.
2012-08-29 22:21:43 -04:00
Michael Rash
557cd6615b consolidatd fuzzing functions within a single 'fuzzer' function 2012-08-26 15:46:54 -04:00
Michael Rash
f4c16bc47f [server] Stronger IP validation based on a bug found by Fernando Arnaboldi from IOActive
This commit fixes a condition in which the server did not properly validate
allow IP addresses from malicious authenticated clients.  This has been fixed
with stronger allow IP validation.
2012-08-25 23:08:55 -04:00
Michael Rash
d46ba1c027 (Fernando Arnaboldi, IOActive) Found and fixed several DoS/code execution vulns for authenticated clients
- [server] Fernando Arnaboldi from IOActive found several DoS/code
execution vulnerabilities for malicious fwknop clients that manage to
get past the authentication stage (so a such a client must be in
possession of a valid access.conf encryption key).  These vulnerbilities
manifested themselves in the handling of malformed access requests, and
both the fwknopd server code along with libfko now perform stronger input
validation of access request data.  These vulnerabilities affect
pre-2.0.3 fwknop releases.
- [test suite] Added a new fuzzing capability to ensure proper server-side
input validation.  Fuzzing data is constructed with modified fwknop
client code that is designed to emulate malicious behavior.
2012-08-24 22:12:19 -04:00
Michael Rash
8d6bc05295 merged from master 2012-08-17 21:19:52 -04:00
Michael Rash
760162a40a ipfw active/expire test bug fix (atoi() for config vars) 2012-08-16 22:30:09 -04:00
Michael Rash
3afd1aa762 [server] ipfw active/expire sets cannot be the same 2012-08-16 22:16:36 -04:00
Michael Rash
385396b845 Added --enable-distcheck for 'make distcheck' verification 2012-08-13 22:53:29 -04:00
Michael Rash
47795d41e2 merged from master 2012-08-10 22:30:07 -04:00
Michael Rash
27ccfe35d3 [server] Added GPG_ALLOW_NO_PW variable and associated test suite support
For GPG mode, added a new access.conf variable "GPG_ALLOW_NO_PW" to make it
possible to leverage a server-side GPG key pair that has no associated
password.  This comes in handy when a system requires the user to leverage
gpg-agent / pinentry which can present a problem in automated environments as
required by the fwknopd server.  Now, it might seem like a problem to remove
the passphrase from a GPG key pair, but it's important to note that simply
doing this is little worse than storing the passphrase in the clear on disk
anyway in the access.conf file.  Further, this link help provides additional
detail:

http://www.gnupg.org/faq/GnuPG-FAQ.html#how-can-i-use-gnupg-in-an-automated-environment
2012-08-10 22:20:30 -04:00
Michael Rash
eb5176cf60 [test suite] added --enable-all arg 2012-08-03 21:20:21 -04:00
Michael Rash
f7084721b7 added 'altered HMAC' tests to ensure HMAC verification happens properly 2012-08-02 23:24:38 -04:00
Michael Rash
b8ed3a60d9 excluded HMAC random verification from --enable-valgrind mode (too slow for 100 client executions) 2012-08-02 21:56:45 -04:00
Michael Rash
1528697aaa merged replay prefix and IP resolve tests 2012-08-01 23:05:51 -04:00
Michael Rash
5fd3343ca9 added client IP resolution test with complete SPA->SSH cycle 2012-08-01 22:30:02 -04:00
Michael Rash
016098a254 Replay attack bug fix (encryption prefixes)
Ensure that an attacker cannot force a replay attack by intercepting an
SPA packet and the replaying it with the base64 version of "Salted__"
(for Rindael) or the "hQ" prefix (for GnuPG).  This is an important fix.
The following comment was added into the fwknopd code:

/* Ignore any SPA packets that contain the Rijndael or GnuPG prefixes
 * since an attacker might have tacked them on to a previously seen
 * SPA packet in an attempt to get past the replay check.  And, we're
 * no worse off since a legitimate SPA packet that happens to include
 * a prefix after the outer one is stripped off won't decrypt properly
 * anyway because libfko would not add a new one.
*/

Conflicts:

	lib/cipher_funcs.h
2012-08-01 21:52:56 -04:00
Michael Rash
a8bb42569c [test suite] minor compile bug fix 2012-07-29 23:35:32 -04:00
Michael Rash
afc71b7df3 Replay attack bug fix (encryption prefixes)
Ensure that an attacker cannot force a replay attack by intercepting an
SPA packet and the replaying it with the base64 version of "Salted__"
(for Rindael) or the "hQ" prefix (for GnuPG).  This is an important fix.
The following comment was added into the fwknopd code:

/* Ignore any SPA packets that contain the Rijndael or GnuPG prefixes
 * since an attacker might have tacked them on to a previously seen
 * SPA packet in an attempt to get past the replay check.  And, we're
 * no worse off since a legitimate SPA packet that happens to include
 * a prefix after the outer one is stripped off won't decrypt properly
 * anyway because libfko would not add a new one.
*/
2012-07-29 23:31:15 -04:00
Michael Rash
a9cbd60327 [libfko] first HMAC-SHA256 implementation (includes test suite support) 2012-07-29 21:34:08 -04:00
Michael Rash
b760f4aad3 [test suite] exempted valgrind collection test from --test-limit 2012-07-27 23:59:03 -04:00
Michael Rash
a6ea3f6935 [test suite] minor bug fix for file existence check 2012-07-27 18:08:23 -04:00
Michael Rash
d0cb2c6ad5 [test suite] added 100 key uniqueness test for --key-gen mode 2012-07-27 13:30:29 -04:00
Michael Rash
ab52476bfc [test suite] [client] added --key-gen and --key-gen-file tests 2012-07-27 13:05:29 -04:00
Michael Rash
3f05a6d25a [test suite] added sha384 and digest type arg tests 2012-07-26 14:53:45 -04:00
Michael Rash
4f1c5b55a4 [test suite] added --test-limit argument 2012-07-26 12:52:25 -04:00
Michael Rash
661991b747 complete cycle tests for client-set digest types 2012-07-26 04:09:06 -04:00
Michael Rash
c51a85523f Added valgrind individual test diff results.
A new output/valgrind-coverage directory was added to test suite results, and valgrind
output is compared in --diff mode using data in this directory.
2012-07-25 23:38:41 -04:00
Michael Rash
5043683739 [test suite] bug fix after merge to account for new file_find_regex() API 2012-07-24 17:50:17 -04:00
Michael Rash
175374337d merged crypto_update after fwknop-2.0.1 merge to crypto_update from master 2012-07-24 17:10:00 -04:00
Michael Rash
c6b674617c completed merge from master after fwknop-2.0.1 release 2012-07-24 16:19:48 -04:00
Michael Rash
4c25aa17f3 [test suite] minor filename update -> use config files for fwknopd in a hash 2012-07-20 21:16:13 -04:00
Michael Rash
c0aa346890 [test suite] minor hostname bugfix to get 'local NAT' test to work 2012-07-18 22:55:56 -04:00
Michael Rash
72aaeb893e [test suite] better fwknopd is running check 2012-07-18 22:32:16 -04:00
Michael Rash
71fc4fe7fe [test suite] file_find_regex() postive vs. negative match styles
Positive match style requires all regex's to be found, whereas negative match
style only requires seeing one regex.
2012-07-17 21:55:13 -04:00
Michael Rash
6c73e160d9 Ensure that INPUT rules are added in --nat-local mode
This change ensures that INPUT rules are added when the fwknop client is used to
request access to a local service with --nat-local mode.
2012-07-17 21:50:29 -04:00
Michael Rash
981059452b minor file_find_regex() logging prefix update 2012-07-16 22:05:15 -04:00
Michael Rash
1b9f847521 [test suite] added local_nat_fwknopd.conf file for local NAT tests 2012-07-16 21:43:28 -04:00
Michael Rash
de7aa3b619 Add INPUT ACCEPT rule for --nat-local connections
When using the --nat-local argument on the fwknop client command line, the
fwknopd server needs to add an INPUT ACCEPT rule for the requested access
since the incoming connection is destined for a local socket.  Added test
suite support to test --nat-local access.

[test suite] Minor bug fix to ensure that all file_find_regex() calls return
true if all regex's are matched and false if any regex does not match data in
the specified file.
2012-07-15 21:32:14 -04:00
Michael Rash
e250776107 [test suite] Bug fix to account for libfko.dylib extension
Richard Haas reported the test suite failing on Mac OS X systems with the
existence check for the libfko library.  Damien Stuart advised that the library
has a different extention '.dylib' on Mac OS X, so this change accounts for the
difference.
2012-07-12 22:11:35 -04:00
Michael Rash
d7c4572521 merged test suite changes from the crypto_update branch 2012-07-10 22:03:56 -04:00
Michael Rash
e5004dc829 Merge branch 'master' into crypto_update 2012-07-10 08:23:16 -04:00
Michael Rash
4d39140148 [test suite] minor directory path bug fix for --diff mode 2012-07-09 22:05:57 -04:00
Michael Rash
dc8a034a4d merged usage() information from master 2012-07-08 22:00:13 -04:00
Michael Rash
bc2e41fd47 added unique function names to --enable-valgrind suspect functions test 2012-07-08 21:21:36 -04:00
Michael Rash
9497044f24 added new test in --enable-valgrind mode to collect suspect functions 2012-07-08 15:30:35 -04:00
Michael Rash
6b3e5ef3c2 Added a test for a dual-usage key in access.conf 2012-07-08 08:35:50 -04:00
Michael Rash
92e403a242 added initial HMAC-SHA256 support for the client side 2012-07-02 23:50:45 -04:00
Michael Rash
3095f0ee43 Added key generation support with --key-gen
Added --key-gen to allow KEY_BASE64 and HMAC_KEY_BASE64 keys to be created from
reading random data from /dev/random.  These keys can be placed within server
access.conf files and corresponding client .fwknoprc files for SPA
communications.  The HMAC key is not used yet with this commit, but that is
coming.
2012-06-27 23:06:17 -04:00