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

💡 [REQUEST] - Incorporate support for cli interaction during ttpforge execution. #497

Open
cedowens opened this issue May 15, 2024 · 0 comments
Labels
question Clarification and/or additional information required to move forward

Comments

@cedowens
Copy link

Implementation PR

No response

Reference Issues

No response

Summary

When running TTPs via ttpforge using an expect routine that requires user command interaction (ex: running a ttpforge that ssh's into another machine using password-based auth), TTPForge hangs at the point in the expect script where the user input is captured. TTPForge hangs indefinitely which essentially breaks the TTP.

Recommendation will be to add support for routines such as expect routines that need user interaction during execution.

Basic Example

Here is an example of an expect script (which could be executed by ttpforge) where this currently hangs:

steps:

  • name: example
    inline: |
    /usr/bin/expect -c '
    set timeout -1
    puts -nonewline "Enter your ssh password: "
    stty -echo
    flush stdout
    gets stdin pword
    stty echo
    spawn /bin/bash
    expect "bash"
    send -- "ssh $user@$server\n"
    expect "password:"
    send -- "$pword\r"
    expect "
    $"
    send -- "whoami\r"
    expect "*$"
    expect eof
    '

Specifically, forge hangs right at the "send -- "$pword\r" command.

Drawbacks

none

Unresolved questions

No response

@cedowens cedowens added the question Clarification and/or additional information required to move forward label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Clarification and/or additional information required to move forward
Projects
None yet
Development

No branches or pull requests

1 participant