Giter Site home page Giter Site logo

wesyoung / synapse-fileparser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from captaingeech42/synapse-fileparser

0.0 1.0 0.0 330 KB

Synapse Advanced Power-up to parse files because I don't have enterprise ;(

License: MIT License

Shell 0.14% Python 98.69% Dockerfile 1.17%

synapse-fileparser's Introduction

synapse-fileparser

Synapse Advanced Power-up to parse files because I don't have enterprise ;(

Usage

To parse a file, use zw.fileparser.parse. Any input files that have a :mime property set will be parsed according to that MIME, otherwise a MIME will be auto-detected and set on the node.

Permissions

This package exposes one permission level:

  • zw.fileparser.user: Allows use of the fileparser service

Deployment

1. Provision the aha service

$ cd /srv/syn/aha
$ docker compose exec aha /bin/bash

# in the AHA container
python -m synapse.tools.aha.provision.service 00.fileparser
one-time use URL: ssl://aha..............

2. Start the service

Create a docker-compose.yml file:

version: "3.3"
services:
  00.fileparser:
    user: "999"
    image: synapse-fileparser
    network_mode: host
    restart: unless-stopped
    volumes:
        - ./storage:/vertex/storage
    environment:
        - SYN_FILEPARSER_AXON=aha://axon...
        - SYN_FILEPARSER_HTTPS_PORT=null
        - SYN_FILEPARSER_AHA_PROVISION=<replaceme>
$ docker build -t synapse-fileparser .
$ docker compose up

3. Register the service in your cortex

storm> service.add fileparser aha://fileparser...

Model changes (here)

New Forms

_zw:file:mime:pe:import

type: _zw:file:mime:pe:import
base: guid
doc: The fused knowledge of a file:bytes node containing a pe import.
    
file: file:bytes
dll: str
name: str
address: int
ordinal: int

_zw:file:mime:elf:segment

Both this form and the corresponding section form are designed similarly to their corresponding Mach-O forms.

type: _zw:file:mime:elf:segment
base: guid
doc: A delineated region of bytes inside of an ELF binary.

file: file:bytes
hash: hash:sha256
type: enum
type:raw: int
disksize: int
memsize: int
size: int

_zw:file:mime:elf:section

type: _zw:file:mime:elf:section
base: guid
doc: A section inside a ELF binary denoting a named region of bytes inside a segment.

segment: _zw:file:mime:elf:segment
hash: hash:sha256
size: int
name: str
offset: int
type: enum
type:raw: int

Modified Forms

file:mime:pe:export

_address: int
_ordinal: int

file:bytes

// bitness of the executable file
_exe:bitness: int

// exphash from pefile
_mime:pe:exphash: hash:sha256

// timestamp from debug directory entry
_mime:pe:debug:time: time

// imp/exphash by the parser
_mime:elf:imphash: hash:sha256
_mime:elf:exphash: hash:sha256

// e_ident[EI_OSABI] value
_mime:elf:os: enum
_mime:elf:os:raw: int

// e_type
_mime:elf:type: enum

file:subfile

// timestamps from archive file formats
// if the container file format doesn't include all three, mtime is used
_archive:mtime
_archive:ctime
_archive:atime

synapse-fileparser's People

Contributors

captaingeech42 avatar

Watchers

 avatar

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.