Gallopsled/pwntools

ssh proxy_sock is broken

Open

#1787 aperta il 7 feb 2021

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Python (1684 fork)batch import
backport-requiredbuggood first issue

Metriche repository

Star
 (11.127 star)
Metriche merge PR
 (Merge medio 18g 5h) (5 PR mergiate in 30 g)

Descrizione

It appears that the SSH option proxy_sock does not work.

Works

>>> ssh(host='example.pwnme').whoami()
b'travis'

Does not work

>>> r = remote('localhost', 22)
>>> ssh(host='example.pwnme', proxy_sock=r.sock).whoami()
...
AuthenticationException: Authentication failed.

Works but should not work

It appears that there is some state in the remote that is bugged. When doing proxy_sock=r first, then proxy_sock=r.sock, everything works.

>>> r = remote('localhost', 22)
>>> ssh(host='example.pwnme', proxy_sock=r).whoami()
...
TypeError: '<' not supported between instances of 'NoneType' and 'int'
>>> ssh(host='example.pwnme', proxy_sock=r.sock).whoami()
b'travis'

Guida contributor