GuardianUnivalle-Benito-Yucra 0.1.34__py3-none-any.whl → 0.1.35__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of GuardianUnivalle-Benito-Yucra might be problematic. Click here for more details.

@@ -108,33 +108,22 @@ def detectar_archivos_sospechosos() -> List[str]:
108
108
 
109
109
  def detectar_programas_instalados() -> list[str]:
110
110
  """
111
- Analiza programas instalados en Windows para detectar software potencialmente malicioso.
112
- Funciona incluso si WMIC está en otra ruta o no está disponible.
111
+ Detecta software potencialmente malicioso en Windows usando PowerShell.
113
112
  """
114
113
  hallazgos = []
115
114
  if platform.system() != "Windows":
116
115
  return hallazgos
117
116
 
118
- # Rutas posibles de WMIC
119
- posibles_rutas = [
120
- "C:\\Windows\\System32\\wbem\\WMIC.exe",
121
- "C:\\Windows\\SysWOW64\\wbem\\WMIC.exe",
122
- "C:\\Windows\\System32\\WMIC.exe",
123
- ]
124
-
125
- wmic_path = None
126
- for ruta in posibles_rutas:
127
- if os.path.exists(ruta):
128
- wmic_path = ruta
129
- break
130
-
131
- # Si no se encontró ruta, intenta usarlo directamente (PATH)
132
- if wmic_path is None:
133
- wmic_path = "wmic"
117
+ ps_command = (
118
+ "Get-ItemProperty HKLM:\\Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*,"
119
+ "HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\* | Select-Object DisplayName"
120
+ )
134
121
 
135
122
  try:
136
123
  salida = subprocess.check_output(
137
- [wmic_path, "product", "get", "name"], stderr=subprocess.DEVNULL, shell=True
124
+ ["powershell", "-Command", ps_command],
125
+ stderr=subprocess.DEVNULL,
126
+ shell=True,
138
127
  ).decode("utf-8", errors="ignore")
139
128
 
140
129
  for linea in salida.splitlines():
@@ -143,10 +132,8 @@ def detectar_programas_instalados() -> list[str]:
143
132
  hallazgos.append(nombre)
144
133
  registrar_evento("Keylogger", f"Software sospechoso: {nombre}")
145
134
 
146
- except FileNotFoundError:
147
- logger.warning("WMIC no encontrado. No se puede listar programas instalados.")
148
135
  except Exception as e:
149
- logger.error("Error al listar programas instalados: %s", e)
136
+ logger.error("Error al listar programas instalados con PowerShell: %s", e)
150
137
 
151
138
  return hallazgos
152
139
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GuardianUnivalle-Benito-Yucra
3
- Version: 0.1.34
3
+ Version: 0.1.35
4
4
  Summary: Middleware y detectores de seguridad (SQLi, XSS, CSRF, DoS, Keylogger) para Django/Flask
5
5
  Author-email: Andres Benito Calle Yucra <benitoandrescalle035@gmail.com>
6
6
  License: MIT
@@ -6,15 +6,15 @@ GuardianUnivalle_Benito_Yucra/criptografia/intercambio_claves.py,sha256=9djnlzb0
6
6
  GuardianUnivalle_Benito_Yucra/criptografia/kdf.py,sha256=_sbepEY1qHEKga0ExrX2WRg1HeCPY5MC5CfXZWYyl-A,709
7
7
  GuardianUnivalle_Benito_Yucra/detectores/detector_csrf.py,sha256=wt9LRMG9XK4eSSmW91tlGmsJWfyk445b8-n2oxlXlwo,7893
8
8
  GuardianUnivalle_Benito_Yucra/detectores/detector_dos.py,sha256=KpsFnZvPmtKVgxR2Em_gIQvoho3sGOE_qQSWOEhts48,6163
9
- GuardianUnivalle_Benito_Yucra/detectores/detector_keylogger.py,sha256=Cb-XqpILzzcj8qu0zoG1KekyFF6zmsjHYDJs4eXEjfs,8472
9
+ GuardianUnivalle_Benito_Yucra/detectores/detector_keylogger.py,sha256=L5RQ0Sdgg7hTU1qkZYwt7AcDqtAzT6u-jwBGo7YWfsw,8078
10
10
  GuardianUnivalle_Benito_Yucra/detectores/detector_sql.py,sha256=o2IXqF3Nbsh5roPihyLal42iCzgxfyX3D6Ef-cxOpVo,6644
11
11
  GuardianUnivalle_Benito_Yucra/detectores/detector_xss.py,sha256=Ipw1XXBd1-SsOOhhl9joQGduTq0GhSa61TRTyASF3XE,6795
12
12
  GuardianUnivalle_Benito_Yucra/middleware_web/middleware_web.py,sha256=23pLLYqliUoMrIC6ZEwz3hKXeDjWfHSm9vYPWGmDDik,495
13
13
  GuardianUnivalle_Benito_Yucra/mitigacion/limitador_peticion.py,sha256=ipMOebYhql-6mSyHs0ddYXOcXq9w8P_IXLlpiIqGncw,246
14
14
  GuardianUnivalle_Benito_Yucra/mitigacion/lista_bloqueo.py,sha256=6AYWII4mrmwCLHCvGTyoBxR4Oasr4raSHpFbVjqn7d8,193
15
15
  GuardianUnivalle_Benito_Yucra/puntuacion/puntuacion_amenaza.py,sha256=Wx5XfcII4oweLvZsTBEJ7kUc9pMpP5-36RfI5C5KJXo,561
16
- guardianunivalle_benito_yucra-0.1.34.dist-info/licenses/LICENSE,sha256=5e4IdL542v1E8Ft0A24GZjrxZeTsVK7XrS3mZEUhPtM,37
17
- guardianunivalle_benito_yucra-0.1.34.dist-info/METADATA,sha256=FQPhIzUcYEulIzGZfnnDy9A-zLTGdW7WRLnHukzg_fQ,1893
18
- guardianunivalle_benito_yucra-0.1.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- guardianunivalle_benito_yucra-0.1.34.dist-info/top_level.txt,sha256=HTWfZM64WAV_QYr5cnXnLuabQt92dvlxqlR3pCwpbDQ,30
20
- guardianunivalle_benito_yucra-0.1.34.dist-info/RECORD,,
16
+ guardianunivalle_benito_yucra-0.1.35.dist-info/licenses/LICENSE,sha256=5e4IdL542v1E8Ft0A24GZjrxZeTsVK7XrS3mZEUhPtM,37
17
+ guardianunivalle_benito_yucra-0.1.35.dist-info/METADATA,sha256=j2NXDtyBtMKe9DTSF9JP1CuDlQfgM0ZiBX9N3HBFRsM,1893
18
+ guardianunivalle_benito_yucra-0.1.35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
+ guardianunivalle_benito_yucra-0.1.35.dist-info/top_level.txt,sha256=HTWfZM64WAV_QYr5cnXnLuabQt92dvlxqlR3pCwpbDQ,30
20
+ guardianunivalle_benito_yucra-0.1.35.dist-info/RECORD,,