peass-ng / PEASS-ng

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

Scan for hidden .bat files #59

Closed uBadRequest closed 4 years ago

uBadRequest commented 4 years ago

There is a box that has a hidden .bat script that contained the commands

@echo off

:LOOP

for /F "skip=6" %%i in ('net localgroup "administrators"') do net localgroup "administrators" %%i /delete

net user ausername somepassword
net user administrator someotherpassword

ping -n 3 127.0.0.1

cls

GOTO :LOOP

:EXIT

This appeared to have missed it.... think you could add a check for finding .bat files such as this that container credentials?

carlospolop commented 4 years ago

Hi @uBadRequest,

Are you proposing to search for ".bat" file only in winpeas or also in linpeas?

carlospolop commented 4 years ago

hello?