diff --git a/src/detection/terminalshell/terminalshell.c b/src/detection/terminalshell/terminalshell.c index 8f58c2c4b..c5d49c947 100644 --- a/src/detection/terminalshell/terminalshell.c +++ b/src/detection/terminalshell/terminalshell.c @@ -414,7 +414,7 @@ bool fftsGetShellVersion(FFstrbuf* exe, const char* exeName, FFstrbuf* version) if (ffStrEqualsIgnCase(exeName, "fish")) { return getShellVersionFish(exe, version); } - if (ffStrEqualsIgnCase(exeName, "pwsh")) { + if (ffStrEqualsIgnCase(exeName, "pwsh") || ffStrEqualsIgnCase(exeName, "pwsh-preview")) { return getShellVersionPwsh(exe, version); } if (ffStrEqualsIgnCase(exeName, "csh") || ffStrEqualsIgnCase(exeName, "tcsh")) { diff --git a/src/detection/terminalshell/terminalshell_windows.c b/src/detection/terminalshell/terminalshell_windows.c index eb5d59ffc..a9bc51c3a 100644 --- a/src/detection/terminalshell/terminalshell_windows.c +++ b/src/detection/terminalshell/terminalshell_windows.c @@ -63,6 +63,8 @@ static uint32_t getShellInfo(FFShellResult* result, uint32_t pid) { static void setShellInfoDetails(FFShellResult* result) { if (ffStrbufIgnCaseEqualS(&result->prettyName, "pwsh")) { ffStrbufSetS(&result->prettyName, "PowerShell"); + } else if (ffStrbufIgnCaseEqualS(&result->prettyName, "pwsh-preview")) { + ffStrbufSetS(&result->prettyName, "PowerShell Preview"); } else if (ffStrbufIgnCaseEqualS(&result->prettyName, "powershell")) { ffStrbufSetS(&result->prettyName, "Windows PowerShell"); } else if (ffStrbufIgnCaseEqualS(&result->prettyName, "powershell_ise")) {