Changeset 828605
- Timestamp:
- 12/26/2013 09:17:54 AM (12 years ago)
- Location:
- 6scan-protection/trunk
- Files:
-
- 3 edited
-
admin/includes/common.php (modified) (1 diff)
-
modules/signatures/analyzer.php (modified) (2 diffs)
-
modules/signatures/update.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
6scan-protection/trunk/admin/includes/common.php
r825975 r828605 4 4 die( 'No direct access allowed' ); 5 5 6 define ( 'SIXSCAN_VERSION' , '3.0.5. 1' );6 define ( 'SIXSCAN_VERSION' , '3.0.5.2' ); 7 7 define ( 'SIXSCAN_HTACCESS_VERSION' , '1' ); 8 8 -
6scan-protection/trunk/modules/signatures/analyzer.php
r824665 r828605 145 145 */ 146 146 147 $triggered_vuln_type = 'None'; 148 $is_waf_enabled = True; 149 147 150 /* WAF is disabled */ 148 151 if ( in_array( 'waf_global_enable' , $allowed_waf_rules ) == FALSE ) 149 return array('noblock','');152 $is_waf_enabled = False; 150 153 151 154 /* Filter strange requests */ 152 155 if ( sixscan_signatures_analyzer_is_env_flag_on( "sixscanstrangerequest" ) ){ 153 if ( in_array( 'waf_non_standard_req_disable' , $allowed_waf_rules ) ) 154 return array('block',''); 156 if ( in_array( 'waf_non_standard_req_disable' , $allowed_waf_rules ) && $is_waf_enabled ) 157 return array('block', 'non_getpost_request'); 158 else 159 $triggered_vuln_type = 'non_getpost_request'; 155 160 } 156 161 157 162 /* Filter SQL injection */ 158 163 if ( sixscan_signatures_analyzer_is_env_flag_on( "sixscanwafsqli" ) ){ 159 if ( in_array( 'waf_sql_protection_enable' , $allowed_waf_rules ) ) 160 return array('block','sql'); 164 if ( in_array( 'waf_sql_protection_enable' , $allowed_waf_rules ) && $is_waf_enabled ) 165 return array('block', 'sql'); 166 else 167 $triggered_vuln_type = 'sql'; 161 168 } 162 169 163 170 /* Filter Cross Site Scripting */ 164 171 if ( sixscan_signatures_analyzer_is_env_flag_on( "sixscanwafxss" ) ){ 165 if ( in_array( 'waf_xss_protection_enable' , $allowed_waf_rules ) ) 166 return array('block','xss'); 172 if ( in_array( 'waf_xss_protection_enable' , $allowed_waf_rules ) && $is_waf_enabled ) 173 return array('block', 'xss'); 174 else 175 $triggered_vuln_type = 'xss'; 167 176 } 168 177 169 178 /* Filter CSRF on POST */ 170 179 if ( sixscan_signatures_analyzer_is_env_flag_on( "sixscanwafcsrf" ) ){ 171 if ( in_array( 'waf_post_csrf_protection_enable' , $allowed_waf_rules ) ) 172 return array('block','csrf'); 180 if ( in_array( 'waf_post_csrf_protection_enable' , $allowed_waf_rules ) && $is_waf_enabled ) 181 return array('block', 'csrf'); 182 else 183 $triggered_vuln_type = 'csrf'; 173 184 } 174 185 175 186 /* Filter RFI */ 176 187 if ( sixscan_signatures_analyzer_is_env_flag_on( "sixscanwafrfi" ) ){ 177 if ( in_array( 'waf_rfi_protection_enable' , $allowed_waf_rules ) ){178 $allowed_rfi_scripts = array( '/wp-login.php' );188 if ( in_array( 'waf_rfi_protection_enable' , $allowed_waf_rules ) && $is_waf_enabled ){ 189 $allowed_rfi_scripts = array( '/wp-login.php', '/wp-cron.php' ); 179 190 180 191 /* If link is OK to be used with URL as mask */ … … 194 205 && ( sixscan_signatures_analyzer_is_rfi_by_mask( $_SERVER['QUERY_STRING'] , $current_hostname . "/" ) == FALSE ) ) 195 206 196 return array('block', 'rfi');197 198 return array('ignore', '');207 return array('block', 'rfi'); 208 209 return array('ignore', ''); 199 210 } 211 else{ 212 $triggered_vuln_type = 'rfi'; 213 } 200 214 201 215 /* RFI with no exclusions - always blocking */ 202 return array('block','rfi'); 216 return array('block', 'rfi'); 217 } 218 else{ 219 $triggered_vuln_type = 'rfi'; 203 220 } 204 221 } 205 222 206 223 /* Trigger is not blocked */ 207 return array('noblock', '');224 return array('noblock', $triggered_vuln_type); 208 225 } 209 226 ?> -
6scan-protection/trunk/modules/signatures/update.php
r584844 r828605 232 232 233 233 $vuln_urls = "#Broad-spectrum protection: User agent/referrer injections. XSS,RFI and SQLI prevention 234 RewriteCond %{REQUEST_METHOD} ^(OPTIONS| HEAD|PUT|DELETE|TRACE|CONNECT|PATCH|TRACK|DEBUG) [NC]\n";234 RewriteCond %{REQUEST_METHOD} ^(OPTIONS|PUT|DELETE|TRACE|CONNECT|PATCH|TRACK|DEBUG) [NC]\n"; 235 235 236 236 if (sixscan_signatures_is_to_block_non_standard_requests())
Note: See TracChangeset
for help on using the changeset viewer.