Skip to content

Conversation

@adityatelange
Copy link
Owner

This pull request adds support for command obfuscation to the interactive PowerShell shell in evil_winrm_py.py. Users can now toggle obfuscation on and off using the new obf/obs command, and the shell prompt visually indicates when obfuscation is enabled. The groundwork for obfuscating PowerShell commands is included, though the actual obfuscation logic is yet to be implemented.

Command obfuscation feature:

  • Added a new obf/obs command to the shell menu, allowing users to toggle command obfuscation on or off.
  • Introduced the global OBFUSCATION_ENABLED flag to track obfuscation state.
  • Updated the shell prompt to show a visual indicator when obfuscation is enabled.
  • Added a stub for the ps_obfuscate function, which will eventually obfuscate PowerShell commands before execution.
  • Modified the command execution flow to pass all commands through ps_obfuscate if obfuscation is enabled, and implemented the toggle logic in the shell loop.
image

@adityatelange adityatelange requested a review from Copilot October 24, 2025 20:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a command obfuscation feature for the interactive PowerShell shell, allowing users to toggle obfuscation on/off via a new obf/obs command. The shell prompt visually indicates when obfuscation is active, and the infrastructure routes commands through an obfuscation function (currently a stub returning the original command).

  • Added obf/obs command to toggle obfuscation state
  • Updated shell prompt to display obfuscation indicator when enabled
  • Integrated ps_obfuscate function into command execution flow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant