|
8 | 8 | * License: GNU/GPLv2 |
9 | 9 | * @see LICENSE.txt |
10 | 10 | * |
11 | | - * This file: Optional security extras module (last modified: 2025.09.03). |
| 11 | + * This file: Optional security extras module (last modified: 2025.09.22). |
12 | 12 | * |
13 | 13 | * False positive risk (an approximate, rough estimate only): « [ ]Low [x]Medium [ ]High » |
14 | 14 | */ |
|
224 | 224 | } // 2022.06.05 mod 2023.09.04 |
225 | 225 |
|
226 | 226 | /** Probing for exposed AWS credentials. */ |
227 | | - if ($Trigger(preg_match('~(?:^|[/?])(?:\.?aws_?/(?:config(?:uration)?|credentials?)(?:\.yml)?|\.?aws\.yml|aws[_-]secrets?\.ya?ml|config/aws\.json)(?:$|[/?])~', $LCNrURI), 'Probing for exposed AWS credentials')) { |
| 227 | + if ($Trigger(preg_match('~(?:^|[/?])(?:\.?aws_?/(?:config(?:uration)?|credentials?)(?:\.yml)?|\.?aws\.yml|aws[_-]secrets?\.ya?ml|config/aws\.json|\.?aws-credentials\.(?:json|php|ya?ml)?|\.awsvault)(?:$|[/?])~', $LCNrURI), 'Probing for exposed AWS credentials')) { |
228 | 228 | $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed AWS credentials.'], $CIDRAM['BlockInfo']['IPAddr']); |
229 | | - } // 2023.09.04 mod 2025.08.24 |
| 229 | + } // 2023.09.04 mod 2025.09.22 |
230 | 230 |
|
231 | 231 | /** Probing for exposed FTP credentials. */ |
232 | 232 | if ($Trigger(preg_match('~(?:^|[/?])\.?s?ftp-(?:config|sync)\.json(?:$|[/?])~', $LCNrURI), 'Probing for exposed FTP credentials')) { |
|
284 | 284 | } // 2025.08.02 |
285 | 285 |
|
286 | 286 | /** Probing for env file. */ |
287 | | - if ($Trigger(preg_match('~(?:^|[/?=])(?:config|secrets?)?\.env(?:\.[\da-z]+)*(?:$|[/?])~', $LCNrURI), 'Probing for env file')) { |
| 287 | + if ($Trigger(preg_match('~(?:^|[/?=])(?:(?:config|secrets?)?\.env|env\.backup)(?:\.[\da-z]+)*(?:$|[/?])~', $LCNrURI), 'Probing for env file')) { |
288 | 288 | $CIDRAM['Reporter']->report([15, 21], ['Caught probing for env file.'], $CIDRAM['BlockInfo']['IPAddr']); |
289 | | - } // 2025.03.18 mod 2025.08.24 |
| 289 | + } // 2025.03.18 mod 2025.09.22 |
290 | 290 |
|
291 | 291 | /** Probing for unsecured configuration file. */ |
292 | 292 | if ($Trigger(preg_match('~(?:^|[/?])\.?config.ya?ml(?:$|[/?])~', $LCNrURI), 'Probing for unsecured configuration file')) { |
|
310 | 310 | $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed Rails app secrets.'], $CIDRAM['BlockInfo']['IPAddr']); |
311 | 311 | } // 2025.08.07 |
312 | 312 |
|
| 313 | + /** Probing for exposed Home Assistant secrets. */ |
| 314 | + if ($Trigger(preg_match('~(?:^|[/?])secrets\.yaml(?:$|[/?])~', $LCNrURI), 'Probing for exposed Home Assistant secrets')) { |
| 315 | + $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed Home Assistant secrets.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 316 | + } // 2025.09.22 |
| 317 | + |
| 318 | + /** Probing for exposed BMC secrets. */ |
| 319 | + if ($Trigger(preg_match('~(?:^|[/?])secrets\.txt(?:$|[/?])~', $LCNrURI), 'Probing for exposed BMC secrets')) { |
| 320 | + $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed BMC secrets.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 321 | + } // 2025.09.22 |
| 322 | + |
313 | 323 | /** Probing for exposed Apache HTTP authentication credentials. */ |
314 | 324 | if ($Trigger(preg_match('~(?:^|[/?])\.htpasswd(?:$|[/?])~', $LCNrURI), 'Probing for exposed Apache HTTP authentication credentials')) { |
315 | 325 | $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed Apache HTTP authentication credentials.'], $CIDRAM['BlockInfo']['IPAddr']); |
|
470 | 480 | $CIDRAM['Reporter']->report([15], ['Caught probing for exposed etc/shadow file.'], $CIDRAM['BlockInfo']['IPAddr']); |
471 | 481 | } // 2025.09.03 |
472 | 482 |
|
| 483 | + /** SQL injection attack detection. */ |
473 | 484 | if ($Trigger(preg_match('~\?1\+1&&|\)%7d%7d%2f~', $LCNrURI), 'SQLi attack')) { |
474 | 485 | $CIDRAM['Reporter']->report([15, 16], ['SQL injection attack detected.'], $CIDRAM['BlockInfo']['IPAddr']); |
475 | 486 | } // 2025.09.03 |
| 487 | + |
| 488 | + /** Probing for exposed Google API credentials. */ |
| 489 | + if ($Trigger(preg_match('~(?:^|[/?])credentials\.(?:json|txt)(?:$|[/?])~', $LCNrURI), 'Probing for exposed Google API credentials')) { |
| 490 | + $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed Google API credentials.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 491 | + } // 2025.09.22 |
| 492 | + |
| 493 | + /** Probing for exposed ELMAH security file. */ |
| 494 | + if ($Trigger(preg_match('~(?:^|[/?])elmah\.axd(?:$|[/?])~', $LCNrURI), 'Probing for exposed ELMAH security file')) { |
| 495 | + $CIDRAM['Reporter']->report([15, 21], ['Caught probing for exposed ELMAH security file.'], $CIDRAM['BlockInfo']['IPAddr']); |
| 496 | + } // 2025.09.22 |
476 | 497 | } |
477 | 498 |
|
478 | 499 | /** |
|
0 commit comments