How sowieee/ids-web3 works
Project type and purpose
• This is a full-stack blockchain monitoring and visualization tool (named “IDS-WEB3”) built for a blockchain course project.
• It listens for specific system events (via Sysmon), hooks processes (via Frida), records or replays those events on an Ethereum smart contract, and renders the data in a web UI.
File structure
• Top‐level directories:
• backend/ – Python Flask application, event listeners, blockchain integration
• frontend/ – Vue 3 single-page application (Vite, Vuetify, Pinia)
• lib/, script/, test/, src/ – Foundry smart-contract toolkit, deployment scripts, contract code, and tests
• Configuration:
• foundry.toml – Foundry project settings
• backend/contract_abi.json – ABI for Python to interact with deployed contract
• backend/config.py, requirements.txt – Flask settings and dependencies
• CI:
• .github/workflows/test.yml – automated tests or linting pipeline
• Tooling:
• Sysmon (external) for low-level event monitoring
• Frida hooks (backend/frida_hook.py) to instrument apps at runtime
• backend/etw_listener.py for ETW event capture
README for additional insights
• Underlying tech: Foundry (Forge, Cast, Anvil) to compile, test, deploy smart contracts
• Python Flask for REST API or WebSocket endpoints
• Vue + Vite + Vuetify + Pinia for the web interface
• Sysmon must be running externally to feed the Python listeners
a. Main components
• Browser / Mobile Client
• Vue SPA (frontend)
• Flask API server (backend)
• ETW listener + Frida hook modules
• Blockchain adapter (Web3.py)
• Local Ethereum node (Anvil/Ganache)
• Smart contract (deployed on local node)
• External Sysmon agent
b. Relationships and data flows
1. User interacts with the SPA over HTTP/S or WebSocket.
2. SPA dispatches user actions to Flask API endpoints (e.g. fetch recorded events, trigger analysis).
3. Flask routes invoke:
– ETW listener (reads Sysmon event stream)
– Frida hook module (instruments target processes)
– Blockchain adapter (sends transactions or calls to the smart contract via JSON-RPC)
4. The local node (Anvil) processes transactions and emits events.
5. Flask processes these events, persists or forwards them back to the SPA.
c. Architectural patterns / design principles
• Layered architecture: presentation (Vue), application (Flask), infrastructure (Sysmon, blockchain)
• Event-driven flow: ETW → event handlers → blockchain transactions → UI updates
• Single codebase monolith on the backend, but separation of concerns by module
d. Key technologies
• Python Flask, Web3.py
• Sysmon (ETW) + Frida for low-level event capture
• Foundry (Forge/Cast/Anvil) for contract lifecycle
• Vue 3 + Vite + Vuetify + Pinia