-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adversary Import fails with Code 500 #191
Comments
I also got similar kind of error but when importing indicators: [2025-01-15 15:21:26,298] INFO config _______ _ _ _______ _______ _ _ _______ _____ __ _ _______ _____ ______
[2025-01-15 15:21:26,298] INFO config | |_____| |______ | |____/ | | | | \ | |______ | | ____
[2025-01-15 15:21:26,298] INFO config |_____ | | |______ |_____ | \_ |_____ |_____| | \_| | __|__ |_____|
[2025-01-15 15:21:26,298] INFO config
[2025-01-15 15:21:26,299] WARNING config misp_enable_ssl SSL is disabled for MISP API requests
[2025-01-15 15:21:27,024] INFO config No configuration errors found (1 warning)
[2025-01-15 15:21:27,024] INFO config
[2025-01-15 15:21:27,024] INFO config ____ _ _ ____ ____ _ _ ____ ___ ____ ____ ____ ____ ___
[2025-01-15 15:21:27,024] INFO config | |__| |___ | |_/ [__ |__] |__| [__ [__ |___ | \
[2025-01-15 15:21:27,024] INFO config |___ | | |___ |___ | \_ ___] | | | ___] ___] |___ |__/
[2025-01-15 15:21:27,024] INFO config
/home/misp/csenv/lib/python3.10/site-packages/pymisp/__init__.py:67: FutureWarning: This class is deprecated, use PyMISP instead
warnings.warn('This class is deprecated, use PyMISP instead', FutureWarning)
[2025-01-15 15:21:28,066] INFO processor/main Retrieving all galaxy cluster values for the Android cluster.
Traceback (most recent call last):
File "/home/misp/MISP-tools/misp_import.py", line 505, in <module>
main()
File "/home/misp/MISP-tools/misp_import.py", line 495, in main
import_handler = ImportHandler(config, intel_api_client,
File "/home/misp/MISP-tools/misp_import.py", line 312, in __init__
self.importer = CrowdstrikeToMISPImporter(
File "/home/misp/MISP-tools/cs_misp_import/importer.py", line 76, in __init__
self.all_galaxies = self.get_galaxies()
File "/home/misp/MISP-tools/cs_misp_import/importer.py", line 270, in get_galaxies
all_galaxies.append(self.misp_client.search_galaxy_clusters(gal["id"], searchall=""))
File "/home/misp/csenv/lib/python3.10/site-packages/pymisp/api.py", line 1781, in search_galaxy_clusters
clusters_j = self._check_json_response(r)
File "/home/misp/csenv/lib/python3.10/site-packages/pymisp/api.py", line 3978, in _check_json_response
r = self._check_response(response, expect_json=True)
File "/home/misp/MISP-tools/cs_misp_import/misp_safe_check_response.py", line 55, in safe_check_response
raise MISPServerError(fail_msg)
pymisp.exceptions.MISPServerError: Error code 500: An Internal Error Has Occurred. My MISP error.log shows: 2025-01-15 15:21:28 Error: [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Galaxy.default' in 'where clause'
Request URL: /galaxy_clusters/index/3
Stack Trace:
#0 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Datasource/DboSource.php(502): PDOStatement->execute()
#1 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Datasource/DboSource.php(468): DboSource->_execute()
#2 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Datasource/DboSource.php(715): DboSource->execute()
#3 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Datasource/DboSource.php(1226): DboSource->fetchAll()
#4 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Model.php(3053): DboSource->read()
#5 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Model.php(3025): Model->_readDataSource()
#6 /var/www/MISP/app/Model/AppModel.php(4359): Model->find()
#7 /var/www/MISP/app/Controller/GalaxyClustersController.php(105): AppModel->find()
#8 [internal function]: GalaxyClustersController->index()
#9 /var/www/MISP/app/Lib/cakephp/lib/Cake/Controller/Controller.php(499): ReflectionMethod->invokeArgs()
#10 /var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction()
#11 /var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke()
#12 /var/www/MISP/app/webroot/index.php(105): Dispatcher->dispatch()
#13 {main} I realize this happen after I upgraded my MISP version to 2.4.200 |
Actually, your specific issue is also reported in the MISP repository: MISP/MISP#10062 |
Edited Line 169: Fixed [Issue 191](CrowdStrike#191) Changed `ta_galaxy_id = gal["Galaxy"]["uuid"]` to `ta_galaxy_id = gal["Galaxy"]["id"]`
Fixed my issue by editing line 169 in The error suggested that the Galaxy ID used to create the GalaxyCluster was too long. Taking a look at the galaxy_clusters table, a Galaxy ID was max. 11 integers, but when debugging I saw a UUID being used to add the GalaxyCluster. Created Pull request 192. |
I can import reports and but importing adversaries fails everytime:
In the MISP
error.log
I see:The text was updated successfully, but these errors were encountered: