let selection_wwwroot = @"\inetpub\wwwroot\";
let selection_ext1 = dynamic(['.asp','.ashx','.ph']);
let selection_static = dynamic(["\\www\\", "\\htdocs\\", "\\html\\"]);
let selection_ext2 = ".ph";
let false_positive1 = dynamic(['\\AppData\\Local\\Temp\\', '\\Windows\\Temp\\']); //false positives when unpacking some executables in $TEMP
let false_positive_system = "System"; //backup or restore from drivers
let false_positive_legitimate = dynamic(["\\xampp","\\QGIS"]);
DeviceFileEvents //SOC-748162
| where ActionType == "FileCreated" //Modification to filter only file creation
| where (FolderPath contains selection_wwwroot and FolderPath has_any (selection_ext1)) or (FolderPath has_any (selection_static) and FolderPath endswith selection_ext2)
| where not(FolderPath has_any (false_positive1) or InitiatingProcessFolderPath == false_positive_system or FolderPath has_any (false_positive_legitimate))