peass-ng / PEASS-ng

PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)
https://book.hacktricks.xyz
Other
16.06k stars 3.09k forks source link

Line endings in winPEAS.bat #130

Closed zoork11 closed 3 years ago

zoork11 commented 3 years ago

Hi there,

on cloning the repo the line endings in winPEAS.bat are in linux style (only line feed '\n'). The new subroutines do not work with that. The routines return to random places within the batch script. Is it possible to enforce windows style line endings on batch files?

I also suggest adding Serv-U binary to the exploitable SUID binaries. (https://www.exploit-db.com/exploits/47009)

And big thumbs up to all people contributing to this awesome script/program! :)

Greetings zoork

rautamiekka commented 3 years ago

This problem would be remedied if the devs used an actual editor (or even just an office software) such as VSCode (or VSCodium), or Notepad++.

Most basic Linux editors support changing line endings, too, and Linux has an app to convert line endings outside an editor.

carlospolop commented 3 years ago

Hi @zoork11, Thank you for the suggestion about the privesc SUID CVE, I have added it. Also, I have updated the winpeas batch version. Next time consider using unix2dos in linux (and even submitting a PR).

@rautamiekka, I can assure that the devs use an "actual" editor ;)

zoork11 commented 3 years ago

Thanks for resolving the issue @carlospolop. It could be helpful to add a .gitattributes file to the repository, to avoid the problem in the future. It is generally easy to fix but hard to debug if a wrong line ending makes it into the batch file. I can add the file if it is wanted.

carlospolop commented 3 years ago

please, submit the PR