Skip to the content.

Project 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 build
  • basic_pl_concepts-x86-64-msvc-release.exe - 64-bit, MSVC, release build
  • basic_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 artifacts
  • Cargo.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

  1. Create project in docs/ or appropriate section
  2. Build with various optimization levels
  3. Copy binaries to datasets/Benign-Samples/{project_name}/
  4. Document in project README
  5. Update wiki if significant

Adding Analysis Scripts

  1. Place in src/analysis/ or tools/{platform}/
  2. Document usage in comments
  3. Add README if complex
  4. Reference in wiki documentation

Adding Documentation

  1. Create markdown file in docs/ or wiki/
  2. Follow existing structure and naming conventions
  3. Update navigation in Home.md if it’s a wiki page
  4. 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

Maintenance

Keeping Structure Clean

  1. Regular cleanup of build artifacts
  2. Archive completed experiments
  3. Update documentation with structural changes
  4. 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

Questions?

See the FAQ or open an issue on GitHub.