MDR Portal WAF Notes.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. Reference OWASP whitepaper
  2. https://d0.awsstatic.com/whitepapers/Security/aws-waf-owasp.pdf
  3. portal-generic-restrict-sizes DONE
  4. Filters in portal-generic-size-restrictions
  5. The length of the Body is greater than 4096.
  6. The length of the Query string is greater than 1024.
  7. The length of the Header 'cookie' is greater than 4093.
  8. The length of the URI is greater than 512.
  9. /complete/saml
  10. TEST
  11. failing
  12. is it The length of the Header 'cookie' is greater than 4093. ? nope
  13. is it The length of the URI is greater than 512. ? nope
  14. The length of the Query string is greater than 1024. ? nope
  15. The length of the Body is greater than 4096. ? YES!
  16. trying
  17. The length of the Body is greater than 8000. Nope
  18. The length of the Body is greater than 12000. YES!
  19. The length of the Body is greater than 11168. sometimes!
  20. The length of the Body is greater than 12288. YES!
  21. ***try to exclude the saml URI****
  22. URI starts with: "/complete/saml" after decoding as URL.
  23. TODO
  24. Add URL filter for the rule portal-generic-restrict-sizes NOT complete/saml
  25. URI starts with: "/complete/saml" after decoding as URL.
  26. portal-generic-match-admin-company-url
  27. portal-generic-match-api-url
  28. URI starts with: "/api/issue/" after decoding as URL.
  29. /api/issue/
  30. portal-generic-enforce-csrf
  31. https://stackoverflow.com/questions/38485028/what-is-the-difference-between-set-cookie-and-cookie
  32. The length of the Header 'cookie' is equal to 118.
  33. HTTP method matches exactly to: "post" after converting to lowercase.
  34. /complete/saml
  35. TEST
  36. test is using set-cookie
  37. Csrftoken cookie is size 172
  38. csrftoken=0aHJ5IjG7jegZikOds5IFWRya2k60UuN7qvyqAXsJ4W2DkwKdr1e8oguzwywmgS3; expires=Wed, 03 Feb 2021 16:28:19 GMT; HttpOnly; Max-Age=31449600; Path=/; SameSite=Lax; Secure
  39. csrftoken=bEGgb6Z8ggr4q4Urxw4a9J7JEHWhwTAecBWpXYlxo82FEpZlpLYTnHnej98ff5ex; expires=Mon, 01 Feb 2021 23:18:07 GMT; HttpOnly; Max-Age=31449600; Path=/; SameSite=Lax; Secure
  40. sessionid=9b3azu262faw7n16e94zwiwijwsyycf5; HttpOnly; Path=/; SameSite=Lax; Secure
  41. sessionid=29b3rlsvbbijp64jcnrzn78ctzqvlm8d; HttpOnly; Path=/; SameSite=Lax; Secure
  42. Cookie header does NOT exist
  43. ***see if we can use the equal not less than***
  44. ***can we use an OR option?***
  45. PROD
  46. prod using cookie
  47. Cookie header does exist
  48. portal-generic-detect-admin-access
  49. TEST
  50. have whole page locked down to no need for difference in test/prod. the 0.0.0.0/0 should give access.
  51. "12.245.107.250/32", # DPS Office Legato
  52. "12.204.167.162/32", # DPS Office San Antonio
  53. "54.86.98.62/32", # DPS AWS User VPN
  54. "75.138.227.80/32", # Duane Waddle
  55. "24.11.231.98/32", # George Starcher
  56. "99.151.37.185/32", # Wesley Leonard
  57. "70.106.200.157/32", # John Reuther
  58. "108.243.20.48/32", # Ryan Plas
  59. "73.10.53.113/32", # Rick Page Home
  60. "50.21.207.50/32", # Brad Poulton
  61. "70.160.60.248/32", # Brandon Naughton
  62. "173.71.212.4/32", # Ryan Howard
  63. PROD
  64. have admin page locked down to whitelisted IPs
  65. 73.10.53.113/32
  66. 99.151.37.185/32
  67. 170.248.173.247/32
  68. 170.248.173.245/32
  69. TEST
  70. ***TEST WAF rule should be 0.0.0.0 for ADMIN access; SG will provide protection****
  71. 10.* only for /admin
  72. cidr_blocks = ["${lookup(local.workspace-default-portal-cidrs,terraform.workspace,"")}"] <-SG No changes needed
  73. admin_remote_ipset <- WAF changes needed test = 0.0.0.0 PROD = these IPs
  74. 73.10.53.113/32
  75. 99.151.37.185/32
  76. 170.248.173.247/32
  77. 170.248.173.245/32