MalSCCM icon indicating copy to clipboard operation
MalSCCM copied to clipboard

Add FbGetSCCMAdmins (plus other refactors)

Open rasta-mouse opened this issue 1 year ago • 0 comments

The main purpose of this PR was to add FbGetSCCMAdmins which reads the site administrative users from SMS_Admin. Example output:

[*] Action: Get SCCM Admins
UserName: SCM-1\Administrator
SID: S-1-5-21-303941143-420902481-3534137921-500
Roles: Full Administrator
Security Scopes: All
Collections: All Systems, All Users and User Groups

UserName: LAB\rasta
SID: S-1-5-21-2629820871-389766067-3233314696-1106
Roles: Asset Manager, Application Administrator, Security Administrator
Security Scopes: test-scope
Collections: All Users and User Groups, All Desktop and Server Clients

[*] Inspect complete

It also includes some other refactoring and code clean-ups (mostly to satisfy my own OCD, for which I apologise). The main functional change is to add CommandName as a get-only property on ICommand. This way, it is enforced on the command classes, rather than leaving it to the dev to remember. The CommandCollection class now also uses reflection to instantiate each command class, rather than having to manually add each to a dictionary.

rasta-mouse avatar Sep 28 '23 17:09 rasta-mouse