|
8 | 8 | * License: GNU/GPLv2 |
9 | 9 | * @see LICENSE.txt |
10 | 10 | * |
11 | | - * This file: Optional security extras module (last modified: 2025.07.16). |
| 11 | + * This file: Optional security extras module (last modified: 2025.07.17). |
12 | 12 | * |
13 | 13 | * False positive risk (an approximate, rough estimate only): « [ ]Low [x]Medium [ ]High » |
14 | 14 | */ |
|
77 | 77 | $CIDRAM['Reporter']->report([15], ['Caught probing for quarantined files.'], $CIDRAM['BlockInfo']['IPAddr']); |
78 | 78 | } // 2017.03.22 mod 2023.08.13 |
79 | 79 |
|
80 | | - /** Probing for unsecured backup files. */ |
| 80 | + /** Probing for exposed backup files. */ |
81 | 81 | if ($Trigger(preg_match( |
82 | | - '~(?:/backup|(?:archive|backup|docroot|htdocs|public_html|site|www)\.(?:gz|rar|tar(?:\.gz)?|zip)|d(?:atabase|b|ump)\.sql)(?:$|[/?])~', |
| 82 | + '~(?:(?:^|[/?])backup|(?:archive|backup|d(?:atabase|b|ocroot|ump)|htdocs|public_html|site|www)(?:\.(?:new\d*|old\d*|sql))*(?:\.(?:[7bg]z\d*|7?zip|b[ac]k|[rt]ar(?:\.gz)?|tgz))+)(?:$|[/?])~', |
83 | 83 | $LCNrURI |
84 | | - ), 'Probing for unsecured backup files not allowed')) { |
85 | | - $CIDRAM['Reporter']->report([15], ['Caught probing for unsecured backup files.'], $CIDRAM['BlockInfo']['IPAddr']); |
86 | | - } // 2023.08.13 mod 2025.03.03 |
| 84 | + ), 'Probing for exposed backup files')) { |
| 85 | + $CIDRAM['Reporter']->report([15], ['Caught probing for exposed backup files.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 86 | + } // 2023.08.13 mod 2025.07.17 |
87 | 87 |
|
88 | | - /** Probing for unsecured SQL dumps. */ |
| 88 | + /** Probing for exposed SQL dumps. */ |
89 | 89 | if ($Trigger(preg_match( |
90 | | - '~^[^?]*[^/?]+\.sql(?:\.(?:b[ac]k|bz|new|old|t?gz|7?zip|[rt]ar))?(?:$|[/?])~', |
| 90 | + '~\.sql(?:\.(?:[7bg]z\d*|7?zip|b[ac]k|db\d*|new\d*|old\d*|[rt]ar|sql|tgz))*(?:$|[/?])~', |
91 | 91 | $LCNrURI |
92 | | - ), 'Probing for unsecured SQL dumps not allowed')) { |
93 | | - $CIDRAM['Reporter']->report([15], ['Caught probing for unsecured SQL dumps.'], $CIDRAM['BlockInfo']['IPAddr']); |
94 | | - } // 2024.05.12 |
| 92 | + ), 'Probing for exposed SQL dumps')) { |
| 93 | + $CIDRAM['Reporter']->report([15], ['Caught probing for exposed SQL dumps.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 94 | + } // 2024.05.12 mod 2025.07.17 |
95 | 95 |
|
96 | 96 | /** Probing for unsecured WordPress configuration files. */ |
97 | 97 | if ($Trigger(preg_match( |
|
156 | 156 | $CIDRAM['Reporter']->report([15, 20], ['Caught probing for webshells/backdoors. Host might be compromised.'], $CIDRAM['BlockInfo']['IPAddr']); |
157 | 157 | } |
158 | 158 |
|
159 | | - /** Probing for vulnerable plugins or webapps. */ |
| 159 | + /** Probing for common vulnerabilities and exploits. */ |
160 | 160 | if ( |
| 161 | + $Trigger(preg_match('~/ecp/current/exporttool/microsoft.exchange.ediscovery.exporttool.application(?:$|[/?])~', $LCNrURI), $Exploit = 'CVE-2021-28481') || // 2025.07.17 |
161 | 162 | $Trigger(preg_match('~/util/php/eval-stdin\.php[57]?(?:$|[/?])~', $LCNrURI), $Exploit = 'CVE-2017-9841') || // 2025.07.16 |
162 | 163 | $Trigger(preg_match('~/elfinder/php/connector\.php[57]?(?:$|[/?])~', $LCNrURI), $Exploit = 'elFinder') || // 2025.07.07 (possible matches: CVE-2019-1010178, CVE-2020-25213, CVE-2020-35235, CVE-2021-32682) |
163 | 164 | $Trigger(preg_match('~/tinymce/plugins/filemanager/dialog\.php[57]?(?:$|[/?])~', $LCNrURI), $Exploit = 'TinyMCE Filemanager') || // 2025.07.07 |
164 | 165 | $Trigger(preg_match('~/civicrm/packages/openflashchart/php-ofc-library/ofc_upload_image\.php[57]?(?:$|[/?])~', $LCNrURI), $Exploit = 'CIVI-SA-2013-001') || // 2025.07.05 |
165 | 166 | $Trigger(preg_match('~/library/openflashchart/php-ofc-library/ofc_upload_image\.php[57]?(?:$|[/?])~', $LCNrURI), $Exploit = 'ZSL-2013-5126') || // 2025.07.10 |
166 | 167 | $Trigger(preg_match('~/includes/openflashchart/php-ofc-library/ofc_upload_image\.php[57]?(?:$|[/?])~', $LCNrURI), $Exploit = 'SA53428') || // 2025.07.10 |
167 | 168 | $Trigger(preg_match('~/dup-installer/main\.installer\.php[57]?(?:$|[/?])~', $LCNrURI), $Exploit = 'CVE-2022-2551') || // 2024.09.05 |
168 | | - $Trigger(preg_match('~/Telerik\.Web\.UI\.WebResource\.axd(?:$|[/?])~i', $LCNrURI), $Exploit = 'CVE-2019-18935') || // 2024.10.30 |
| 169 | + $Trigger(preg_match('~/Telerik\.Web\.UI\.WebResource\.axd(?:$|[/?])~i', $LCNrURI), $Exploit = 'CVE-2019-18935') // 2024.10.30 |
| 170 | + ) { |
| 171 | + $CIDRAM['Reporter']->report([15, 21], ['Caught probing for ' . $Exploit . ' vulnerability.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 172 | + } |
| 173 | + |
| 174 | + /** Probing for common vulnerabilities and exploits. */ |
| 175 | + if ( |
| 176 | + $Trigger(preg_match('~hello\.world\?(?:%ad|\xAD)d\+allow_url_include(?:%3d|=)1\+(?:%ad|\xAD)d~', $LCNrURI), $Exploit = 'CVE-2024-4577') || // 2025.07.17 |
169 | 177 | $Trigger(preg_match('~\?s=../%5c|invokefunction&function=call_user_func_array&|vars%5b0%5d=md5|vars%5b1%5d%5b%5d=hellothinkphp~', $LCNrURI), $Exploit = 'CVE-2018-20062') // 2025.07.01 |
170 | 178 | ) { |
171 | 179 | $CIDRAM['Reporter']->report([15, 21], ['Caught probing for ' . $Exploit . ' vulnerability.'], $CIDRAM['BlockInfo']['IPAddr']); |
172 | 180 | } |
173 | 181 |
|
174 | 182 | /** Probing for exposed Git data. */ |
175 | | - if ($Trigger(preg_match('~\.git(?:config)?(?:$|\W)~', $LCNrURI), 'Probing for exposed git data')) { |
176 | | - $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed git data.'], $CIDRAM['BlockInfo']['IPAddr']); |
177 | | - } // 2022.06.05 mod 2025.04.28 |
| 183 | + if ($Trigger(preg_match('~\.git(?:config)?(?:$|\W)~', $LCNrURI), 'Probing for exposed Git data')) { |
| 184 | + $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed Git data.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 185 | + } // 2022.06.05 mod 2025.07.17 |
| 186 | + |
| 187 | + /** Probing for exposed SVN data. */ |
| 188 | + if ($Trigger(preg_match('~(?:^|[/?])\.svn(?:$|[/?])|\.svn/wc\.db(?:$|[/?])~', $LCNrURI), 'Probing for exposed SVN data')) { |
| 189 | + $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed SVN data.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 190 | + } // 2025.07.17 |
178 | 191 |
|
179 | 192 | /** Probing for exposed VSCode data. */ |
180 | 193 | if ($Trigger(preg_match('~(?:^|[/?])\.vscode(?:$|\W)~', $LCNrURI), 'Probing for exposed VSCode data')) { |
|
196 | 209 | $CIDRAM['Reporter']->report([15], ['Caught probing for exposed FTP credentials.'], $CIDRAM['BlockInfo']['IPAddr']); |
197 | 210 | } // 2025.03.09 |
198 | 211 |
|
| 212 | + /** Probing for exposed FrontPage file credential dumps. */ |
| 213 | + if ($Trigger(preg_match('~(?:^|[/?])_vti_pvt/service\.pwd(?:$|[/?])~', $LCNrURI), 'Probing for exposed FrontPage file credential dumps')) { |
| 214 | + $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed FrontPage file credential dumps.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 215 | + } // 2025.07.17 |
| 216 | + |
| 217 | + /** Probing for exposed server private keys. */ |
| 218 | + if ($Trigger(preg_match('~(?:^|[/?])private/server\.key(?:$|[/?])~', $LCNrURI), 'Probing for exposed server private keys')) { |
| 219 | + $CIDRAM['Reporter']->report([15], ['Caught probing for exposed server private keys.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 220 | + } // 2025.07.17 |
| 221 | + |
| 222 | + /** Probing for exposed Ansible service credentials. */ |
| 223 | + if ($Trigger(preg_match('~(?:^|[/?])user_secrets\.yml(?:$|[/?])~', $LCNrURI), 'Probing for exposed Ansible service credentials')) { |
| 224 | + $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed Ansible service credentials.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 225 | + } // 2025.07.17 |
| 226 | + |
| 227 | + /** Probing for exposed Visual Studio secrets. */ |
| 228 | + if ($Trigger(preg_match('~(?:^|[/?])secrets\.json(?:$|[/?])~', $LCNrURI), 'Probing for exposed Visual Studio secrets')) { |
| 229 | + $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed Visual Studio secrets.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 230 | + } // 2025.07.17 |
| 231 | + |
| 232 | + /** Probing for exposed Rails database schema state capture file. */ |
| 233 | + if ($Trigger(preg_match('~(?:^|[/?])db/schema\.rb(?:$|[/?])~', $LCNrURI), 'Probing for exposed Rails database schema state capture file')) { |
| 234 | + $CIDRAM['Reporter']->report([15], ['Caught probing for exposed Rails database schema state capture file.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 235 | + } // 2025.07.17 |
| 236 | + |
| 237 | + /** Probing for exposed cloud-init configuration file. */ |
| 238 | + if ($Trigger(preg_match('~(?:^|[/?])cloud-config\.yml(?:$|[/?])~', $LCNrURI), 'Probing for exposed cloud-init configuration file')) { |
| 239 | + $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed cloud-init configuration file.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 240 | + } // 2025.07.17 |
| 241 | + |
199 | 242 | /** Probing for vulnerable routers. */ |
200 | 243 | if ($Trigger(preg_match('~(?:^|\W)HNAP1~i', $LCNrURI), 'Probing for vulnerable routers')) { |
201 | 244 | $CIDRAM['Reporter']->report([15, 23], ['Caught probing for vulnerable routers.'], $CIDRAM['BlockInfo']['IPAddr']); |
202 | 245 | } // 2022.06.05 |
203 | 246 |
|
204 | 247 | /** Probing for vulnerable webapps. */ |
205 | | - if ($Trigger(preg_match('~cgi-bin/(?:get_status|(?:web)?login)\.cgi(?:$|\?)|manager/text/list~', $LCNrURI), 'Probing for vulnerable webapps')) { |
| 248 | + if ($Trigger(preg_match('~cgi-bin/(?:get_status|(?:web)?login)\.cgi(?:$|[/?])|(?:^|[/?])manager/text/list~', $LCNrURI), 'Probing for vulnerable webapps')) { |
206 | 249 | $CIDRAM['Reporter']->report([15, 21], ['Caught probing for vulnerable webapps.'], $CIDRAM['BlockInfo']['IPAddr']); |
207 | | - } // 2022.06.05 mod 2025.03.03 |
| 250 | + } // 2022.06.05 mod 2025.07.17 |
208 | 251 |
|
209 | 252 | /** Probing for sendgrid env file. */ |
210 | 253 | if ($Trigger(preg_match('~(?:^|[/?])sendgrid\.env(?:$|[/?])~', $LCNrURI), 'Probing for sendgrid env file')) { |
|
0 commit comments