add ALLOW_ANY_USER_AGENT to ignore incoming User-Agent strings in SPA packets over HTTP, closes #296

This commit is contained in:
Michael Rash
2019-03-11 21:56:21 -07:00
parent 2857a9cb1b
commit fb69921fdd
11 changed files with 61 additions and 5 deletions
Binary file not shown.
@@ -0,0 +1,2 @@
ENABLE_SPA_OVER_HTTP Y;
ALLOW_ANY_USER_AGENT Y;
+2
View File
@@ -45,6 +45,7 @@ our $multi_pkts_pcap_file = "$conf_dir/multi_pkts.pcap";
our $fcs_pcap_file = "$conf_dir/fcs_spa.pcap";
our $spa_over_http_pcap_file = "$conf_dir/spa_over_http.pcap";
our $spa_x_forwarded_for_pcap_file = "$conf_dir/spa_x_forwarded_for.pcap";
our $spa_allow_any_user_agent_pcap_file = "$conf_dir/spa_allow_any_user_agent.pcap";
our $lib_dir = '../lib/.libs';
@@ -637,6 +638,7 @@ our %cf = (
'udp_server' => "$conf_dir/udp_server_fwknopd.conf",
'spa_over_http' => "$conf_dir/spa_over_http_fwknopd.conf",
'spa_x_forwarded_for' => "$conf_dir/spa_x_forwarded_for_fwknopd.conf",
'spa_allow_any_user_agent' => "$conf_dir/spa_allow_any_user_agent_fwknopd.conf",
'tcp_pcap_filter' => "$conf_dir/tcp_pcap_filter_fwknopd.conf",
'icmp_pcap_filter' => "$conf_dir/icmp_pcap_filter_fwknopd.conf",
'open_ports_access' => "$conf_dir/open_ports_access.conf",
+13
View File
@@ -611,6 +611,19 @@
"--verbose --verbose --verbose",
'server_positive_output_matches' => [qr/Added access rule.*\sfor 1.2.3.4/],
},
{
'category' => 'Rijndael+HMAC',
'subcategory' => 'server',
'detail' => '--pcap-file any User-Agent',
'function' => \&process_pcap_file_directly,
'cmdline' => '',
'fwknopd_cmdline' => "$fwknopdCmd -c $cf{'spa_allow_any_user_agent'} -a $cf{'hmac_access'} " .
"-d $default_digest_file -p $default_pid_file " .
"--pcap-file $spa_allow_any_user_agent_pcap_file --foreground $verbose_str " .
"--pcap-filter 'port 80' " .
"--verbose --verbose --verbose",
'server_positive_output_matches' => [qr/Added access rule.*\sfor 1.2.3.4/],
},
{
'category' => 'Rijndael+HMAC',