How to inventory Windows installed software Jonathan Risto

  • Slides: 15
Download presentation
How to inventory Windows installed software Jonathan Risto December 2016 GIAC (GAWN Gold, GCIH

How to inventory Windows installed software Jonathan Risto December 2016 GIAC (GAWN Gold, GCIH Gold, GSLC Gold, GLEG Gold, GWAPT Gold, GCCC Gold, GSNA Gold, GPEN, GCFA, GSEC, GCPM) SANS Technology Institute - Candidate for Master of Science Degree 1 1

Objective • • • Importance of a software inventory Why is this such a

Objective • • • Importance of a software inventory Why is this such a problem to collect Where is this information stored Methods to collect the information Scripting for speed and accuracy Conclusion SANS Technology Institute - Candidate for Master of Science Degree 2

Control 2 of the 20 Critical Controls • The second item of the 20

Control 2 of the 20 Critical Controls • The second item of the 20 CSC is software inventory • Without a software inventory – Cannot know vulnerabilities – Cannot keep systems updated – Cannot validate authorized software SANS Technology Institute - Candidate for Master of Science Degree 3

Where can we find it? • Windows does not have just one location to

Where can we find it? • Windows does not have just one location to register an installed program • Example registry key locations include: – 'HKLMSOFTWAREMicrosoftWindowsCurrent. Vers ionUninstall' – 'HKLMSOFTWAREWow 6432 NodeMicrosoftWind owsCurrent. VersionUninstall' • No single query can return the required information SANS Technology Institute - Candidate for Master of Science Degree 4

Collection problems SANS Technology Institute - Candidate for Master of Science Degree 5

Collection problems SANS Technology Institute - Candidate for Master of Science Degree 5

Available tools for collection • Commercial tools – E. g. Tripwire, Software Inspector, Nessus

Available tools for collection • Commercial tools – E. g. Tripwire, Software Inspector, Nessus • Free tools – E. g. OCS inventory, Ps. Info • Built-in tools – E. g. WMIC, Power. Shell SANS Technology Institute - Candidate for Master of Science Degree 6

Ps. Info • Ps. Info is a Microsoft Sysinternals tool that can collect local

Ps. Info • Ps. Info is a Microsoft Sysinternals tool that can collect local or remote system information • Version 1. 77 used in paper • Run from command line psinfo. exe -s applications SANS Technology Institute - Candidate for Master of Science Degree 7

Ps. Info output example SANS Technology Institute - Candidate for Master of Science Degree

Ps. Info output example SANS Technology Institute - Candidate for Master of Science Degree 8

WMIC • Windows Management Instrumentation Command-line • Permits access to query and change system

WMIC • Windows Management Instrumentation Command-line • Permits access to query and change system functionality • To collect inventory information wmic product get name, version SANS Technology Institute - Candidate for Master of Science Degree 9

WMIC example SANS Technology Institute - Candidate for Master of Science Degree 10

WMIC example SANS Technology Institute - Candidate for Master of Science Degree 10

WMIC output issues SANS Technology Institute - Candidate for Master of Science Degree 11

WMIC output issues SANS Technology Institute - Candidate for Master of Science Degree 11

Power. Shell • Uses the Open. Sub. Key and Get. Value cmdlets within Power.

Power. Shell • Uses the Open. Sub. Key and Get. Value cmdlets within Power. Shell • Accesses the following registry locations and iterates through each subkey – SOFTWAREMicrosoftWindowsCurrent. Vers ionUninstall , – SOFTWAREWow 6432 NodeMicrosoftWind owsCurrent. VersionUninstall SANS Technology Institute - Candidate for Master of Science Degree 12

Scripting it all together • Running commands on individual systems is tedious at best

Scripting it all together • Running commands on individual systems is tedious at best – Summer student project • However, scripts provide a quicker means to accomplish the tasks • Two primary methods to create Windows scripts – Batch scripting – Power. Shell SANS Technology Institute - Candidate for Master of Science Degree 13

Scripts within the paper • Scripts examples include: – Batch file for Ps. Info

Scripts within the paper • Scripts examples include: – Batch file for Ps. Info and WMIC collection – Power. Shell script for PS commands • All query for IP address to inventory • Some checking is performed for valid data types and entry • Output stored in text file for archiving and future reference SANS Technology Institute - Candidate for Master of Science Degree 14

Conclusion • 3 methods discussed in paper – Scripts provided automate the process •

Conclusion • 3 methods discussed in paper – Scripts provided automate the process • Increases visibility and understanding of the network • Major first step to remediation SANS Technology Institute - Candidate for Master of Science Degree 15