it works
This solves it. thanks…
for anybody going through this, ill consider putting up a download link to a ptunnel repo with correct glib(ldd --version). downloading an earlier release from the github repo will not fix the libcrypto / glib problem (this solves it for chisel not ptunnel). Unless the pwnbox is from an older parrotos release, compiling it from parrotos will not work (glib version is 3.5, pivot host is 3.11).
Using @lpinilla 's approach, I got it to work by doing the following:
Run the sudo ./autogen.sh
. It performs a configure, make clean, and make all (here we really just need the configure
).
Run sudo make clean
to clean up the area.
Within Makefile
and src/Makefile
update the LDFLAGS to the following:
LDFLAGS = -static
If you run
sudo ./autogen.sh
again, it will clear your Makefile changes, so don’t do it.
Run sudo make -j4 all
. Now everything should be “built-in” to the executable (no glibc issues).
Copy everything over to the target and execute.
Great answer mate. Thank you for the explanation!
For everybody still struggeling, as a workaround you can use the PWNBox to do sudo ./autogen.sh and scp the directory to the Ubuntu host and then go back to your own VM and continue from there. No need to set up a new VM ^^
You need to install autoconf NOT autoREconf:
$ sudo apt install autoconf
after that you can use:
$ ./autogen.sh
Or you build it yourself with make.
Do you mean the htb web box? I tried that and still nothing lol
Hi there, I got stuck “sudo: ./ptunnel-ng: command not found” Who faced it? How have you solved it? I have used it in a correct directory.
see this writeup
Not sure if anyone else was experiencing the same error I was when trying to set up ptunnel-ng via the sudo ./autogen.sh
script on the pivot machine, but this is something you can do if you encountered:
'WARNING: 'automake-1.16' is missing on your system
Basically, you’ll need to get a few things on your attacking machine first so you can transfer them over and install them on the pivot machine:
- The latest version of /gnu/m4 (I just searched for ‘/gnu/m4 tar’ and got it from the gnu website).
- The latest version of autoconf (again, I just searched for ‘autoconf tar’ and got it from the gnu website).
- The latest version of automake (once again, search for ‘automake tar’ and get it from the gnu website).
Once you have everything, unzip them, and transfer them over to the pivot machine with the scp -r
command.
Then you’ll want to then install them on the pivot machine, starting with /gnu/m4, then autoconf, and finally automake.
There will be an ‘INSTALL’ file that you can read and follow for each one.
Once they’re all good to go, you can go back to setting up ptunnel-ng on the pivot machine with the sudo ./autogen.sh
script.
If everything was done correctly, you’ll be able to set up your server on the pivot machine and connect to it with your attacker machine.
I’m not sure if there are better or more efficient ways of doing this, but this worked for me!
Also, just a question if anyone might know…
I had my proxychains set up and good to go, I wanted to simulate a blind nmap scan with:
sudo proxychains nmap -Pn -sV -sT -vv xxx.xxx.xxx.0/23 -p3389
But I’m not getting back any information for 172.16.5.19…?
If I scan it directly, I can get a response, but nothing if I do a broader scan like this?
Also, noticing that it would terminate my ssh session upon trying to run the scan…
Is it my scanning technique? I would love some clarification because I would like to figure out how I would scan for hosts in an actual blind scenario…
we have the same issue
I solved this using hanstunnel/bin at master · albertzak/hanstunnel · GitHub
It does ICMP Tunneling but also creates a new interface. See: Tunneling and Port Forwarding | HackTricks
Well, guess it’s time for Ligolo-ng yet again. A bunch of the presented tools didn’t work right away.. But my mindset is the following: I use Ligolo-ng. If it doesn’t work, I use chisel. If this also doesn’t work, meterpreter tunneling. If still nothing works, direct SSH tunneling..