-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
molecule testing, multiple fixes, fingerprinting docs
- Loading branch information
1 parent
ab28229
commit 37e69ee
Showing
26 changed files
with
614 additions
and
125 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# HAProxy Fingerprinting | ||
|
||
We are only dealing with server-side fingerprinting. | ||
|
||
This kind of fingerprinting only has a very limited set of information to work with - including: | ||
|
||
* TCP data | ||
* SSL data | ||
* HTTP data | ||
|
||
If you want to have a fingerprint that is unique for each client that connects, you might want to look into implementing [Client-side fingerprinting](https://wiki.superstes.eu/en/latest/1/infra/waf.html#client-side-fingerprint) in your web application frontend. | ||
|
||
Check out my [WAF Docs](https://wiki.superstes.eu/en/latest/1/infra/waf.html) for more details. | ||
|
||
## SSL Fingerprint (JA3) | ||
|
||
This fingerprint will be the same for every HTTP client. Per example: Chrome 118.1.1 will have the same one - no matter were it comes from. This can be pretty useful to track/recognize a distributed attack. | ||
|
||
You may not want to use this kind of fingerprint for blocking clients. But it can be combined with other data to limit the block-scope. | ||
|
||
If you enable `security.fingerprint_ssl` you can reference it using the variables: | ||
|
||
* `var(txn.fingerprint_ssl)` => MD5 hash of JA3 fingerprint | ||
* `var(txn.fingerprint_ssl_raw)` => raw JA3 fingerprint |
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
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,59 @@ | ||
--- | ||
|
||
defaults_waf: | ||
block_code: 425 | ||
|
||
# todo: search parameters and body of http requests for SQLi/Path-Traversal/XSS/... | ||
|
||
# see also: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/blob/master/_generator_lists/bad-user-agents.list | ||
user_agents: | ||
# Well-known user-agents used by scripting languages for very basic security-filtering | ||
# matching is done case-insensitive | ||
script: | ||
# NOTE: empty user-agent is also matched | ||
full: [ ] | ||
|
||
# NOTE: these are sub-strings inside the user-agent header | ||
sub: | ||
# cli tools | ||
- 'curl' | ||
- 'wget' | ||
- 'Apache-HttpClient' | ||
- 'nmap' | ||
- 'Metasploit' | ||
# automation tools | ||
- 'headless' | ||
- 'cypress' | ||
# golang | ||
- 'go-http-client' | ||
- 'zgrab' | ||
# python | ||
- 'python' | ||
- 'httpx' | ||
- 'httpcore' | ||
- 'aiohttp' | ||
- 'httputil' | ||
- 'urllib' | ||
# php | ||
- 'GuzzleHttp' | ||
- 'phpcrawl' | ||
- 'Zend_Http_Client' | ||
- 'Wordpress' | ||
- 'Symfony-HttpClient' | ||
# others | ||
- 'cpp-httplib' # c++ | ||
- 'java' | ||
- 'perl' | ||
- 'axios' # JS | ||
- 'ruby' | ||
|
||
bad_crawlers: | ||
full: [ ] | ||
sub: | ||
- 'spider' | ||
- 'test-bot' | ||
- 'tiny-bot' | ||
- 'fidget-spinner-bot' | ||
- 'download' | ||
# python | ||
- 'scrapy' |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
|
||
HAPROXY_CONFIG: "{{ defaults_haproxy | combine(haproxy, recursive=true, list_merge='prepend') }}" | ||
HAPROXY_WAF: "{{ defaults_waf | combine(HAPROXY_CONFIG.waf, recursive=true) }}" |
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,10 @@ | ||
# Usage | ||
|
||
Check out the [Molecule Tutorial](https://github.com/ansibleguy/ansible_tutorial/blob/main/99/Molecule.md) on how to get started! | ||
|
||
# Running | ||
|
||
```bash | ||
cd roles/ansibleguy.infra_haproxy | ||
molecule test | ||
``` |
Oops, something went wrong.