1njected / CMLoot

Find interesting files stored on (System Center) Configuration Manager (SCCM/CM) SMB shares

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A condition based on an english hardcoded string cause CMLoot to fail on non english systems

Z4kSec opened this issue · comments

commented

Hi @1njected,

First, thanks a lot for this awesome tool.

While using it, I had a specific usecase where the SCCMContentLib share was configured as hidden (SCCMContentLib$).

This share can still be accessed by my domain user, but it will not be displayed by the net view commands (line 61).

I didn't create any pull request cause I don't know how you want to manage this case. But it could be nice to implement it natively ! :)

commented

My bad, the /all net view option displays the hidden share. But I think the issue is due to the -match conditions (line 65.

Indeed, SCCMContentLib$ doesn't match SCCMContentLib. Maybe replacing this line by if ($share -like 'SCCMContentLib*') { could do the job ;)

Great find, thx! I'll try to push a fix in a few days. I'm also replacing Get-ChildItem as it is very slow. :)

commented

Okay so the root cause was not due to my latest explainations... You can ignore them x)

Indeed, the langage of the system is not in english so the hardcoded string " Disk " line 62 doesn't match to the net view output.

Sorry for all of these messages ! :)