Most of you have probably heard about the vulnerability in bash by now, which affects most Linux distributions and OS X. If not, check out the article from Red Hat’s security blog.

Most administrators will want to patch bash as soon as possible. When running a large VMware environment, first thing you probably want to do is do a quick inventory of the servers that might be vulnerable.

You can use the following PowerCLI one-liner to do so:

This will give you a list of all Virtual Machines that are powered on and that aren’t running Windows as a guest operating system.

You could pipe the output to Format-Table -autosize or Out-GridView for easier reading or a sortable graphical table.

I can also imagine you would like to have all IP-addresses of these virtual machines for quick patching. The following 2 lines of code will do this for you:

Finally, if you want to test if your system is vulnerable, paste the following line on your linux machines using terminal or ssh:

If the word vulnerable is returned by the prompt, your system is indeed vulnerable.

Email this to someoneTweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInDigg thisPin on Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">