Skip to content

Conversation

@sqlerrorthing
Copy link
Owner

Closes #142
Closes #152 (if use anti vm)

@sqlerrorthing sqlerrorthing added this to the 2.1.0 milestone Aug 7, 2025
@sqlerrorthing sqlerrorthing added the core The stealer core functionality label Aug 7, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Aug 7, 2025

Reviewer's Guide

This PR introduces a new antivm crate with virtualization detection strategies, integrates it into the workspace and builder, refactors the message_box module for consistent formatting, and extends the filesystem Path API with a system_root helper.

Class diagram for the new antivm crate

classDiagram
    class VmDetector {
        <<trait>>
        +is_running_in_vm() bool
    }
    class KVMCheck {
        +is_running_in_vm() bool
    }
    class SmallScreenCheck {
        +is_running_in_vm() bool
    }
    class ParallelsCheck {
        +is_running_in_vm() bool
    }
    class Check {
        +KVM
        +SmallScreen
        +Parallels
        +Custom(Box<VmDetector>)
        +is_running_in_vm() bool
    }
    class run_checks {
        +run_checks(checks: Vec<Check>) bool
    }
    VmDetector <|.. KVMCheck
    VmDetector <|.. SmallScreenCheck
    VmDetector <|.. ParallelsCheck
    VmDetector <|.. Check : via Custom
    Check ..> KVMCheck : dispatch
    Check ..> SmallScreenCheck : dispatch
    Check ..> ParallelsCheck : dispatch
    run_checks ..> Check : uses
Loading

Class diagram for the extended Path API in filesystem

classDiagram
    class Path {
        +system_root() Path
        +roaming_appdata() Path
        +localappdata() Path
    }
Loading

File-Level Changes

Change Details Files
Add anti-VM crate with virtualization detection logic and dispatch
  • Introduce VmDetector trait and Check enum with dispatch macro
  • Implement KVMCheck, ParallelsCheck, SmallScreenCheck strategies
  • Provide run_checks helper to aggregate detection results
antivm/src/lib.rs
antivm/src/kvm_check.rs
antivm/src/parallels.rs
antivm/src/monitor_metrics.rs
antivm/Cargo.toml
antivm/README.md
Integrate antivm and message_box features into workspace and build pipeline
  • Add antivm to workspace members in Cargo.toml
  • Conditionally enable message_box features in builder/main
  • Format build.rs panic call into multi-line string
Cargo.toml
build.rs
builder/src/main.rs
Refactor message_box module for import grouping and trailing commas
  • Reorder and group use statements
  • Add missing commas in enums, structs, match arms, and function signatures
  • Tidy Ask and ToExpr implementations for consistency
builder/src/message_box.rs
builder/src/lib.rs
Extend filesystem Path API with system_root helper
  • Add system_root() returning Windows system directory
  • Use system_root in antivm driver checks
filesystem/src/path.rs
antivm/src/kvm_check.rs
antivm/src/parallels.rs

Assessment against linked issues

Issue Objective Addressed Explanation
#142 Add anti-VM (virtual machine detection) functionality as a selectable option in the builder, allowing users to enable or disable anti-VM checks.
#142 Implement anti-VM checks that, if a VM is detected, can either silently exit or display a message box indicating the program cannot run in a VM.
#152 Prevent the Discord webhook URL from being detected in the 'Contacted URLs' section by VirusTotal, likely by implementing anti-VM or sandbox evasion techniques.

Possibly linked issues

  • [FEATURE] AntiVM #142: The PR adds a new 'antivm' crate implementing KVM, small screen, and Parallels checks, directly addressing the issue's request.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sqlerrorthing sqlerrorthing modified the milestones: 2.1.0, 2.2.0 Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core The stealer core functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Virustotal detects discord webhook url

2 participants