Git Product home page Git Product logo

ochi's People

Contributors

aditygrg2 avatar dependabot[bot] avatar dkumiszhan avatar glaslos avatar shanky0 avatar tushar-kalsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ochi's Issues

Apply all enable, saved queries to incoming events

I agree this ended up to be much more complex from a UX point of view.
I wonder if a better approach would be to show on the main page a list with all the enabled queries and the user can define the boolean operator between them. I will create a sketch to make it a bit more clear what I mean.
We should park this ticket until we find a solution that is understandable to the user from a UX point of view.

Support for UDP events in the event filter

We should introduce a tcp and udp filter to include and exclude by transport type.
This is currently not supported as the honeypot needs to indicate the transport type in the event payload.

Leaking sensor IP information

Leaving this here as there are going to be people wanting to discuss this:

There is an obvious possibility of a sensor IP address to be leaked through Ochi. I have addressed this for simple cases in Glutton.

For everyone else: If you hook up your sensor to Ochi, you are responsible for making sure you are not leaking your IP address. We will not sanitize payload data in Ochi.

Statistics client-side

Create a new page with a statistics overview. Statistics consist of aggregations of:

  • Count events by destination port
  • Count events by query match

Statistics are stored client side. They only persist in the local storage.

Improved filter input

Currently, we have a fixed-size input field limiting usability when providing multiple filter rules.
Look at Greynoise input field for inspiration.

  • On focus, expand the input field's width
  • Add a clear or reset button to the expanded input field to remove all filters
  • Add additional lines to the input field if the text exceeds the field length

Move parameters into config file

We pass service configuration as parameters. We should use a config file instead. Create config file if it doesn't exist. Default config shoold have configuration for local testing.

Use github.com/hashicorp/hcl/v2 for the configuration.

Per sensor add download button for ARM and AMD64 binaries

The backend will have access to binaries for each architecture.
UUID of the sensor needs to be baked into binary. Use the following snippet to replace a placeholder sensor UUID in the binary:

// IndexReplace uses the optimized offset finding
func IndexReplace(b, old, new []byte) []byte {
	i := bytes.Index(b, old)
	if i == -1 {
		return b
	}
	copy(b[i:], new)
	return b
}

Implement hot reloading for golang backend

Currently, hot reloading is only available for svelte frontend. Ideally we can run golang backend with svelte frontend reloading both. To support that we need the following:

  • google authentication not working on localhost:8080
  • live reload go backend with air or something similar
  • make svelte frontend fetch data from golang backend on different ports. I partially implemented that in #77.

Fixed layout should be dynamic

The App.svelte has a lot of hard-coded layout glory. This makes is rather difficult to add new layout elements without breaking the current layout. Even adding new pages would be challenging. Here are some offenders:

Redo the layout allowing for:

  • Dynamically resize the window
  • Adding more elements (like separating the right column)
  • Adding a new page (e.g. rule management, user profile...)

Add tags to saved queries

Outcome: Queries can be tagged

Query metadata:

  • A tag to be applied.

Tags:

  • Tags have a type and a value

Flow:

This issue depends on #6

Make Content component responsive

It would be nice if the width of the component was dynamic in response to the current window width. When the window is too narrow, we can decrease width parameter passed to hexy.

Statistics server-side

Create a new page with statistics

  • Events by sensor ID
  • Events by global/public queries
  • Events by port

There is an endpoint for statistics.
There is a websocket with statistics updates.

Per sensor add delete button

Add a confirmation modal.
Add a new endpoint DELETE /sensor/:uuid that removes the sensor.
Make sure that only owners can delete a sensor, otherwise return 404.

Event Queries using a domain specific language

We introduce the term Queries for filters and labels.

Goals:

  • Being able to filter events by more than just destination port.
  • Instead of filtering events, apply a label to an event. E.g. assign a protocol to an event.
  • When picking Apply, add the filter to a list of filters.
  • User should be able to delete a filter.
  • User should be able to edit a filter.
  • On a new event, apply all filters and labels.

Approach:

Branch:

Example Queries:

  • tcp.port eq 25 (shows only TCP traffic with destination port 25)
  • ip.src eq 192.168.0.0/16 (show only traffic from IPs in this subnet)

Permanent link to event

Outcome: On-demand, create a permanent link to an event.

  • Add a "Share" button on the Content component
  • On click, store JSON to the database (BLOB) with a new UUID (UUID: string, user_id: string, event: blob)
  • Create a route /events/<uuid> reusing the Content component, showing the event from the JSON blob.
  • Use the go server for routing.

Add a page to list all sensors

  • Create a backend repository with sensors. ID should be UUID and it should have a name and owner ID.
  • Create a new endpoint in the backend /sensors that returns the sensors by authenticated user ID
  • Add a new page that lists all the sensors in a table

Stop auto-follow on scroll

Outcome: Stop following new events on scroll, resume with button

When scrolling in the events list, stop following new events. There should be a button at the bottom of the events list that resumes following events.

Create a section with project information

Section could be footer, header or grid element.

  • Should have a link to this GitHub repository and a call to action to contribute: "Contribute to this project through GitHub".
  • Should have the following copy: "Ochi - Honeypot Data Feed Interface".

Create Glutton config

Endpoint returning a config for Glutton with http producer enabled and pointing to Ochi with sensor ID and secret.
Events from sensors with configs from this endpoint are by default private and only visible to the owner.

Add sensor ID to the event list/details. Probably a synonym and not the actual sensor ID.

Disable sensor configs sending invalid events.

Have a list of sensor configs per user. Users can CRUD sensor configs.

Improve filtering syntax

In #46 we introduced the initial version of filtering syntax using chevrotain. We need to improve the syntax by adding new features.

Some things to consider:

  • Should we support operators like contains or matches?
  • Should we support in operator?
  • Should we support "unary" clause (for example tcp, ip.src, etc)?
  • How can we filter by payload? #57

Consider optimizing chevrotain DSL parsing logic on input change

Currently we parse the event filter using chevrotain DSL definition when user types. When user clicks Apply, we parse the same filter again. We can do some optimization by persisting the result of filter parsing on input change and reusing it on pressing Apply button. Things to consider here is that persisted event might be out of date or invalid.

Google Summer of Code 2023

Ochi is participating as part of the Honeynet project in the Google Summer of Code 2023 (GSoC). Ochi is looking for engaged and motivated students to join us during 12 weeks of exciting collaboration. This is a very new project so there is a lot of potential to work on the foundation of it.

Ochi is a web interface for live Honeypot events to correlate, filter and annotate.
As part of the GSoC'23 we would like to add the ability to filter the events using a version of the Wireshark query syntax as a DSL. Queries should be persistent and the backend should calculate metrics how often a query is matched.

Furthermore the backend should support perma-links to events so they can be shared:

Primary skills required are HTML/CSS/JavaScript. Secondary would be Golang but this can also be covered by the mentor of the project.

Account creation

  • Add a Google sign-up/sign-in button to the to right corner
  • Callback should go to the backend and create a user and return a session ID
  • Use sqlite3 as a persistent database, a new db should be created if none found.
  • Login user if already exists
  • User receives a session/(jw?)token for future authentication.

Add a button to create a new sensor

Button opens modal with form for sensor name.
Create a new backend endpoint POST /sensors to create new sensors.
Sensor names are unique per user, not globally.
Confirming form creates a new sensor entry in the database with the chosen name.

Configuration button and modal

Add a button to open configuration to the top bar.
On click open a model to configure:

  • The number of messages in the view: Currently set to 50
  • Switching between dial() and test()

Persist Queries

Outcome: User can save and load their queries.

Metadata:

  • Boolean if rules is active
  • The actual query as DSL
  • Description of the query

Flow:

  • If the user is signed in and has an account:
  • A save button added to the query input
  • Save button opens a dialog asking for a name for the query, confirm saves the query
  • Create a new page with a list of all saved queries
  • From the query page, queries can be loaded and applied to future events

This issue depends on #4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.