├── .gitignore
├── .landscape.yml
├── CHANGELOG
├── README.md
├── ce1sus-run.py
├── ce1sus
├── __init__.py
├── common
│ ├── __init__.py
│ ├── checks.py
│ └── system.py
├── controllers
│ ├── __init__.py
│ ├── admin
│ │ ├── __init__.py
│ │ ├── attributedefinitions.py
│ │ ├── conditions.py
│ │ ├── group.py
│ │ ├── mails.py
│ │ ├── objectdefinitions.py
│ │ ├── references.py
│ │ ├── syncserver.py
│ │ └── user.py
│ ├── base.py
│ ├── common
│ │ ├── __init__.py
│ │ ├── assembler.py
│ │ ├── merger.py
│ │ └── process.py
│ ├── events
│ │ ├── __init__.py
│ │ ├── attributecontroller.py
│ │ ├── event.py
│ │ ├── events.py
│ │ ├── indicatorcontroller.py
│ │ ├── observable.py
│ │ ├── relations.py
│ │ ├── reports.py
│ │ └── search.py
│ └── login.py
├── db
│ ├── __init__.py
│ ├── brokers
│ │ ├── __init__.py
│ │ ├── common
│ │ │ ├── __init__.py
│ │ │ └── processbroker.py
│ │ ├── config.py
│ │ ├── definitions
│ │ │ ├── __init__.py
│ │ │ ├── attributedefinitionbroker.py
│ │ │ ├── conditionbroker.py
│ │ │ ├── definitionbase.py
│ │ │ ├── handlerdefinitionbroker.py
│ │ │ ├── objectdefinitionbroker.py
│ │ │ ├── referencesbroker.py
│ │ │ └── typebrokers.py
│ │ ├── event
│ │ │ ├── __init__.py
│ │ │ ├── attributebroker.py
│ │ │ ├── comments.py
│ │ │ ├── composedobservablebroker.py
│ │ │ ├── eventbroker.py
│ │ │ ├── objectbroker.py
│ │ │ ├── observablebroker.py
│ │ │ ├── relatedobjects.py
│ │ │ ├── reportbroker.py
│ │ │ └── searchbroker.py
│ │ ├── mailtemplate.py
│ │ ├── mispbroker.py
│ │ ├── permissions
│ │ │ ├── __init__.py
│ │ │ ├── group.py
│ │ │ └── user.py
│ │ ├── relationbroker.py
│ │ ├── syncserverbroker.py
│ │ └── values.py
│ ├── classes
│ │ ├── __init__.py
│ │ ├── attribute.py
│ │ ├── basedbobject.py
│ │ ├── common.py
│ │ ├── config.py
│ │ ├── definitions.py
│ │ ├── event.py
│ │ ├── group.py
│ │ ├── indicator.py
│ │ ├── log.py
│ │ ├── mailtemplate.py
│ │ ├── object.py
│ │ ├── observables.py
│ │ ├── processitem.py
│ │ ├── relation.py
│ │ ├── report.py
│ │ ├── servers.py
│ │ ├── ttp.py
│ │ ├── types.py
│ │ ├── user.py
│ │ └── values.py
│ └── common
│ │ ├── __init__.py
│ │ ├── broker.py
│ │ ├── common.py
│ │ ├── connectors
│ │ ├── __init__.py
│ │ ├── mysql.py
│ │ └── sqlite.py
│ │ ├── recepie
│ │ ├── __init__.py
│ │ └── satool.py
│ │ └── session.py
├── depricated
│ ├── __init__.py
│ ├── brokers
│ │ ├── __init__.py
│ │ ├── basefoo.py
│ │ └── oldbrokers.py
│ ├── classes
│ │ ├── __init__.py
│ │ ├── definitionclasses.py
│ │ ├── eventclasses.py
│ │ ├── oldce1susconfig.py
│ │ ├── permissionclasses.py
│ │ └── valuesclasses.py
│ └── helpers
│ │ ├── __init__.py
│ │ └── bitdecoder.py
├── handlers
│ ├── __init__.py
│ ├── attributes
│ │ ├── __init__.py
│ │ ├── cbvaluehandler.py
│ │ ├── datehandler.py
│ │ ├── emailhandler.py
│ │ ├── filehandler.py
│ │ ├── generichandler.py
│ │ ├── linkhandler.py
│ │ ├── multiplegenerichandler.py
│ │ └── texthandler.py
│ ├── base.py
│ └── references
│ │ ├── __init__.py
│ │ ├── filehandler.py
│ │ ├── generichandler.py
│ │ ├── linkhandler.py
│ │ ├── rthandler.py
│ │ └── texthandler.py
├── helpers
│ ├── __init__.py
│ ├── bitdecoder.py
│ ├── common
│ │ ├── __init__.py
│ │ ├── config.py
│ │ ├── converters.py
│ │ ├── debug.py
│ │ ├── hash.py
│ │ ├── ldaphandling.py
│ │ ├── mailer.py
│ │ ├── objects.py
│ │ ├── rt.py
│ │ ├── strings.py
│ │ ├── syslogger.py
│ │ └── validator
│ │ │ ├── __init__.py
│ │ │ ├── objectvalidator.py
│ │ │ └── valuevalidator.py
│ └── pluginfunctions.py
├── mappers
│ ├── __init__.py
│ ├── misp
│ │ ├── __init__.py
│ │ ├── ce1susmisp.py
│ │ └── mispce1sus.py
│ └── stix
│ │ ├── __init__.py
│ │ ├── helpers
│ │ ├── __init__.py
│ │ ├── ce1susstix.py
│ │ ├── common.py
│ │ ├── cyboxmapper.py
│ │ └── stixce1sus.py
│ │ └── stixmapper.py
├── plugins
│ ├── __init__.py
│ ├── base.py
│ ├── ldapplugin.py
│ └── mailplugin.py
└── views
│ ├── __init__.py
│ └── web
│ ├── __init__.py
│ ├── adapters
│ ├── __init__.py
│ ├── ce1susadapter.py
│ ├── misp
│ │ ├── __init__.py
│ │ └── misp.py
│ ├── openiocadapter.py
│ └── stixadapter.py
│ ├── api
│ ├── __init__.py
│ ├── version2
│ │ ├── __init__.py
│ │ └── depricated.py
│ └── version3
│ │ ├── __init__.py
│ │ ├── handlers
│ │ ├── __init__.py
│ │ ├── admin
│ │ │ ├── __init__.py
│ │ │ ├── adminattributehandler.py
│ │ │ ├── admingrouphandler.py
│ │ │ ├── adminindicatorhandler.py
│ │ │ ├── adminobjecthandler.py
│ │ │ ├── adminreferencehandler.py
│ │ │ ├── admintypehandler.py
│ │ │ ├── adminuserhandler.py
│ │ │ ├── adminvalidationhandler.py
│ │ │ ├── conditionhandler.py
│ │ │ ├── mailhandler.py
│ │ │ └── syncservershandler.py
│ │ ├── common
│ │ │ ├── __init__.py
│ │ │ ├── definitions.py
│ │ │ ├── grouphandler.py
│ │ │ ├── processhandler.py
│ │ │ └── restchecks.py
│ │ ├── events
│ │ │ ├── __init__.py
│ │ │ ├── eventhandler.py
│ │ │ ├── eventshandler.py
│ │ │ ├── objecthandler.py
│ │ │ ├── observablehanlder.py
│ │ │ ├── reporthandler.py
│ │ │ └── searchhandler.py
│ │ ├── loginhandler.py
│ │ ├── mischandler.py
│ │ └── restbase.py
│ │ └── restcontroller.py
│ ├── common
│ ├── __init__.py
│ ├── base.py
│ └── decorators.py
│ └── frontend
│ ├── __init__.py
│ ├── index.py
│ ├── menus.py
│ └── plugin.py
├── config
├── ce1sus.conf_tmpl
├── cherrypy.conf_tmpl
└── handlers.conf_tmpl
├── docs
├── AUTHORS
├── DOCUMENTATION.md
├── LICENSE
├── ce1sus_api.yaml
├── images
│ ├── ce1sus_attrmgt.png
│ ├── ce1sus_groupmgt.png
│ ├── ce1sus_gui.png
│ ├── ce1sus_objmgt.png
│ └── ce1sus_usermgt.png
└── licenses
│ ├── MIT-angluar-strap.txt
│ ├── MIT-angluarjs.txt
│ ├── MIT-restangular.txt
│ ├── agpl-3.0.txt
│ ├── apache-2.0.txt
│ ├── css-spinners.txt
│ ├── swagger-ui_LICENSE
│ └── unserscore-license.txt
├── htdocs
├── ce1sus_swagger.json
├── css
│ ├── angular-growl.min.css
│ ├── bootstrap-additions.min.css
│ ├── bootstrap-theme.css
│ ├── bootstrap-theme.css.map
│ ├── bootstrap-theme.min.css
│ ├── bootstrap.css
│ ├── bootstrap.css.map
│ ├── bootstrap.min.css
│ ├── ce1sus
│ │ └── ce1sus.css
│ ├── font-awesome.css
│ ├── font-awesome.min.css
│ ├── loading-bar.min.css
│ ├── main.min.css
│ ├── ng-table.min.css
│ ├── print.css
│ ├── reset.css
│ ├── screen.css
│ ├── select.min.css
│ ├── throbber.css
│ └── typography.css
├── fonts
│ ├── FontAwesome.otf
│ ├── droid-sans-v6-latin-700.eot
│ ├── droid-sans-v6-latin-700.svg
│ ├── droid-sans-v6-latin-700.ttf
│ ├── droid-sans-v6-latin-700.woff
│ ├── droid-sans-v6-latin-700.woff2
│ ├── droid-sans-v6-latin-regular.eot
│ ├── droid-sans-v6-latin-regular.svg
│ ├── droid-sans-v6-latin-regular.ttf
│ ├── droid-sans-v6-latin-regular.woff
│ ├── droid-sans-v6-latin-regular.woff2
│ ├── fontawesome-webfont.eot
│ ├── fontawesome-webfont.svg
│ ├── fontawesome-webfont.ttf
│ ├── fontawesome-webfont.woff
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.svg
│ ├── glyphicons-halflings-regular.ttf
│ └── glyphicons-halflings-regular.woff
├── images
│ ├── cyboxlogov2.png
│ ├── explorer_icons.png
│ ├── logo_small.png
│ ├── throbber.gif
│ └── wordnik_api.png
├── index.html
├── js
│ ├── angularjs-1.3.0
│ │ ├── .gitignore
│ │ ├── angular-animate.min.js
│ │ ├── angular-animate.min.js.map
│ │ ├── angular-cookies.min.js
│ │ ├── angular-cookies.min.js.map
│ │ ├── angular-file-upload-shim.min.js
│ │ ├── angular-file-upload.min.js
│ │ ├── angular-growl.min.js
│ │ ├── angular-loader.min.js
│ │ ├── angular-loader.min.js.map
│ │ ├── angular-messages.min.js
│ │ ├── angular-messages.min.js.map
│ │ ├── angular-resource.min.js
│ │ ├── angular-resource.min.js.map
│ │ ├── angular-route-segment.min.js
│ │ ├── angular-route.min.js
│ │ ├── angular-route.min.js.map
│ │ ├── angular-sanitize.min.js
│ │ ├── angular-sanitize.min.js.map
│ │ ├── angular-strap.min.js
│ │ ├── angular-strap.min.js.map
│ │ ├── angular-strap.tpl.min.js
│ │ ├── angular.min.js
│ │ ├── angular.min.js.map
│ │ ├── errors.json
│ │ ├── loading-bar.min.js
│ │ ├── modules
│ │ │ ├── affix.js
│ │ │ ├── affix.min.js
│ │ │ ├── affix.min.js.map
│ │ │ ├── alert.js
│ │ │ ├── alert.min.js
│ │ │ ├── alert.min.js.map
│ │ │ ├── alert.tpl.js
│ │ │ ├── alert.tpl.min.js
│ │ │ ├── aside.js
│ │ │ ├── aside.min.js
│ │ │ ├── aside.min.js.map
│ │ │ ├── aside.tpl.js
│ │ │ ├── aside.tpl.min.js
│ │ │ ├── button.js
│ │ │ ├── button.min.js
│ │ │ ├── button.min.js.map
│ │ │ ├── collapse.js
│ │ │ ├── collapse.min.js
│ │ │ ├── collapse.min.js.map
│ │ │ ├── date-parser.js
│ │ │ ├── date-parser.min.js
│ │ │ ├── date-parser.min.js.map
│ │ │ ├── datepicker.js
│ │ │ ├── datepicker.min.js
│ │ │ ├── datepicker.min.js.map
│ │ │ ├── datepicker.tpl.js
│ │ │ ├── datepicker.tpl.min.js
│ │ │ ├── debounce.js
│ │ │ ├── debounce.min.js
│ │ │ ├── debounce.min.js.map
│ │ │ ├── dimensions.js
│ │ │ ├── dimensions.min.js
│ │ │ ├── dimensions.min.js.map
│ │ │ ├── dropdown.js
│ │ │ ├── dropdown.min.js
│ │ │ ├── dropdown.min.js.map
│ │ │ ├── dropdown.tpl.js
│ │ │ ├── dropdown.tpl.min.js
│ │ │ ├── modal.js
│ │ │ ├── modal.min.js
│ │ │ ├── modal.min.js.map
│ │ │ ├── modal.tpl.js
│ │ │ ├── modal.tpl.min.js
│ │ │ ├── navbar.js
│ │ │ ├── navbar.min.js
│ │ │ ├── navbar.min.js.map
│ │ │ ├── parse-options.js
│ │ │ ├── parse-options.min.js
│ │ │ ├── parse-options.min.js.map
│ │ │ ├── popover.js
│ │ │ ├── popover.min.js
│ │ │ ├── popover.min.js.map
│ │ │ ├── popover.tpl.js
│ │ │ ├── popover.tpl.min.js
│ │ │ ├── raf.js
│ │ │ ├── raf.min.js
│ │ │ ├── raf.min.js.map
│ │ │ ├── scrollspy.js
│ │ │ ├── scrollspy.min.js
│ │ │ ├── scrollspy.min.js.map
│ │ │ ├── select.js
│ │ │ ├── select.min.js
│ │ │ ├── select.min.js.map
│ │ │ ├── select.tpl.js
│ │ │ ├── select.tpl.min.js
│ │ │ ├── tab.js
│ │ │ ├── tab.min.js
│ │ │ ├── tab.min.js.map
│ │ │ ├── tab.tpl.js
│ │ │ ├── tab.tpl.min.js
│ │ │ ├── timepicker.js
│ │ │ ├── timepicker.min.js
│ │ │ ├── timepicker.min.js.map
│ │ │ ├── timepicker.tpl.js
│ │ │ ├── timepicker.tpl.min.js
│ │ │ ├── tooltip.js
│ │ │ ├── tooltip.min.js
│ │ │ ├── tooltip.min.js.map
│ │ │ ├── tooltip.tpl.js
│ │ │ ├── tooltip.tpl.min.js
│ │ │ ├── typeahead.js
│ │ │ ├── typeahead.min.js
│ │ │ ├── typeahead.min.js.map
│ │ │ ├── typeahead.tpl.js
│ │ │ └── typeahead.tpl.min.js
│ │ ├── ng-table.map
│ │ ├── ng-table.min.js
│ │ ├── ng-table.min.js.map
│ │ ├── ngScrollSpy.min.js
│ │ ├── select.min.js
│ │ └── version.json
│ ├── bootstrap-3.2.0
│ │ └── bootstrap.min.js
│ ├── ce1sus
│ │ ├── ce1sus_app.js
│ │ ├── common
│ │ │ ├── functions.js
│ │ │ └── simplePagination.js
│ │ ├── config
│ │ │ └── main.js
│ │ ├── controllers
│ │ │ ├── admin
│ │ │ │ ├── attribute.js
│ │ │ │ ├── condition.js
│ │ │ │ ├── group.js
│ │ │ │ ├── jobs.js
│ │ │ │ ├── mail.js
│ │ │ │ ├── object.js
│ │ │ │ ├── references.js
│ │ │ │ ├── servers.js
│ │ │ │ ├── type.js
│ │ │ │ ├── user.js
│ │ │ │ └── validation.js
│ │ │ ├── event
│ │ │ │ ├── attribute.js
│ │ │ │ ├── event.js
│ │ │ │ ├── events.js
│ │ │ │ ├── object.js
│ │ │ │ ├── observable.js
│ │ │ │ ├── references.js
│ │ │ │ ├── reports.js
│ │ │ │ └── search.js
│ │ │ ├── handlers
│ │ │ │ ├── filehandlercontroller.js
│ │ │ │ └── rthandlercontroller.js
│ │ │ ├── help
│ │ │ │ └── main.js
│ │ │ ├── login.js
│ │ │ ├── main.js
│ │ │ ├── misc.js
│ │ │ └── plugins
│ │ │ │ └── ldaphandler.js
│ │ ├── directives
│ │ │ └── directives.js
│ │ └── factories
│ │ │ └── factories.js
│ ├── restangular-1.4.0
│ │ ├── restangular.min.js
│ │ ├── underscore-min.js
│ │ └── underscore-min.map
│ ├── sha1.js
│ └── swagger
│ │ ├── lib
│ │ ├── backbone-min.js
│ │ ├── handlebars-2.0.0.js
│ │ ├── highlight.7.3.pack.js
│ │ ├── jquery-1.8.0.min.js
│ │ ├── jquery.ba-bbq.min.js
│ │ ├── jquery.slideto.min.js
│ │ ├── jquery.wiggle.min.js
│ │ ├── marked.js
│ │ ├── swagger-oauth.js
│ │ ├── underscore-min.js
│ │ └── underscore-min.map
│ │ ├── swagger-ui.js
│ │ └── swagger-ui.min.js
├── o2c.html
├── pages
│ ├── activate.html
│ ├── admin.html
│ ├── admin
│ │ ├── attribute
│ │ │ ├── attributedetail.html
│ │ │ ├── help.html
│ │ │ └── modals
│ │ │ │ ├── addattributemodal.html
│ │ │ │ └── editattributemodal.html
│ │ ├── attrmgt.html
│ │ ├── bgjobs.html
│ │ ├── bgjobs
│ │ │ ├── help.html
│ │ │ └── jobs.html
│ │ ├── condition
│ │ │ ├── conditiondetail.html
│ │ │ ├── help.html
│ │ │ └── modals
│ │ │ │ ├── addconditionmodal.html
│ │ │ │ └── editconditionmodal.html
│ │ ├── conditionmgt.html
│ │ ├── group
│ │ │ ├── groupdetail.html
│ │ │ ├── help.html
│ │ │ └── modals
│ │ │ │ ├── addgroupmodal.html
│ │ │ │ └── editgroupmodal.html
│ │ ├── groupmgt.html
│ │ ├── mail
│ │ │ ├── help.html
│ │ │ ├── maildetail.html
│ │ │ └── modals
│ │ │ │ └── editmailmodal.html
│ │ ├── mailmgt.html
│ │ ├── object
│ │ │ ├── help.html
│ │ │ ├── modals
│ │ │ │ ├── addobjectmodal.html
│ │ │ │ └── editobjectmodal.html
│ │ │ └── objectdetail.html
│ │ ├── objmgt.html
│ │ ├── referencemgt.html
│ │ ├── references
│ │ │ ├── help.html
│ │ │ ├── modals
│ │ │ │ ├── addreferencemodal.html
│ │ │ │ └── editreferencemodal.html
│ │ │ └── referencedetail.html
│ │ ├── syncservers.html
│ │ ├── syncservers
│ │ │ ├── help.html
│ │ │ ├── modals
│ │ │ │ ├── addserver.html
│ │ │ │ ├── editserver.html
│ │ │ │ └── serverdetails.html
│ │ │ └── servers.html
│ │ ├── type
│ │ │ ├── help.html
│ │ │ ├── modals
│ │ │ │ ├── addtypemodal.html
│ │ │ │ └── editypemodal.html
│ │ │ └── typedetail.html
│ │ ├── typesmgt.html
│ │ ├── user
│ │ │ ├── help.html
│ │ │ ├── modals
│ │ │ │ ├── addldapuser.html
│ │ │ │ ├── addusermodal.html
│ │ │ │ └── editusermodal.html
│ │ │ └── userdetail.html
│ │ ├── usermgt.html
│ │ ├── validation.html
│ │ └── validation
│ │ │ └── event
│ │ │ └── layout.html
│ ├── common
│ │ ├── directives
│ │ │ ├── addremtables.html
│ │ │ ├── attributedefinitionform.html
│ │ │ ├── composendobservableview.html
│ │ │ ├── conditionform.html
│ │ │ ├── eventform.html
│ │ │ ├── eventreportform.html
│ │ │ ├── groupform.html
│ │ │ ├── indicatorview.html
│ │ │ ├── menuitem.html
│ │ │ ├── objectattributeform.html
│ │ │ ├── objectdefinitionform.html
│ │ │ ├── objectproperties.html
│ │ │ ├── objectview.html
│ │ │ ├── observableform.html
│ │ │ ├── observableobjectform.html
│ │ │ ├── observableview.html
│ │ │ ├── referencedefinitionform.html
│ │ │ ├── reportreferenceform.html
│ │ │ ├── reportview.html
│ │ │ ├── serverform.html
│ │ │ ├── typeform.html
│ │ │ └── userform.html
│ │ ├── error.html
│ │ ├── loading.html
│ │ └── text.html
│ ├── events.html
│ ├── events
│ │ ├── add.html
│ │ ├── all.html
│ │ ├── event
│ │ │ ├── groups.html
│ │ │ ├── indicator
│ │ │ │ └── details.html
│ │ │ ├── indicators.html
│ │ │ ├── layout.html
│ │ │ ├── modals
│ │ │ │ ├── addcomment.html
│ │ │ │ ├── changeowner.html
│ │ │ │ ├── commentdetails.html
│ │ │ │ ├── edit.html
│ │ │ │ └── editcomment.html
│ │ │ ├── observable
│ │ │ │ ├── add.html
│ │ │ │ ├── addChild.html
│ │ │ │ ├── composeddetails.html
│ │ │ │ ├── composededit.html
│ │ │ │ ├── details.html
│ │ │ │ ├── edit.html
│ │ │ │ └── object
│ │ │ │ │ ├── add.html
│ │ │ │ │ ├── addChild.html
│ │ │ │ │ ├── attributes
│ │ │ │ │ ├── add.html
│ │ │ │ │ ├── details.html
│ │ │ │ │ └── edit.html
│ │ │ │ │ ├── details.html
│ │ │ │ │ ├── properties.html
│ │ │ │ │ └── setorder.html
│ │ │ ├── observables.html
│ │ │ ├── overview.html
│ │ │ ├── relations.html
│ │ │ ├── report
│ │ │ │ ├── add.html
│ │ │ │ ├── addChild.html
│ │ │ │ ├── details.html
│ │ │ │ ├── edit.html
│ │ │ │ └── reference
│ │ │ │ │ ├── add.html
│ │ │ │ │ ├── details.html
│ │ │ │ │ └── edit.html
│ │ │ └── reports.html
│ │ ├── serach.html
│ │ ├── unpublished.html
│ │ └── unpublished
│ │ │ ├── attributes.html
│ │ │ ├── objects.html
│ │ │ ├── observables.html
│ │ │ └── uevents.html
│ ├── handlers
│ │ ├── attribtues
│ │ │ ├── add
│ │ │ │ ├── combobox.html
│ │ │ │ ├── date.html
│ │ │ │ ├── file.html
│ │ │ │ ├── link.html
│ │ │ │ ├── multiline.html
│ │ │ │ ├── plain.html
│ │ │ │ └── text.html
│ │ │ ├── edit
│ │ │ │ ├── combobox.html
│ │ │ │ ├── date.html
│ │ │ │ ├── file.html
│ │ │ │ ├── link.html
│ │ │ │ ├── multiline.html
│ │ │ │ ├── plain.html
│ │ │ │ └── text.html
│ │ │ └── view
│ │ │ │ ├── combobox.html
│ │ │ │ ├── date.html
│ │ │ │ ├── file.html
│ │ │ │ ├── link.html
│ │ │ │ ├── multiline.html
│ │ │ │ ├── plain.html
│ │ │ │ └── text.html
│ │ └── references
│ │ │ ├── add
│ │ │ ├── file.html
│ │ │ ├── link.html
│ │ │ ├── plain.html
│ │ │ └── rtticket.html
│ │ │ ├── edit
│ │ │ ├── file.html
│ │ │ ├── link.html
│ │ │ ├── plain.html
│ │ │ └── rtticket.html
│ │ │ └── view
│ │ │ ├── file.html
│ │ │ ├── link.html
│ │ │ ├── plain.html
│ │ │ └── rtticket.html
│ ├── help
│ │ ├── about.html
│ │ ├── api.html
│ │ └── layout.html
│ ├── home.html
│ ├── layout.html
│ ├── login.html
│ ├── logout.html
│ └── main.html
└── swagger.html
├── maintenance.py
├── scheduler.py
└── scripts
├── install
├── database
│ ├── attributes.json
│ ├── conditions.json
│ ├── db_data.py
│ ├── db_init.py
│ ├── objects.json
│ └── references.json
├── nginx
│ └── ce1sus_tmpl
└── uwsgi
│ └── ce1sus.ini_tmpl
├── migration
├── dump_0.10.py
└── migrate_0.10_to_0.11.0.py
└── updates
└── def_update.py
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS generated files #
2 | ######################
3 | *.pyc
4 | *~
5 | *.swp
6 | rtkit
7 | magic.py
8 |
9 | # EclipseGenerated #
10 | ####################
11 | .project
12 | .settings
13 | .pydevproject
14 |
15 | !.gitignore
16 |
17 | /oldCe1sus
18 | /python-libs
19 | /reports
20 | /mysql_backup.sh
21 | /cover.sh
22 | /sonar-project.properties
23 | /files
24 | /gpgkey
25 | /gpgkeys
26 | /sessions
27 | /guy.asc
28 | /mykey.asc
29 | /mykeyfile.asc
30 | /mysql_backup_local.sh
31 | /output.html
32 | /public.asc
33 | /test.py
34 | /test2.py
35 | /test3.py
36 | /Copy ce1sus_orig.sqlite
37 | /ce1sus_orig.sqlite
38 | /libtaxii
39 | /libs/
40 | /log/
41 | /stix/
42 | /cybox/
43 | /lib/
44 | /__init__.py
45 | /dumps/
46 | /eml_parser/
47 | /openioc_to_cybox.py
48 | /openioc.py
49 | /ioc_observable.py
50 |
51 | config/ce1sus.conf
52 | config/cherrypy.conf
53 | config/handlers.conf
54 | gpg/
55 |
56 | cybox
57 | stix
58 | eml_parser
59 | /openiocdump/
60 |
--------------------------------------------------------------------------------
/.landscape.yml:
--------------------------------------------------------------------------------
1 | pep8:
2 | disable:
3 | - E111
4 | - E114
5 | pylint:
6 | disable:
7 | - W0311
8 |
--------------------------------------------------------------------------------
/ce1sus/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/__init__.py
--------------------------------------------------------------------------------
/ce1sus/common/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/common/__init__.py
--------------------------------------------------------------------------------
/ce1sus/controllers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/controllers/__init__.py
--------------------------------------------------------------------------------
/ce1sus/controllers/admin/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/controllers/admin/__init__.py
--------------------------------------------------------------------------------
/ce1sus/controllers/common/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/controllers/common/__init__.py
--------------------------------------------------------------------------------
/ce1sus/controllers/events/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/controllers/events/__init__.py
--------------------------------------------------------------------------------
/ce1sus/db/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/db/__init__.py
--------------------------------------------------------------------------------
/ce1sus/db/brokers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/db/brokers/__init__.py
--------------------------------------------------------------------------------
/ce1sus/db/brokers/common/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/db/brokers/common/__init__.py
--------------------------------------------------------------------------------
/ce1sus/db/brokers/common/processbroker.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Nov 9, 2014
7 | """
8 | import sqlalchemy.orm.exc
9 |
10 | from ce1sus.db.classes.processitem import ProcessItem, ProcessStatus
11 | from ce1sus.db.common.broker import BrokerBase, NothingFoundException, BrokerException
12 |
13 |
14 | __author__ = 'Weber Jean-Paul'
15 | __email__ = 'jean-paul.weber@govcert.etat.lu'
16 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
17 | __license__ = 'GPL v3+'
18 |
19 |
20 | class ProcessBroker(BrokerBase):
21 |
22 | def get_broker_class(self):
23 | """
24 | overrides BrokerBase.get_broker_class
25 | """
26 | return ProcessItem
27 |
28 | def get_scheduled_process_items(self):
29 | try:
30 | process_id = ProcessStatus.SCHEDULED
31 | result = self.session.query(ProcessItem).filter(ProcessItem.db_status == process_id)
32 | return result.all()
33 | except sqlalchemy.orm.exc.NoResultFound:
34 | raise NothingFoundException('Nothing found')
35 | except sqlalchemy.exc.SQLAlchemyError as error:
36 | raise BrokerException(error)
37 |
--------------------------------------------------------------------------------
/ce1sus/db/brokers/config.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Feb 2, 2014
7 | """
8 | import sqlalchemy.orm.exc
9 |
10 | from ce1sus.db.classes.config import Ce1susConfig
11 | from ce1sus.db.common.broker import BrokerBase, NothingFoundException, BrokerException, TooManyResultsFoundException
12 |
13 |
14 | __author__ = 'Weber Jean-Paul'
15 | __email__ = 'jean-paul.weber@govcert.etat.lu'
16 | __copyright__ = 'Copyright 2013, GOVCERT Luxembourg'
17 | __license__ = 'GPL v3+'
18 |
19 |
20 | class Ce1susConfigBroker(BrokerBase):
21 | """This is the interface between python an the database"""
22 |
23 | def get_broker_class(self):
24 | """
25 | overrides BrokerBase.get_broker_class
26 | """
27 | return Ce1susConfig
28 |
29 | def get_by_key(self, key):
30 | """
31 | Returns a Ce1susConfig by it's key
32 | """
33 | try:
34 | return self.session.query(Ce1susConfig).filter(Ce1susConfig.key == key).one()
35 | except sqlalchemy.orm.exc.NoResultFound:
36 | raise NothingFoundException(u'Nothing found with key :{0}'.format(key))
37 | except sqlalchemy.orm.exc.MultipleResultsFound:
38 | raise TooManyResultsFoundException('Too many results found for key :{0}'.format(key))
39 | except sqlalchemy.exc.SQLAlchemyError as error:
40 | raise BrokerException(error)
41 |
--------------------------------------------------------------------------------
/ce1sus/db/brokers/definitions/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/db/brokers/definitions/__init__.py
--------------------------------------------------------------------------------
/ce1sus/db/brokers/definitions/conditionbroker.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Nov 6, 2014
7 | """
8 | from sqlalchemy.exc import SQLAlchemyError
9 | from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
10 |
11 | from ce1sus.db.classes.attribute import Condition
12 | from ce1sus.db.common.broker import BrokerBase, NothingFoundException, TooManyResultsFoundException, BrokerException
13 |
14 |
15 | __author__ = 'Weber Jean-Paul'
16 | __email__ = 'jean-paul.weber@govcert.etat.lu'
17 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
18 | __license__ = 'GPL v3+'
19 |
20 |
21 | class ConditionBroker(BrokerBase):
22 |
23 | def get_broker_class(self):
24 | """
25 | overrides BrokerBase.get_broker_class
26 | """
27 | return Condition
28 |
29 | def get_condition_by_value(self, value):
30 | try:
31 | if value == None:
32 | value = 'Equals'
33 | return self.session.query(Condition).filter(Condition.value == value).one()
34 | except NoResultFound:
35 | raise NothingFoundException('Nothing found with ID :{0} in {1}'.format(value, self.__class__.__name__))
36 | except MultipleResultsFound:
37 | raise TooManyResultsFoundException('Too many results found for ID :{0}'.format(value))
38 | except SQLAlchemyError as error:
39 | raise BrokerException(error)
40 |
--------------------------------------------------------------------------------
/ce1sus/db/brokers/definitions/handlerdefinitionbroker.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Dec 20, 2013
7 | """
8 |
9 | from ce1sus.db.classes.definitions import AttributeHandler
10 | from ce1sus.db.common.broker import BrokerBase
11 |
12 |
13 | __author__ = 'Weber Jean-Paul'
14 | __email__ = 'jean-paul.weber@govcert.etat.lu'
15 | __copyright__ = 'Copyright 2013, GOVCERT Luxembourg'
16 | __license__ = 'GPL v3+'
17 |
18 |
19 | class AttributeHandlerBroker(BrokerBase):
20 | """
21 | Attribute handler broker
22 | """
23 |
24 | def get_broker_class(self):
25 | """
26 | overrides BrokerBase.get_broker_class
27 | """
28 | return AttributeHandler
29 |
--------------------------------------------------------------------------------
/ce1sus/db/brokers/event/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/db/brokers/event/__init__.py
--------------------------------------------------------------------------------
/ce1sus/db/brokers/event/comments.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Dec 22, 2014
7 | """
8 | from ce1sus.db.classes.event import Comment
9 | from ce1sus.db.common.broker import BrokerBase
10 |
11 |
12 | __author__ = 'Weber Jean-Paul'
13 | __email__ = 'jean-paul.weber@govcert.etat.lu'
14 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
15 | __license__ = 'GPL v3+'
16 |
17 |
18 | class CommentBroker(BrokerBase):
19 |
20 | def get_broker_class(self):
21 | return Comment
22 |
--------------------------------------------------------------------------------
/ce1sus/db/brokers/event/observablebroker.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """This module provides container classes and interfaces
4 | for inserting data into the database.
5 |
6 | Created on Jul 9, 2013
7 | """
8 | import sqlalchemy.orm.exc
9 | from sqlalchemy.sql.expression import and_
10 |
11 | from ce1sus.db.classes.observables import Observable
12 | from ce1sus.db.common.broker import BrokerBase, NothingFoundException, TooManyResultsFoundException, BrokerException
13 |
14 |
15 | __author__ = 'Weber Jean-Paul'
16 | __email__ = 'jean-paul.weber@govcert.etat.lu'
17 | __copyright__ = 'Copyright 2013, GOVCERT Luxembourg'
18 | __license__ = 'GPL v3+'
19 |
20 |
21 | # pylint: disable=R0904
22 | class ObservableBroker(BrokerBase):
23 | """
24 | This broker handles all operations on event objects
25 | """
26 | def __init__(self, session):
27 | BrokerBase.__init__(self, session)
28 |
29 | def get_broker_class(self):
30 | """
31 | overrides BrokerBase.get_broker_class
32 | """
33 | return Observable
34 |
35 | def get_by_id_and_event_id(self, identifier, event_id):
36 | try:
37 | result = self.session.query(Observable).filter(and_(Observable.identifier == identifier, Observable.event_id == event_id)).one()
38 | except sqlalchemy.orm.exc.NoResultFound:
39 | raise NothingFoundException('No observable found with ID :{0} in event with ID {1}'.format(identifier, event_id))
40 | except sqlalchemy.orm.exc.MultipleResultsFound:
41 | raise TooManyResultsFoundException('Too many results found for observable with ID {0} in event with ID {1}'.format(identifier, event_id))
42 | except sqlalchemy.exc.SQLAlchemyError as error:
43 | raise BrokerException(error)
44 |
45 | return result
46 |
--------------------------------------------------------------------------------
/ce1sus/db/brokers/mispbroker.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Apr 7, 2015
7 | """
8 | from ce1sus.db.classes.log import ErrorMispAttribute
9 | from ce1sus.db.common.broker import BrokerBase
10 |
11 |
12 | __author__ = 'Weber Jean-Paul'
13 | __email__ = 'jean-paul.weber@govcert.etat.lu'
14 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
15 | __license__ = 'GPL v3+'
16 |
17 |
18 | class ErrorMispBroker(BrokerBase):
19 |
20 | def __init__(self, session):
21 | BrokerBase.__init__(self, session)
22 |
23 | def get_broker_class(self):
24 | """
25 | overrides BrokerBase.get_broker_class
26 | """
27 | return ErrorMispAttribute
28 |
--------------------------------------------------------------------------------
/ce1sus/db/brokers/permissions/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/db/brokers/permissions/__init__.py
--------------------------------------------------------------------------------
/ce1sus/db/classes/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/db/classes/__init__.py
--------------------------------------------------------------------------------
/ce1sus/db/classes/config.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Oct 20, 2014
7 | """
8 | from sqlalchemy.schema import Column
9 | from sqlalchemy.types import Unicode, UnicodeText
10 |
11 | from ce1sus.db.classes.basedbobject import SimpleLogingInformations
12 | from ce1sus.db.common.session import Base
13 |
14 |
15 | __author__ = 'Weber Jean-Paul'
16 | __email__ = 'jean-paul.weber@govcert.etat.lu'
17 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
18 | __license__ = 'GPL v3+'
19 |
20 |
21 | class Ce1susConfig(SimpleLogingInformations, Base):
22 | key = Column('key', Unicode(255, collation='utf8_unicode_ci'), nullable=False, index=True)
23 | value = Column('value', UnicodeText(collation='utf8_unicode_ci'), nullable=False)
24 |
25 | def validate(self):
26 | # TODO: create validation for ce1susconfig
27 | """
28 | Returns true if the object is valid
29 | """
30 | return self
31 |
--------------------------------------------------------------------------------
/ce1sus/db/classes/log.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Apr 7, 2015
7 | """
8 |
9 | from sqlalchemy.schema import Column, ForeignKey
10 | from sqlalchemy.types import BigInteger, UnicodeText, Unicode, Boolean
11 |
12 | from ce1sus.db.common.session import Base
13 |
14 |
15 | __author__ = 'Weber Jean-Paul'
16 | __email__ = 'jean-paul.weber@govcert.etat.lu'
17 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
18 | __license__ = 'GPL v3+'
19 |
20 |
21 | class ErrorMispAttribute(Base):
22 |
23 | object_id = Column('object_id', BigInteger, ForeignKey('objects.object_id', onupdate='cascade', ondelete='cascade'))
24 |
25 | value = Column('value', UnicodeText(collation='utf8_unicode_ci'))
26 | category = Column('category', Unicode(255, collation='utf8_unicode_ci'))
27 | type_ = Column('type', Unicode(255, collation='utf8_unicode_ci'))
28 | observable_id = Column('observable_id', BigInteger, ForeignKey('observables.observable_id', onupdate='cascade', ondelete='cascade'))
29 |
30 | misp_id = Column('misp_id', Unicode(255, collation='utf8_unicode_ci'))
31 | is_ioc = Column('is_ioc', Boolean)
32 | share = Column('share', Boolean)
33 |
34 | event_id = Column('event_id', BigInteger, ForeignKey('events.event_id', onupdate='cascade', ondelete='cascade'))
35 | message = Column('message', UnicodeText(collation='utf8_unicode_ci'))
36 | orig_uuid = Column('orig_uuid', Unicode(45, collation='utf8_unicode_ci'))
37 |
38 | def validate(self):
39 | return True
40 |
--------------------------------------------------------------------------------
/ce1sus/db/classes/ttp.py:
--------------------------------------------------------------------------------
1 | from sqlalchemy.orm import relationship
2 | from sqlalchemy.schema import Table, Column, ForeignKey
3 | from sqlalchemy.types import BigInteger
4 |
5 | from ce1sus.db.classes.basedbobject import ExtendedLogingInformations
6 | from ce1sus.db.classes.indicator import Killchain
7 | from ce1sus.db.common.session import Base
8 |
9 |
10 | _REL_TTPS_KILLCHAINS = Table('rel_ttps_killchains', Base.metadata,
11 | Column('rtk_id', BigInteger, primary_key=True, nullable=False, index=True),
12 | Column('ttps_id', BigInteger, ForeignKey('ttpss.ttps_id', ondelete='cascade', onupdate='cascade'), primary_key=True, index=True),
13 | Column('killchain_id', BigInteger, ForeignKey('killchains.killchain_id', ondelete='cascade', onupdate='cascade'), primary_key=True, index=True)
14 | )
15 |
16 |
17 | class TTPs(ExtendedLogingInformations, Base):
18 | event = relationship('Event', uselist=False)
19 | event_id = Column('event_id', BigInteger, ForeignKey('events.event_id', onupdate='cascade', ondelete='cascade'), nullable=False, index=True)
20 | kill_chains = relationship('Killchain', secondary='rel_ttps_killchains')
21 |
--------------------------------------------------------------------------------
/ce1sus/db/common/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/db/common/__init__.py
--------------------------------------------------------------------------------
/ce1sus/db/common/connectors/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/db/common/connectors/__init__.py
--------------------------------------------------------------------------------
/ce1sus/db/common/recepie/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Unowned code
3 | """
4 |
--------------------------------------------------------------------------------
/ce1sus/depricated/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/depricated/__init__.py
--------------------------------------------------------------------------------
/ce1sus/depricated/brokers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/depricated/brokers/__init__.py
--------------------------------------------------------------------------------
/ce1sus/depricated/brokers/basefoo.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Jan 8, 2015
7 | """
8 | from sqlalchemy.ext.declarative import declarative_base
9 |
10 |
11 | __author__ = 'Weber Jean-Paul'
12 | __email__ = 'jean-paul.weber@govcert.etat.lu'
13 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
14 | __license__ = 'GPL v3+'
15 |
16 |
17 | BASE = declarative_base()
18 |
--------------------------------------------------------------------------------
/ce1sus/depricated/classes/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/depricated/classes/__init__.py
--------------------------------------------------------------------------------
/ce1sus/depricated/classes/oldce1susconfig.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Jan 8, 2015
7 | """
8 | from sqlalchemy.schema import Column
9 | from sqlalchemy.types import Integer, String
10 |
11 | from ce1sus.db.common.session import BaseClass
12 | from ce1sus.depricated.brokers.basefoo import BASE
13 |
14 |
15 | __author__ = 'Weber Jean-Paul'
16 | __email__ = 'jean-paul.weber@govcert.etat.lu'
17 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
18 | __license__ = 'GPL v3+'
19 |
20 |
21 | class OldCe1susConfig(BASE):
22 | """
23 | Container class for the ce1sus configuration
24 | """
25 | __tablename__ = 'ce1sus'
26 | identifier = Column('ce1sus_id', Integer, primary_key=True)
27 | key = Column('key', String)
28 | value = Column('value', String)
29 |
30 | def to_dict(self):
31 | return {'identifier': BaseClass.convert_value(self.identifier),
32 | 'key': BaseClass.convert_value(self.key),
33 | 'value': BaseClass.convert_value(self.value)
34 | }
35 |
36 | def validate(self):
37 | """
38 | Returns true if the object is valid
39 | """
40 | return self
41 |
--------------------------------------------------------------------------------
/ce1sus/depricated/helpers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/depricated/helpers/__init__.py
--------------------------------------------------------------------------------
/ce1sus/handlers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/handlers/__init__.py
--------------------------------------------------------------------------------
/ce1sus/handlers/attributes/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/handlers/attributes/__init__.py
--------------------------------------------------------------------------------
/ce1sus/handlers/attributes/datehandler.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | module handing the generic handler
5 |
6 | Created: Aug 22, 2013
7 | """
8 | from ce1sus.db.classes.common import ValueTable
9 | from ce1sus.handlers.attributes.generichandler import GenericHandler
10 |
11 |
12 | __author__ = 'Weber Jean-Paul'
13 | __email__ = 'jean-paul.weber@govcert.etat.lu'
14 | __copyright__ = 'Copyright 2013, GOVCERT Luxembourg'
15 | __license__ = 'GPL v3+'
16 |
17 |
18 | class DateHandler(GenericHandler):
19 | """The generic handler for handling known atomic values"""
20 |
21 | @staticmethod
22 | def get_uuid():
23 | return '11406d00-8dec-11e3-baa8-0800200c9a66'
24 |
25 | @staticmethod
26 | def get_description():
27 | return u'Handler for Dates'
28 |
29 | @staticmethod
30 | def get_allowed_types():
31 | return [ValueTable.DATE_VALUE]
32 |
33 | def get_view_type(self):
34 | return 'date'
35 |
--------------------------------------------------------------------------------
/ce1sus/handlers/attributes/linkhandler.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | module providing support for tickets handling
5 |
6 | Created: Aug, 2013
7 | """
8 | from ce1sus.handlers.references.generichandler import GenericHandler
9 |
10 |
11 | __author__ = 'Weber Jean-Paul'
12 | __email__ = 'jean-paul.weber@govcert.etat.lu'
13 | __copyright__ = 'Copyright 2013, GOVCERT Luxembourg'
14 | __license__ = 'GPL v3+'
15 |
16 |
17 | class LinkHandler(GenericHandler):
18 |
19 | @staticmethod
20 | def get_uuid():
21 | return 'b69aca60-a2dc-11e4-bcd8-0800200c9a66'
22 |
23 | @staticmethod
24 | def get_description():
25 | return u'Handler for Links'
26 |
27 | def get_view_type(self):
28 | return 'link'
29 |
30 | def require_js(self):
31 | return False
32 |
--------------------------------------------------------------------------------
/ce1sus/handlers/attributes/texthandler.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | module handing the generic handler
5 |
6 | Created: Aug 22, 2013
7 | """
8 | from ce1sus.db.classes.common import ValueTable
9 | from ce1sus.handlers.attributes.generichandler import GenericHandler
10 |
11 |
12 | __author__ = 'Weber Jean-Paul'
13 | __email__ = 'jean-paul.weber@govcert.etat.lu'
14 | __copyright__ = 'Copyright 2013, GOVCERT Luxembourg'
15 | __license__ = 'GPL v3+'
16 |
17 |
18 | class TextHandler(GenericHandler):
19 | """The generic handler for handling known atomic values"""
20 | @staticmethod
21 | def get_uuid():
22 | return '1a8ec7d0-8dec-11e3-baa8-0800200c9a66'
23 |
24 | @staticmethod
25 | def get_description():
26 | return u'Text Handler, usable for a textlines'
27 |
28 | def get_additional_object_chksums(self):
29 | return list()
30 |
31 | @staticmethod
32 | def get_allowed_types():
33 | return [ValueTable.TEXT_VALUE]
34 |
35 | def get_additinal_attribute_chksums(self):
36 | return list()
37 |
38 | def get_view_type(self):
39 | return 'text'
40 |
--------------------------------------------------------------------------------
/ce1sus/handlers/references/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/handlers/references/__init__.py
--------------------------------------------------------------------------------
/ce1sus/handlers/references/generichandler.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | module handing the generic handler
5 |
6 | Created: Aug 22, 2013
7 | """
8 |
9 |
10 | from ce1sus.handlers.base import HandlerBase
11 |
12 |
13 | __author__ = 'Weber Jean-Paul'
14 | __email__ = 'jean-paul.weber@govcert.etat.lu'
15 | __copyright__ = 'Copyright 2013, GOVCERT Luxembourg'
16 | __license__ = 'GPL v3+'
17 |
18 |
19 | class GenericHandler(HandlerBase):
20 | """The generic handler for handling known atomic values"""
21 |
22 | @staticmethod
23 | def get_uuid():
24 | return '4af84930-97e8-11e4-bd06-0800200c9a66'
25 |
26 | @staticmethod
27 | def get_description():
28 | return u'Generic Handler, usable for a single line entry'
29 |
30 | def insert(self, report, user, json):
31 | definition = self.get_main_definition()
32 | reference = self.create_reference(report, definition, user, json)
33 | value = json.get('value', None)
34 | reference.value = value
35 | return reference, None, None
36 |
37 | def get_data(self, reference, parameters):
38 | return list()
39 |
40 | def get_view_type(self):
41 | return 'plain'
42 |
43 | def update(self, reference, user, json):
44 | reference.populate(json)
45 | return reference
46 |
47 | def require_js(self):
48 | return False
49 |
50 | def get_additinal_reference_chksums(self):
51 | return list()
52 |
53 | def get_additinal_attribute_chksums(self):
54 | return self.get_additinal_reference_chksums()
55 |
--------------------------------------------------------------------------------
/ce1sus/handlers/references/linkhandler.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | module providing support for tickets handling
5 |
6 | Created: Aug, 2013
7 | """
8 | from ce1sus.handlers.references.generichandler import GenericHandler
9 |
10 |
11 | __author__ = 'Weber Jean-Paul'
12 | __email__ = 'jean-paul.weber@govcert.etat.lu'
13 | __copyright__ = 'Copyright 2013, GOVCERT Luxembourg'
14 | __license__ = 'GPL v3+'
15 |
16 |
17 | class LinkHandler(GenericHandler):
18 |
19 | @staticmethod
20 | def get_uuid():
21 | return 'b69aca60-a2dc-11e4-bcd8-0800200c9a66'
22 |
23 | @staticmethod
24 | def get_description():
25 | return u'Handler for Links'
26 |
27 | def get_view_type(self):
28 | return 'link'
29 |
30 | def require_js(self):
31 | return False
32 |
--------------------------------------------------------------------------------
/ce1sus/handlers/references/texthandler.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | module handing the generic handler
5 |
6 | Created: Aug 22, 2013
7 | """
8 | from ce1sus.db.classes.common import ValueTable
9 | from ce1sus.handlers.references.generichandler import GenericHandler
10 |
11 |
12 | __author__ = 'Weber Jean-Paul'
13 | __email__ = 'jean-paul.weber@govcert.etat.lu'
14 | __copyright__ = 'Copyright 2013, GOVCERT Luxembourg'
15 | __license__ = 'GPL v3+'
16 |
17 |
18 | class TextHandler(GenericHandler):
19 | """The generic handler for handling known atomic values"""
20 | @staticmethod
21 | def get_uuid():
22 | return '04fc6ca0-d3c4-11e4-8830-0800200c9a66'
23 |
24 | @staticmethod
25 | def get_description():
26 | return u'Text Handler, usable for a textlines'
27 |
28 | def get_additional_object_chksums(self):
29 | return list()
30 |
31 | @staticmethod
32 | def get_allowed_types():
33 | return [ValueTable.TEXT_VALUE]
34 |
35 | def get_additinal_attribute_chksums(self):
36 | return list()
37 |
38 | def get_view_type(self):
39 | return 'text'
40 |
--------------------------------------------------------------------------------
/ce1sus/helpers/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Package for general helpers
3 | """
4 |
--------------------------------------------------------------------------------
/ce1sus/helpers/common/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/helpers/common/__init__.py
--------------------------------------------------------------------------------
/ce1sus/helpers/common/validator/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/helpers/common/validator/__init__.py
--------------------------------------------------------------------------------
/ce1sus/mappers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/mappers/__init__.py
--------------------------------------------------------------------------------
/ce1sus/mappers/misp/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/mappers/misp/__init__.py
--------------------------------------------------------------------------------
/ce1sus/mappers/stix/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/mappers/stix/__init__.py
--------------------------------------------------------------------------------
/ce1sus/mappers/stix/helpers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/mappers/stix/helpers/__init__.py
--------------------------------------------------------------------------------
/ce1sus/plugins/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/plugins/__init__.py
--------------------------------------------------------------------------------
/ce1sus/plugins/base.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Oct 28, 2014
7 | """
8 | from ce1sus.db.common.session import SessionManager
9 | from ce1sus.helpers.common.debug import Log
10 |
11 |
12 | __author__ = 'Weber Jean-Paul'
13 | __email__ = 'jean-paul.weber@govcert.etat.lu'
14 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
15 | __license__ = 'GPL v3+'
16 |
17 | PLUGIN_ROOT = 'ce1sus.plugins'
18 |
19 |
20 | class PluginException(Exception):
21 | pass
22 |
23 |
24 | def plugin_web_method(method):
25 | # TODO: check if the method has the right amount of arguments and the right ones
26 | method.web_plugin = True
27 | return method
28 |
29 |
30 | def plugin_internal_method(method):
31 | method.internal_plugin = True
32 | return method
33 |
34 |
35 | class BasePlugin(object):
36 |
37 | def __init__(self, config):
38 | self.conig = config
39 | self.__logger = Log(config)
40 | self.session_manager = SessionManager(config)
41 |
42 | @property
43 | def logger(self):
44 | return self.__logger.get_logger(self.__class__.__name__)
45 |
46 | def broker_factory(self, clazz):
47 | """
48 | Instantiates a broker.
49 |
50 | Note: In short sets up the broker in a correct manner with all the
51 | required settings
52 |
53 | :param clazz: The BrokerClass to be instantiated
54 | :type clazz: Extension of brokerbase
55 |
56 | :returns: Instance of a broker
57 | """
58 | self.logger.debug('Create broker for {0}'.format(clazz))
59 | return self.session_manager.broker_factory(clazz)
60 |
--------------------------------------------------------------------------------
/ce1sus/plugins/mailplugin.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Nov 7, 2014
7 | """
8 | from ce1sus.helpers.common.mailer import Mailer, Mail, MailerException
9 | from ce1sus.plugins.base import BasePlugin, plugin_internal_method, PluginException
10 |
11 |
12 | __author__ = 'Weber Jean-Paul'
13 | __email__ = 'jean-paul.weber@govcert.etat.lu'
14 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
15 | __license__ = 'GPL v3+'
16 |
17 |
18 | class MailPlugin(BasePlugin):
19 |
20 | def __init__(self, config):
21 | BasePlugin.__init__(self, config)
22 | self.mailer = Mailer(config)
23 |
24 | @plugin_internal_method
25 | def create_mail(self, subject, reciever, body, encrypt=True):
26 | mail = Mail()
27 | mail.subject = subject
28 | # if set to none the default sender is taken
29 | mail.sender = None
30 | mail.body = body
31 | mail.reciever = reciever
32 | mail.encrypt = encrypt
33 |
34 | @plugin_internal_method
35 | def send_mail(self, mail):
36 | try:
37 | self.mailer.send_mail(mail)
38 | except MailerException as error:
39 | raise PluginException(error)
40 |
41 | @plugin_internal_method
42 | def import_gpg_key(self, gpg_key):
43 | self.mailer.import_gpg(gpg_key)
44 |
45 | @plugin_internal_method
46 | def get_instance(self):
47 | return self
48 |
--------------------------------------------------------------------------------
/ce1sus/views/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/adapters/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/adapters/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/adapters/misp/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/adapters/misp/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/api/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/api/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version2/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/api/version2/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version2/depricated.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Mar 19, 2015
7 | """
8 | import cherrypy
9 |
10 | from ce1sus.views.web.common.base import BaseView
11 |
12 |
13 | __author__ = 'Weber Jean-Paul'
14 | __email__ = 'jean-paul.weber@govcert.etat.lu'
15 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
16 | __license__ = 'GPL v3+'
17 |
18 |
19 | class DepricatedView(BaseView):
20 |
21 | @cherrypy.expose
22 | @cherrypy.tools.allow(methods=['GET', 'POST', 'PUT', 'DELETE'])
23 | def index(self):
24 | raise cherrypy.HTTPError(status=410, message='The interface for version 0.2.0 is depricated use 0.3.0 instead')
25 |
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version3/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/api/version3/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version3/handlers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/api/version3/handlers/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version3/handlers/admin/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/api/version3/handlers/admin/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version3/handlers/admin/adminindicatorhandler.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Mar 16, 2015
7 | """
8 | from ce1sus.controllers.events.indicatorcontroller import IndicatorController
9 | from ce1sus.views.web.api.version3.handlers.restbase import RestBaseHandler, rest_method, methods, require
10 |
11 |
12 | __author__ = 'Weber Jean-Paul'
13 | __email__ = 'jean-paul.weber@govcert.etat.lu'
14 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
15 | __license__ = 'GPL v3+'
16 |
17 |
18 | class AdminIndicatorTypesHandler(RestBaseHandler):
19 |
20 | def __init__(self, config):
21 | RestBaseHandler.__init__(self, config)
22 | self.indicator_controller = self.controller_factory(IndicatorController)
23 |
24 | @rest_method(default=True)
25 | @methods(allowed=['GET'])
26 | @require()
27 | def default(self, **args):
28 | # TODO inmplement indicator handler
29 | details = self.get_detail_value(args)
30 | inflated = self.get_inflated_value(args)
31 | types = self.indicator_controller.get_all_types()
32 | result = list()
33 | for type_ in types:
34 | result.append(type_.to_dict(details, inflated))
35 | return result
36 |
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version3/handlers/admin/adminvalidationhandler.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Dec 29, 2014
7 | """
8 | from ce1sus.controllers.events.events import EventsController
9 | from ce1sus.views.web.api.version3.handlers.restbase import RestBaseHandler, rest_method, methods, require
10 | from ce1sus.views.web.common.decorators import validate
11 |
12 |
13 | __author__ = 'Weber Jean-Paul'
14 | __email__ = 'jean-paul.weber@govcert.etat.lu'
15 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
16 | __license__ = 'GPL v3+'
17 |
18 |
19 | class ValidationHandler(RestBaseHandler):
20 |
21 | def __init__(self, config):
22 | RestBaseHandler.__init__(self, config)
23 | self.events_controller = self.controller_factory(EventsController)
24 |
25 | @rest_method()
26 | @methods(allowed=['GET'])
27 | @require(validate())
28 | def unvalidated(self, **args):
29 | # default settings as not to list to much
30 | parameters = args.get('parameters')
31 | count = parameters.get('count', 10)
32 | page = parameters.get('page', 1)
33 | details = self.get_detail_value(args)
34 | events, total_events = self.events_controller.get_unvalidated_events(page, count, self.get_user(), parameters)
35 | result = list()
36 | for event in events:
37 | result.append(event.to_dict(details, False))
38 | return {'total': total_events, 'data': result}
39 |
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version3/handlers/common/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/api/version3/handlers/common/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version3/handlers/common/grouphandler.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Dec 19, 2014
7 | """
8 | from ce1sus.controllers.admin.group import GroupController
9 | from ce1sus.controllers.base import ControllerException
10 | from ce1sus.views.web.api.version3.handlers.restbase import RestBaseHandler, rest_method, methods, require, RestHandlerException
11 |
12 |
13 | __author__ = 'Weber Jean-Paul'
14 | __email__ = 'jean-paul.weber@govcert.etat.lu'
15 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
16 | __license__ = 'GPL v3+'
17 |
18 |
19 | class GroupHandler(RestBaseHandler):
20 |
21 | def __init__(self, config):
22 | RestBaseHandler.__init__(self, config)
23 | self.group_controller = self.controller_factory(GroupController)
24 |
25 | @rest_method(default=True)
26 | @methods(allowed=['GET'])
27 | @require()
28 | def groups(self, **args):
29 | try:
30 | path = args.get('path')
31 | details = self.get_detail_value(args)
32 | if len(path) > 0:
33 | raise RestHandlerException('Path is too long')
34 | else:
35 | # else return all
36 | groups = self.group_controller.get_all_groups()
37 | result = list()
38 | for group in groups:
39 | result.append(group.to_dict(complete=details))
40 | return result
41 |
42 | except ControllerException as error:
43 | raise RestHandlerException(error)
44 |
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version3/handlers/common/restchecks.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Dec 19, 2014
7 | """
8 | from ce1sus.common.checks import is_user_priviledged
9 | from ce1sus.controllers.base import ControllerException
10 | from ce1sus.views.web.api.version3.handlers.restbase import RestBaseHandler, rest_method, methods, require, RestHandlerException
11 |
12 | __author__ = 'Weber Jean-Paul'
13 | __email__ = 'jean-paul.weber@govcert.etat.lu'
14 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
15 | __license__ = 'GPL v3+'
16 |
17 |
18 | class ChecksHandler(RestBaseHandler):
19 |
20 | def __init__(self, config):
21 | RestBaseHandler.__init__(self, config)
22 |
23 | @rest_method(default=True)
24 | @methods(allowed=['GET'])
25 | @require()
26 | def checks(self, **args):
27 | try:
28 | raise RestHandlerException('No checks selected')
29 | except ControllerException as error:
30 | raise RestHandlerException(error)
31 |
32 | @rest_method(default=True)
33 | @methods(allowed=['GET'])
34 | def isuseradmin(self, **args):
35 | return is_user_priviledged(self.get_user())
36 |
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version3/handlers/events/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/api/version3/handlers/events/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/api/version3/handlers/events/eventshandler.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | (Description)
5 |
6 | Created on Nov 14, 2014
7 | """
8 | from ce1sus.controllers.events.events import EventsController
9 | from ce1sus.views.web.api.version3.handlers.restbase import RestBaseHandler, rest_method, methods, require
10 |
11 |
12 | __author__ = 'Weber Jean-Paul'
13 | __email__ = 'jean-paul.weber@govcert.etat.lu'
14 | __copyright__ = 'Copyright 2013-2014, GOVCERT Luxembourg'
15 | __license__ = 'GPL v3+'
16 |
17 |
18 | class EventsHandler(RestBaseHandler):
19 |
20 | def __init__(self, config):
21 | RestBaseHandler.__init__(self, config)
22 | self.events_controller = self.controller_factory(EventsController)
23 |
24 | @rest_method(default=True)
25 | @methods(allowed=['GET'])
26 | @require()
27 | def events(self, **args):
28 | # default settings as not to list to much
29 | parameters = args.get('parameters')
30 | count = parameters.get('count', None)
31 | if count:
32 | count = int(count)
33 | else:
34 | count = None
35 | page = parameters.get('page', None)
36 | if page:
37 | page = int(page)
38 | if page > 1:
39 | offset = count * (page - 1)
40 | else:
41 | offset = 1
42 | else:
43 | offset = None
44 | details = self.get_detail_value(args)
45 |
46 | events, total_events = self.events_controller.get_events(offset, count, self.get_user(), parameters)
47 | result = list()
48 | for event in events:
49 | result.append(event.to_dict(details, False))
50 | return {'total': total_events, 'data': result}
51 |
--------------------------------------------------------------------------------
/ce1sus/views/web/common/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/common/__init__.py
--------------------------------------------------------------------------------
/ce1sus/views/web/frontend/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GOVCERT-LU/ce1sus/f72de15dd83b404ab836ce841ffe5e0c554a705a/ce1sus/views/web/frontend/__init__.py
--------------------------------------------------------------------------------
/config/ce1sus.conf_tmpl:
--------------------------------------------------------------------------------
1 | # DB Configuration
2 | [SessionManager]
3 | protocol=mysql+mysqldb
4 | username=
5 | password=
6 | host=127.0.0.1
7 | db=
8 | port=3306
9 | debug=no
10 | usecherrypy=yes
11 |
12 | #General configurations for ce1sus
13 | [ce1sus]
14 | #If set to yes emails will be send to the users/groups who can access/see the event
15 | sendmail=yes
16 | useldap=yes
17 | #The following variable be displayed in the title section
18 | environment=LOCAL_DEV
19 | #Not this has to be the external address for ce1sus
20 | baseurl=http://localhost:8080
21 | maintenaceuseruuid=f49eb0ed-438d-49ef-aa19-1d615a3ba01d
22 | usebasicauth=no
23 | #salt used for passwords
24 | salt=SomeReallyIntrestingRandom
25 |
26 | [Logger]
27 | log=Yes
28 | log_file=log/logger.txt
29 | logConsole = Yes
30 | level=DEBUG
31 | size=10000000
32 | backups=1000
33 | syslog=no
34 |
35 | #Configuration for the LDAP server
36 | [LDAP]
37 | server=
38 | usetls=True
39 | users_dn=
40 |
41 | #Configuration for the smtp server
42 | [Mailer]
43 | from=ce1sus@ce1sus.lan
44 | smtp=
45 | port=25
46 | user=
47 | password=
48 | gpgkeys=
49 | passphrase=
50 | keylength=4096
51 | expiredate=2023-01-01
52 |
53 | [MISPAdapter]
54 | dump=yes
55 | file=mispdump
56 |
57 | [OpenIOCAdapter]
58 | file=openiocdump
59 | dump=yes
60 |
61 | [ErrorMails]
62 | enabled=yes
63 | receiver=
64 | sender=ce1sus@ce1sus.lan
65 | subject=ErrorOccureredForCelsus_Local_DEV
66 | smtp=
67 | level=error
68 | user=
69 |
70 | [Plugins]
71 | LdapPlugin=True
72 | MailPlugin=True
--------------------------------------------------------------------------------
/config/cherrypy.conf_tmpl:
--------------------------------------------------------------------------------
1 | [global]
2 | tools.encode.on = True
3 | tools.encode.encoding='UTF-8'
4 | log.screen=True
5 | tools.staticdir.on=True,
6 | tools.staticdir.root='/path/to/ce1sus/htdocs'
7 | tools.staticdir.dir=''
8 | tools.sessions.on=True
9 | tools.sessions.timeout=60
10 | #For http only use
11 | tools.sessions.httponly = True
12 | #uncomment if using https and comment the above
13 | #tools.sessions.secure = True
14 | tools.sessions.storage_type = 'Memcached'
15 | tools.sessions.timeout = 60
16 | tools.auth.on=True
17 | #Do not set caching to true
18 | tools.caching.on=False
19 | tools.db.on=True
20 | tools.sessions.clean_up_delay = 5
21 | request.show_tracebacks=False
22 | #set the port for cherrypy
23 | server.socket_port = 8080
24 | server.socket_host = "0.0.0.0"
--------------------------------------------------------------------------------
/config/handlers.conf_tmpl:
--------------------------------------------------------------------------------
1 | [FileHandler]
2 | files=
3 |
4 | [CVEHandler]
5 | cveUrl=http://cve.mitre.org/cgi-bin/cvename.cgi?name=
6 |
7 | [RTHandler]
8 | rt_user=
9 | rt_password=
10 | rt_url=
11 |
12 | [FileReferenceHandler]
13 | files=
14 |
15 | [FileWithHashesHandler]
16 | files=
17 |
--------------------------------------------------------------------------------
/docs/AUTHORS:
--------------------------------------------------------------------------------
1 | GOVCERT.LU:
2 | -----------
3 | Weber Jean-Paul
12 | The user is now activated
13 |
15 | Please click here to go to the login screen
16 |
22 | The user cannot be activated due to:
23 |
25 | {{response.errors}}
26 |
28 | Please contact the owner of ce1sus for assistance
29 | TODO: Write TODO: Write NOTE: Only custom objects can be edited or deleted. Also to note is that if an object is still referenced it cannot be deleted. TODO: Write TODO: Write TODO: Write TODO: Write
20 | Ce1sus Library
3 | User activation
4 |
5 | Help
2 |
3 | Background Jobs Management
8 |
--------------------------------------------------------------------------------
/htdocs/pages/admin/bgjobs/jobs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/htdocs/pages/admin/condition/conditiondetail.html:
--------------------------------------------------------------------------------
1 |
4 |
31 |
32 | {{item.type_}}
6 | {{item.event_uuid}}
8 |
9 |
11 |
14 | {{item.status}}
16 |
17 |
30 | Condition Details - {{condition.name}}:
2 | Help
2 |
3 |
4 | The conditions are used to determine how the value should be taken into account.
5 |
6 |
7 |
8 |
9 |
25 |
26 |
--------------------------------------------------------------------------------
/htdocs/pages/admin/condition/modals/addconditionmodal.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
14 | Name
11 | Description
12 | Mandatory
13 |
15 |
19 | Value
16 | value of the condition. This can be any kind of text
17 | yes
18 |
20 |
24 | description
21 | Description of the condition
22 | yes
23 | Help
2 |
3 | Group Management
8 | The group has also the same rights are the associated groups, it can be compared as user and groups.
--------------------------------------------------------------------------------
/htdocs/pages/admin/group/modals/addgroupmodal.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Mail Template - {{mail.name}}:
2 | Help
2 |
3 |
4 | A ce1sus objects corresponds to a cybox object, in this section the user is allowed to add custom objects.
5 | The custom objects are "containers" which can be added to an observable.
6 |
7 |
9 |
10 |
11 |
12 |
38 |
39 |
--------------------------------------------------------------------------------
/htdocs/pages/admin/object/modals/addobjectmodal.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
17 | Name
14 | Description
15 | Mandatory
16 |
18 |
22 | name
19 | Name of the object
20 | yes
21 |
23 |
27 | description
24 | Description of the object
25 | yes
26 |
28 |
32 | CHKSUM
29 | Checksum of the object, it is used to determine a definition uniquely
30 | not applicable
31 |
33 |
37 | Default Shareable
34 | If checked the share flag is automatically set when this object is added to an observable.
35 | no
36 | Help
2 |
3 | Help
2 |
3 | Synchronization Server Management
8 |
--------------------------------------------------------------------------------
/htdocs/pages/admin/syncservers/modals/addserver.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Help
3 |
4 | Type Details - {{type.name}}:
2 | Help
2 |
3 | Permissions
6 | Disabled: The user is not able to login anymore
7 | Validate: The user is able to validate events incomming from the REST API
8 | Priviledged:The user is able to access the administration sections (DEPRICATED)
9 | Set Groups: The user is able administer the group (NOT IMPLEMENTED)
--------------------------------------------------------------------------------
/htdocs/pages/admin/user/modals/addusermodal.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 | |
13 | 15 | 17 | |
18 | 23 | |
{{item.int_id}} | 7 |{{item.title}} | 9 |{{item.analysis}} | 11 |{{item.status}} | 13 |15 | {{item.tlp}} | 16 |{{item.creator_group.name}} | 18 |{{item.created_at}} | 20 |21 | 22 | | 23 |
24 |
5 | {{relation.rel_attribute.definition.name}} 6 | | 7 |8 | {{relation.rel_attribute.value}} 9 | | 10 |11 | {{relation.rel_event.title}} 12 | | 13 |14 | |
15 |
Value is required.
14 |Value is too short.
16 |Value is too long.
18 |Value does not match pattern "{{definition.regex}}"
20 |Value is required.
14 |Value is too short.
16 |Value is too long.
18 |Value does not match pattern "{{definition.regex}}"
20 |Value is required.
14 |Value is too short.
16 |Value is too long.
18 |Value does not match pattern "{{definition.regex}}"
20 |Value is required.
14 |Value is too short.
16 |Value is too long.
18 |Value does not match pattern "{{definition.regex}}"
20 |Value is required.
12 |Value is too short.
14 |Value is too long.
16 |Value does not match pattern "{{definition.regex}}"
18 |Value is required.
12 |Value is too short.
14 |Value is too long.
16 |Value does not match pattern "{{definition.regex}}"
18 |Value is required.
13 |Value is too short.
15 |Value is too long.
17 |Value does not match pattern "{{definition.regex}}"
19 |Value is required.
12 |Value is too short.
14 |Value is too long.
16 |Value does not match pattern "{{definition.regex}}"
18 |Value is required.
14 |Value is too short.
16 |Value is too long.
18 |Value does not match pattern "{{definition.regex}}"
20 |Value is required.
14 |Value is too short.
16 |Value is too long.
18 |Value does not match pattern "{{definition.regex}}"
20 |Value is required.
12 |Value is too short.
14 |Value is too long.
16 |Value does not match pattern "{{definition.regex}}"
18 |Value is required.
12 |Value is too short.
14 |Value is too long.
16 |Value does not match pattern "{{definition.regex}}"
18 |Write your about
6 |A thread database
5 |7 | 8 |
You have logged out.
4 |