Skip to content

Commit

Permalink
#64 #78 Organization categories and view reports wrote by an organiza…
Browse files Browse the repository at this point in the history
…tion for vendors
  • Loading branch information
Samuel Hassine committed Jun 26, 2019
1 parent 38585de commit bd85982
Show file tree
Hide file tree
Showing 61 changed files with 1,476 additions and 861 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
APP__REACTIVE: false
GRAKN__HOSTNAME: 127.0.0.1
ELASTICSEARCH__HOSTNAME: 127.0.0.1
- image: graknlabs/grakn:1.5.5
- image: graknlabs/grakn:1.5.6
- image: docker.elastic.co/elasticsearch/elasticsearch:6.7.1
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The structuration of the data is performed using a knowledge schema based on the

The goal is to create a comprehensive tool allowing users to capitalize technical (such as TTPs and observables) and non-technical information (such as suggested attribution, victimlogy etc.) while linking each piece of information to its primary source (a report, a MISP event, etc.), with features such as links between each information, first and last seen dates, levels of confidence etc. The tool is able to use the [MITRE ATT&CK framework](https://attack.mitre.org) (through a [dedicated connector](https://github.com/OpenCTI-Platform/connectors)) to help structure the data. The user can also chose to implement its own datasets.

Once data has been capitalised and processed by the analyst within OpenCTI, new relations [may be inferred](https://opencti-platform.github.io/docs/guides/inferences) from existing ones to facilitate the understanding and the representation of this information. This allow the user to extract and leverage meaningful knowledge from the raw data.
Once data has been capitalized and processed by the analysts within OpenCTI, new relations [may be inferred](https://opencti-platform.github.io/docs/guides/inferences) from existing ones to facilitate the understanding and the representation of this information. This allow the user to extract and leverage meaningful knowledge from the raw data.

OpenCTI not only allows [imports]((https://opencti-platform.github.io/docs/guides/import-data)) but also [exports of data]((https://opencti-platform.github.io/docs/guides/export-data)) under different formats (CSV, STIX2 bundles, etc.). [Connectors](https://github.com/OpenCTI-Platform/connectors) are currently developped to accelerate interactions between the tool and other platforms.

Expand Down
2 changes: 1 addition & 1 deletion opencti-docker/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'
services:
opencti-dev-grakn:
container_name: opencti-dev-grakn
image: graknlabs/grakn:1.5.5
image: graknlabs/grakn:1.5.6
restart: always
ports:
- 48555:48555
Expand Down
4 changes: 3 additions & 1 deletion opencti-docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
grakn:
image: graknlabs/grakn:1.5.5
image: graknlabs/grakn:1.5.6
ports:
- 48555:48555
restart: always
Expand All @@ -20,6 +20,7 @@ services:
context: ./worker
environment:
- RUN_USER=root
- OPENCTI_PORT=8080
volumes:
- "./config:/opt/opencti/shared_config:rw"
links:
Expand All @@ -31,6 +32,7 @@ services:
context: ./integration
environment:
- RUN_USER=root
- OPENCTI_PORT=8080
volumes:
- "./config:/opt/opencti/shared_config:rw"
links:
Expand Down
2 changes: 1 addition & 1 deletion opencti-docker/integration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y upgrade && apt-g
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3 python3-pip curl sudo rsyslog wget netcat locales

# Download archive
RUN wget -O /opt/opencti.tar.gz https://releases.opencti.io/opencti-20190625.tar.gz
RUN wget -O /opt/opencti.tar.gz https://releases.opencti.io/opencti-20190626.tar.gz
RUN cd /opt && tar xvfz opencti.tar.gz

# Set the locale
Expand Down
2 changes: 1 addition & 1 deletion opencti-docker/opencti/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs

# Download archive
RUN wget -O /opt/opencti.tar.gz https://releases.opencti.io/opencti-20190625.tar.gz
RUN wget -O /opt/opencti.tar.gz https://releases.opencti.io/opencti-20190626.tar.gz
RUN cd /opt && tar xvfz opencti.tar.gz

# Expose and entrypoint
Expand Down
12 changes: 10 additions & 2 deletions opencti-docker/opencti/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@
/etc/init.d/rsyslog start

# Wait launching
while ! nc -z elasticsearch 9200; do
while ! nc -z ${ELASTICSEARCH__HOSTNAME} 9200; do
echo "Waiting ElasticSearch to launch..."
sleep 2
done
while ! nc -z grakn 48555; do
while ! nc -z ${GRAKN__HOSTNAME} 48555; do
echo "Waiting Grakn to launch..."
sleep 2
done
while ! nc -z ${REDIS__HOSTNAME} 6379; do
echo "Waiting Redis to launch..."
sleep 2
done
while ! nc -z ${RABBITMQ__HOSTNAME} 5672; do
echo "Waiting RabbitMQ to launch..."
sleep 2
done

# Chown the application
if [ $RUN_USER != "root" ]; then
Expand Down
2 changes: 1 addition & 1 deletion opencti-docker/worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y upgrade && apt-g
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3 python3-pip curl sudo rsyslog wget netcat locales

# Download archive
RUN wget -O /opt/opencti.tar.gz https://releases.opencti.io/opencti-20190625.tar.gz
RUN wget -O /opt/opencti.tar.gz https://releases.opencti.io/opencti-20190626.tar.gz
RUN cd /opt && tar xvfz opencti.tar.gz

# Set the locale
Expand Down
1 change: 1 addition & 0 deletions opencti-docker/worker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ done

# Replace the token in the configuration
sed -i -e "s/REPLACE_API_KEY/$(cat /opt/opencti/shared_config/token)/g" /opt/opencti/worker/config.yml.docker.sample
sed -i -e "s/OPENCTI_PORT/${OPENCTI_PORT}/g" /opt/opencti/worker/config.yml.docker.sample
cp /opt/opencti/worker/config.yml.docker.sample /opt/opencti/shared_config/config.yml

# Chown the application
Expand Down
4 changes: 2 additions & 2 deletions opencti-documentation/docs/installation/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_label: Manual
## Prerequisites

- Node.JS (>= 10)
- Grakn (>= 1.5.2)
- Grakn (>= 1.5.6)
- Redis (>= 3.0)
- ElasticSearch (>= 6)
- RabbitMQ (>= 3.7)
Expand All @@ -20,7 +20,7 @@ $ sudo apt-get install nodejs npm python3 python3-pip
## Download the application files
```bash
$ mkdir /path/to/your/app && cd /path/to/your/app
$ wget https://github.com/LuatixHQ/opencti/releases/download/v0.1/opencti-release-0.1.tar.gz
$ wget https://github.com/OpenCTI-Platform/opencti/releases/download/1.0.0/opencti-release-0.1.tar.gz
$ tar xvfz opencti-release-0.1.tar.gz
```

Expand Down
2 changes: 1 addition & 1 deletion opencti-front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@material-ui/core": "^4.1.1",
"@material-ui/icons": "^4.2.0",
"@material-ui/lab": "^4.0.0-alpha.16",
"@material-ui/pickers": "^3.1.1",
"@material-ui/pickers": "^3.1.2",
"apollo-link": "^1.2.12",
"apollo-link-ws": "^1.0.18",
"babel-plugin-relay": "^5.0.0",
Expand Down
25 changes: 14 additions & 11 deletions opencti-front/src/components/DatePickerField.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import React, { Component } from 'react';
import * as PropTypes from 'prop-types';
import { DatePicker } from '@material-ui/pickers'
import { DatePicker } from '@material-ui/pickers';
import { dateFormat } from '../utils/Time';
import inject18n from './i18n';

class DatePickerField extends Component {
constructor(props) {
super(props);
this.currentDate = this.props.field.value;
}

render() {
const {
t,
Expand All @@ -14,22 +19,20 @@ class DatePickerField extends Component {
fd,
yd,
nsd,
nsdt,
field,
form,
onFocus,
onSubmit,
onChange,
...other
} = this.props;
const currentError = form.errors[field.name];
return (
<DatePicker
variant='inline'
disableToolbar={true}
disableToolbar={false}
autoOk={true}
keyboard={true}
allowKeyboardControl={true}
clearable={true}
name={field.name}
value={field.value}
onFocus={() => {
Expand All @@ -47,12 +50,12 @@ class DatePickerField extends Component {
}
}}
onChange={(date) => {
form.setFieldValue(field.name, date);
if (typeof onChange === 'function') {
onChange(field.name, date);
}
if (typeof onSubmit === 'function') {
onSubmit(field.name, dateFormat(date));
if (this.currentDate !== date) {
form.setFieldValue(field.name, date);
this.currentDate = date;
if (typeof onSubmit === 'function') {
onSubmit(field.name, dateFormat(date));
}
}
}}
format="YYYY-MM-DD"
Expand Down
9 changes: 8 additions & 1 deletion opencti-front/src/private/components/Organizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ const inlineStyles = {
},
name: {
float: 'left',
width: '60%',
width: '40%',
fontSize: 12,
fontWeight: '700',
},
organization_class: {
float: 'left',
width: '20%',
fontSize: 12,
fontWeight: '700',
},
Expand Down Expand Up @@ -214,6 +220,7 @@ class Organizations extends Component {
primary={
<div>
{this.SortHeader('name', 'Name')}
{this.SortHeader('organization_class', 'Organization type')}
{this.SortHeader('created_at', 'Creation date')}
{this.SortHeader('updated_at', 'Modification date')}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import AttackPatternOverview from './AttackPatternOverview';
import AttackPatternIdentity from './AttackPatternIdentity';
import AttackPatternEdition from './AttackPatternEdition';
import EntityExternalReferences from '../external_reference/EntityExternalReferences';
import EntityStixRelationsPie from '../stix_relation/EntityStixRelationsPie';
import EntityCoursesOfAction from '../course_of_action/EntityCoursesOfAction';
import EntityReportsChart from '../report/EntityReportsChart';
import EntityStixRelationsChart from '../stix_relation/EntityStixRelationsChart';

Expand Down Expand Up @@ -52,16 +52,12 @@ class AttackPatternComponent extends Component {
style={{ marginTop: 30 }}
>
<Grid item={true} xs={4}>
<EntityStixRelationsChart
entityId={attackPattern.id}
relationType="uses"
/>
<EntityCoursesOfAction entityId={attackPattern.id} />
</Grid>
<Grid item={true} xs={4}>
<EntityStixRelationsPie
<EntityStixRelationsChart
entityId={attackPattern.id}
entityType="Stix-Domain-Entity"
field="entity_type"
relationType="uses"
/>
</Grid>
<Grid item={true} xs={4}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class AttackPatternEditionContainer extends Component {
onChange={this.handleChangeTab.bind(this)}
>
<Tab label={t('Overview')} />
<Tab label={t('Identity')} />
<Tab label={t('Details')} />
</Tabs>
</AppBar>
{this.state.currentTab === 0 && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AttackPatternKnowledgeComponent extends Component {
const { classes, attackPattern } = this.props;
const link = `/dashboard/techniques/attack_patterns/${
attackPattern.id
}/threats`;
}/knowledge`;
return (
<div className={classes.container}>
<AttackPatternHeader attackPattern={attackPattern} variant="noalias" />
Expand Down
4 changes: 2 additions & 2 deletions opencti-front/src/private/components/campaign/CampaignCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ const styles = theme => ({
},
content: {
width: '100%',
height: 89,
height: 87,
overflow: 'hidden',
paddingTop: 0,
},
contentDummy: {
width: '100%',
height: 89,
height: 87,
overflow: 'hidden',
marginTop: 15,
},
Expand Down
Loading

0 comments on commit bd85982

Please sign in to comment.