Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a cmd/hex_escape encoder #121

Closed
postmodern opened this issue Jun 29, 2024 · 2 comments
Closed

Add a cmd/hex_escape encoder #121

postmodern opened this issue Jun 29, 2024 · 2 comments
Assignees
Labels
builtin-encoders Builtin Payloads feature New Feature
Milestone

Comments

@postmodern
Copy link
Member

postmodern commented Jun 29, 2024

Add a built-in command payload encoder that converts each argument to a shell hex string using Support::Encoders::Shell.encode(string).

  • ls -l -> bash -c "$'\x6c\x73' $'\x2d\x6c'"

Use Shellwords.shellsplit to split the command into arguments.

@postmodern postmodern added feature New Feature builtin-encoders Builtin Payloads labels Jun 29, 2024
@postmodern postmodern added this to the 0.3.0 milestone Jun 30, 2024
@postmodern
Copy link
Member Author

Confirmed $'\x6c\x73' $'\x2d\x6c' works in zsh and mksh.

@postmodern postmodern changed the title Add a cmd/encode encoder Add a cmd/hex_encode encoder Aug 11, 2024
@postmodern postmodern self-assigned this Aug 11, 2024
@postmodern postmodern changed the title Add a cmd/hex_encode encoder Add a cmd/hex_escape encoder Aug 11, 2024
@postmodern
Copy link
Member Author

There shouldn't be cmd/ encoders, since CommandPayloads can represent either UNIX shell commands or Windows (cmd.exe or PowerShell) commands.

@postmodern postmodern closed this as not planned Won't fix, can't repro, duplicate, stale Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtin-encoders Builtin Payloads feature New Feature
Projects
None yet
Development

No branches or pull requests

1 participant