forked from EnableSecurity/wafw00f
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python | ||
|
||
|
||
NAME = 'Citrix NetScaler' | ||
|
||
|
||
def is_waf(self): | ||
""" | ||
First checks if a cookie associated with Netscaler is present, | ||
if not it will try to find if a "Cneonction" or "nnCoection" is returned | ||
for any of the attacks sent | ||
""" | ||
# NSC_ and citrix_ns_id come from David S. Langlands <dsl 'at' surfstar.com> | ||
if self.matchcookie('^(ns_af=|citrix_ns_id|NSC_)'): | ||
return True | ||
if self.matchheader(('Cneonction', 'close'), attack=True): | ||
return True | ||
if self.matchheader(('nnCoection', 'close'), attack=True): | ||
return True | ||
if self.matchheader(('Via', 'NS-CACHE'), attack=True): | ||
return True | ||
if self.matchheader(('x-client-ip', '.'), attack=True): | ||
return True | ||
if self.matchheader(('Location', '\/vpn\/index\.html')): | ||
return True | ||
if self.matchcookie('^pwcount'): | ||
return True | ||
return False |