Docs  /  Guides

Integration Guide

How to integrate Rerius into editors, IDEs, CI pipelines, and other tools.

Repository: https://github.com/ECLS-Studio/rerius


VS Code#

Tasks#

Create .vscode/tasks.json in your analysis workspace:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Rerius: Analyze",
      "type": "shell",
      "command": "/path/to/Rerius/rerius",
      "args": ["-x", "${file}"],
      "presentation": { "reveal": "always", "panel": "new" },
      "group": "test"
    },
    {
      "label": "Rerius: CFG only",
      "type": "shell",
      "command": "/path/to/Rerius/rerius",
      "args": ["-f", "-C", "${file}"],
      "presentation": { "reveal": "always" }
    },
    {
      "label": "Rerius: Entropy scan",
      "type": "shell",
      "command": "/path/to/Rerius/rerius",
      "args": ["-e", "${file}"],
      "presentation": { "reveal": "always" }
    },
    {
      "label": "Rerius: Start web UI",
      "type": "shell",
      "command": "node",
      "args": ["/path/to/Rerius/js/server/server.js"],
      "isBackground": true,
      "problemMatcher": []
    }
  ]
}

Press Ctrl+Shift+PTasks: Run Task → select a Rerius task.

Extension#

There's no dedicated VS Code extension at the moment: the tasks.json approach above covers most workflows without one (syntax highlighting for .daxc files and inline CFG visualization would be the main things a real extension could add).


Neovim / Vim#

Add to your config:

-- Neovim: analyze current file with rerius
vim.keymap.set('n', '<leader>nx', function()
    vim.cmd('split | terminal rerius -x ' .. vim.fn.expand('%'))
end, { desc = 'Rerius full analysis' })

vim.keymap.set('n', '<leader>ne', function()
    vim.cmd('split | terminal rerius -e ' .. vim.fn.expand('%'))
end, { desc = 'Rerius entropy scan' })
" Vim: analyze current file
nnoremap <leader>nx :split \| execute 'terminal rerius -x ' . expand('%')<CR>

Ghidra Integration#

Rerius output can complement Ghidra analysis:

# Export symbol list from Rerius
./rerius -y -f -n ./binary | grep "^\[ENTRY\]\|^  │" > symbols.txt

# Generate annotated assembly for import
./rerius -x -o snap.daxc ./binary
./rerius -c snap.daxc > annotated.S
# Import annotated.S into Ghidra via File → Import File

Python Scripting#

Call Rerius from Python scripts via subprocess:

import subprocess, json, sys

def analyze(binary_path, flags='-x -n'):
    """Run rerius and capture output."""
    result = subprocess.run(
        ['/path/to/rerius'] + flags.split() + [binary_path],
        capture_output=True, text=True, timeout=60
    )
    return result.stdout

def get_json(binary_path, endpoint='analyze'):
    """Query the REST server."""
    import urllib.request
    req = urllib.request.Request(
        f'http://localhost:7070/api/{endpoint}',
        data=json.dumps({'file': binary_path}).encode(),
        headers={'Content-Type': 'application/json'},
        method='POST'
    )
    with urllib.request.urlopen(req) as r:
        return json.loads(r.read())

if __name__ == '__main__':
    binary = sys.argv[1]

    # Get analysis via REST API (requires server running)
    data = get_json(binary, 'info')
    print(f"arch: {data['arch']}, sha256: {data['sha256'][:16]}...")

    fns = get_json(binary, 'functions')
    print(f"functions: {len(fns['functions'])}")

CI Pipeline Integration#

GitHub Actions - analyze on PR#

- name: Check binary for packed content
  run: |
    # Install Rerius
    git clone https://github.com/ECLS-Studio/rerius.git /tmp/rerius
    cd /tmp/rerius && make 2>/dev/null

    # Scan the built binary
    OUTPUT=$(/tmp/rerius/rerius -e ./mybinary 2>/dev/null)
    if echo "$OUTPUT" | grep -q "PACKED\|ENCRYPTED"; then
      echo "::warning::Binary contains high-entropy sections - possible packing"
      echo "$OUTPUT"
    fi

Makefile integration#

# Add to your project Makefile
RERIUS ?= /path/to/rerius

.PHONY: analyze security-scan
analyze: $(TARGET)
    $(RERIUS) -x $(TARGET)

security-scan: $(TARGET)
    @echo "=== Entropy Analysis ==="
    $(RERIUS) -e -n $(TARGET)
    @echo ""
    @echo "=== Validity Filter ==="
    $(RERIUS) -V -n $(TARGET)

Docker#

FROM ubuntu:24.04

RUN apt-get update && apt-get install -y \
    build-essential nodejs libnode-dev git \
    && rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/ECLS-Studio/rerius.git /rerius \
    && cd /rerius && make

ENV PATH="/rerius:$PATH"

# Start the REST API server
EXPOSE 7070
CMD ["node", "/rerius/js/server/server.js"]
docker build -t rerius .
docker run -p 7070:7070 -v /path/to/binaries:/binaries rerius

# Analyze via REST from host
curl -s -X POST http://localhost:7070/api/info \
  -H 'Content-Type: application/json' \
  -d '{"file":"/binaries/target"}'

Web Frontend → REST Backend#

If you build a custom frontend that talks to the Rerius REST server:

// BigInt addresses come back as "0x..." strings
const res = await fetch('http://localhost:7070/api/functions', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ file: '/path/to/binary' }),
});
const { functions } = await res.json();
// functions[0].start is a string like "0x0000000000004010"

All REST endpoints (42 as of the current server) are listed in js/README.md.

Edit this page on GitHub Source: docs/INTEGRATION.md · Rerius v1.0.0
On this page
Integration Guide VS Code Tasks Extension Neovim / Vim Ghidra Integration Python Scripting CI Pipeline Integration GitHub Actions - analyze on PR Makefile integration Docker Web Frontend → REST Backend
ESC
↑↓ navigate openesc close