[Bug]: Opening a file on Windows spawns powershell -EncodedCommand, which AVG and Avast block as malware

Abierto Apto para principiantes
#30,954 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
67/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
electron, node.js, typescript
Área
desktop

Línea de trabajo

Empieza en el área de la aplicación de escritorio (apps/desktop) y sigue cómo, al hacer clic en un enlace a un archivo local, se invoca el paquete npm open en Windows. Comprueba el comportamiento de Electron’s shell.openPath() y cómo gestiona la aplicación su resultado; el informe lo identifica como el reemplazo sugerido. El trabajo está terminado cuando los archivos locales se abren en su aplicación predeterminada sin iniciar PowerShell con -EncodedCommand.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/desktop

Steps to reproduce
  1. On Windows 11 with AVG (or Avast, same engine) and its Behavior Shield on, open T3 Code.
  2. In a thread, click a link to a local file (in my case a PDF in the workspace) so the app opens it in the default viewer.
Expected behavior

The file opens in its default app.

Actual behavior

The file does not open. AVG's Behavior Shield kills powershell.exe and shows "Threat secured: IDP.HELU.PSE96 - Command line detection", process C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe.

The cause is in the desktop bundle (resources/app.asar): files are opened with the open npm package, which on Windows spawns

powershell -NoProfile -NonInteractive –ExecutionPolicy Bypass -EncodedCommand <base64 of: Start "<path>">

An encoded command that also bypasses the execution policy is a classic malware pattern, so behavior-based antivirus engines flag it. Several AVG, Avast and Norton forum threads show the same IDP.HELU.PSE family firing on tools that spawn PowerShell this way.

Timing on my machine: Windows PowerShell 5.1 console start (Microsoft-Windows-PowerShell/Operational, event 40961) at 18:10:39, AVG detection at 18:10:49, no other detections that day. The file itself is clean.

Suggested fix: on Windows, open files with Electron's shell.openPath() (ShellExecute, no PowerShell process) instead of the open package.

Impact

Major degradation or frequent failure

Version or commit

T3 Code (Beta) desktop 0.1.7

Environment

Windows 11 Pro 10.0.26200, AVG Antivirus with Behavior Shield on

Logs or stack traces
AVG: Threat name IDP.HELU.PSE96 - Command line detection
     Process C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
     Detected by Behavior Shield, Status Blocked
Workaround

Open the file from File Explorer instead of clicking it in T3 Code.

Lenguaje dominante
TypeScript
Estrellas
24.8k
Forks
6.4k
Merge medio
13 h 48 min
PR fusionados (30 d)
208

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pingdotgg/t3code

Todos los issues de pingdotgg/t3code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.