3 ms·
This seems like a CTF trick. If I were faced with this problem, I would do an SSH local port forward, and then just wget the file, hosted locally with python -m
by djent 6y ago
This seems like a CTF trick. If I were faced with this problem, I would do an SSH local port forward, and then just wget the file, hosted locally with python -m SimpleHTTPServer
- AnotherGoodName 6y agoOr you can open SSH back to your local port forwarded server from the remote SSH shell. At that point you can pipe whatever you want to/from your local server using the standard SSH commands.
- livre 6y agoI think we can assume that if they are restricting things as the article describes they also disabled port forwarding.
- AnotherGoodName 6y agoPort forwarding your local machine is always an option.
- susam 6y agoThat's right. See https://news.ycombinator.com/item?id=24507146 https://news.ycombinator.com/item?id=24507146 for example.
- susam 6y agoI mentioned in my blog post that there is an SSH gateway in between. I tried this on my local system: ssh -L 9000:127.0.0.1:8000 user@host But when I visit http://127.0.0.1:9000/ http://127.0.0.1:9000/ on my local system, I get a connection reset by peer error. At the same time, in the terminal where I have set up the port forward with the ssh command above, I get this error: open failed: unknown channel type The SSH gateway is forbidding port forwarding as well.
- lathiat 6y agoI know we're getting into the weeds here but for the benefit of people learning random things that work slightly differently (tm) A possible workaround for this specific scenario would be to use 'sshutle' which runs a python script on the remote end to terminate the traffic. Except in your specific scenario you'd have to somehow trick it to execute using a login shell like one of the other comments shows. Having said all of that, I would just do what you did :)