-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
questionClarification and/or additional information required to move forwardClarification and/or additional information required to move forwardtype/major
Description
Implementation PR
No response
Reference Issues
No response
Summary
Dedicated yaml syntax for ssh remote command execution:
Basic Example
It could look like this:
steps:
- name: establish_ssh_session
create_remote_session:
name: my_session
ssh_cmd: ssh -i ${MY_KEYFILE} ${MY_USER}@${MY_HOST_ARG}
- name: execute_remote_commands
remote_session: my_session
inline: |
hostname
whoami
We can support this natively in golang with the appropriate package:
https://stackoverflow.com/a/41528181
Although we may want to just pipe stdin to a real ssh process - that's "hacky" but
would create more realistic telemetry of attacker activity so hacky might be significantly better in this instance.
Later, We can extend the create_remote_session architecture to support connecting to a remote C2 implant, use WinRM, etc
Drawbacks
No response
Unresolved questions
- Is there a way we could design this to support nested pivots (SSH chains)?
- is there extra glue we need to do to make the telemetry look more real (like making ssh think it's attached to a real tty)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionClarification and/or additional information required to move forwardClarification and/or additional information required to move forwardtype/major