Commit Graph

531 Commits (c3ebc18afa81a68fa3fa0722cb7a1d0fa8ea8eb4)

Author SHA1 Message Date
iglocska 345e898f5f Tagging added to the API
- Create / Edit / Remove / index / view tags via the API
2015-10-30 16:28:51 +01:00
Iglocska 80f29c1f33 More details on the PGP validation tool 2015-10-27 15:18:04 +01:00
Iglocska f9da3f2d2c Small fix to the pgp key validation tool
- doesn't break on completely invalid keys anymore
2015-10-27 14:00:31 +01:00
iglocska 6fa27d659a Reverted change in proposal file storage path that wasn't needed 2015-10-22 09:51:31 +02:00
iglocska 61e865956b Fixes to several issues, fixes #693
- Fixed a critical bug in the XML export
  - As of recently XML exports include relations as they were missing before
  - the sanitisation of the event info field in related attributes was incorrectly sanitized of unicode characters
  - this can lead to the XML export breaking and also for affected events to be blocked from synchronisation

- Proposal fixes
  - fixed an invalid uuid generation that lead to an exception
  - fixed the attachments for proposals still using the old attachment system that disallows most filenames
  - added the automatic creation of hashes for attachment proposals
2015-10-21 23:44:07 +02:00
Iglocska 3dc83778c2 Fixed the current user check while removing dead workers, fixes #685
- as pointed out by RichieB2B
2015-10-14 15:07:29 +02:00
Iglocska c9bf8105e6 Replaced get_current_user for the process owner identification, fixes #685
- As RichieB2B noted, get_current_user() gets the owner of the script in CentOS / RHEL not the user executing the script (as in Ubuntu)

- Current solution uses posix_getpwuid and posix_geteuid if the php-posix package is installed
- if not, it uses whoami
2015-10-13 10:49:55 +02:00
Iglocska f9f9eed6fd Issue fixed with open_basedir preventing the worker diagnostics from working, fixes #685
- for some users the workers appeared to be dead even though the worker processes were functional and started by the correct user
- this was due to access to /proc being blocked by open_basedir directive settings
- added a check and the corresponding view changes to this being the case
2015-10-12 16:48:43 +02:00
Iglocska 24eae46640 Fix to a previous invalid check on the cakephp version 2015-10-09 20:51:12 +02:00
Iglocska f018c60c01 Fixed the worker diagnostics showing incorrect data under Red Hat / CentOS, fixes #685
- Under these distros, php is blocked from seeing concurrently running php processes even under the same user
- instead of running ps, the diagnostic now checks the existance of the pid file in /proc/
2015-10-09 17:09:33 +02:00
Iglocska 9223240efd Further fixes that caused issues with old PHP versions 2015-10-09 16:38:48 +02:00
Iglocska 00b74b43de Fixed a possible issue with the previous commit on certain php versions 2015-10-09 16:24:36 +02:00
Iglocska dc638adac2 Upgrade to CakePHP 2.7, fixes #684
- cakephp submodule updated to 2.7
- make sure that you update your instance!

- not updating will not break compatibility
2015-10-09 15:59:25 +02:00
Iglocska a55e38ffda Fix to the previous commit 2015-09-23 12:32:00 +02:00
Iglocska 6ef7772e0b Fixed an issue with old upgraded instances that didn't use the db session handler
- diagnostic tool would throw exceptions because the db session tables are still missing in some older instances
- if a different session handler is used, the test is skipped
2015-09-23 12:14:32 +02:00
iglocska 6fa13b4ad0 Fix to the text export ignoring the rule to exclude unpublished and non-IDS flagged data, fixes #646 2015-09-18 10:53:03 +02:00
iglocska 1079c4a1ea Added a diagnostic to check and purge overgrown session tables 2015-09-16 18:55:28 +02:00
iglocska 14188f1367 Fix to a new bug introduced with the correlation engine
- an attribute could correlate with another attribut of the same event
2015-09-16 15:34:00 +02:00
iglocska c06e687b5e Event blacklist context completed 2015-09-16 14:19:22 +02:00
iglocska 26e640e19c Further progress on several issues 2015-09-16 12:15:43 +02:00
Iglocska df59748719 progress on several issues
- switching workstations, this is all WiP
2015-09-15 15:11:08 +02:00
Iglocska 2142bf87c3 Several issues resolved
- fixed an issue where pushing a single event would fail

- both event and attribute edits via the API work without providing a timestamp. The current timestamp is instead attached

- both event and attribute edits fill the required fields from the data in the database if not supplied (as long as the uuid is found)
2015-09-07 14:25:24 +02:00
Iglocska e7b54c2c61 Fix to a serious bug with adding attributes via the API and performance fixes
- due to a bug, setting an attribute ID in the /attributes/add API call can lead to overwriting an existing attribute

performance improvements:

- massive improvements to the correlation performance
- improvements to the attribute validation process
2015-09-07 10:06:34 +02:00
Iglocska 43c2290097 Enhancements to the reportValidationIssuesAttributes action
- now also shows issues not related to the value field
- takes an optional parameter to validate a single event's attributes
2015-09-03 10:58:54 +02:00
Richard van den Berg 2eddbb5dcc Export MISP tags as STIX journal entries 2015-08-31 12:55:42 +02:00
Iglocska 597e40fc0f Collection of fixes
- CSV export ignored the tag parameters
- tagging events didn't work as expected in some cases
- timing out and clicking on an admin action results in being redirected to a non-existing admin login page
- distribution setting ignored when uploading attachments
2015-08-27 09:44:58 +02:00
Iglocska bc4bc46fca Fix to the previous hotfix
- indexes were not created if they already existed
- this was an issue if a non unique index was present

- also made the process more verbose and added a generic method that deals with index removal
2015-08-25 11:56:29 +02:00
Iglocska 556688069a Resolved an issue that can lead to duplicate events showing up in MISP
- UUID uniqueness was previously not enforced
- changed the MYSQL.sql file to reflect the changes
- Added upgrade admin tool to remove duplicate events and make the database changes required
- Tweaked the tool for the attribute uuid fix so that it cannot created duplicate keys

- some minor fixes, such as automatically removing eventTag objects on event deletion
2015-08-25 10:32:26 +02:00
Iglocska 266e656bab Fix to a new bug introduced with the blacklisting that can prevent new events from being added via the UI 2015-08-18 16:24:50 +02:00
Iglocska 80dcdcf9d8 Database update admin-actions are now logged and if they fail the errors are logged 2015-08-18 09:44:59 +02:00
iglocska a93807439d Several bigger changes
- new functionality: Event blacklisting by UUID
  - site admins cna enable this feature in the server settings
  - enabling the feature will make the required db changes
  - any deleted event will automatically get blacklisted
  - this prevents deleted events from flowing back from a synced instance
  - site admins can manually add UUIDs to the list and remove entries

- fix to UUID duplication issues for attributes
  - simply run the admin script and it will regenerate the UUID of attributes that are duplicates, if any such exist
  - timestamps/event published status will not be affected

- config.core.php now includes a change that prevents from 404 exceptions being logged
  - the sync uses 404s to signal that an event with a given uuid does not exist when negotiating proposal synchronisation
  - this causes a dangerously high amount of noise in the logs
2015-08-17 16:10:10 +02:00
Iglocska 5273c2c5aa New functionality: API to download sample by hash
- simply pass an MD5 hash along and receive a sample if available zipped and base64 encoded in a response object
- pass any hash along with a flag set and receive any samples from events that have the passed hash

- Also, fix for an issue with the freetext import not using semi-colons as separators
2015-08-07 12:04:44 +02:00
Iglocska 7e10eb7b46 Some fixes to the upload malware API
- Threat level ID options correctly set
- Threat level ID validation tightened to reject anything but the existing threat levels
- The upload malware API now logs validation issues during the failed creation of attributes / events
2015-08-05 00:11:16 +02:00
Iglocska 7db6e9ac47 A list of changes to the way attachments are uploaded, fixes #559, fixes #482
- new API for uploading malware samples
  - allows the upload of several files
  - can be used to populate a pre-existing event, or create a new event
  - expects a JSON or an XML object with the samples base64 encoded
- new way of storing malware samples
  - original filename not used any longer
  - samples are renamed to their md5 hashes
  - original filename preserved in a secondary txt file
- removed filename validation as it is no longer used for the command line execution
  - this allows unicode name files to be uploaded!
  - changed the UI attachment upload to reflect these changes
  - code more centralised and extendible
2015-08-04 02:00:21 +02:00
Iglocska 616629e9b5 Fixed an issue with the NIDS export not correctly working for single events 2015-07-22 19:27:56 +02:00
Iglocska 684be69ed0 Incremental export generation for HIDS and NIDS exports
- Instead of fetching all events at once for the export, events are fetched one by one
- Greatly reduces memory footprint (It mostly depends on the event with the most eligible attributes now, instead of the combined list of all events)
- Because of the lower memory usage, the time taken for the export is also slashed to a fragment of what it was before
2015-07-20 16:25:16 +02:00
Iglocska b089cf077f Some changes to the workers
- some fixes with the previous iteration of the background workers
- PID now checked using ps -p instead of looking for it in /proc
2015-07-17 15:06:38 +02:00
Iglocska 93f9a01c87 Changes to the hids exports
- fixed some issues with unset variables (from, to, last) when triggered by the background workers
- reduced memory usage of the hids exports (removed storing the hashes twice in memory, drastically removed the data retrieved from the db when preparing the export)
2015-07-17 10:50:50 +02:00
Iglocska c906cacd81 Merge branch 'pr567' into hotfix-2.3.97 2015-07-13 11:23:29 +02:00
Iglocska 47ad24fbad Merge branch 'pr564' into hotfix-2.3.97 2015-07-13 11:23:24 +02:00
Richard van den Berg 4b5bc3736a Use setupHttpSocket for fetchPGPKey 2015-07-13 11:05:53 +02:00
Iglocska 1645ee1e3b Rework of the diagnostics for background workers
- shows dead background workers
- allows site admins to add workers to any queue on the fly
- allows site admins to kill workers on the fly
2015-07-12 21:45:11 +02:00
David André 2b6ec81891 Edited comment for RPZ_Policy
Removed copy/pasta and added a correct comment for RPZ_Policy
2015-07-09 11:49:58 +02:00
Iglocska 6a25471ea4 Fix to an error with very large strings in an array causing a failure in the XML conversion of simpleXML, fixes #500
Moved the XML conversion in restfullEventToServer() to MISP's own xml conversion tool
2015-07-08 10:37:20 +02:00
Iglocska e706562cd5 Fixes to the RPZ export based on the testing of elhoim
- some errors in the format (wrong comment character used, rpz-ip not appended to IP addresses, missing semi-colon)
- removed hostnames that are on domains blocked by the rules based on domain attributes
2015-07-07 14:42:28 +02:00
Iglocska a05afbdd11 GnuPG.binary demoted to optional setting as it should be 2015-07-01 09:01:32 +02:00
Iglocska 3f215743f0 Complete rework of the ZeroMQ implementation
- python server running in the background doing the publishing
- MISP -> python script communication via redis
- configurable / controllable via the admin UI
2015-06-29 08:56:45 +02:00
Iglocska df1c6b1961 Merge branch 'fix-stix-date-ranges' into hotfix-2.3.86
Conflicts:
	app/View/Events/automation.ctp
2015-06-24 17:50:26 +02:00
Iglocska 3d2b8c3c10 Added pub/sub feature using ZeroMQ, fixes #540 and fixes #526
- by installing the requirements described in the update and the install instructions (ubuntu only for now, centos/red-hat versions to be tested and described), administrators can enable the pub/sub feature
- assign a port to the service via the interface
- each time an event is published, MISP will use ZMQ's PUB feature to push out a MISP JSON package using the "misp_json" prefix
2015-06-24 17:38:15 +02:00
Iglocska c120c5bdd3 Some merge issues resolved 2015-06-23 17:21:19 +02:00