# muneeb2346/mprss_project architecture

> Architecture diagram of the GitHub repository muneeb2346/mprss_project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/muneeb2346/mprss_project
- Repository: https://github.com/muneeb2346/mprss_project

## Overview

MPRSS is a modular Android malware analysis system: it can collect runtime behavior, analyze APKs and network flows, produce risk and family assessments, and provide explainability through a web portal. The documented automated workflow is APK upload, sandbox execution and behavioral logging, then static and flow scoring; separate services provide behavioral scoring and explanations. Dataset integration and model-training modules support those analysis capabilities. The excerpts establish some service calls and UI composition, but do not show all runtime wiring, especially portal-to-backend connections, so those links are omitted.

Main entry points: [`MPRSS_Module6_PORTAL/mprss_portal/src/components/Dashboard.jsx`](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/Dashboard.jsx) (Analysis dashboard), [`MPRSS_Module7_Orchestrator/module7_orchestrator.py`](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module7_Orchestrator/module7_orchestrator.py) (Sandbox API), [`MPRSS_Module4_XAI/xai_service.py`](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module4_XAI/xai_service.py) (Explanation service), [`MPRSS_Module5_Family_Calssification/static_family_cluster_trainer.py`](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module5_Family_Calssification/static_family_cluster_trainer.py) (Static clustering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Sandbox orchestration"]
  node_orchestrator["Sandbox API"]
  node_behavior_hooks["Runtime hooks<br/>[behavior_hooks.js]"]
end

subgraph group_analysis["Malware analysis"]
  node_behavior_service["Behavior service"]
  node_behavior_core["Behavior scoring<br/>[behavior_core.py]"]
  node_static_api["Static analysis API<br/>[app.py]"]
  node_apk_parser["APK feature parser"]
  node_anomaly_api["Anomaly API<br/>[app.py]"]
  node_flow_features["Flow features"]
end

subgraph group_models["Models and insights"]
  node_xai_service["Explanation service<br/>[xai_service.py]"]
  node_xai_core["Explanation engine<br/>[xai_core.py]"]
  node_lstm_scorer["LSTM explainer<br/>[lstm_scorer.py]"]
  node_family_predictor["Family prediction"]
  node_risk_scorer["Risk scoring<br/>[risk_scorer.py]"]
  node_family_flow["Flow clustering"]
  node_family_static["Static clustering"]
  node_cluster_utils["Cluster utilities<br/>[cluster_utils.py]"]
  node_static_family_features["Static family features"]
end

subgraph group_portal["Analysis portal"]
  node_portal_app["Portal shell<br/>[App.js]"]
  node_dashboard["Analysis dashboard<br/>[Dashboard.jsx]"]
  node_upload["APK upload<br/>[UploadArea.jsx]"]
  node_risk_score["Risk display<br/>[RiskScore.jsx]"]
  node_risk_breakdown["Risk breakdown<br/>[RiskBreakdown.jsx]"]
  node_live_log["Live log<br/>[LiveLog.jsx]"]
  node_family_view["Family results"]
  node_xai_view["Explanation view<br/>[XaiInsights.jsx]"]
end

subgraph group_datasets["Dataset preparation"]
  node_dataset_pipeline["Dataset integration"]
  node_data_loader["Dataset loader<br/>[data_loader.py]"]
  node_feature_extractor["Feature extraction"]
  node_dataset_integrator["Dataset merger"]
  node_risk_trainer["Static risk trainer"]
  node_anomaly_trainer["Anomaly trainer"]
end

node_user(("Analyst"))

node_user -->|"uses"| node_portal_app
node_portal_app -->|"renders"| node_dashboard
node_dashboard -->|"renders"| node_upload
node_dashboard -->|"renders"| node_risk_score
node_dashboard -->|"renders"| node_risk_breakdown
node_dashboard -->|"renders"| node_live_log
node_dashboard -->|"renders"| node_family_view
node_dashboard -->|"renders"| node_xai_view
node_orchestrator -->|"submits APK"| node_static_api
node_orchestrator -->|"submits flow"| node_anomaly_api
node_static_api -->|"parses APK"| node_apk_parser
node_behavior_service -->|"scores events"| node_behavior_core
node_xai_service -->|"builds explainers"| node_xai_core
node_xai_service -->|"loads explainer"| node_lstm_scorer
node_lstm_scorer -->|"uses scoring logic"| node_behavior_core
node_orchestrator -->|"scores risk"| node_risk_scorer
node_orchestrator -->|"predicts family"| node_family_predictor
node_family_flow -->|"selects clusters"| node_cluster_utils
node_family_static -->|"selects clusters"| node_cluster_utils
node_family_static -->|"extracts features"| node_static_family_features
node_dataset_pipeline -->|"integrates datasets"| node_dataset_integrator

click node_orchestrator "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module7_Orchestrator/module7_orchestrator.py"
click node_behavior_hooks "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module7_Orchestrator/behavior_hooks.js"
click node_behavior_service "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module1_Behavior_implementation/behavior_service.py"
click node_behavior_core "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module4_XAI/behavior_core.py"
click node_static_api "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/api/app.py"
click node_apk_parser "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/apk_static_parser.py"
click node_anomaly_api "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module3_Anomaly_Detection/api/app.py"
click node_flow_features "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module3_Anomaly_Detection/src/flow_feature_extractor.py"
click node_xai_service "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module4_XAI/xai_service.py"
click node_xai_core "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module4_XAI/xai_core.py"
click node_lstm_scorer "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module4_XAI/lstm_scorer.py"
click node_family_predictor "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module7_Orchestrator/family_predictor.py"
click node_risk_scorer "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module7_Orchestrator/risk_scorer.py"
click node_family_flow "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module5_Family_Calssification/flow_family_cluster_trainer.py"
click node_family_static "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module5_Family_Calssification/static_family_cluster_trainer.py"
click node_cluster_utils "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module5_Family_Calssification/cluster_utils.py"
click node_static_family_features "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module5_Family_Calssification/static_feature_extractor.py"
click node_portal_app "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/App.js"
click node_dashboard "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/Dashboard.jsx"
click node_upload "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/UploadArea.jsx"
click node_risk_score "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/RiskScore.jsx"
click node_risk_breakdown "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/RiskBreakdown.jsx"
click node_live_log "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/LiveLog.jsx"
click node_family_view "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/FamilyClassification.jsx"
click node_xai_view "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/XaiInsights.jsx"
click node_dataset_pipeline "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/main_integration_pipeline.py"
click node_data_loader "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/data_loader.py"
click node_feature_extractor "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/feature_extractor.py"
click node_dataset_integrator "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/dataset_integrator.py"
click node_risk_trainer "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/risk_model_trainer.py"
click node_anomaly_trainer "https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module3_Anomaly_Detection/src/anomaly_model_trainer.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_orchestrator,node_behavior_hooks toneBlue
class node_behavior_service,node_behavior_core,node_static_api,node_apk_parser,node_anomaly_api,node_flow_features toneAmber
class node_xai_service,node_xai_core,node_lstm_scorer,node_family_predictor,node_risk_scorer,node_family_flow,node_family_static,node_cluster_utils,node_static_family_features toneMint
class node_portal_app,node_dashboard,node_upload,node_risk_score,node_risk_breakdown,node_live_log,node_family_view,node_xai_view toneRose
class node_dataset_pipeline,node_data_loader,node_feature_extractor,node_dataset_integrator,node_risk_trainer,node_anomaly_trainer,node_user toneIndigo
```

## Components

### Sandbox orchestration

- [Sandbox API](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module7_Orchestrator/module7_orchestrator.py): `MPRSS_Module7_Orchestrator/module7_orchestrator.py`
- [Runtime hooks](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module7_Orchestrator/behavior_hooks.js): `MPRSS_Module7_Orchestrator/behavior_hooks.js`

### Malware analysis

- [Behavior service](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module1_Behavior_implementation/behavior_service.py): `MPRSS_Module1_Behavior_implementation/behavior_service.py`
- [Behavior scoring](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module4_XAI/behavior_core.py): `MPRSS_Module4_XAI/behavior_core.py`
- [Static analysis API](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/api/app.py): `MPRSS_Module2_ML_Integration & Static implemetation/api/app.py`
- [APK feature parser](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/apk_static_parser.py): `MPRSS_Module2_ML_Integration & Static implemetation/src/apk_static_parser.py`
- [Anomaly API](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module3_Anomaly_Detection/api/app.py): `MPRSS_Module3_Anomaly_Detection/api/app.py`
- [Flow features](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module3_Anomaly_Detection/src/flow_feature_extractor.py): `MPRSS_Module3_Anomaly_Detection/src/flow_feature_extractor.py`

### Models and insights

- [Explanation service](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module4_XAI/xai_service.py): `MPRSS_Module4_XAI/xai_service.py`
- [Explanation engine](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module4_XAI/xai_core.py): `MPRSS_Module4_XAI/xai_core.py`
- [LSTM explainer](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module4_XAI/lstm_scorer.py): `MPRSS_Module4_XAI/lstm_scorer.py`
- [Family prediction](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module7_Orchestrator/family_predictor.py): `MPRSS_Module7_Orchestrator/family_predictor.py`
- [Risk scoring](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module7_Orchestrator/risk_scorer.py): `MPRSS_Module7_Orchestrator/risk_scorer.py`
- [Flow clustering](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module5_Family_Calssification/flow_family_cluster_trainer.py): `MPRSS_Module5_Family_Calssification/flow_family_cluster_trainer.py`
- [Static clustering](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module5_Family_Calssification/static_family_cluster_trainer.py): `MPRSS_Module5_Family_Calssification/static_family_cluster_trainer.py`
- [Cluster utilities](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module5_Family_Calssification/cluster_utils.py): `MPRSS_Module5_Family_Calssification/cluster_utils.py`
- [Static family features](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module5_Family_Calssification/static_feature_extractor.py): `MPRSS_Module5_Family_Calssification/static_feature_extractor.py`

### Analysis portal

- [Portal shell](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/App.js): `MPRSS_Module6_PORTAL/mprss_portal/src/App.js`
- [Analysis dashboard](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/Dashboard.jsx): `MPRSS_Module6_PORTAL/mprss_portal/src/components/Dashboard.jsx`
- [APK upload](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/UploadArea.jsx): `MPRSS_Module6_PORTAL/mprss_portal/src/components/UploadArea.jsx`
- [Risk display](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/RiskScore.jsx): `MPRSS_Module6_PORTAL/mprss_portal/src/components/RiskScore.jsx`
- [Risk breakdown](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/RiskBreakdown.jsx): `MPRSS_Module6_PORTAL/mprss_portal/src/components/RiskBreakdown.jsx`
- [Live log](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/LiveLog.jsx): `MPRSS_Module6_PORTAL/mprss_portal/src/components/LiveLog.jsx`
- [Family results](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/FamilyClassification.jsx): `MPRSS_Module6_PORTAL/mprss_portal/src/components/FamilyClassification.jsx`
- [Explanation view](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module6_PORTAL/mprss_portal/src/components/XaiInsights.jsx): `MPRSS_Module6_PORTAL/mprss_portal/src/components/XaiInsights.jsx`

### Dataset preparation

- [Dataset integration](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/main_integration_pipeline.py): `MPRSS_Module2_ML_Integration & Static implemetation/src/main_integration_pipeline.py`
- [Dataset loader](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/data_loader.py): `MPRSS_Module2_ML_Integration & Static implemetation/src/data_loader.py`
- [Feature extraction](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/feature_extractor.py): `MPRSS_Module2_ML_Integration & Static implemetation/src/feature_extractor.py`
- [Dataset merger](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/dataset_integrator.py): `MPRSS_Module2_ML_Integration & Static implemetation/src/dataset_integrator.py`
- [Static risk trainer](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module2_ML_Integration%20%26%20Static%20implemetation/src/risk_model_trainer.py): `MPRSS_Module2_ML_Integration & Static implemetation/src/risk_model_trainer.py`
- [Anomaly trainer](https://github.com/muneeb2346/mprss_project/blob/main/MPRSS_Module3_Anomaly_Detection/src/anomaly_model_trainer.py): `MPRSS_Module3_Anomaly_Detection/src/anomaly_model_trainer.py`

### Other components

- **Analyst**

## Connections

- Analyst → Portal shell: uses
- Portal shell → Analysis dashboard: renders (evidence: `MPRSS_Module6_PORTAL/mprss_portal/src/App.js`)
- Analysis dashboard → APK upload: renders (evidence: `MPRSS_Module6_PORTAL/mprss_portal/src/components/Dashboard.jsx`)
- Analysis dashboard → Risk display: renders (evidence: `MPRSS_Module6_PORTAL/mprss_portal/src/components/Dashboard.jsx`)
- Analysis dashboard → Risk breakdown: renders (evidence: `MPRSS_Module6_PORTAL/mprss_portal/src/components/Dashboard.jsx`)
- Analysis dashboard → Live log: renders (evidence: `MPRSS_Module6_PORTAL/mprss_portal/src/components/Dashboard.jsx`)
- Analysis dashboard → Family results: renders (evidence: `MPRSS_Module6_PORTAL/mprss_portal/src/components/Dashboard.jsx`)
- Analysis dashboard → Explanation view: renders (evidence: `MPRSS_Module6_PORTAL/mprss_portal/src/components/Dashboard.jsx`)
- Sandbox API → Static analysis API: submits APK (evidence: `MPRSS_Module7_Orchestrator/module7_orchestrator.py`)
- Sandbox API → Anomaly API: submits flow (evidence: `MPRSS_Module7_Orchestrator/module7_orchestrator.py`)
- Static analysis API → APK feature parser: parses APK (evidence: `MPRSS_Module2_ML_Integration & Static implemetation/api/app.py`)
- Behavior service → Behavior scoring: scores events (evidence: `MPRSS_Module1_Behavior_implementation/behavior_service.py`)
- Explanation service → Explanation engine: builds explainers (evidence: `MPRSS_Module4_XAI/xai_service.py`)
- Explanation service → LSTM explainer: loads explainer (evidence: `MPRSS_Module4_XAI/xai_service.py`)
- LSTM explainer → Behavior scoring: uses scoring logic (evidence: `MPRSS_Module4_XAI/lstm_scorer.py`)
- Sandbox API → Risk scoring: scores risk (evidence: `MPRSS_Module7_Orchestrator/module7_orchestrator.py`)
- Sandbox API → Family prediction: predicts family (evidence: `MPRSS_Module7_Orchestrator/module7_orchestrator.py`)
- Flow clustering → Cluster utilities: selects clusters (evidence: `MPRSS_Module5_Family_Calssification/flow_family_cluster_trainer.py`)
- Static clustering → Cluster utilities: selects clusters (evidence: `MPRSS_Module5_Family_Calssification/static_family_cluster_trainer.py`)
- Static clustering → Static family features: extracts features (evidence: `MPRSS_Module5_Family_Calssification/static_family_cluster_trainer.py`)
- Dataset integration → Dataset merger: integrates datasets (evidence: `MPRSS_Module2_ML_Integration & Static implemetation/src/main_integration_pipeline.py`)
