Island: Allow Windows ransomware target paths to be UNC paths
This commit is contained in:
parent
9d4ee88e09
commit
d2dda4519f
|
@ -12,8 +12,8 @@ const windowsAbsolutePathRegex = /^([A-Za-z]:(\\|\/))/ // path starts like `C:\`
|
|||
const windowsEnvVarNonNumeric = '[A-Za-z#\\$\'\\(\\)\\*\\+,-\\.\\?@\\[\\]_`\\{\\}~+ ]'
|
||||
const windowsPathStartsWithEnvVariableRegex = new RegExp(
|
||||
`^%(${windowsEnvVarNonNumeric}+(${windowsEnvVarNonNumeric}|\\d)*)%`
|
||||
);// path starts like `$` OR `%abc%`
|
||||
|
||||
) // path starts like `$` OR `%abc%`
|
||||
const windowsUncPathRegex = /^\\{2}/ // Path starts like `\\`
|
||||
const emptyRegex = /^$/
|
||||
|
||||
|
||||
|
@ -55,6 +55,7 @@ function buildValidRansomwarePathWindowsRegex() {
|
|||
return new RegExp([
|
||||
emptyRegex.source,
|
||||
windowsAbsolutePathRegex.source,
|
||||
windowsPathStartsWithEnvVariableRegex.source
|
||||
windowsPathStartsWithEnvVariableRegex.source,
|
||||
windowsUncPathRegex.source
|
||||
].join('|'))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue