29.04.2014 Views

Spotting the Adversary with Windows Event Log Monitoring

Spotting the Adversary with Windows Event Log Monitoring

Spotting the Adversary with Windows Event Log Monitoring

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The listing below is not an exhaustive list to identify all issues <strong>with</strong> WinRM. These commands are helpful<br />

to diagnose common errors. [83][84][85]<br />

winrm e winrm/config/listener<br />

WinRM can enumerate all listeners that WinRM is currently using.<br />

winrm id –remote:TARGET<br />

The above command identifies (id) <strong>the</strong> remote machine (TARGET) by asking <strong>the</strong> remote machine its<br />

operating system version and WinRM version. The TARGET can be a NetBIOS name, Domain name, or<br />

FQDN. Alternatively, using <strong>the</strong>–auth:none option will forces WinRM to not use au<strong>the</strong>ntication when<br />

requesting information from <strong>the</strong> remote machine. Using this option only provides a minimal set of<br />

details (version of WinRM only).<br />

The identify option provide insight if communication between two WinRM parties are correct and not<br />

interrupted. This interruption can be <strong>the</strong> result of a firewall blocking WinRM or WinRM not running.<br />

winrm get wmi/root/cimv2/Win32_Service?Name=WinRM<br />

This command provides useful information (e.g., ProcessID and Context WinRM runs in) regarding <strong>the</strong><br />

WinRM service running on <strong>the</strong> local machine.<br />

WinRM allows <strong>the</strong> restoration of default settings using <strong>the</strong> above command.<br />

winrm invoke restore winrm/config @{}<br />

These two commands display <strong>the</strong> configuration for both WinRM client and service. Viewing<br />

configuration settings can help identify any possible incorrect configuration settings.<br />

winrm get winrm/config/client/auth<br />

winrm get winrm/config/service/auth<br />

WinRM error messages display <strong>the</strong> description of <strong>the</strong> error and an error code. The definition behind <strong>the</strong><br />

error code can be shown by executing <strong>the</strong> above command. The ERRORCODE needs to be supplied<br />

verbatim as it was displayed in <strong>the</strong> original error message (e.g., 0x80070005 means Access Denied).<br />

These errors are Win32 error codes.<br />

winrm helpmsg ERRORCODE<br />

83 http://blogs.technet.com/b/jonjor/archive/2009/01/09/winrm-windows-remote-management-troubleshooting.aspx<br />

84 http://msdn.microsoft.com/en-us/library/windows/desktop/ee309364(v=vs.85).aspx<br />

85 http://msdn.microsoft.com/en-us/library/windows/desktop/aa384295(v=vs.85).aspx#enabling_auth_options<br />

61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!