Project Structure
PhD Research on Rust Binary Analysis and Malware Detection
View on GitHubProject Structure
This page provides a comprehensive overview of the repository structure and organization.
Repository Overview
The-State-of-Rust-in-Malware-Programming/
├── docs/ # Documentation and research notes
├── datasets/ # Sample datasets
├── src/ # Source code (detection frameworks, scripts)
├── tools/ # Helper scripts and tool integrations
├── wiki/ # Wiki documentation
├── .git/ # Git repository data
├── .gitignore # Git ignore rules
├── .gitattributes # Git attributes
├── LICENSE # Project license
└── README.md # Main project README
Directory Breakdown
/docs - Documentation
Contains methodology documentation, experiment notes, and research materials.
docs/
└── 01-Rust-Binary-Analysis/
└── 01-basic_pl_concepts/
├── src/
│ └── main.rs # Basic Rust PL concepts sample
├── Cargo.toml # Project manifest
├── Cargo.lock # Dependency lock file
└── README.md # Sample documentation
Purpose:
- Research notes and findings
- Experiment documentation
- Sample Rust projects for analysis
- Work-in-progress academic writing
Key Projects:
01-basic_pl_concepts: Basic programming language concepts in Rust (enums, structs, traits)
/datasets - Sample Datasets
Contains curated collections of Rust binaries for research and analysis.
datasets/
└── Benign-Samples/
└── 01-basic-pl-concepts/
├── basic_pl_concepts-x86-64-msvc-release.exe
├── basic_pl_concepts-x86-i686-msvc-release.exe
└── basic_pl_concepts-x86-release-O3.exe
Purpose:
- Benign Rust binary samples
- Malicious Rust binary samples (where licensing permits)
- Test datasets for detection frameworks
- Signature databases
Categories:
- Benign-Samples: Known-good Rust binaries with various compilation settings
- Malicious-Samples: Rust-based malware samples (to be added)
/src - Source Code
Detection frameworks, analysis scripts, and Rust test cases.
src/
├── detection/ # Malware detection frameworks
├── analysis/ # Binary analysis scripts
└── test_cases/ # Test case generation
Purpose:
- Automated detection frameworks
- Static and dynamic analysis tools
- Signature extraction scripts
- Test case generators
/tools - Helper Tools
Helper scripts and integrations for reverse engineering platforms.
tools/
├── ida/ # IDA Pro scripts
├── ghidra/ # Ghidra scripts
├── binja/ # Binary Ninja scripts
└── radare2/ # radare2 scripts
Purpose:
- IDA Python scripts for Rust binary analysis
- Ghidra decompiler scripts
- Binary Ninja plugins
- radare2 automation scripts
/wiki - Wiki Documentation
GitHub wiki pages stored in the repository for version control.
wiki/
├── Home.md
├── Installation-and-Setup.md
├── Building-Rust-Samples.md
├── Project-Structure.md
└── ...
Purpose:
- Comprehensive project documentation
- Tutorials and guides
- Research methodology
- Tool documentation
File Naming Conventions
Binary Samples
Format: {project_name}-{arch}-{toolchain}-{profile}.exe
Examples:
basic_pl_concepts-x86-i686-msvc-release.exe- 32-bit, MSVC, release buildbasic_pl_concepts-x86-64-msvc-release.exe- 64-bit, MSVC, release buildbasic_pl_concepts-x86-release-O3.exe- 32-bit, O3 optimizations
Documentation
- Use kebab-case for filenames:
rust-binary-analysis.md - Number sections for ordering:
01-basic_pl_concepts,02-advanced-features - README files in each major directory
Source Code
- Rust: Standard Rust naming conventions (
snake_case) - Python: PEP 8 naming conventions
- Scripts: Descriptive names with file extensions
Configuration Files
.gitignore
Configured to ignore:
target/- Rust build artifactsCargo.lock- Dependency lock files (for libraries)- Editor files (
.idea/,.vscode/, etc.) - OS artifacts (
.DS_Store,Thumbs.db) - Build caches
.gitattributes
Ensures consistent line endings and file handling across platforms.
Cargo.toml Files
Each Rust project contains:
- Package metadata
- Dependencies
- Build profiles
- Optimization settings
Adding New Content
Adding a New Sample
- Create project in
docs/or appropriate section - Build with various optimization levels
- Copy binaries to
datasets/Benign-Samples/{project_name}/ - Document in project README
- Update wiki if significant
Adding Analysis Scripts
- Place in
src/analysis/ortools/{platform}/ - Document usage in comments
- Add README if complex
- Reference in wiki documentation
Adding Documentation
- Create markdown file in
docs/orwiki/ - Follow existing structure and naming conventions
- Update navigation in
Home.mdif it’s a wiki page - Cross-reference related documents
Build Artifacts
Build artifacts are not committed to the repository:
target/ # Ignored - Rust build output
*.pdb # Ignored - Debug symbols
*.ilk # Ignored - Incremental link files
Exception: Curated binary samples in datasets/ are committed for research purposes.
Research Organization
Experiment Structure
Each experiment or research topic should follow:
docs/{number}-{topic}/
├── {experiment_name}/
│ ├── src/ # Source code
│ ├── results/ # Experimental results
│ ├── notes.md # Research notes
│ └── README.md # Experiment overview
Dataset Organization
datasets/{category}/
└── {sample_name}/
├── {binary_variants}
└── metadata.json # Sample metadata
Navigation
Maintenance
Keeping Structure Clean
- Regular cleanup of build artifacts
- Archive completed experiments
- Update documentation with structural changes
- Maintain consistent naming across the project
Version Control
- Commit source code and documentation
- Commit curated binary samples
- Ignore temporary and build files
- Tag significant milestones