Commit Graph

292 Commits (4fea371c4b417e6eac5cdefe0baf77840f5752a1)

Author SHA1 Message Date
William Robinet 4fea371c4b Fix permissions 2016-02-11 17:03:51 +01:00
Iglocska 5c1a5fad75 Fixes to the event downloads / APIs
- download event as JSON now has the option to include attachments
- switched to using the restsearch api instead of the deprecated /events/xml API

- added attachment inclusion to both restsearch apis

- fixed some bugs with the API
2016-02-09 15:43:09 +01:00
Iglocska 5ddaee7678 Fix to an invalid permission lookup denying users from mass deleting attributes due to a copy pasta fail 2016-01-18 15:37:07 +01:00
Iglocska bab7044a8e Multiple file upload added to the add attachment functionality 2016-01-03 19:25:00 +01:00
iglocska 4f715073c0 Changed the attachment distribution settings to match the attribute distribution settings, fixes #777
- added inherit event as a distribution option for attachments
2015-12-29 01:16:24 +01:00
iglocska 66a90cd60c Several fixes to the exports, fixes #790
- New generic fetch attribute method was mistakenly using the order field as a condition, resulting in some exports only displaying a subset of the data
  - the fix to this fixes the issue described in #790 for text exports
- Fix to the RPZ exports not working correctly
- Fix to the horrible performance of RPZ exports
- Fix to several background worker issues with exports
2015-12-26 02:50:50 +01:00
Iglocska b40e0fdc7c Merge branch 'master' into 2.4-syncrework
Conflicts:
	VERSION.json
	app/Controller/AttributesController.php
	app/Controller/ShadowAttributesController.php
	app/Lib/Tools/ComplexTypeTool.php
	app/Model/Attribute.php
	app/View/Pages/administration.ctp
2015-12-09 02:00:23 +01:00
iglocska 5e79c30974 Fix to the previous fix
- Flipped it the wrong way, fixed now
2015-12-04 14:28:02 +01:00
iglocska a82addb981 Small fix to the previous commit
- Small fix to a copy-paste fail
2015-12-04 14:23:42 +01:00
iglocska 65faeb48d9 Further tweaks
- fixed some corner cases
- added support for the same defanging to the freetext import tool
2015-12-04 11:33:14 +01:00
iglocska 744cf50fb9 Update to attribute validation and the freetext import tool, fixes #742
- defanged URL type attributes are refanged on input
- admin script to do the same for all existing attributes

- admin tool doesn't recognise a word followed by a . as a url
2015-12-04 10:43:38 +01:00
Iglocska 5dbbe84069 Merge branch 'master' into 2.4-beta
Conflicts:
	VERSION.json
	app/Controller/EventsController.php
	app/Controller/ShadowAttributesController.php
	app/Model/Event.php
	app/View/Elements/side_menu.ctp
2015-11-30 09:37:22 +01:00
iglocska 9eb5680ee8 Reimplementation of the Add XML feature
- called Add MISP export now
- can be an XML / JSON file
- result browser with explanations of failures

- REST XML/JSON add/edit of events returns errors instead of the partially succeeding event
2015-11-30 02:28:07 +01:00
iglocska f36e00e944 Permission checks 2015-11-14 17:27:06 +01:00
iglocska 8cc0996c3c Merge branch 'master' into 2.4-beta
Conflicts:
	VERSION.json
	app/View/Elements/side_menu.ctp
	app/View/Pages/administration.ctp
2015-11-14 17:16:38 +01:00
iglocska afdcc1af0c Fixed a security issue with the CSRF protection being avoidable using some site admin functionality
- as discovered and reported by Egidio Romano of Minded Security

- Lacking checks of HTTP methods in some functionality could lead to a site admin uploading and executing malicious scripts

- Tightened HTTP method verification across the board for actions that modify data
- Turned some administrative tasks to POST only actions
2015-11-13 23:57:03 +01:00
iglocska 620aab4e0e Merge branch 'master' into 2.4-beta
Conflicts:
	VERSION.json
	app/Controller/AttributesController.php
	app/Controller/EventsController.php
	app/Model/Event.php
2015-11-12 08:44:23 +01:00
iglocska 8f485ef98a Fixed a bug with the attribute search API 2015-11-09 23:18:51 +01:00
iglocska 685ba2a0b9 Comments now correctly save on attachments 2015-11-09 12:44:09 +01:00
Iglocska 7a686a2718 Merge branch 'master' into 2.4-beta
Also, reworked a lot of remaining distribution checks not handled by the main fetch methods

Conflicts:
	VERSION.json
	app/Controller/AttributesController.php
	app/Controller/ShadowAttributesController.php
	app/View/ShadowAttributes/add.ctp
	app/View/ShadowAttributes/edit.ctp
2015-10-30 13:39:12 +01:00
iglocska 7d651f094b Fix to a vulnerability found in attributescontroller
- vulnerability reported by Airbus Group CERT

- Deprecated ajax attribute view had inverse access control logic
- removed ajax path
- added XML/JSON view
2015-10-27 08:31:48 +01:00
iglocska ef1d3949e7 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
	app/Controller/ShadowAttributesController.php
	app/Lib/Tools/JSONConverterTool.php
	app/Lib/Tools/XMLConverterTool.php
	app/Model/User.php
	app/View/Elements/eventattribute.ctp
2015-10-22 09:59:00 +02:00
Iglocska 044996bdb5 New feature: Proposal to delete attribute, fixes #315
- Users can now propose a deletion to an attribute
  - also tied into the mass accept mechanism
  - new UI elements to go along with this

- Code refactoring for category list retrievals
  - Until now, several methods got the list of categories from the validation code
  - Was awkward with a fake empty element that had to be removed
  - altered the validation code to read the categoryDefinitions array instead
2015-10-16 23:49:04 +02:00
Iglocska 328c666e3a Merge branch 'master' into feature/sg
Merging all the new changes from master

Conflicts:
	VERSION.json
	app/Console/Command/AdminShell.php
	app/Controller/AttributesController.php
	app/Controller/EventsController.php
	app/Model/Attribute.php
	app/Model/Event.php
	app/Model/Log.php
	app/Model/Server.php
	app/Model/User.php
	app/View/Elements/side_menu.ctp
	app/View/Pages/administration.ctp
	app/View/Users/admin_index.ctp
2015-10-12 09:41:20 +02:00
Iglocska df59748719 progress on several issues
- switching workstations, this is all WiP
2015-09-15 15:11:08 +02:00
Iglocska e1a95c62b0 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
	app/Controller/EventsController.php
	app/Controller/ServersController.php
	app/Model/Attribute.php
	app/View/Users/statistics.ctp
2015-09-10 15:02:44 +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
Iglocska 186452cd5b Further progress 2015-08-31 02:32:37 +02:00
Iglocska 704880ce59 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
	app/Controller/AttributesController.php
	app/Controller/EventsController.php
	app/Model/Attribute.php
	app/Model/Event.php
	app/Model/Server.php
2015-08-30 13:29:05 +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 64485ad4a6 Fixed a bug with downloadSample that returns all accessible samples instead of the requested one, fixes #610
- fixed incorrect branch order causing this issue
2015-08-24 13:29:25 +02:00
Iglocska ebbc7390d1 Added event ID field to restSearch APIs, to assist #456
- eventid a new parameter for both event and attribute restsearch
- these APIs now accept arrays in both json and xml format (you can send "eventid": ["15", "16"] instead of "eventid": "15&&16" in addition to the old functionality
2015-08-18 19:51:41 +02:00
Iglocska 76b8aacc4c Added event ID/UUID to the event filters and attribute search
- enter a UUID in the event ID field of the attribute search to find attributes belonging to a certain event
- use event IDs / UUIDs to filter events on the event index
2015-08-18 15:37:49 +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 94398b8192 Download all samples for an event ID via the API
- as explained on the automation page
- also, better error handling

- all API calls that fail during authentication will now return a JSON/XML error message instead of redirecting to the login page
2015-08-07 16:10:40 +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 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 3fb4c1f52d Copy pasta fail 2015-08-03 15:49:16 +02:00
Iglocska 7cc3a9a6d9 Removed SG options if no SGs exist from attribute creation/edit 2015-08-03 15:46:58 +02:00
Iglocska 0481e6eb02 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
	app/Controller/ServersController.php
	app/Controller/ShadowAttributesController.php
	app/Controller/UsersController.php
	app/Model/Event.php
	app/webroot/js/ajaxification.js
2015-06-29 14:27:16 +02:00
Iglocska dc9fbf48d0 Proposal mass accept/discard, fixes #466 2015-06-25 11:51:36 +02:00
Iglocska ae0e1aeacb Merge branch 'feature/rpz' into hotfix-2.3.86
Conflicts:
	app/Console/Command/EventShell.php
	app/Model/Server.php
2015-06-23 17:19:08 +02:00
Iglocska c73f71f243 Merge branch 'master' into feature/sg
The merging is complete

Conflicts:
	VERSION.json
	app/Console/Command/ServerShell.php
	app/Controller/AppController.php
	app/Controller/AttributesController.php
	app/Controller/EventsController.php
	app/Controller/PostsController.php
	app/Controller/UsersController.php
	app/Model/Attribute.php
	app/Model/Event.php
	app/Model/Log.php
	app/Model/Server.php
	app/Model/User.php
	app/View/Elements/side_menu.ctp
	app/View/Users/admin_index.ctp
	app/webroot/js/ajaxification.js
2015-06-10 22:54:20 +02:00
Iglocska 71635b00a1 Added a new API parameter that allows to restrict events to the most recently published ones, #527
- added the new flag "last" to the list of parameters
- exports affected: XML, CSV, NIDS, HIDS, STIX, Text, RestSearch
- Valid values: number + format where format can be d, m, h for day, minute, hour (examples: 5d or 12h or 30m)
2015-06-06 20:00:57 +02:00
iglocska a0031a48e0 Merge branch 'master' into feature/rpz 2015-05-20 16:37:30 +02:00
iglocska 9db3a36103 Small fixes
- filename fix
- per event download fixed
2015-05-20 16:28:59 +02:00
iglocska 2afea61ea0 Added the missing ways to exploit the rpz functionality
- rpz added to exports, both old-style and with background workers
- per event rpz functionality added
2015-05-20 16:23:42 +02:00
iglocska dedc9f5ef2 First revision of the RPZ export complete
- documented in automation view
- right now it follows the simple rule of user > admin settings > default values when generating the export
- Parameters can be passed via url / JSON object / XML object
- filters include filter on event ID, date range, tags

TODO:
- buttons for a per event download via the UI
- introduce new export option for normal users (via background workers and the old style export)
2015-05-20 15:04:41 +02:00