souleyez 2.31.0__py3-none-any.whl → 2.35.0__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.
@@ -10,8 +10,8 @@ from pathlib import Path
10
10
  from souleyez.storage.database import get_db
11
11
  from souleyez.storage.crypto import get_crypto_manager
12
12
 
13
- # Supported SIEM types
14
- SIEM_TYPES = ['wazuh', 'splunk', 'elastic', 'sentinel']
13
+ # Supported SIEM types (Open Source first, then Commercial)
14
+ SIEM_TYPES = ['wazuh', 'elastic', 'splunk', 'sentinel', 'google_secops']
15
15
 
16
16
 
17
17
  class WazuhConfig:
@@ -22,10 +22,14 @@ class WazuhConfig:
22
22
  """
23
23
 
24
24
  @staticmethod
25
- def get_config(engagement_id: int) -> Optional[Dict[str, Any]]:
25
+ def get_config(engagement_id: int, siem_type: str = None) -> Optional[Dict[str, Any]]:
26
26
  """
27
27
  Get SIEM config for an engagement.
28
28
 
29
+ Args:
30
+ engagement_id: Engagement ID
31
+ siem_type: Optional SIEM type to filter by. If None, returns first/active config.
32
+
29
33
  Returns:
30
34
  Config dict or None if not configured
31
35
  """
@@ -33,19 +37,31 @@ class WazuhConfig:
33
37
  conn = db.get_connection()
34
38
  cursor = conn.cursor()
35
39
 
36
- # Check if new columns exist (migration 025)
40
+ # Check if new columns exist (migration 025+)
37
41
  cursor.execute("PRAGMA table_info(wazuh_config)")
38
42
  columns = [col[1] for col in cursor.fetchall()]
39
43
  has_new_columns = 'siem_type' in columns
40
44
 
41
45
  # Query with or without new columns
42
46
  if has_new_columns:
43
- cursor.execute("""
44
- SELECT api_url, api_user, api_password, indexer_url, indexer_user,
45
- indexer_password, verify_ssl, enabled, siem_type, config_json
46
- FROM wazuh_config
47
- WHERE engagement_id = ?
48
- """, (engagement_id,))
47
+ if siem_type:
48
+ cursor.execute("""
49
+ SELECT api_url, api_user, api_password, indexer_url, indexer_user,
50
+ indexer_password, verify_ssl, enabled, siem_type, config_json
51
+ FROM wazuh_config
52
+ WHERE engagement_id = ? AND siem_type = ?
53
+ """, (engagement_id, siem_type))
54
+ else:
55
+ # Get most recently updated config (the "current" selected SIEM)
56
+ # Not filtering by enabled - user may have selected but not configured yet
57
+ cursor.execute("""
58
+ SELECT api_url, api_user, api_password, indexer_url, indexer_user,
59
+ indexer_password, verify_ssl, enabled, siem_type, config_json
60
+ FROM wazuh_config
61
+ WHERE engagement_id = ?
62
+ ORDER BY updated_at DESC
63
+ LIMIT 1
64
+ """, (engagement_id,))
49
65
  else:
50
66
  cursor.execute("""
51
67
  SELECT api_url, api_user, api_password, indexer_url, indexer_user,
@@ -190,7 +206,7 @@ class WazuhConfig:
190
206
  pass
191
207
  config_json_str = json.dumps(encrypted_config)
192
208
 
193
- # Upsert config
209
+ # Upsert config - keyed by (engagement_id, siem_type) for multi-SIEM support
194
210
  cursor.execute("""
195
211
  INSERT INTO wazuh_config (
196
212
  engagement_id, api_url, api_user, api_password, indexer_url,
@@ -198,7 +214,7 @@ class WazuhConfig:
198
214
  siem_type, config_json
199
215
  )
200
216
  VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
201
- ON CONFLICT(engagement_id) DO UPDATE SET
217
+ ON CONFLICT(engagement_id, siem_type) DO UPDATE SET
202
218
  api_url = excluded.api_url,
203
219
  api_user = excluded.api_user,
204
220
  api_password = excluded.api_password,
@@ -207,8 +223,8 @@ class WazuhConfig:
207
223
  indexer_password = excluded.indexer_password,
208
224
  verify_ssl = excluded.verify_ssl,
209
225
  enabled = excluded.enabled,
210
- siem_type = excluded.siem_type,
211
- config_json = excluded.config_json
226
+ config_json = excluded.config_json,
227
+ updated_at = CURRENT_TIMESTAMP
212
228
  """, (
213
229
  engagement_id, api_url, api_user, encrypted_api_password,
214
230
  indexer_url, indexer_user or 'admin', encrypted_indexer_password,
@@ -262,17 +278,124 @@ class WazuhConfig:
262
278
  )
263
279
 
264
280
  @staticmethod
265
- def delete_config(engagement_id: int) -> bool:
266
- """Delete Wazuh config for an engagement."""
281
+ def delete_config(engagement_id: int, siem_type: str = None) -> bool:
282
+ """
283
+ Delete SIEM config for an engagement.
284
+
285
+ Args:
286
+ engagement_id: Engagement ID
287
+ siem_type: Optional SIEM type. If None, deletes ALL SIEM configs for engagement.
288
+ """
267
289
  db = get_db()
268
290
  conn = db.get_connection()
269
291
  cursor = conn.cursor()
270
- cursor.execute("DELETE FROM wazuh_config WHERE engagement_id = ?", (engagement_id,))
292
+ if siem_type:
293
+ cursor.execute(
294
+ "DELETE FROM wazuh_config WHERE engagement_id = ? AND siem_type = ?",
295
+ (engagement_id, siem_type)
296
+ )
297
+ else:
298
+ cursor.execute("DELETE FROM wazuh_config WHERE engagement_id = ?", (engagement_id,))
271
299
  conn.commit()
272
300
  return cursor.rowcount > 0
273
301
 
274
302
  @staticmethod
275
- def is_configured(engagement_id: int) -> bool:
276
- """Check if Wazuh is configured for an engagement."""
277
- config = WazuhConfig.get_config(engagement_id)
303
+ def is_configured(engagement_id: int, siem_type: str = None) -> bool:
304
+ """Check if SIEM is configured for an engagement."""
305
+ config = WazuhConfig.get_config(engagement_id, siem_type)
278
306
  return config is not None and config.get("enabled", False)
307
+
308
+ @staticmethod
309
+ def list_configured_siems(engagement_id: int) -> List[Dict[str, Any]]:
310
+ """
311
+ List all configured SIEMs for an engagement.
312
+
313
+ Returns:
314
+ List of dicts with siem_type, enabled, and api_url for each configured SIEM
315
+ """
316
+ db = get_db()
317
+ conn = db.get_connection()
318
+ cursor = conn.cursor()
319
+
320
+ cursor.execute("PRAGMA table_info(wazuh_config)")
321
+ columns = [col[1] for col in cursor.fetchall()]
322
+
323
+ if 'siem_type' not in columns:
324
+ # Old schema - only one config possible
325
+ cursor.execute("""
326
+ SELECT 'wazuh' as siem_type, enabled, api_url
327
+ FROM wazuh_config
328
+ WHERE engagement_id = ?
329
+ """, (engagement_id,))
330
+ else:
331
+ cursor.execute("""
332
+ SELECT siem_type, enabled, api_url, updated_at
333
+ FROM wazuh_config
334
+ WHERE engagement_id = ?
335
+ ORDER BY siem_type
336
+ """, (engagement_id,))
337
+
338
+ rows = cursor.fetchall()
339
+ return [
340
+ {
341
+ 'siem_type': row[0],
342
+ 'enabled': bool(row[1]),
343
+ 'api_url': row[2],
344
+ 'updated_at': row[3] if len(row) > 3 else None
345
+ }
346
+ for row in rows
347
+ ]
348
+
349
+ @staticmethod
350
+ def get_all_configs(engagement_id: int) -> Dict[str, Dict[str, Any]]:
351
+ """
352
+ Get all SIEM configs for an engagement, keyed by siem_type.
353
+
354
+ Returns:
355
+ Dict mapping siem_type to config dict
356
+ """
357
+ configs = {}
358
+ for siem in SIEM_TYPES:
359
+ config = WazuhConfig.get_config(engagement_id, siem)
360
+ if config:
361
+ configs[siem] = config
362
+ return configs
363
+
364
+ @staticmethod
365
+ def get_current_siem_type(engagement_id: int) -> str:
366
+ """
367
+ Get the currently selected SIEM type for an engagement.
368
+
369
+ Returns the most recently selected SIEM type, even if not fully configured.
370
+
371
+ Returns:
372
+ SIEM type string ('wazuh', 'splunk', etc.) or 'wazuh' as default
373
+ """
374
+ config = WazuhConfig.get_config(engagement_id)
375
+ if config:
376
+ return config.get('siem_type', 'wazuh')
377
+ return 'wazuh'
378
+
379
+ @staticmethod
380
+ def set_current_siem(engagement_id: int, siem_type: str) -> bool:
381
+ """
382
+ Set a SIEM type as current by updating its timestamp.
383
+
384
+ This makes the specified SIEM the "active" one without changing its config.
385
+
386
+ Args:
387
+ engagement_id: Engagement ID
388
+ siem_type: SIEM type to make current
389
+
390
+ Returns:
391
+ True if successful
392
+ """
393
+ db = get_db()
394
+ conn = db.get_connection()
395
+ cursor = conn.cursor()
396
+ cursor.execute(
397
+ "UPDATE wazuh_config SET updated_at = CURRENT_TIMESTAMP WHERE engagement_id = ? AND siem_type = ?",
398
+ (engagement_id, siem_type)
399
+ )
400
+ conn.commit()
401
+ return cursor.rowcount > 0
souleyez/main.py CHANGED
@@ -173,7 +173,7 @@ def _check_privileged_tools():
173
173
 
174
174
 
175
175
  @click.group()
176
- @click.version_option(version='2.31.0')
176
+ @click.version_option(version='2.35.0')
177
177
  def cli():
178
178
  """SoulEyez - AI-Powered Pentesting Platform by CyberSoul Security"""
179
179
  from souleyez.log_config import init_logging
@@ -0,0 +1,119 @@
1
+ """
2
+ Migration 027: Multi-SIEM Persistence
3
+
4
+ Changes wazuh_config table to support multiple SIEM configs per engagement.
5
+ - Removes UNIQUE constraint on engagement_id
6
+ - Adds UNIQUE constraint on (engagement_id, siem_type)
7
+ - Allows each engagement to have separate configs for Wazuh, Splunk, etc.
8
+ """
9
+ import os
10
+
11
+
12
+ def upgrade(conn):
13
+ """Migrate to multi-SIEM persistence."""
14
+ cursor = conn.cursor()
15
+
16
+ # Check if siem_type column exists (from migration 025)
17
+ cursor.execute("PRAGMA table_info(wazuh_config)")
18
+ columns = [col[1] for col in cursor.fetchall()]
19
+
20
+ if 'siem_type' not in columns:
21
+ cursor.execute("ALTER TABLE wazuh_config ADD COLUMN siem_type TEXT DEFAULT 'wazuh'")
22
+ if 'config_json' not in columns:
23
+ cursor.execute("ALTER TABLE wazuh_config ADD COLUMN config_json TEXT")
24
+
25
+ # Create new table with correct constraint
26
+ cursor.execute("""
27
+ CREATE TABLE IF NOT EXISTS siem_config_new (
28
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
29
+ engagement_id INTEGER NOT NULL,
30
+ siem_type TEXT NOT NULL DEFAULT 'wazuh',
31
+ api_url TEXT,
32
+ api_user TEXT,
33
+ api_password TEXT,
34
+ indexer_url TEXT,
35
+ indexer_user TEXT DEFAULT 'admin',
36
+ indexer_password TEXT,
37
+ verify_ssl BOOLEAN DEFAULT 0,
38
+ enabled BOOLEAN DEFAULT 1,
39
+ config_json TEXT,
40
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
41
+ updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
42
+ FOREIGN KEY (engagement_id) REFERENCES engagements(id) ON DELETE CASCADE,
43
+ UNIQUE(engagement_id, siem_type)
44
+ )
45
+ """)
46
+
47
+ # Copy existing data
48
+ cursor.execute("""
49
+ INSERT OR IGNORE INTO siem_config_new (
50
+ id, engagement_id, siem_type, api_url, api_user, api_password,
51
+ indexer_url, indexer_user, indexer_password, verify_ssl, enabled,
52
+ config_json, created_at, updated_at
53
+ )
54
+ SELECT
55
+ id, engagement_id, COALESCE(siem_type, 'wazuh'), api_url, api_user, api_password,
56
+ indexer_url, indexer_user, indexer_password, verify_ssl, enabled,
57
+ config_json, created_at, updated_at
58
+ FROM wazuh_config
59
+ """)
60
+
61
+ # Drop old table and rename new one
62
+ cursor.execute("DROP TABLE wazuh_config")
63
+ cursor.execute("ALTER TABLE siem_config_new RENAME TO wazuh_config")
64
+
65
+ # Recreate index
66
+ cursor.execute("CREATE INDEX IF NOT EXISTS idx_wazuh_config_engagement ON wazuh_config(engagement_id)")
67
+ cursor.execute("CREATE INDEX IF NOT EXISTS idx_wazuh_config_siem_type ON wazuh_config(siem_type)")
68
+
69
+ conn.commit()
70
+
71
+ if not os.environ.get('SOULEYEZ_MIGRATION_SILENT'):
72
+ print("Migration 027: Multi-SIEM persistence enabled")
73
+
74
+
75
+ def downgrade(conn):
76
+ """Revert to single SIEM per engagement (lossy - keeps only first config per engagement)."""
77
+ cursor = conn.cursor()
78
+
79
+ cursor.execute("""
80
+ CREATE TABLE IF NOT EXISTS wazuh_config_old (
81
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
82
+ engagement_id INTEGER NOT NULL UNIQUE,
83
+ api_url TEXT NOT NULL,
84
+ api_user TEXT NOT NULL,
85
+ api_password TEXT,
86
+ indexer_url TEXT,
87
+ indexer_user TEXT DEFAULT 'admin',
88
+ indexer_password TEXT,
89
+ verify_ssl BOOLEAN DEFAULT 0,
90
+ enabled BOOLEAN DEFAULT 1,
91
+ siem_type TEXT DEFAULT 'wazuh',
92
+ config_json TEXT,
93
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
94
+ updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
95
+ FOREIGN KEY (engagement_id) REFERENCES engagements(id) ON DELETE CASCADE
96
+ )
97
+ """)
98
+
99
+ # Copy only first config per engagement
100
+ cursor.execute("""
101
+ INSERT OR IGNORE INTO wazuh_config_old (
102
+ engagement_id, api_url, api_user, api_password,
103
+ indexer_url, indexer_user, indexer_password, verify_ssl, enabled,
104
+ siem_type, config_json, created_at, updated_at
105
+ )
106
+ SELECT
107
+ engagement_id, api_url, api_user, api_password,
108
+ indexer_url, indexer_user, indexer_password, verify_ssl, enabled,
109
+ siem_type, config_json, created_at, updated_at
110
+ FROM wazuh_config
111
+ GROUP BY engagement_id
112
+ """)
113
+
114
+ cursor.execute("DROP TABLE wazuh_config")
115
+ cursor.execute("ALTER TABLE wazuh_config_old RENAME TO wazuh_config")
116
+ cursor.execute("CREATE INDEX IF NOT EXISTS idx_wazuh_config_engagement ON wazuh_config(engagement_id)")
117
+
118
+ conn.commit()
119
+ print("Migration 027: Reverted to single SIEM per engagement")
@@ -31,6 +31,7 @@ from . import (
31
31
  _024_wazuh_vulnerabilities,
32
32
  _025_multi_siem_support,
33
33
  _026_add_engagement_scope,
34
+ _027_multi_siem_persistence,
34
35
  )
35
36
 
36
37
  # Migration registry - maps version to module
@@ -60,6 +61,7 @@ MIGRATIONS_REGISTRY = {
60
61
  '024': _024_wazuh_vulnerabilities,
61
62
  '025': _025_multi_siem_support,
62
63
  '026': _026_add_engagement_scope,
64
+ '027': _027_multi_siem_persistence,
63
65
  }
64
66
 
65
67
 
@@ -504,18 +504,21 @@ CREATE INDEX IF NOT EXISTS idx_msf_sessions_active ON msf_sessions(is_active);
504
504
  -- Wazuh SIEM Integration (Detection Validation)
505
505
  CREATE TABLE IF NOT EXISTS wazuh_config (
506
506
  id INTEGER PRIMARY KEY AUTOINCREMENT,
507
- engagement_id INTEGER NOT NULL UNIQUE,
508
- api_url TEXT NOT NULL,
509
- api_user TEXT NOT NULL,
507
+ engagement_id INTEGER NOT NULL,
508
+ siem_type TEXT NOT NULL DEFAULT 'wazuh',
509
+ api_url TEXT,
510
+ api_user TEXT,
510
511
  api_password TEXT,
511
512
  indexer_url TEXT,
512
513
  indexer_user TEXT DEFAULT 'admin',
513
514
  indexer_password TEXT,
514
515
  verify_ssl BOOLEAN DEFAULT 0,
515
516
  enabled BOOLEAN DEFAULT 1,
517
+ config_json TEXT,
516
518
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
517
519
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
518
- FOREIGN KEY (engagement_id) REFERENCES engagements(id) ON DELETE CASCADE
520
+ FOREIGN KEY (engagement_id) REFERENCES engagements(id) ON DELETE CASCADE,
521
+ UNIQUE(engagement_id, siem_type)
519
522
  );
520
523
 
521
524
  -- Detection validation results per job
@@ -539,6 +542,7 @@ CREATE TABLE IF NOT EXISTS detection_results (
539
542
  );
540
543
 
541
544
  CREATE INDEX IF NOT EXISTS idx_wazuh_config_engagement ON wazuh_config(engagement_id);
545
+ CREATE INDEX IF NOT EXISTS idx_wazuh_config_siem_type ON wazuh_config(siem_type);
542
546
  CREATE INDEX IF NOT EXISTS idx_detection_results_job ON detection_results(job_id);
543
547
  CREATE INDEX IF NOT EXISTS idx_detection_results_engagement ON detection_results(engagement_id);
544
548
  CREATE INDEX IF NOT EXISTS idx_detection_results_status ON detection_results(detection_status);
@@ -8152,6 +8152,40 @@ def manage_engagements_menu():
8152
8152
  click.echo(click.style(f" ✓ Created engagement '{ws_name}' (ID: {ws_id})", fg='green'))
8153
8153
  if selected_template:
8154
8154
  click.echo(click.style(f" ✓ Applied preset: {selected_template.name}", fg='green'))
8155
+
8156
+ # Save scope to engagement_scope table if provided
8157
+ if ws_scope.strip():
8158
+ from souleyez.security.scope_validator import ScopeManager
8159
+ import ipaddress
8160
+ scope_mgr = ScopeManager()
8161
+ scope_value = ws_scope.strip()
8162
+
8163
+ # Determine scope type
8164
+ scope_type = None
8165
+ try:
8166
+ # Check if CIDR
8167
+ ipaddress.ip_network(scope_value, strict=False)
8168
+ scope_type = 'cidr'
8169
+ except ValueError:
8170
+ try:
8171
+ # Check if single IP
8172
+ ipaddress.ip_address(scope_value)
8173
+ scope_type = 'cidr'
8174
+ scope_value = f"{scope_value}/32" # Convert single IP to CIDR
8175
+ except ValueError:
8176
+ # Check if URL
8177
+ if scope_value.startswith(('http://', 'https://')):
8178
+ scope_type = 'url'
8179
+ else:
8180
+ # Assume domain
8181
+ scope_type = 'domain'
8182
+
8183
+ try:
8184
+ scope_mgr.add_scope(ws_id, scope_type, scope_value, description="Added during engagement creation")
8185
+ click.echo(click.style(f" ✓ Added scope: {scope_type}={scope_value}", fg='green'))
8186
+ except Exception as scope_err:
8187
+ click.echo(click.style(f" ⚠ Could not save scope: {scope_err}", fg='yellow'))
8188
+
8155
8189
  click.echo()
8156
8190
 
8157
8191
  # Show next steps based on preset
@@ -8896,18 +8930,48 @@ def _select_siem_type(engagement_id: int):
8896
8930
  config = WazuhConfig.get_config(engagement_id)
8897
8931
  current_type = config.get('siem_type', 'wazuh') if config else 'wazuh'
8898
8932
 
8899
- # Show available SIEM types
8900
- siem_types = SIEMFactory.get_available_types()
8901
- click.echo(" Available SIEM platforms:")
8933
+ # Define SIEM categories with emojis
8934
+ siem_emojis = {
8935
+ 'wazuh': '🦎',
8936
+ 'elastic': '🦌',
8937
+ 'splunk': '⚡',
8938
+ 'sentinel': '🛡️',
8939
+ 'google_secops': '🔍',
8940
+ }
8941
+ open_source_siems = ['wazuh', 'elastic']
8942
+ commercial_siems = ['splunk', 'sentinel', 'google_secops']
8943
+
8944
+ # Build ordered list for selection (open source first)
8945
+ siem_types = open_source_siems + commercial_siems
8946
+
8947
+ # Show Open Source section
8948
+ click.echo(" 🌐 " + click.style("OPEN SOURCE", fg='green', bold=True))
8949
+ click.echo(" " + "─" * 60)
8950
+ idx = 1
8951
+ for siem_type in open_source_siems:
8952
+ info = SIEMFactory.get_type_info(siem_type)
8953
+ emoji = siem_emojis.get(siem_type, '📊')
8954
+ current_marker = click.style(" (current)", fg='green') if siem_type == current_type else ""
8955
+ # Remove [Open Source] prefix from description since we have section header
8956
+ desc = info['description'].replace('[Open Source] ', '')
8957
+ click.echo(f" [{idx}] {emoji} {click.style(info['name'], bold=True)}{current_marker}")
8958
+ click.echo(f" {click.style(desc, dim=True)}")
8959
+ idx += 1
8902
8960
  click.echo()
8903
8961
 
8904
- for i, siem_type in enumerate(siem_types, 1):
8962
+ # Show Commercial section
8963
+ click.echo(" 💼 " + click.style("COMMERCIAL", fg='cyan', bold=True))
8964
+ click.echo(" " + "─" * 60)
8965
+ for siem_type in commercial_siems:
8905
8966
  info = SIEMFactory.get_type_info(siem_type)
8906
- is_current = " (current)" if siem_type == current_type else ""
8907
- marker = click.style("*", fg='green') if siem_type == current_type else " "
8908
- click.echo(f" {marker} [{i}] {click.style(info['name'], bold=True)}{is_current}")
8909
- click.echo(f" {info['description']}")
8910
- click.echo()
8967
+ emoji = siem_emojis.get(siem_type, '📊')
8968
+ current_marker = click.style(" (current)", fg='green') if siem_type == current_type else ""
8969
+ # Remove [Commercial] prefix from description since we have section header
8970
+ desc = info['description'].replace('[Commercial] ', '')
8971
+ click.echo(f" [{idx}] {emoji} {click.style(info['name'], bold=True)}{current_marker}")
8972
+ click.echo(f" {click.style(desc, dim=True)}")
8973
+ idx += 1
8974
+ click.echo()
8911
8975
 
8912
8976
  click.echo(" [q] Cancel")
8913
8977
  click.echo()
@@ -8929,19 +8993,28 @@ def _select_siem_type(engagement_id: int):
8929
8993
  if new_type == current_type:
8930
8994
  click.echo(f"\n {info['name']} is already selected.")
8931
8995
  else:
8932
- # If switching SIEM types, we need to reconfigure
8933
- click.echo(f"\n Switching to {click.style(info['name'], bold=True)}...")
8934
- click.echo(" You'll need to configure the connection settings.")
8935
-
8936
- # Save minimal config to set the SIEM type
8937
- WazuhConfig.save_siem_config(
8938
- engagement_id=engagement_id,
8939
- siem_type=new_type,
8940
- config={'siem_type': new_type},
8941
- enabled=False # Not enabled until configured
8942
- )
8943
- click.echo(click.style(f"\n SIEM type set to {info['name']}", fg='green'))
8944
- click.echo(" Use 'Configure Connection' to set up credentials.")
8996
+ # Check if this SIEM type already has a config
8997
+ existing_config = WazuhConfig.get_config(engagement_id, new_type)
8998
+
8999
+ if existing_config and existing_config.get('enabled'):
9000
+ # Already configured - just make it current by updating timestamp
9001
+ click.echo(f"\n Switching to {click.style(info['name'], bold=True)}...")
9002
+ WazuhConfig.set_current_siem(engagement_id, new_type)
9003
+ click.echo(click.style(f"\n ✓ Switched to {info['name']} (existing config restored)", fg='green'))
9004
+ else:
9005
+ # Not configured - create placeholder
9006
+ click.echo(f"\n Switching to {click.style(info['name'], bold=True)}...")
9007
+ click.echo(" You'll need to configure the connection settings.")
9008
+
9009
+ # Save minimal config to set the SIEM type
9010
+ WazuhConfig.save_siem_config(
9011
+ engagement_id=engagement_id,
9012
+ siem_type=new_type,
9013
+ config={'siem_type': new_type},
9014
+ enabled=False # Not enabled until configured
9015
+ )
9016
+ click.echo(click.style(f"\n ✓ SIEM type set to {info['name']}", fg='green'))
9017
+ click.echo(" Use 'Configure Connection' to set up credentials.")
8945
9018
  else:
8946
9019
  click.echo(click.style("\n ✗ Invalid choice", fg='red'))
8947
9020
  except ValueError:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: souleyez
3
- Version: 2.31.0
3
+ Version: 2.35.0
4
4
  Summary: AI-Powered Penetration Testing Platform with 40+ integrated tools
5
5
  Author-email: CyberSoul Security <contact@cybersoulsecurity.com>
6
6
  Maintainer-email: CyberSoul Security <contact@cybersoulsecurity.com>
@@ -78,7 +78,7 @@ Welcome to the SoulEyez beta! Thank you for helping us test and improve this pen
78
78
 
79
79
  > ⚠️ **Important**: Only use SoulEyez on systems you have explicit authorization to test.
80
80
 
81
- ## Version: 2.31.0
81
+ ## Version: 2.35.0
82
82
 
83
83
  ### What's Included
84
84
 
@@ -316,4 +316,4 @@ Happy hacking! 🛡️
316
316
 
317
317
  ---
318
318
 
319
- **Version**: 2.31.0 | **Release Date**: January 2026 | **Maintainer**: CyberSoul Security
319
+ **Version**: 2.35.0 | **Release Date**: January 2026 | **Maintainer**: CyberSoul Security
@@ -1,10 +1,10 @@
1
- souleyez/__init__.py,sha256=zq0ntjl0x0b8cZ5atHq4qdP41IgcQakOa5M3T83gsbU,23
1
+ souleyez/__init__.py,sha256=UQAEIsTm70ZCEpKHmL6kibJZmLc7zEVtPdYXWIXUQvQ,24
2
2
  souleyez/config.py,sha256=av357I3GYRWAklv8Dto-9-5Db699Wq5znez7zo7241Q,11595
3
3
  souleyez/devtools.py,sha256=rptmUY4a5eVvYjdEc6273MSagL-D9xibPOFgohVqUno,3508
4
4
  souleyez/feature_flags.py,sha256=mo6YAq07lc6sR3lEFKmIwTKxXZ2JPxwa5X97uR_mu50,4642
5
5
  souleyez/history.py,sha256=gzs5I_j-3OigIP6yfmBChdqxaFmyUIxvTpzWUPe_Q6c,2853
6
6
  souleyez/log_config.py,sha256=MMhPAJOqgXDfuE-xm5g0RxAfWndcmbhFHvIEMm1a_Wo,5830
7
- souleyez/main.py,sha256=atBSCuroBxewPPeq2ph0qRcU1O4nZqM2j3pjR-Hyluc,130228
7
+ souleyez/main.py,sha256=PzOvPmiph3bP8HsTdi1VBaFKNYkCaLnz67aFN0cfPMc,130228
8
8
  souleyez/scanner.py,sha256=U3IWHRrJ5aQ32dSHiVAHB60w1R_z0E0QxfM99msYNlw,3124
9
9
  souleyez/security.py,sha256=S84m1QmnKz_6NgH2I6IBIAorMHxRPNYVFSnks5xjihQ,2479
10
10
  souleyez/ui.py,sha256=15pfsqoDPnojAqr5S0TZHJE2ZkSHzkHpNVfVvsRj66A,34301
@@ -104,7 +104,7 @@ souleyez/detection/__init__.py,sha256=QIhvXjFdjrquQ6A0VQ7GZQkK_EXB59t8Dv9PKXhEUe
104
104
  souleyez/detection/attack_signatures.py,sha256=akgWwiIkh6WYnghCuLhRV0y6FS0SQ0caGF8tZUc49oA,6965
105
105
  souleyez/detection/mitre_mappings.py,sha256=xejE80YK-g8kKaeQoo-vBl8P3t8RTTItbfN0NaVZw6s,20558
106
106
  souleyez/detection/validator.py,sha256=-AJ7QSJ3-6jFKLnPG_Rc34IXyF4JPyI82BFUgTA9zw0,15641
107
- souleyez/docs/README.md,sha256=3jeh30cw-juNfg74y8-fPun3tGkVtqo2wYDVPWIzYI8,7183
107
+ souleyez/docs/README.md,sha256=IP5bsU6g4NnyMMkLXeI5qSTgPAmhpDxS3-0AOUnFAjw,7183
108
108
  souleyez/docs/api-reference/cli-commands.md,sha256=lTLFnILN3YRVdqCaag7WgsYXfDGglb1TuPexkxDsVdE,12917
109
109
  souleyez/docs/api-reference/engagement-api.md,sha256=nd-EvQMtiJrobg2bzFEADp853HP1Uhb9dmgok0_-neE,11672
110
110
  souleyez/docs/api-reference/integration-guide.md,sha256=c96uX79ukHyYotLa54wZ20Kx-EUZnrKegTeGkfLD-pw,16285
@@ -162,10 +162,11 @@ souleyez/importers/__init__.py,sha256=FNeqzNzKnaO7NUpoHt2IjXpA0g2eGl8YQwwfg2LhFE
162
162
  souleyez/importers/msf_importer.py,sha256=pPeXKqIv5ML2mu2Ew_BFI3vJbqDuBc53OHE4GJmqd5A,11754
163
163
  souleyez/importers/smart_importer.py,sha256=hem7Zhvurl8Lm_qY1qeOF-JigQWClXtdmKKlzavvHbo,14425
164
164
  souleyez/integrations/__init__.py,sha256=AG15oe2CIfQIJCUCOnMifj-EeZdzCe0A764ZU2gKVCo,79
165
- souleyez/integrations/siem/__init__.py,sha256=CVeHwXX8wstISL-0nZgffWgdMJQO1Aji0wVAKX67Ouw,1263
165
+ souleyez/integrations/siem/__init__.py,sha256=6KWX7hgTvoOiD5upV7nmBph1e1WOyrMdtN_JfFRJ_pc,1368
166
166
  souleyez/integrations/siem/base.py,sha256=JmbhRlHl7wsRyd3nOhCqDHFP4VwBv-VR7uIKWoohKDE,8144
167
167
  souleyez/integrations/siem/elastic.py,sha256=LuxheashiOO-AJbtUEK_BZ1T8EUAr1KlZkOheWPPgrQ,14712
168
- souleyez/integrations/siem/factory.py,sha256=aRTV2IFTF1e5PvmTrAVk1UsrVzm476esY2mLsey3F9Q,8061
168
+ souleyez/integrations/siem/factory.py,sha256=8OBoVpVSjnQQ5oXjcq3iJUEK-ItnyCVkcZV8wHbWEug,9424
169
+ souleyez/integrations/siem/googlesecops.py,sha256=HY832skGOlpidH9KdvvSmvMXP-fxT5S90BD6gFwMKnU,19419
169
170
  souleyez/integrations/siem/sentinel.py,sha256=8zxuMgqlfCeGu_gHPNjfmBfBR5PEmtMTbqliC9dnbcI,15789
170
171
  souleyez/integrations/siem/splunk.py,sha256=Vi6RMSqjXCVhy6AmQ0kFs_OrP6jDez3Vis8ZYJtWIGA,28587
171
172
  souleyez/integrations/siem/wazuh.py,sha256=vltBhkP5BkgJLmdmF6u_b2RgTvP7iE9sFDxOt9v71qM,10245
@@ -173,7 +174,7 @@ souleyez/integrations/siem/rule_mappings/__init__.py,sha256=PbCLigl6Zo8ClvxZ29yd
173
174
  souleyez/integrations/siem/rule_mappings/wazuh_rules.py,sha256=tfduSFFVxUOgL19w4ZFmOC0JDlnewz3PwA94a_XFTmI,8307
174
175
  souleyez/integrations/wazuh/__init__.py,sha256=d-zfG_enCStagLZNf3bZ57GujT64jsfI7zS3gJDui10,288
175
176
  souleyez/integrations/wazuh/client.py,sha256=Gc42bYP-dh2sDJNLh2WYt6iK0OUMnE9WYkegaZ_qUwk,21824
176
- souleyez/integrations/wazuh/config.py,sha256=26XDoZQBffxV-av7RiJnXKX2yLBPFw83qXu2j8mK6jk,10501
177
+ souleyez/integrations/wazuh/config.py,sha256=WGOkc53EKZFsriUgs8xK26g6UBGvoGnK1Gcc-cRxDYU,14920
177
178
  souleyez/integrations/wazuh/host_mapper.py,sha256=e5wKLb3KbkWLOry8z-8WMD36hmRSWO6ZhB_-iyfgKjg,9047
178
179
  souleyez/integrations/wazuh/sync.py,sha256=lrZ-9Fd1HKm2ZHPvj83MCFL9UhZqAowWEXTidXDizw0,12168
179
180
  souleyez/intelligence/__init__.py,sha256=oLjyxmSk5VgLxYnkSM9PmrREpiGAVmnqrRBxRGf4cQo,423
@@ -292,7 +293,7 @@ souleyez/storage/migrate_to_engagements.py,sha256=1th_JBc38GuqAO0CXVzJ4tcgbl30rE
292
293
  souleyez/storage/msf_sessions.py,sha256=UC0XEijKvfIOQ_vvE2GGn-JSdUYCL92vz7JJGdQPI5w,8577
293
294
  souleyez/storage/osint.py,sha256=axfdaM49RZczsX6e_K0e2yalkhxp29XDwwwN1y4VOyA,5887
294
295
  souleyez/storage/recommendation_engine.py,sha256=wLoDeldLkcrBU1X4iz1lG7tEQRb8ljiyAJTNIohNCqU,16341
295
- souleyez/storage/schema.sql,sha256=OLZbWKazYDvnlB1hbXVnm6ycuhbFQj0qqz5cNZIIk6Q,21636
296
+ souleyez/storage/schema.sql,sha256=fetlvwt4H3kEOgiHVGdGQncYKHehaVkEEJBbyAQ7Ltk,21798
296
297
  souleyez/storage/screenshots.py,sha256=wKLXJQw9csAP5uhSyEeC1idLsaLcW9I7_45SFNjfAu8,5500
297
298
  souleyez/storage/smb_shares.py,sha256=TybDadUKbc7HEyLlhc8c6plEfDBYuAcrjNMRjTC61CE,9120
298
299
  souleyez/storage/sqlmap_data.py,sha256=la3GFtT0EJx8k_iIBW3A5lT63y0Drc_B9yLyoDN3MBA,14068
@@ -325,7 +326,8 @@ souleyez/storage/migrations/_023_fix_detection_results_fk.py,sha256=U_mAbo9G7JJ6
325
326
  souleyez/storage/migrations/_024_wazuh_vulnerabilities.py,sha256=PhEGCDQYTxTFFDUSnbQBAxLTzWBq3UVsOEv3ibTAndI,3579
326
327
  souleyez/storage/migrations/_025_multi_siem_support.py,sha256=7Fz8D-_Q8nnFBlbafMN8O5q9m0_Rr1GfsvVfBQlj3vg,1086
327
328
  souleyez/storage/migrations/_026_add_engagement_scope.py,sha256=95_6an4jfYecfNVTRMrBfHre6Rzcnj9Xm8f0DqR_9OY,3562
328
- souleyez/storage/migrations/__init__.py,sha256=fo_i986wpVfj3x9wpy3LMvbDzYLaO5YrwnbdozR4vwg,2145
329
+ souleyez/storage/migrations/_027_multi_siem_persistence.py,sha256=HLbDC9aWiVBsZEoTzOqugVaqRiOLVzih3MPsJ-D6SXA,4606
330
+ souleyez/storage/migrations/__init__.py,sha256=rqQ6QwpomzjPRosnnXUzpNqQkD9pPxtcHWMjwIeMP4Y,2218
329
331
  souleyez/storage/migrations/migration_manager.py,sha256=KegAH1HIP6kzdl3WlW1wbdt2LM4Cgu1CmaExFWZcGjc,7438
330
332
  souleyez/testing/__init__.py,sha256=Kgu3r9X80sggabbkSEmM9qZyino29QYNzb9tfY05fak,66
331
333
  souleyez/testing/credential_tester.py,sha256=wRp0hi32f44nO-qm5Yr-mmly-xg1LlZxY2NKpjqOr-A,15004
@@ -345,7 +347,7 @@ souleyez/ui/export_view.py,sha256=0nQvVsKk7FU4uRzSfJ_qBZh_Lfn8hgGA2rbJ5bNg5-Y,65
345
347
  souleyez/ui/gap_analysis_view.py,sha256=AytAOEBq010wwo9hne1TE-uJpY_xicjLrFANbvN3r3w,30727
346
348
  souleyez/ui/help_system.py,sha256=nKGxLaMi-TKYs6xudTyw_tZqBb1cGFEuYYh6N-MAsJE,16648
347
349
  souleyez/ui/intelligence_view.py,sha256=VeAQ-3mANRnLIVpRqocL3JV0HUmJtADdxDeC5lzQhE0,32168
348
- souleyez/ui/interactive.py,sha256=1dfYCQ_s5iaaU6xdKCimvvZQfmgshMql5DxToFayKUc,1402812
350
+ souleyez/ui/interactive.py,sha256=dkyIys13Q6_OsDO84-sg1DNQvVTttVOBHjIZV2sSM7w,1406611
349
351
  souleyez/ui/interactive_selector.py,sha256=6A51fgmFRnemBY0aCPHIhK2Rpba16NjSGKLzC0Q5vI8,16407
350
352
  souleyez/ui/log_formatter.py,sha256=akhIkYoO_cCaKxS1V5N3iPmIrHzgsU7pmsedx70s9TI,3845
351
353
  souleyez/ui/menu_components.py,sha256=N8zq2QXGmfaLJ08l53MMYt1y-5LRWgpZH6r8nXHonj8,3519
@@ -368,9 +370,9 @@ souleyez/ui/tutorial_state.py,sha256=Thf7_qCj4VKjG7UqgJqa9kjIqiFUU-7Q7kG4v-u2B4A
368
370
  souleyez/ui/wazuh_vulns_view.py,sha256=3vJJEmrjgS2wD6EDB7ZV7WxgytBHTm-1WqNDjp7lVEI,21830
369
371
  souleyez/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
370
372
  souleyez/utils/tool_checker.py,sha256=kQcXJVY5NiO-orQAUnpHhpQvR5UOBNHJ0PaT0fBxYoQ,30782
371
- souleyez-2.31.0.dist-info/licenses/LICENSE,sha256=J7vDD5QMF4w2oSDm35eBgosATE70ah1M40u9W4EpTZs,1090
372
- souleyez-2.31.0.dist-info/METADATA,sha256=rOm0p3BiHE7aZbq6T-37YbMHCPReDSqJ7GuyHMFVBBo,11345
373
- souleyez-2.31.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
374
- souleyez-2.31.0.dist-info/entry_points.txt,sha256=bN5W1dhjDZJl3TKclMjRpfQvGPmyrJLwwDuCj_X39HE,48
375
- souleyez-2.31.0.dist-info/top_level.txt,sha256=afAMzS9p4lcdBNxhGo6jl3ipQE9HUvvNIPOdjtPjr_Q,9
376
- souleyez-2.31.0.dist-info/RECORD,,
373
+ souleyez-2.35.0.dist-info/licenses/LICENSE,sha256=J7vDD5QMF4w2oSDm35eBgosATE70ah1M40u9W4EpTZs,1090
374
+ souleyez-2.35.0.dist-info/METADATA,sha256=hdL5BqKlvdFWr9zsEZpIB7i5lubTY_C_jrSu2fYdsvA,11345
375
+ souleyez-2.35.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
376
+ souleyez-2.35.0.dist-info/entry_points.txt,sha256=bN5W1dhjDZJl3TKclMjRpfQvGPmyrJLwwDuCj_X39HE,48
377
+ souleyez-2.35.0.dist-info/top_level.txt,sha256=afAMzS9p4lcdBNxhGo6jl3ipQE9HUvvNIPOdjtPjr_Q,9
378
+ souleyez-2.35.0.dist-info/RECORD,,