Closed jm33-m0 closed 4 years ago
My solution is to restart emp3r0r
, the reason why it works is still unknown
The culprit:
In https://github.com/jm33-m0/emp3r0r/blob/4ede2fd73ee933a1ceb3499a6d7274e0ffc41fd0/core/internal/cc/rshell.go#L18
there are several goroutines started with reverseBash()
, who are left running the background even after reverseBash
has exited.
One of the goroutines that's responsible for receiving data and displaying them on os.Stdout
https://github.com/jm33-m0/emp3r0r/blob/4ede2fd73ee933a1ceb3499a6d7274e0ffc41fd0/core/internal/cc/rshell.go#L70 keeps running and writing to os.Stdout
, while the new bash session also has a goroutine writing to os.Stdout
, making the stdout a mess eventually
https://github.com/jm33-m0/emp3r0r/blob/4ede2fd73ee933a1ceb3499a6d7274e0ffc41fd0/core/internal/cc/rshell.go#L18 On the first run,
bash
works mostly good, the terminal is functional. However, if we exit currentbash
session, and re-runbash
on whatever target, the terminal is totally unusable as all characters are scambled