Gallopsled / Gallopsled/pwntools

ssh proxy_sock is broken

Open
#1,787 1 comment 0 reactions 0 assignees View on GitHub
backport-required bug good first issue
Dominant language
Python
Stars
13.7k
Forks
1.9k
Avg merge
6d 23h
Merged PRs (30d)
3

Description

It appears that the SSH option `proxy_sock` does not work.

## Works

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

## Does not work

```py
>>> 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.

```py
>>> 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'
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the two SSH examples using remote('localhost', 22), then trace the ssh(host=..., proxy_sock=...) and remote/r.sock entry points to find where proxy socket state is handled. Done means proxy_sock=r.sock works directly without first passing proxy_sock=r, with regression coverage for both the failing and working cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.