Skip to content

Inline obfuscation - #23

Draft
adityatelange wants to merge 4 commits into
mainfrom
feat/obfuscate_inline
Draft

Inline obfuscation#23
adityatelange wants to merge 4 commits into
mainfrom
feat/obfuscate_inline

Conversation

@adityatelange

Copy link
Copy Markdown
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

Copilot AI left a comment

Copy link
Copy Markdown

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.

Comment thread evil_winrm_py/evil_winrm_py.py Outdated
Comment thread evil_winrm_py/evil_winrm_py.py Outdated
adityatelange and others added 2 commits October 25, 2025 01:56
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hydr0nium

Copy link
Copy Markdown
Contributor

Pretty cool idea. Any ideas how to implement the actual obfuscation?

@adityatelange

Copy link
Copy Markdown
Owner Author

Pretty cool idea. Any ideas how to implement the actual obfuscation?

I have it already implemented which already works with most public working AMSi bypass scripts.

Not be pushing it as no one needs the feature. People are happy using og evil-winrm. There's no need of this tool maybe.

@gumbyDE

gumbyDE commented Apr 26, 2026

Copy link
Copy Markdown

Pretty cool idea. Any ideas how to implement the actual obfuscation?

I have it already implemented which already works with most public working AMSi bypass scripts.

Not be pushing it as no one needs the feature. People are happy using og evil-winrm. There's no need of this tool maybe.

Just wanted to assure you that there's a huge community out there that hates evil-winrm and loves evil-winrm-py. So "there's no need of this tool maybe" is not true :)

@hydr0nium

Copy link
Copy Markdown
Contributor

@gumbyDE I 100% agree with you. I tell everyone to use this tool. Not because the other one is bad but rather because dealing with Ruby is suuuchh a pain sometimes

@adityatelange adityatelange added the enhancement New feature or request label May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants