Issue with passwords in WMI plugin

Addons for Cacti and discussion about those addons

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
Elix
Posts: 6
Joined: Thu Jul 18, 2019 10:23 am

Issue with passwords in WMI plugin

#1 Post by Elix » Thu Jul 18, 2019 10:53 am

Dears,

latest WMI plugin installed in Cacti 1.2.5. Works smoothly except issues highlighted in another thread and when using passwords in a WMI query that contains a dollar character ($). Utilizing such password, regardless if stored in "WMI Queries | Authentication" or used in "WMI Query Tool", leads to an authentication failure against the given host. Executing exactly the same query with identical parameters from a command line (WMIC4.0.0TP4) runs smoothly so that the wmic binary can be excluded as root cause.

Any help on this appreciated!

Thanks,
Elix

netniV
Cacti Guru User
Posts: 2881
Joined: Sun Aug 27, 2017 12:05 am

Re: Issue with passwords in WMI plugin

#2 Post by netniV » Thu Jul 18, 2019 4:15 pm

Based of your other post, again this probably needs reporting.

User avatar
Osiris
Cacti Pro User
Posts: 863
Joined: Mon Jan 05, 2015 10:10 am

Re: Issue with passwords in WMI plugin

#3 Post by Osiris » Thu Jul 18, 2019 8:58 pm

Likely an escapeshellarg() is needed somewhere. Have you logged this to GitHub?
Before history, there was a paradise, now dust.

User avatar
Elix
Posts: 6
Joined: Thu Jul 18, 2019 10:23 am

Re: Issue with passwords in WMI plugin

#4 Post by Elix » Fri Jul 19, 2019 9:20 am

Both issues reported on github now. Thank you for your attention!

BR,
Elix

User avatar
Osiris
Cacti Pro User
Posts: 863
Joined: Mon Jan 05, 2015 10:10 am

Re: Issue with passwords in WMI plugin

#5 Post by Osiris » Fri Jul 19, 2019 12:19 pm

I did a code review yesterday, and the password is escaped. Could you provide an example of the raw command as escaped and upload it. Don't need to see the output, just the command.
Before history, there was a paradise, now dust.

User avatar
Elix
Posts: 6
Joined: Thu Jul 18, 2019 10:23 am

Re: Issue with passwords in WMI plugin

#6 Post by Elix » Tue Jul 23, 2019 2:54 am

Issues have already been solved by netniV and cigamit with commit 0b0ca1a.

Thanks again to everybody for solving the issue that fast!

BR,
Elix

Post Reply