<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8083286463160428652</id><updated>2012-01-28T10:54:05.230-08:00</updated><category term='gnuplot'/><category term='gci'/><category term='Joanna Rutkowska;metaphysics of network security'/><category term='logging'/><category term='geoiplookup;tcpdump;firewall logs'/><category term='alternative to tap; tcpdump; syslog;FVS318'/><category term='Combining logparser.exe with cmd.exe'/><category term='&quot;The Cloud&quot;'/><category term='lsof for Windows'/><category term='Powershell'/><category term='data breaches; ITRC;2010'/><category term='Port 6000;X11;FVS318;Syslog'/><category term='reasonable steps to safeguard sensitive digital content'/><category term='GetOwnerModuleFromTcpEntry  Powershell iphlpapi.dll'/><category term='native tail.exe; cmd.exe;'/><category term='System.Diagnostics.Process with System.Security.AccessControl'/><category term='Threads'/><category term='get-acl'/><category term='Logon screen error;'/><category term='updates'/><category term='Vista Firewall;Parsing Logs;logparser.exe'/><category term='get-wmiobject win32_networkadapter;XP and Vista network interfaces'/><category term='Argus'/><category term='Social Networking; EFF;Privacy'/><category term='&quot;One Page Checklist for Securing and Cleaning a Malware Infected Windows PC&quot;'/><category term='ICF;Cygwin;Microsoft&apos;s Firewall'/><category term='mergecap'/><category term='ITL'/><category term='threats; attack vectors; sniffers;firewalls'/><category term='ingress snort logs'/><category term='net helpmsg;Windows Error Messages;Silliness'/><category term='ps;fstat;lsof;Linux;Windows;OpenBSD;DEP'/><category term='windows times-stamping'/><category term='sorting ingress source IPs'/><category term='Win32:SQLSlammer;Malware detection;Snort;Traceroute'/><category term='Sorting/Searching for Events by UserID'/><category term='Get-WinEvent Logon Windows Filtering Platform'/><category term='LoadCapAndFilter;NCSI.txt;'/><category term='&quot;universal privelege&quot;'/><category term='Modules'/><category term='LocateIP.sh;tcp/IDS analysis;'/><category term='Bank Fraud;Money Mules;Small Business'/><category term='Security;Hotmail;Microsoft'/><category term='tcpslice'/><category term='one year anniversary'/><category term='tasklist'/><category term='netsh ETL tracing'/><category term='Check-TCPUDPClient.ps1'/><category term='Advanced Persistent Threat;'/><category term='Cyber Security Review;&quot;The Shadow Government&quot;;&quot;McMafia&quot;'/><category term='start up'/><category term='&apos;Get-WinEvent&apos; Logons'/><category term='Networ Monitor 3.3;VSC++ Express;WDDK;Visual Studio;OpenSource Parsers;logparser;'/><category term='virus protection'/><category term='netstat'/><category term='Get-WinEvent Logon'/><category term='pcregrep'/><category term='Powershell LSOF'/><category term='Bash 4.0;awk;geoiplookup;pcregrep;'/><category term='The Security Process'/><category term='*NIX find'/><category term='LinuxFest Northwest'/><category term='&quot;Security by Isolation&quot;'/><category term='Parsing Netstat'/><category term='Vista Firewall;Parsing Logs;Powershell'/><category term='rtime.cmd'/><category term='&apos;Get-WinEvent&apos; ETL Providers Event Logs'/><category term='svchost'/><category term='Eddie Kohler; ipsumdump'/><category term='Windows TCP/IP Address information'/><category term='Bot Hunter;SRI; APT;'/><category term='Exposing Shell Paths with Powershell'/><category term='Is Digital Security Possible'/><category term='Cell Tracking'/><category term='lsof tcpdump'/><category term='GeoIP'/><category term='Small Business Owners'/><category term='Test Harness;Vista;work needed'/><category term='APT;Snort;Data Protection'/><category term='lsof for Powershell'/><category term='NetGear Firewall;Syslog output;Parsing Logs;LinuxFest Northwest'/><category term='openfiles'/><category term='gawk;SrcIP;DstIP;sort;uniq;Cygwin'/><category term='Vista Firewall;Parsing Logs;cmd.exe;Windump;nmap'/><category term='Automobile hacking...'/><category term='Windows 7 Firewall;Parsing Logs;Powershell;logparser.exe'/><category term='Process'/><category term='ipsumdump'/><category term='accesschk'/><category term='TrendMicro;Sophos;PC Tools;DEP;AV;'/><category term='netmon captures'/><category term='Conficker C; Syslogd; Firewall Blocking'/><category term='FileVersionInfo'/><title type='text'>Network Security</title><subtitle type='html'>This is the weblog for &lt;a href="http://www.rmfnetworksecurity.com/"&gt;http://www.rmfnetworksecurity.com&lt;/a&gt;. See Also &lt;a href="http://horizontal-logic.blogspot.com/"&gt;http://horizontal-logic.blogspot.com&lt;/a&gt; for more Powershell code.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>84</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-1502292828259892278</id><published>2011-12-18T20:46:00.000-08:00</published><updated>2012-01-04T16:12:07.317-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows TCP/IP Address information'/><title type='text'>One liners for retrieving Windows TCP/IP and  IP Address information</title><content type='html'>One liners for retrieving Windows IP Address information from Powershell v3.0:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;gwmi -class Win32_NetworkAdapterConfiguration | % {if ($_.IPAddress -ne $null) {$input}}&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;gwmi -class Win32_NetworkAdapterConfiguration | % {if ($_.IPAddress -ne $null) {$input}} | fl *&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;gwmi -class Win32_NetworkAdapterConfiguration | % {if ($_.IPAddress -ne $null) {$input | Select -ea 0 IP,DHCP,DNS,WINS}}&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;gwmi -class Win32_NetworkAdapter | &amp;nbsp;% {If ($_.NetEnabled) {$input | Select Caption, Name, Speed, TimeOflastReset,Net*}}&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;gwmi -class Win32_NetworkAdapterConfiguration | % {If ($_.IPAddress -ne $null) {write "$($_.caption) $($_.IPAddress) $($_.SettingID)"}}&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;gwmi -class Win32_PerfRawData_Tcpip_NetworkInterface | % {if ($_.BytesReceivedPersec -ne 0) {write "$($_.Name) $($_.BytesReceivedPersec) $($_.BytesSentPersec)"} }&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;and a function for retrieve 'PropertySets' of IP information for a list of computers; provided that you can make remote Powershell connectivity work:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;div&gt;function Global:Show-IPinfo {&lt;/div&gt;&lt;div&gt;[CmdletBinding()]&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Param(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Parameter(ValueFromPipeline=$true)]&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [array]$HostList=@("localhost"),&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;[array]$PropertySets=@("IP","DHCP","DNS")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; )&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;$HostList | % {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$HostIP=gwmi -computer $input -class Win32_NetworkAdapterConfiguration |&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;% {if ($_.IPAddress -ne $null) {$input}}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$PropertySets |&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;% {foreach ($i in ($HostIP.$input).ReferencedPropertyNames) {write "$($i) : $($HostIP.$i)"}}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-1502292828259892278?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/1502292828259892278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/12/one-liners-for-retrieving-windows-tcpip.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1502292828259892278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1502292828259892278'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/12/one-liners-for-retrieving-windows-tcpip.html' title='One liners for retrieving Windows TCP/IP and  IP Address information'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-3338751515306871709</id><published>2011-12-10T14:50:00.000-08:00</published><updated>2011-12-10T14:50:36.300-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FileVersionInfo'/><title type='text'>FileVersionInfo Part II</title><content type='html'>&lt;pre&gt;&lt;span style="color: green;"&gt;#&lt;/span&gt;&lt;span style="color: green;"&gt; Powershell v3.0 code&lt;/span&gt;&lt;span style="color: green;"&gt;&lt;br /&gt;#&lt;/span&gt;&lt;span style="color: green;"&gt; Recurses current directory to gather file version information of a boolean property&lt;/span&gt;&lt;span style="color: green;"&gt;&lt;br /&gt;#&lt;/span&gt;&lt;span style="color: green;"&gt; Returns number of Debug,Patched,PreRelease,Private,Special builds&lt;/span&gt;&lt;span style="color: green;"&gt;&lt;br /&gt;#&lt;/span&gt;&lt;span style="color: green;"&gt; Creates csv of those properties in current directory&lt;/span&gt;&lt;span style="color: green;"&gt;&lt;br /&gt;#&lt;/span&gt;&lt;span style="color: green;"&gt; Takes up to three arguments:&lt;/span&gt;&lt;span style="color: green;"&gt;&lt;br /&gt;#&lt;/span&gt;&lt;span style="color: green;"&gt; [mandatory]$filename (e.g. *.dll),$exportflag (e.g. "0" to output csv;default is off), $filetime (default is now)&lt;/span&gt;&lt;span style="color: green;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt; &lt;span style="color: cadetblue;"&gt;Global:Get-fileinfo&lt;/span&gt; {&lt;br /&gt;[CmdletBinding()]&lt;br /&gt;    &lt;span style="color: blue;"&gt;Param&lt;/span&gt;(&lt;br /&gt;        [Parameter(ValueFromPipeline&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;$true&lt;/span&gt;)]&lt;br /&gt;        [&lt;span style="color: teal;"&gt;object&lt;/span&gt;]&lt;span style="color: purple;"&gt;$filename&lt;/span&gt;,&lt;br /&gt;        [&lt;span style="color: teal;"&gt;bool&lt;/span&gt;]&lt;span style="color: purple;"&gt;$exportflag&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;1,&lt;br /&gt;        &lt;span style="color: purple;"&gt;$filetime&lt;/span&gt;=[&lt;span style="color: teal;"&gt;DateTime&lt;/span&gt;]::&lt;span style="color: saddlebrown;"&gt;Now&lt;/span&gt;.&lt;span style="color: saddlebrown;"&gt;ToFileTime&lt;/span&gt;()&lt;br /&gt;         )&lt;br /&gt; &lt;br /&gt;&lt;span style="color: purple;"&gt;$Files&lt;/span&gt;=&lt;span style="color: cadetblue; font-weight: bold;"&gt;ls&lt;/span&gt; &lt;span style="color: cadetblue; font-style: italic;"&gt;-Filter&lt;/span&gt; &lt;span style="color: purple;"&gt;$filename&lt;/span&gt; &lt;span style="color: cadetblue; font-style: italic;"&gt;-recurse&lt;/span&gt; &lt;span style="color: red;"&gt;-File&lt;/span&gt; &lt;br /&gt;&lt;span style="color: green;"&gt;#&lt;/span&gt;&lt;span style="color: green;"&gt;# $Files=ls -ea 0 -Filter $filename -recurse #remove '-File' to create 2.0 code. Add '-ea 0' as desired.&lt;/span&gt;&lt;span style="color: green;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: purple;"&gt;$FileInfo&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;$Files&lt;/span&gt; | &lt;br /&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt; {[&lt;span style="color: teal;"&gt;System.Diagnostics.FileVersionInfo&lt;/span&gt;]::&lt;span style="color: saddlebrown;"&gt;GetVersionInfo&lt;/span&gt;(&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;$(($_.DirectoryName)+&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;\&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;+($_.Name))&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;)}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: purple;"&gt;$Global:DebugBuild&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;$FileInfo&lt;/span&gt; | &lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt;  {&lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: purple;"&gt;$_&lt;/span&gt;.IsDebug) {&lt;span style="color: purple;"&gt;$_&lt;/span&gt;}}&lt;br /&gt;&lt;span style="color: purple;"&gt;$Global:PatchedBuild&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;$FileInfo&lt;/span&gt; | &lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt;  {&lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: purple;"&gt;$_&lt;/span&gt;.IsPatched) {&lt;span style="color: purple;"&gt;$_&lt;/span&gt;}}&lt;br /&gt;&lt;span style="color: purple;"&gt;$Global:PrereleaseBuild&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;$FileInfo&lt;/span&gt; | &lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt;  {&lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: purple;"&gt;$_&lt;/span&gt;.IsPreRelease) {&lt;span style="color: purple;"&gt;$_&lt;/span&gt;}}&lt;br /&gt;&lt;span style="color: purple;"&gt;$Global:PrivateBuild&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;$FileInfo&lt;/span&gt; | &lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt;  {&lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: purple;"&gt;$_&lt;/span&gt;.IsPrivateBuild) {&lt;span style="color: purple;"&gt;$_&lt;/span&gt;}}&lt;br /&gt;&lt;span style="color: purple;"&gt;$Global:SpecialBuild&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;$FileInfo&lt;/span&gt; | &lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt;  {&lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: purple;"&gt;$_&lt;/span&gt;.IsSpecialBuild) {&lt;span style="color: purple;"&gt;$_&lt;/span&gt;}}&lt;br /&gt;&lt;br /&gt;[&lt;span style="color: teal;"&gt;hashtable&lt;/span&gt;]&lt;span style="color: purple;"&gt;$Global:Report&lt;/span&gt;=@{&lt;br /&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;DebugBuild&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;=&lt;/span&gt; &lt;span style="color: maroon;"&gt;'&lt;/span&gt;&lt;span style="color: maroon;"&gt;$DebugBuild&lt;/span&gt;&lt;span style="color: maroon;"&gt;'&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;PatchedBuild&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;=&lt;/span&gt; &lt;span style="color: maroon;"&gt;'&lt;/span&gt;&lt;span style="color: maroon;"&gt;$PatchedBuild&lt;/span&gt;&lt;span style="color: maroon;"&gt;'&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;PrereleaseBuild&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;=&lt;/span&gt; &lt;span style="color: maroon;"&gt;'&lt;/span&gt;&lt;span style="color: maroon;"&gt;$PrereleaseBuild&lt;/span&gt;&lt;span style="color: maroon;"&gt;'&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;PrivateBuild&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;=&lt;/span&gt; &lt;span style="color: maroon;"&gt;'&lt;/span&gt;&lt;span style="color: maroon;"&gt;$PrivateBuild&lt;/span&gt;&lt;span style="color: maroon;"&gt;'&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;SpecialBuild&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;=&lt;/span&gt; &lt;span style="color: maroon;"&gt;'&lt;/span&gt;&lt;span style="color: maroon;"&gt;$SpecialBuild&lt;/span&gt;&lt;span style="color: maroon;"&gt;'&lt;/span&gt; }&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: purple;"&gt;$exportflag&lt;/span&gt; &lt;span style="color: red;"&gt;-eq&lt;/span&gt; 0)&lt;br /&gt;    {&lt;br /&gt;    [&lt;span style="color: teal;"&gt;array&lt;/span&gt;]&lt;span style="color: purple;"&gt;$hasharray&lt;/span&gt;=&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: purple;"&gt;$i&lt;/span&gt; &lt;span style="color: blue;"&gt;in&lt;/span&gt; &lt;span style="color: purple;"&gt;$Report&lt;/span&gt;){&lt;span style="color: purple;"&gt;$i&lt;/span&gt;.Values}&lt;br /&gt;    &lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: purple;"&gt;$i&lt;/span&gt; &lt;span style="color: blue;"&gt;in&lt;/span&gt; &lt;span style="color: purple;"&gt;$hasharray&lt;/span&gt;) {&lt;span style="color: cadetblue; font-weight: bold;"&gt;invoke-expression&lt;/span&gt; $(&lt;span style="color: purple;"&gt;$i&lt;/span&gt;.trimEnd(&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;$&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;)) | &lt;span style="color: cadetblue; font-weight: bold;"&gt;Export-Csv&lt;/span&gt; -ea 0 &lt;span style="color: cadetblue; font-style: italic;"&gt;-Path&lt;/span&gt; &lt;span style="color: purple;"&gt;$filetime$i&lt;/span&gt;.csv }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;write&lt;/span&gt; &lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Total files: $(($Files).count)&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;write&lt;/span&gt; &lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Marked Debug: $(($DebugBuild).count)&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;write&lt;/span&gt; &lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Marked Patched: $(($PatchedBuild).count)&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;write&lt;/span&gt; &lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Marked Prerelease: $(($PrereleaseBuild).count)&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;write&lt;/span&gt; &lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Marked Private: $(($PrivateBuild).count)&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;write&lt;/span&gt; &lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Marked Special: $(($SpecialBuild).count)&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-3338751515306871709?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/3338751515306871709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/12/fileversioninfo-part-ii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3338751515306871709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3338751515306871709'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/12/fileversioninfo-part-ii.html' title='FileVersionInfo Part II'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-6548211005543699960</id><published>2011-12-10T14:40:00.000-08:00</published><updated>2011-12-10T14:51:10.565-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FileVersionInfo'/><title type='text'>FileVersionInfo Part I</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Retrieving &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.fileversioninfo(v=VS.100).aspx"&gt;FileVersionInfo&lt;/a&gt;&amp;nbsp;in Powershell involves calling&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[System.Diagnostics.FileVersionInfo]::GetVersionInfo(). "ls ' or 'Get-childitem' has a scriptproperty named "VersionInfo" that can be used for this:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;PS C:\ps1&amp;gt; $a=ls -recurse | % {$_.VersionInfo}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;TypeName &amp;nbsp; : System.IO.FileInfo&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; : VersionInfo&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;MemberType : ScriptProperty&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Definition : System.Object VersionInfo {get=[System.Diagnostics.FileVersionInfo]::GetVersionInfo($this.FullName);}&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;System.Diagnostics.FileVersionInfo contains five boolean properties for Debug,Patched,PreRelease,Private,Special builds:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;PS C:\ps1&amp;gt; $a | gm&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;TypeName: System.Diagnostics.FileVersionInfo&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MemberType Definition&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ---------- ----------&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Equals &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Method &amp;nbsp; &amp;nbsp; bool Equals(System.Object obj)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;GetHashCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Method &amp;nbsp; &amp;nbsp; int GetHashCode()&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;GetType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Method &amp;nbsp; &amp;nbsp; type GetType()&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;ToString &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Method &amp;nbsp; &amp;nbsp; string ToString()&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Comments &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Property &amp;nbsp; System.String Comments {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;CompanyName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Property &amp;nbsp; System.String CompanyName {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;FileBuildPart &amp;nbsp; &amp;nbsp; &amp;nbsp;Property &amp;nbsp; System.Int32 FileBuildPart {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;FileDescription &amp;nbsp; &amp;nbsp;Property &amp;nbsp; System.String FileDescription {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;FileMajorPart &amp;nbsp; &amp;nbsp; &amp;nbsp;Property &amp;nbsp; System.Int32 FileMajorPart {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;FileMinorPart &amp;nbsp; &amp;nbsp; &amp;nbsp;Property &amp;nbsp; System.Int32 FileMinorPart {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;FileName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Property &amp;nbsp; System.String FileName {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;FilePrivatePart &amp;nbsp; &amp;nbsp;Property &amp;nbsp; System.Int32 FilePrivatePart {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;FileVersion &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Property &amp;nbsp; System.String FileVersion {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;InternalName &amp;nbsp; &amp;nbsp; &amp;nbsp; Property &amp;nbsp; System.String InternalName {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;IsDebug &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Property &amp;nbsp; System.Boolean IsDebug {get;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;IsPatched &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Property &amp;nbsp; System.Boolean IsPatched {get;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;IsPreRelease &amp;nbsp; &amp;nbsp; &amp;nbsp; Property &amp;nbsp; System.Boolean IsPreRelease {get;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;IsPrivateBuild &amp;nbsp; &amp;nbsp; Property &amp;nbsp; System.Boolean IsPrivateBuild {get;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;IsSpecialBuild &amp;nbsp; &amp;nbsp; Property &amp;nbsp; System.Boolean IsSpecialBuild {get;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Language &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Property &amp;nbsp; System.String Language {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;LegalCopyright &amp;nbsp; &amp;nbsp; Property &amp;nbsp; System.String LegalCopyright {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;LegalTrademarks &amp;nbsp; &amp;nbsp;Property &amp;nbsp; System.String LegalTrademarks {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;OriginalFilename &amp;nbsp; Property &amp;nbsp; System.String OriginalFilename {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;PrivateBuild &amp;nbsp; &amp;nbsp; &amp;nbsp; Property &amp;nbsp; System.String PrivateBuild {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;ProductBuildPart &amp;nbsp; Property &amp;nbsp; System.Int32 ProductBuildPart {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;ProductMajorPart &amp;nbsp; Property &amp;nbsp; System.Int32 ProductMajorPart {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;ProductMinorPart &amp;nbsp; Property &amp;nbsp; System.Int32 ProductMinorPart {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;ProductName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Property &amp;nbsp; System.String ProductName {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;ProductPrivatePart Property &amp;nbsp; System.Int32 ProductPrivatePart {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;ProductVersion &amp;nbsp; &amp;nbsp; Property &amp;nbsp; System.String ProductVersion {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;SpecialBuild &amp;nbsp; &amp;nbsp; &amp;nbsp; Property &amp;nbsp; System.String SpecialBuild {get;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;We can select for these booleans easy enough:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;PS C:\ps1&amp;gt; $a | Select Filename,Is* | fl *| more&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;{ls -recurse | % {$_.VersionInfo} |&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Select Filename,Is* | fl *| more}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;FileName &amp;nbsp; &amp;nbsp; &amp;nbsp; : C:\ps1\CTPv3\app.config&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;IsDebug &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: False&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;IsPatched &amp;nbsp; &amp;nbsp; &amp;nbsp;: False&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;IsPrivateBuild : False&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;IsPreRelease &amp;nbsp; : False&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;IsSpecialBuild : False&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;FileName &amp;nbsp; &amp;nbsp; &amp;nbsp; : C:\ps1\CTPv3\AssemblyInfo.cs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;IsDebug &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: False&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;IsPatched &amp;nbsp; &amp;nbsp; &amp;nbsp;: False&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;IsPrivateBuild : False&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;IsPreRelease &amp;nbsp; : False&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;IsSpecialBuild : False&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-6548211005543699960?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/6548211005543699960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/12/fileversioninfo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/6548211005543699960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/6548211005543699960'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/12/fileversioninfo.html' title='FileVersionInfo Part I'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-3715977461416509793</id><published>2011-09-06T17:38:00.000-07:00</published><updated>2011-10-04T10:19:02.550-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System.Diagnostics.Process with System.Security.AccessControl'/><title type='text'>Muxing System.Diagnostics.Process with System.Security.AccessControl</title><content type='html'>&lt;pre&gt;&lt;span style="color: green;"&gt;#&lt;/span&gt;&lt;span style="color: green;"&gt; three functions that produce filepath,Owner,Access,SDDL&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: green;"&gt;# for the binaries listed by ps ("get-process")&lt;/span&gt;&lt;span style="color: green;"&gt;&lt;br /&gt;#&lt;/span&gt;&lt;span style="color: green;"&gt; All rights reserved Ryan M. Ferris @ RMF Network Security&lt;/span&gt;&lt;span style="color: green;"&gt;&lt;br /&gt;#&lt;/span&gt;&lt;span style="color: green;"&gt; Version r5:21 PM 9/6/2011&lt;/span&gt;&lt;span style="color: green;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue;"&gt;Get-PSACL&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;ps&lt;/span&gt;&lt;span style="color: black;"&gt; | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;get-acl&lt;/span&gt;&lt;span style="color: black;"&gt; -ea &lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: black;"&gt; | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;Select&lt;/span&gt;&lt;span style="color: black;"&gt; pschildname,owner,AccessToString,Sddl&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue;"&gt;Get-PEX&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;{&lt;br /&gt;[&lt;/span&gt;&lt;span style="color: teal;"&gt;array&lt;/span&gt;&lt;span style="color: black;"&gt;]&lt;/span&gt;&lt;span style="color: purple;"&gt;$global:ps_list&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;ps&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;[&lt;/span&gt;&lt;span style="color: teal;"&gt;array&lt;/span&gt;&lt;span style="color: black;"&gt;]&lt;/span&gt;&lt;span style="color: purple;"&gt;$global:acl_list&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;$ps_list&lt;/span&gt;&lt;span style="color: black;"&gt; | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;get-acl&lt;/span&gt;&lt;span style="color: black;"&gt; -ea &lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;$acl_list&lt;/span&gt;&lt;span style="color: black;"&gt; | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;Select&lt;/span&gt;&lt;span style="color: black;"&gt; @{label&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;FilePath&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;; Expression&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;{&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;ls&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$_&lt;/span&gt;&lt;span style="color: black;"&gt;.PsPath}},Owner,AccessToString,Sddl&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue;"&gt;Get-PIDACL&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt;&lt;span style="color: black;"&gt; (&lt;/span&gt;&lt;span style="color: purple;"&gt;$id&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;in&lt;/span&gt;&lt;span style="color: black;"&gt; $(&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;ps&lt;/span&gt;&lt;span style="color: black;"&gt;)) &lt;br /&gt;    {&lt;/span&gt;&lt;span style="color: purple;"&gt;$id&lt;/span&gt;&lt;span style="color: black;"&gt; | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;Select&lt;/span&gt;&lt;span style="color: black;"&gt; Name,ID,&lt;br /&gt;    @{Label&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Owner&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;;Expression&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;{&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;get-acl&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$id&lt;/span&gt;&lt;span style="color: black;"&gt;.Path | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt;&lt;span style="color: black;"&gt; {&lt;/span&gt;&lt;span style="color: purple;"&gt;$_&lt;/span&gt;&lt;span style="color: black;"&gt;.Owner}}},&lt;br /&gt;    @{Label&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Access&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;;Expression&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;{&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;get-acl&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$id&lt;/span&gt;&lt;span style="color: black;"&gt;.Path | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt;&lt;span style="color: black;"&gt; {&lt;/span&gt;&lt;span style="color: purple;"&gt;$_&lt;/span&gt;&lt;span style="color: black;"&gt;.AccessToString}}},&lt;br /&gt;    @{Label&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;SDDL&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;;Expression&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;{&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;get-acl&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$id&lt;/span&gt;&lt;span style="color: black;"&gt;.Path | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt;&lt;span style="color: black;"&gt; {&lt;/span&gt;&lt;span style="color: purple;"&gt;$_&lt;/span&gt;&lt;span style="color: black;"&gt;.SDDL}}}&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: cadetblue;"&gt;Get-PSACL&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: cadetblue;"&gt;Get-PEX&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: cadetblue;"&gt;Get-PIDACL&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: cadetblue;"&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: cadetblue;"&gt;&lt;br /&gt;&lt;/span&gt;Two other functions as well:&lt;/pre&gt;&lt;pre&gt;function FindSDDL&lt;br /&gt;{&lt;br /&gt;foreach ($i in (ls)) {$i|  % {&lt;br /&gt;  $_.getaccesscontrol()} | &lt;br /&gt;  Select @{name="Path";Expression={$i | % {$_.Name}}},&lt;br /&gt;  @{name="Type";Expression={$i | % {$_.gettype().Name}}},&lt;br /&gt;  Owner,&lt;br /&gt;  Access,&lt;br /&gt;   SDDL }&lt;br /&gt;}&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;function RecurseSDDL&lt;br /&gt;{&lt;br /&gt;foreach ($i in (ls -recurse)) {$i|  % {&lt;br /&gt;  $_.getaccesscontrol()} | &lt;br /&gt;  Select @{name="Name";Expression={$i | % {$_.Name}}},&lt;br /&gt;  @{name="Path";Expression={$i | % {$_.PSParentPath}}},&lt;br /&gt;  @{name="Type";Expression={$i | % {$_.gettype().Name}}},&lt;br /&gt;  Owner,&lt;br /&gt;  Access,&lt;br /&gt;   SDDL }&lt;br /&gt;}&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;(or maybe better): &lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;function FindSDDL&lt;br /&gt;{&lt;br /&gt;foreach ($i in (ls)) {$i.getaccesscontrol() | &lt;br /&gt;  Select -property  Owner,Access,SDDL,&lt;br /&gt;  @{name="Path";Expression={$i.Name}},&lt;br /&gt;  @{name="Type";Expression={$i.gettype().Name}}&lt;br /&gt;  }&lt;br /&gt;}&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;function RecurseSDDL&lt;br /&gt;{&lt;br /&gt;$lsr=ls -recurse&lt;br /&gt;foreach ($i in $lsr) {$i.getaccesscontrol() | &lt;br /&gt;Select -property Owner,Access,SDDL,&lt;br /&gt;  @{name="Name";Expression={$i.Name}},&lt;br /&gt;  @{name="Path";Expression={$i.PSParentPath}},&lt;br /&gt;  @{name="Type";Expression={$i.gettype().Name}}&lt;br /&gt;}&lt;br /&gt;} &lt;/b&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-3715977461416509793?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/3715977461416509793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/09/muxing-systemdiagnosticsprocess-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3715977461416509793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3715977461416509793'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/09/muxing-systemdiagnosticsprocess-with.html' title='Muxing System.Diagnostics.Process with System.Security.AccessControl'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-5764193857908048370</id><published>2011-08-31T09:52:00.000-07:00</published><updated>2011-09-05T19:54:25.419-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='get-acl'/><category scheme='http://www.blogger.com/atom/ns#' term='gci'/><title type='text'>Muxing AccessControl and FileInfo objects</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Most of us know&lt;b&gt;&amp;nbsp;&lt;/b&gt;the members (partially printed at bottom) of&amp;nbsp;&lt;b&gt;System.Security.AccessControl&lt;/b&gt; and &lt;b&gt;System.IO.FileInfo. &lt;/b&gt;And most of us know they both share the PS* NoteProperty items:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;ul style="font-family: 'Times New Roman';"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;PSChildName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NoteProperty &amp;nbsp; System.String PSChildName=test.txt&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;PSDrive &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NoteProperty &amp;nbsp; System.Management.Automation.PSDriveInfo PSDrive=C&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;PSParentPath &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NoteProperty &amp;nbsp; System.String PSParentPath=Microsoft.PowerShell.Core\FileSystem::C:\&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;PSPath &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NoteProperty &amp;nbsp; System.String PSPath=Microsoft.PowerShell.Core\FileSystem::C:\test.txt&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;PSProvider &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NoteProperty &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;These 'NoteProperty' may be what makes co-operation between 'get-childitem' (alias 'ls' or 'gci') and 'get-acl' &amp;nbsp;straightforward:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[gci * | get-acl]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-eybsMb2IKDQ/Tl5dX6pmPHI/AAAAAAAAIHE/kVMi_5JBggA/s1600/simple_gci_get-acl.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="193" src="http://4.bp.blogspot.com/-eybsMb2IKDQ/Tl5dX6pmPHI/AAAAAAAAIHE/kVMi_5JBggA/s640/simple_gci_get-acl.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;However, this produces a&amp;nbsp;System.Security.AccessControl object only. What if you need to see both FileInfo properties and AccessControl properties in the same object? &amp;nbsp;For this we will have to do something more clever. &lt;i&gt;Calculated Properties&lt;/i&gt; help us mux AccessControl and FileInfo objects into one, giving us an output of all files with their AccessControl information sorted by LastAccessTime. This is &lt;i&gt;easier to do&lt;/i&gt; because AccessControl and FileInfo objects share the 'PSChildName' NoteProperty which acts here as a type of primary key:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;a href="http://rmfdevelopment.com/PowerShell_Scripts/Check-RecentAccess.htm"&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue;"&gt;Check-RecentAccess&lt;/span&gt;&lt;/a&gt;&lt;span style="color: black;"&gt; {&lt;br /&gt;[CmdletBinding()]&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;Param&lt;/span&gt;&lt;span style="color: black;"&gt;(&lt;br /&gt;        [Parameter(ValueFromPipeline&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;$true&lt;/span&gt;&lt;span style="color: black;"&gt;)]&lt;br /&gt;           [&lt;/span&gt;&lt;span style="color: teal;"&gt;int&lt;/span&gt;&lt;span style="color: black;"&gt;]&lt;/span&gt;&lt;span style="color: purple;"&gt;$days&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;    )&lt;br /&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;$StartTime&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; (&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;get-date&lt;/span&gt;&lt;span style="color: black;"&gt;) &lt;/span&gt;&lt;span style="color: red;"&gt;-&lt;/span&gt;&lt;span style="color: black;"&gt; (&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;new-timespan&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-days&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$days&lt;/span&gt;&lt;span style="color: black;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;$List&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;gci&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt; | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;where&lt;/span&gt;&lt;span style="color: black;"&gt; {&lt;/span&gt;&lt;span style="color: red;"&gt;!&lt;/span&gt;&lt;span style="color: purple;"&gt;$_&lt;/span&gt;&lt;span style="color: black;"&gt;.psiscontainer}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;$Query&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt;&lt;span style="color: black;"&gt; (&lt;/span&gt;&lt;span style="color: purple;"&gt;$i&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;in&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$List&lt;/span&gt;&lt;span style="color: black;"&gt;) { &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;gci&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$i&lt;/span&gt;&lt;span style="color: black;"&gt; |&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;Select&lt;/span&gt;&lt;span style="color: black;"&gt; FullName,*Time, @{Label&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Access&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;;Expression&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;{&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;get-acl&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$_&lt;/span&gt;&lt;span style="color: black;"&gt;.PSChildName | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt;&lt;span style="color: black;"&gt; {&lt;/span&gt;&lt;span style="color: purple;"&gt;$_&lt;/span&gt;&lt;span style="color: black;"&gt;.AccessToString}}}, @{Label&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Owner&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;;Expression&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;{&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;get-acl&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$_&lt;/span&gt;&lt;span style="color: black;"&gt;.PSChildName| &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt;&lt;span style="color: black;"&gt; {&lt;/span&gt;&lt;span style="color: purple;"&gt;$_&lt;/span&gt;&lt;span style="color: black;"&gt;.Owner}}}}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;$Query&lt;/span&gt;&lt;span style="color: black;"&gt; | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;Select&lt;/span&gt;&lt;span style="color: black;"&gt; LastAccessTime,CreationTime,FullName,Owner,Access| &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;where&lt;/span&gt;&lt;span style="color: black;"&gt; {&lt;/span&gt;&lt;span style="color: purple;"&gt;$_&lt;/span&gt;&lt;span style="color: black;"&gt;.LastAccessTime &lt;/span&gt;&lt;span style="color: red;"&gt;-gt&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$StartTime&lt;/span&gt;&lt;span style="color: black;"&gt;} |&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;Sort&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-descending&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;LastAccessTime&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-hiMzIaEaL-Y/Tl5heR_LTbI/AAAAAAAAIHI/IJConcfWOS8/s1600/Check-RecentAccess.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="103" src="http://4.bp.blogspot.com/-hiMzIaEaL-Y/Tl5heR_LTbI/AAAAAAAAIHI/IJConcfWOS8/s640/Check-RecentAccess.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="white-space: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;I have uploaded:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://rmfdevelopment.com/PowerShell_Scripts/Check-RecentAccess.ps1"&gt;Check-RecentAccess&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://rmfdevelopment.com/PowerShell_Scripts/Check-RecentAccessRecurse.ps1"&gt;Check-RecentAccessRecurse&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;TypeName: System.Security.AccessControl.FileSecurity&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MemberType &amp;nbsp; &amp;nbsp; Definition&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;---------- &amp;nbsp; &amp;nbsp; ----------&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Access &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CodeProperty &amp;nbsp; System.Security.AccessControl.AuthorizationRuleCollection Access{get=GetAccess;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Group &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CodeProperty &amp;nbsp; System.String Group{get=GetGroup;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Owner &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CodeProperty &amp;nbsp; System.String Owner{get=GetOwner;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Path &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CodeProperty &amp;nbsp; System.String Path{get=GetPath;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Sddl &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CodeProperty &amp;nbsp; System.String Sddl{get=GetSddl;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;....&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;TypeName: System.IO.FileInfo&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MemberType &amp;nbsp; &amp;nbsp; Definition&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;---------- &amp;nbsp; &amp;nbsp; ----------&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Mode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CodeProperty &amp;nbsp; System.String Mode{get=Mode;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;AppendText &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Method &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.IO.StreamWriter AppendText()&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;CopyTo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Method &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.IO.FileInfo CopyTo(string destFileName), System.IO.FileInfo CopyTo(string destFileName, bool overwrite)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Create &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Method &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.IO.FileStream Create()&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;CreateObjRef &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Method &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;...&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-5764193857908048370?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/5764193857908048370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/08/muxing-accesscontrol-and-fileinfo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5764193857908048370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5764193857908048370'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/08/muxing-accesscontrol-and-fileinfo.html' title='Muxing AccessControl and FileInfo objects'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-eybsMb2IKDQ/Tl5dX6pmPHI/AAAAAAAAIHE/kVMi_5JBggA/s72-c/simple_gci_get-acl.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-8391809815589810896</id><published>2011-08-26T22:12:00.000-07:00</published><updated>2011-08-27T08:45:45.091-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exposing Shell Paths with Powershell'/><title type='text'>New-Object -ComObject Shell.Application</title><content type='html'>Here are some notes on exposing &amp;nbsp;the Shell as a ComObject with Powershell. Here, I trace down the cookies folder:&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;$a = New-Object -ComObject Shell.Application&lt;/b&gt;&lt;br /&gt;&lt;b&gt;$b=1..100&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;foreach ($i in $b) {write "$i $($a | % {$_.Namespace($i).Self.Path})"}&lt;/b&gt;&lt;br /&gt;....&lt;br /&gt;32 C:\Users\rferrisx\AppData\Local\Microsoft\Windows\Temporary Internet Files&lt;br /&gt;33 C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\Cookies&lt;br /&gt;34 C:\Users\rferrisx\AppData\Local\Microsoft\Windows\History&lt;br /&gt;...&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;b&gt;($a | % {ls -recurse $_.Namespace(33).Self.Path }).count&lt;/b&gt;&lt;br /&gt;2385&lt;br /&gt;&lt;br /&gt;&lt;b&gt;($a | % {ls -recurse $_.Namespace(33).Self.Path | gc }) | more&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;__utma&lt;br /&gt;173272373.1981518736.1312989611.1312989611.1312989656.2&lt;br /&gt;google.com/mail/help/&lt;br /&gt;1088&lt;br /&gt;187792384&lt;br /&gt;30315796&lt;br /&gt;433027780&lt;br /&gt;30168945&lt;br /&gt;*&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Powershell gives us some opportunities to look at Windows file structure internals.&amp;nbsp;The output of these commands gives us the objects referenced by the file system for the Windows Shell:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;b&gt;$a = New-Object -ComObject Shell.Application&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="font-weight: normal;"&gt;&lt;b&gt;&lt;b&gt;$b=0..60&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;foreach ($i in $b) {write "$i $($a | % {$_.Namespace($i).Title})"}&lt;/b&gt;&lt;br /&gt;&lt;b&gt;foreach ($i in $b) {write "$i $($a | % {$_.Namespace($i).Self.Path})"}&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I can line them up in &amp;nbsp;spreadsheet (as below). Some are file paths give as GUIDs (or CLSIDs?). Others are blank:&lt;br /&gt;&lt;br /&gt;&lt;table border="0" cellspacing="0" cols="3" frame="VOID" rules="NONE"&gt;	&lt;colgroup&gt;&lt;col width="37"&gt;&lt;/col&gt;&lt;col width="190"&gt;&lt;/col&gt;&lt;col width="611"&gt;&lt;/col&gt;&lt;/colgroup&gt; 	&lt;tbody&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="0" width="37"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;0&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT" width="190"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;Desktop&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT" width="611"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;C:\Users\rferrisx\Desktop&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="1"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;1&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;The Internet&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;::{871C5380-42A0-1069-A2EA-08002B30309D}&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="2"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;2&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;Programs&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\Start Menu\Programs&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="3"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;3&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;All Control Panel Items&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;::{26EE0668-A00A-44D7-9371-BEB064C98683}\0&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="4"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;4&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;Printers&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D}&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="5"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;5&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;My Documents&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;C:\Users\rferrisx\Documents&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="6"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;6&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;Favorites&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;C:\Users\rferrisx\Favorites&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="7"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;7&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;Startup&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="8"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;8&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;Recent Items&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\Recent&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="9"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;9&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;SendTo&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\SendTo&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="10"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;10&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Recycle Bin&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; ::{645FF040-5081-101B-9F08-00AA002F954E}&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="11"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;11&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Start Menu&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\Start Menu&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="12"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;12&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT" sdnum="1033;" sdval="12"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;12&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="13"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;13&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; My Music&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\Music&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="14"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;14&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; My Videos&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\Videos&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="15"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;15&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT" sdnum="1033;" sdval="15"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;15&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="16"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;16&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Desktop&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;C:\Users\rferrisx\Desktop&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="17"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;17&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Computer&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="18"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;18&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Network&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; ::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="19"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;19&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Network Shortcuts&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\Network Shortcuts&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="20"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;20&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Fonts&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Windows\Fonts&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="21"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;21&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Templates&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\Templates&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="22"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;22&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Start Menu&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\ProgramData\Microsoft\Windows\Start Menu&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="23"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;23&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Programs&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\ProgramData\Microsoft\Windows\Start Menu\Programs&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="24"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;24&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Startup&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="25"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;25&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Public Desktop&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\Public\Desktop&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="26"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;26&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Roaming&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Roaming&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="27"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;27&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Printer Shortcuts&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\Printer Shortcuts&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="28"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;28&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Local&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Local&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="29"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;29&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Startup&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="30"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;30&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Startup&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="31"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;31&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Favorites&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\Favorites&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="32"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;32&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Temporary Internet Files&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Local\Microsoft\Windows\Temporary Internet Files&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="33"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;33&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Cookies&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\Cookies&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="34"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;34&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; History&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Local\Microsoft\Windows\History&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="35"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;35&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; ProgramData&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\ProgramData&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="36"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;36&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Windows&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Windows&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="37"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;37&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; System32&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Windows\System32&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="38"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;38&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Program Files&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Program Files&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="39"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;39&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; My Pictures&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\Pictures&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="40"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;40&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; rferrisx&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="41"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;41&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; SysWOW64&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Windows\SysWOW64&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="42"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;42&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Program Files (x86)&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Program Files (x86)&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="43"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;43&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Common Files&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Program Files\Common Files&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="44"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;44&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Common Files&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Program Files (x86)\Common Files&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="45"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;45&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Templates&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\ProgramData\Microsoft\Windows\Templates&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="46"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;46&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Public Documents&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\Public\Documents&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="47"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;47&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Administrative Tools&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="48"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;48&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Administrative Tools&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="49"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;49&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Network Connections&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; ::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="50"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;50&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT" sdnum="1033;" sdval="50"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;50&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="51"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;51&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT" sdnum="1033;" sdval="51"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;51&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="52"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;52&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT" sdnum="1033;" sdval="52"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;52&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="53"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;53&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Public Music&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\Public\Music&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="54"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;54&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Public Pictures&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\Public\Pictures&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="55"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;55&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Public Videos&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\Public\Videos&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="56"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;56&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Resources&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Windows\Resources&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="17" sdnum="1033;" sdval="57"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;57&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT" sdnum="1033;" sdval="409"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;409&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Windows\Resources\0409&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="58"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;58&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; OEM Links&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\ProgramData\OEM Links&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;tr&gt; 			&lt;td align="LEFT" height="18" sdnum="1033;" sdval="59"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;59&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; Temporary Burn Folder&lt;/span&gt;&lt;/td&gt; 			&lt;td align="LEFT"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; C:\Users\rferrisx\AppData\Local\Microsoft\Windows\Burn\Burn&lt;/span&gt;&lt;/td&gt; 		&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;What are those GUID (or CLSID) paths? The 49th appears to be the non-browsable folder:&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;"All Control Panel Items"\"Network Connections"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$a | % {$_.Namespace(49).ParentFolder.Self.GetFolder.Self}&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Application &amp;nbsp;: System.__ComObject&lt;br /&gt;Parent &amp;nbsp; &amp;nbsp; &amp;nbsp; : System.__ComObject&lt;br /&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : All Control Panel Items&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Path &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : ::{21EC2020-3AEA-1069-A2DD-08002B30309D}&lt;/span&gt;&lt;br /&gt;GetLink &amp;nbsp; &amp;nbsp; &amp;nbsp;:&lt;br /&gt;GetFolder &amp;nbsp; &amp;nbsp;: System.__ComObject&lt;br /&gt;IsLink &amp;nbsp; &amp;nbsp; &amp;nbsp; : False&lt;br /&gt;IsFolder &amp;nbsp; &amp;nbsp; : True&lt;br /&gt;IsFileSystem : False&lt;br /&gt;IsBrowsable &amp;nbsp;: False&lt;br /&gt;ModifyDate &amp;nbsp; : 12/30/1899 12:00:00 AM&lt;br /&gt;Size &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 0&lt;br /&gt;Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : System Folder&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$a | % {$_.Namespace(49).ParentFolder.Self.GetFolder.Self.Name}&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;b&gt;All Control Panel Items&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$a | % {$_.Namespace(49).Self.GetFolder.Self}&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Application &amp;nbsp;: System.__ComObject&lt;br /&gt;Parent &amp;nbsp; &amp;nbsp; &amp;nbsp; : System.__ComObject&lt;br /&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : Network Connections&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Path &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : ::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}&lt;/span&gt;&lt;br /&gt;GetLink &amp;nbsp; &amp;nbsp; &amp;nbsp;:&lt;br /&gt;GetFolder &amp;nbsp; &amp;nbsp;: System.__ComObject&lt;br /&gt;IsLink &amp;nbsp; &amp;nbsp; &amp;nbsp; : False&lt;br /&gt;IsFolder &amp;nbsp; &amp;nbsp; : True&lt;br /&gt;IsFileSystem : False&lt;br /&gt;IsBrowsable &amp;nbsp;: False&lt;br /&gt;ModifyDate &amp;nbsp; : 12/30/1899 12:00:00 AM&lt;br /&gt;Size &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 0&lt;br /&gt;Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : System Folder&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$a | % {$_.Namespace(49).Self.GetFolder.Self.Name}&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Network Connections&lt;/span&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-8391809815589810896?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/8391809815589810896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/08/new-object-comobject-shellapplication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8391809815589810896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8391809815589810896'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/08/new-object-comobject-shellapplication.html' title='New-Object -ComObject Shell.Application'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-5994917053290818011</id><published>2011-08-11T17:34:00.000-07:00</published><updated>2011-08-11T17:44:40.552-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sorting/Searching for Events by UserID'/><category scheme='http://www.blogger.com/atom/ns#' term='Modules'/><title type='text'>Sorting Windows events by UserID: Part II (Building a Module)</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;I am a bit late to some v2.0 functionality. &amp;nbsp;I made &lt;a href="http://rmfdevelopment.com/PowerShell_Scripts/UserIDEventsModule.psm1"&gt;my first attempt&lt;/a&gt; at creating a module, in this case a six function script that queries general information from an event log. I ran into at least two problems:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;(a) get-winevent is slow for high volume queries&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;(b) modules so encapsulate their variables in functions that I could not find how to call all functions globally from an internal or external script.&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;You can find the system module locations with:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;$env:PSModulePath&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;(($env:PSModulePath -split(";"))[0])&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;$env:PSModulePath&lt;/i&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;C:\Users\rferrisx\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;(($env:PSModulePath -split(";"))[0])&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;C:\Users\rferrisx\Documents\WindowsPowerShell\Modules&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;After you have created your functions for your module, you can import them into your session:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;Import-Module .\UserIDEventsModule.psm1&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;If you change your module you can remove it:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;remove-module&amp;nbsp;&lt;/span&gt;UserIDEventsModule&lt;/i&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;While your module is imported, you can list your functions:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;$commands=(get-module UserIDEventsModule).ExportedCommands&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;$list=(($commands).Values) | %{$_.Name} | Sort&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;$list&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;0Check-EventLogsBySize&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;1Check-EventLogsByLastWrite&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;2Count-Providers&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;3Find-UniqueUserIDs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;4UserID-filter&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;5Event-filter&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;logtime&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Run-AllModFunc&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;I constructed an internal function to run all the modules that declared all the specific variables to the functions. However, whether I run such a function from as part of a module or an external script, I cannot alter the individual module function variables globally. &amp;nbsp;Setting the variables global with AllScope (as below) does not help:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue;"&gt;Global:Run-AllModFunc&lt;/span&gt;&lt;span style="color: black;"&gt; {&lt;br /&gt;[CmdletBinding()]&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;Param&lt;/span&gt;&lt;span style="color: black;"&gt;(&lt;br /&gt;        [Parameter(ValueFromPipeline&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;$true&lt;/span&gt;&lt;span style="color: black;"&gt;)]&lt;br /&gt;        [&lt;/span&gt;&lt;span style="color: teal;"&gt;int&lt;/span&gt;&lt;span style="color: black;"&gt;]&lt;/span&gt;&lt;span style="color: purple;"&gt;$Global:hours&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: black;"&gt;,&lt;br /&gt;        [&lt;/span&gt;&lt;span style="color: teal;"&gt;string&lt;/span&gt;&lt;span style="color: black;"&gt;]&lt;/span&gt;&lt;span style="color: purple;"&gt;$Global:filter&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;ID&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;,&lt;br /&gt;        [&lt;/span&gt;&lt;span style="color: teal;"&gt;array&lt;/span&gt;&lt;span style="color: black;"&gt;]&lt;/span&gt;&lt;span style="color: purple;"&gt;$Global:logs&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; @(&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Security&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;,&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;System&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;,&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Application&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;),&lt;br /&gt;        [&lt;/span&gt;&lt;span style="color: teal;"&gt;string&lt;/span&gt;&lt;span style="color: black;"&gt;]&lt;/span&gt;&lt;span style="color: purple;"&gt;$Modpath&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; ((&lt;/span&gt;&lt;span style="color: purple;"&gt;$env:PSModulePath&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;-split&lt;/span&gt;&lt;span style="color: black;"&gt;(&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;;&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;))[0]),&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: purple;"&gt;$NoRun&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: maroon;"&gt;Run-AllModFunc&lt;/span&gt;&lt;span style="color: maroon;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt;,&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: purple;"&gt;$FileTime&lt;/span&gt;&lt;span style="color: black;"&gt;=[&lt;/span&gt;&lt;span style="color: teal;"&gt;DateTime&lt;/span&gt;&lt;span style="color: black;"&gt;]::&lt;/span&gt;&lt;span style="color: saddlebrown;"&gt;Now&lt;/span&gt;&lt;span style="color: black;"&gt;.&lt;/span&gt;&lt;span style="color: saddlebrown;"&gt;ToFileTime&lt;/span&gt;&lt;span style="color: black;"&gt;()&lt;br /&gt;        )&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;sv&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-Name&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;hours&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-Option&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;AllScope&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;sv&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-Name&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;filter&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-Option&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;AllScope&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;sv&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-Name&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;logs&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-Option&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;AllScope&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;$host&lt;/span&gt;&lt;span style="color: black;"&gt;.&lt;/span&gt;&lt;span style="color: saddlebrown;"&gt;UI&lt;/span&gt;&lt;span style="color: black;"&gt;.&lt;/span&gt;&lt;span style="color: saddlebrown;"&gt;RawUI&lt;/span&gt;&lt;span style="color: black;"&gt;.&lt;/span&gt;&lt;span style="color: saddlebrown;"&gt;BufferSize&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;new-object&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;System.Management.Automation.Host.Size&lt;/span&gt;&lt;span style="color: black;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;500&lt;/span&gt;&lt;span style="color: black;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;1000&lt;/span&gt;&lt;span style="color: black;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;Import-Module&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$Modpath&lt;/span&gt;&lt;span style="color: black;"&gt;\&lt;/span&gt;&lt;span style="color: maroon;"&gt;UserIDEventsModule.psm1&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;$commands&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;(&lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;get-module&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;UserIDEventsModule&lt;/span&gt;&lt;span style="color: black;"&gt;).ExportedCommands&lt;br /&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;$list&lt;/span&gt;&lt;span style="color: red;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;((&lt;/span&gt;&lt;span style="color: purple;"&gt;$commands&lt;/span&gt;&lt;span style="color: black;"&gt;).Values) | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;%&lt;/span&gt;&lt;span style="color: black;"&gt;{&lt;/span&gt;&lt;span style="color: purple;"&gt;$_&lt;/span&gt;&lt;span style="color: black;"&gt;.Name} | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;Sort&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: cadetblue;"&gt;logtime&lt;/span&gt;&lt;span style="color: black;"&gt; | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;out-file&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-append&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-encoding&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;ascii&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-FilePath&lt;/span&gt;&lt;span style="color: black;"&gt; $(&lt;/span&gt;&lt;span style="color: purple;"&gt;$Filetime&lt;/span&gt;&lt;span style="color: black;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt;&lt;span style="color: black;"&gt; (&lt;/span&gt;&lt;span style="color: purple;"&gt;$func&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;in&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$list&lt;/span&gt;&lt;span style="color: black;"&gt;) {&lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt;&lt;span style="color: black;"&gt; (&lt;/span&gt;&lt;span style="color: purple;"&gt;$func&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;-eq&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: purple;"&gt;$NoRun&lt;/span&gt;&lt;span style="color: black;"&gt; ){} &lt;/span&gt;&lt;span style="color: blue;"&gt;else&lt;/span&gt;&lt;span style="color: black;"&gt; {$(&lt;/span&gt;&lt;span style="color: purple;"&gt;$func&lt;/span&gt;&lt;span style="color: black;"&gt;;&lt;/span&gt;&lt;span style="color: cadetblue;"&gt;logtime&lt;/span&gt;&lt;span style="color: black;"&gt;); &amp;amp;(&lt;/span&gt;&lt;span style="color: purple;"&gt;$func&lt;/span&gt;&lt;span style="color: black;"&gt;) | &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;ft&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-auto&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-wrap&lt;/span&gt;&lt;span style="color: black;"&gt; |  &lt;/span&gt;&lt;span style="color: cadetblue; font-weight: bold;"&gt;out-file&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-append&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-encoding&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: maroon;"&gt;ascii&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: cadetblue; font-style: italic;"&gt;-FilePath&lt;/span&gt;&lt;span style="color: black;"&gt; $(&lt;/span&gt;&lt;span style="color: purple;"&gt;$Filetime&lt;/span&gt;&lt;span style="color: black;"&gt;) }}&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;The &lt;a href="http://rmfdevelopment.com/PowerShell_Scripts/UserIDEventsModule.psm1"&gt;module&lt;/a&gt;&amp;nbsp;runs and produces a text file of critical information, but in the case of a security audit configuration as below, it processes events somewhat slowly, most obviously because of the volume of large amounts 'Filtering Platform Connections' events:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;auditpol /get /category:* | findstr Success&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Security System Extension &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; System Integrity &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; IPsec Driver &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Other System Events &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Security State Change &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Logon &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Logoff &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Account Lockout &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; IPsec Main Mode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; IPsec Quick Mode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; IPsec Extended Mode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Special Logon &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Other Logon/Logoff Events &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Network Policy Server &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Filtering Platform Connection &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Sensitive Privilege Use &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Process Termination &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Success&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Process Creation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Success&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Authentication Policy Change &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Success&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; Filtering Platform Policy Change &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Success&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;Run-AllModFunc&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;0Check-EventLogsBySize&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;2011 &amp;nbsp; &amp;nbsp; 8 &amp;nbsp;11 &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp;19 &amp;nbsp; &amp;nbsp; &amp;nbsp; 7 611&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;1Check-EventLogsByLastWrite&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;2011 &amp;nbsp; &amp;nbsp; 8 &amp;nbsp;11 &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp;19 &amp;nbsp; &amp;nbsp; &amp;nbsp;12 741&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;2Count-Providers&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;2011 &amp;nbsp; &amp;nbsp; 8 &amp;nbsp;11 &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp;19 &amp;nbsp; &amp;nbsp; &amp;nbsp;13 828&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;3Find-UniqueUserIDs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;2011 &amp;nbsp; &amp;nbsp; 8 &amp;nbsp;11 &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp;20 &amp;nbsp; &amp;nbsp; &amp;nbsp;10 522&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;4UserID-filter&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;2011 &amp;nbsp; &amp;nbsp; 8 &amp;nbsp;11 &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp;20 &amp;nbsp; &amp;nbsp; &amp;nbsp;25 843&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;5Event-filter&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;2011 &amp;nbsp; &amp;nbsp; 8 &amp;nbsp;11 &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp;20 &amp;nbsp; &amp;nbsp; &amp;nbsp;47 190&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;logtime&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;2011 &amp;nbsp; &amp;nbsp; 8 &amp;nbsp;11 &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp;21 &amp;nbsp; &amp;nbsp; &amp;nbsp; 7 207&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;If you will &lt;a href="http://rmfdevelopment.com/PowerShell_Scripts/UserIDEventsModule.psm1"&gt;run the module&lt;/a&gt; as a job you must use the parameter 'initializationScript' to import the module into the job session:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;start-job -name AllModFunc -initializationScript {import-module .\UserIDEventsModule.psm1} -scriptblock {Run-AllModFunc}&lt;/i&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-5994917053290818011?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/5994917053290818011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/08/sorting-windows-events-by-userid-part.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5994917053290818011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5994917053290818011'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/08/sorting-windows-events-by-userid-part.html' title='Sorting Windows events by UserID: Part II (Building a Module)'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-6619614311499907635</id><published>2011-07-29T13:07:00.000-07:00</published><updated>2011-07-29T13:08:22.081-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sorting/Searching for Events by UserID'/><title type='text'>Sorting Windows events by UserID</title><content type='html'>Sorting Windows events by UserID is a critical piece of auditing. In the code and examples below, I concentrate on:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$Logs="System","Application","Microsoft-Windows-GroupPolicy/Operational"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;purposefully leaving out the Security log.&amp;nbsp;We can create a simple function that allows us to check all events logs on any machine sorted by file size:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;function CheckEventLogsBySize&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;get-winevent -listlog * | Sort -desc FileSize |&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ft -auto LogName,@{Label="FileLogSize(MB)"; Expression={$_.FileSize/1MB}},@{Label="MaxLogSize(MB)"; Expression={$_.MaximumSizeINBytes/1MB}},LastWriteTime,IsLogFull&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;This gives us a clear view of all log file size, maximum log size, last write time:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-IN7b-cTsI94/TjDu5Kmus9I/AAAAAAAAH70/lpBtep-WXLs/s1600/CheckEventLogBySize.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="102" src="http://1.bp.blogspot.com/-IN7b-cTsI94/TjDu5Kmus9I/AAAAAAAAH70/lpBtep-WXLs/s640/CheckEventLogBySize.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We can also sort by 'LastWriteTime'.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;function CheckEventLogsByLastWrite&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;get-winevent -listlog * | Sort -desc LastWriteTime |&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ft -auto LogName,LastWriteTime,@{Label="FileLogSize(MB)"; Expression={$_.FileSize/1MB}},@{Label="MaxLogSize(MB)"; Expression={$_.MaximumSizeINBytes/1MB}},IsLogFull&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://2.bp.blogspot.com/-3fYk9cgqcik/TjDyTfZXgGI/AAAAAAAAH74/a23V_30wuTo/s1600/CheckEventLogByLastWriteTime.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="112" src="http://2.bp.blogspot.com/-3fYk9cgqcik/TjDyTfZXgGI/AAAAAAAAH74/a23V_30wuTo/s640/CheckEventLogByLastWriteTime.JPG" width="640" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;We can create a 'filterhashtable' array that searches multiple logs for event instances where there is an associated UserID. &amp;nbsp;N.B.: 'ea -0' replaces 'erroraction silentlycontinue' or '$erroractionpreference=silentlycontinue'. &amp;nbsp;'-Max 10000' limits the data collection to the last 10K events.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$Logs="System","Application","Microsoft-Windows-GroupPolicy/Operational"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$a=get-winevent -ea 0 -filterhashtable @{Logname=@($Logs)} -Max 10000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$host.UI.RawUI.BufferSize = new-object System.Management.Automation.Host.Size(500,1000)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$a | where {$_.UserID} | ft TimeCreated,LogName,RecordID,ID,UserID,Message -auto | more&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://3.bp.blogspot.com/-TTSRwyF-Nr4/TjMLr665sZI/AAAAAAAAH78/_43Juyf-qWA/s1600/UserID.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="172" src="http://3.bp.blogspot.com/-TTSRwyF-Nr4/TjMLr665sZI/AAAAAAAAH78/_43Juyf-qWA/s640/UserID.JPG" width="640" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Following from above we can sort for all unique UserIDs:. &amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$b=$a | Select TimeCreated,LogName,RecordID,ID,UserID,Message | where {$_.UserID}&lt;br /&gt;$c=$b | Select -unique UserID&lt;br /&gt;$c | more&lt;br /&gt;&lt;br /&gt;UserId&lt;br /&gt;------&lt;br /&gt;S-1-5-19&lt;br /&gt;S-1-5-18&lt;br /&gt;S-1-5-21-3270194588-3457409491-1468880025-1004&lt;br /&gt;S-1-5-20&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Next we create a list of the UserIDs of which we wish to search:&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;br /&gt;$UserIDs="S-1-5-18","S-1-5-19","S-1-5-20"&lt;br /&gt;$a | where {($_.UserID -eq $UserIDs[0]) -or ($_.UserID -eq $UserIDs[1]) -or ($_.UserID -eq $UserIDs[2])} |ft TimeCreated,LogName,ID,RecordID,UserID,Message -auto | more&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://4.bp.blogspot.com/-QNX2GTIg4yc/TjMPH6c6x4I/AAAAAAAAH8A/ejmqkOkFBAc/s1600/SortingByUserID.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="114" src="http://4.bp.blogspot.com/-QNX2GTIg4yc/TjMPH6c6x4I/AAAAAAAAH8A/ejmqkOkFBAc/s640/SortingByUserID.JPG" width="640" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;We can also create a function (as below) to accomplish the same output:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function UserID-filter&lt;br /&gt;{&lt;br /&gt;$Logs="System","Application","Microsoft-Windows-GroupPolicy/Operational"&lt;br /&gt;$UserIDs="S-1-5-18","S-1-5-19","S-1-5-20"&lt;br /&gt;$Global:Query=get-winevent -ea 0 -filterhashtable @{Logname=@($Logs)} -max 10000&lt;br /&gt;$Query | Select TimeCreated,LogName,ID,RecordID,UserID,Message | where {($_.UserID -eq $UserIDs[0]) -or ($_.UserID -eq $UserIDs[1]) -or ($_.UserID -eq $UserIDs[2])}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Gr-ikOJs4Wg/TjMSFgoylmI/AAAAAAAAH8E/2HtJX7lcbG8/s1600/UserID-Filter.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="138" src="http://2.bp.blogspot.com/-Gr-ikOJs4Wg/TjMSFgoylmI/AAAAAAAAH8E/2HtJX7lcbG8/s640/UserID-Filter.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-6619614311499907635?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/6619614311499907635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/sorting-windows-events-by-userid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/6619614311499907635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/6619614311499907635'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/sorting-windows-events-by-userid.html' title='Sorting Windows events by UserID'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-IN7b-cTsI94/TjDu5Kmus9I/AAAAAAAAH70/lpBtep-WXLs/s72-c/CheckEventLogBySize.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-3066964841232090573</id><published>2011-07-14T19:30:00.000-07:00</published><updated>2011-07-19T17:04:03.258-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Get-WinEvent Logon Windows Filtering Platform'/><title type='text'>Get-Winevent Part III: Querying the Event Log for Logons (Part E)</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;In&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2011/06/get-winevent-part-iii-querying-event.html" style="text-decoration: none;"&gt;Part A&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;of this series ('&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2011/06/get-winevent-part-iii-querying-event.html" style="text-decoration: none;"&gt;Get-Winevent Part III Querying the Event Log for logons&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;'), I worked with the 'where-object' cmdlet to filter through properties of specific logon event types. In&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event.html" style="text-decoration: none;"&gt;Part B,&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;I used '-filterhashtable' and '&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&lt;i&gt;findstr&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;' to more quickly dig into the message field of logon events, utlimately producing a spreadsheet or database format of those events. In&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_02.html" style="text-decoration: none;"&gt;Part C,&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;I presented code that enumerates all provider types for these events. &amp;nbsp;Then I used '-filterhashtable' with an array of multiple security EventIDs whose select 'Message' fields I searched with '&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&lt;i&gt;findstr'&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;for specific properties relating to logons. &amp;nbsp;In &lt;a href="http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_05.html"&gt;Part D&lt;/a&gt;, &amp;nbsp;I pull this all together, creating a timeline of multiple security EventIDs whose select 'Message' fields I pump into a spreadsheet for further analysis. In &lt;a href="http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_14.html"&gt;Part E&lt;/a&gt; (below), I tie in additional auditing events, specifically connections permitted by the Windows Filtering Platform:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;'Auditpol' allows the administrator to add additional events to be collected by the Event Viewer. To see all potential categories:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;auditpol /get /category:*&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;[partial &amp;nbsp;list:]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;System audit policy&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Category/Subcategory                      Setting&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;System&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp; &amp;nbsp;Security System Extension               Success&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp; &amp;nbsp;System Integrity                        Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp; &amp;nbsp;IPsec Driver                            Success&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp; &amp;nbsp;Other System Events                     Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp; &amp;nbsp;Security State Change                   Success&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Logon/Logoff&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp; &amp;nbsp;Logon                                   Success and Failure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp; &amp;nbsp;Logoff                                  Success&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;...&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;A quick trick to set all categories and their subcategories for auditing:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;auditpol /set /category:*&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;After some time, we query the Security log and notice event 5156 for further monitoring:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;get-winevent Security -max 100 | ft -auto -wrap | more&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;7/14/2011 6:59:55 PM Microsoft-Windows-Security-Auditing 5156 The Windows Filtering Platform has permitted a connection.&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Application Information:&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Process ID:        3588&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Application Name:    \device\harddiskvolume3\program files (x86)\opera\opera.exe&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Network Information:&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Direction:        Outbound&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Source Address:        192.168.0.11&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Source Port:        51199&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Destination Address:    199.59.149.243&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Destination Port:        80&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Protocol:        6&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;...&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;$5156=get-winevent -filterhashtable @{logname='security';id=5156} -max 1000&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;foreach ($event in $5156) {($event | Select TimeCreated,Message | fl * | findstr /G:Search5156.lst) -replace "  ","" -join "," | out-file -append 5156.csv}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;where Search5156.lst:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;TimeCreated&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Source&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Destination&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we can add some headers and create some filters in our spreadsheet:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-zk_cMVx97U8/Th-lYZcuAII/AAAAAAAAH7A/Qu_3lg19xNI/s1600/5156Capture.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="186" src="http://2.bp.blogspot.com/-zk_cMVx97U8/Th-lYZcuAII/AAAAAAAAH7A/Qu_3lg19xNI/s640/5156Capture.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-3066964841232090573?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/3066964841232090573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_14.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3066964841232090573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3066964841232090573'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_14.html' title='Get-Winevent Part III: Querying the Event Log for Logons (Part E)'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-zk_cMVx97U8/Th-lYZcuAII/AAAAAAAAH7A/Qu_3lg19xNI/s72-c/5156Capture.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-469199697936691637</id><published>2011-07-14T17:28:00.000-07:00</published><updated>2011-07-14T17:29:51.436-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='&apos;Get-WinEvent&apos; ETL Providers Event Logs'/><title type='text'>Get-WinEvent, EventLogs, ETL, Providers on Win7 Part III</title><content type='html'>Microsoft has exposed substantial providers since XP. With Windows 7, Microsoft has increased the number of providers substantially over previous versions of Windows and added 'netsh trace' functionality to enable tracing, conversion, batching of these kernel level counters. In the commands below, I have mixed cmd shell, powershell, cygwin cmds to parse ETL files. In &amp;nbsp;general, parsing etl files with 'get-winevent' and powershell takes a while... &amp;nbsp;You can understand 'netsh' filtering best with 'netsh trace show CaptureFilterHelp', however I recommend setting your 'netsh trace start maxSize=' parameter at 150 MB or less. (The default is an almost unworkable 250MB.)&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;From cmd.exe, a variable for date/time (e.g. timestamp) could be useful:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;realtd.cmd&lt;br /&gt;@echo off&lt;br /&gt;set realdate=%date:/=.%&lt;br /&gt;set realdate=%realdate:* =%&lt;br /&gt;set realtime=%time::=.%&lt;br /&gt;set realtime=%realtime:* =%&lt;br /&gt;set timestamp=%realdate%_%realtime%&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;From cmd.exe we can start the trace:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;netsh trace start provider=Microsoft-Windows-Kernel-Network provider=Microsoft-Windows-Kernel-Process provider=Microsoft-Windows-Security-Auditing provider=Microsoft-Windows-Security-Netlogon provider=Microsoft-Windows-TCPIP persistent=yes traceFile=%LOCALAPPDATA%\Temp\NetTraces\NetTrace%timestamp%.etl&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;and stop the trace:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;netsh trace stop&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If we choose we can covert the trace with 'netsh' we can dump it to a text or csv dump with:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;netsh trace convert input=NetTrace07.07.2011_1.38.09.40.etl output=NetTrace07.07.2011_1.38.09.40.txt dump=TXT&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Next we can try parsing a particular provider from Powershell. Here I choose "Microsoft-Windows-TCPIP" provider. I adjust the screen buffer size to help 'format-table' catch all of the trace line:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$host.UI.RawUI.BufferSize = new-object System.Management.Automation.Host.Size(500,1000)&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;$Providers="Microsoft-Windows-TCPIP"&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;$FileName="NetTrace07.07.2011_1.38.09.40.etl"&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;foreach ($ProviderName in $Providers) {get-winevent -path "$FileName" -oldest | where {$_.ProviderName -eq "$ProviderName"} | ft  TimeCreated, Message| out-file -encoding ASCII -file "$FileName$ProviderName.txt"}&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I find I can not make GNUWin32 gawk work as advertised inside Powershell.&lt;br /&gt;The following line does not work in Powershell:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;## grep  -i -w "remote" "$FileName$ProviderName.txt" | tr -s '  ' | gawk '{print $1" "$2" "$3","$4" "$5" "$6" "$7" "$8" "$9}' | out-file -encoding ASCII -append "$ProviderName.csv"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;But this will work just fine in Cygwin:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;grep  -i -w "remote" NetTrace07.07.2011_1.38.09.40.etlMicrosoft-Windows-TCPIP.txt | tr -s '  ' | gawk '{print $1" "$2" "$3","$4" "$5" "$6" "$7" "$8" "$9}' &amp;gt;&amp;gt; NetTrace07.07.2011_1.38.09.40.etlMicrosoft-Windows-TCPIP.csv&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;and we are looking at a spreadsheet like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-lN38tWErU5Q/Th-JNVzLsWI/AAAAAAAAH68/nuFHYi8fLuI/s1600/ETLCapture.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="236" src="http://2.bp.blogspot.com/-lN38tWErU5Q/Th-JNVzLsWI/AAAAAAAAH68/nuFHYi8fLuI/s640/ETLCapture.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-469199697936691637?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/469199697936691637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-eventlogs-etl-providers-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/469199697936691637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/469199697936691637'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-eventlogs-etl-providers-on.html' title='Get-WinEvent, EventLogs, ETL, Providers on Win7 Part III'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-lN38tWErU5Q/Th-JNVzLsWI/AAAAAAAAH68/nuFHYi8fLuI/s72-c/ETLCapture.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-192983098450413441</id><published>2011-07-05T16:43:00.000-07:00</published><updated>2011-07-14T20:41:09.972-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Get-WinEvent Logon'/><title type='text'>Get-Winevent Part III: Querying the Event Log for Logons (Part D)</title><content type='html'>In &lt;a href="http://thinking-about-network-security.blogspot.com/2011/06/get-winevent-part-iii-querying-event.html"&gt;Part A&lt;/a&gt; of this series ('&lt;a href="http://thinking-about-network-security.blogspot.com/2011/06/get-winevent-part-iii-querying-event.html"&gt;Get-Winevent Part III Querying the Event Log for logons&lt;/a&gt;'), I worked with the 'where-object' cmdlet to filter through properties of specific logon event types. In &lt;a href="http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event.html"&gt;Part B,&lt;/a&gt; I used '-filterhashtable' and '&lt;i&gt;findstr&lt;/i&gt;' to more quickly dig into the message field of logon events, utlimately producing a spreadsheet or database format of those events. In &lt;a href="http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_02.html"&gt;Part C,&lt;/a&gt; I presented code that enumerates all provider types for these events. &amp;nbsp;Then I used '-filterhashtable' with an array of multiple security EventIDs whose select 'Message' fields I searched with '&lt;i&gt;findstr'&lt;/i&gt; for specific properties relating to logons. &amp;nbsp;In this post (Part D), &amp;nbsp;I pull this all together, creating a timeline of multiple security EventIDs whose select 'Message' fields I pump into a spreadsheet for further analysis.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;Here I get the desired 'logon' events into spreadsheet format:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$EventLogonIDs="4611","4624","4625","4634","4647","4648","4672","4774","4775","4908","4964"&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;$MultipleIDLogEntries=Get-WinEvent -FilterHashtable @{Logname='security';Id=@($EventLogonIDs)}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;foreach ($item in &amp;nbsp;$MultipleIDLogEntries) {($item | Select TimeCreated, Message | fl * | findstr /G:search.lst) -replace" &amp;nbsp;","" -join "," | out-file -append test5.csv }&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 14px; line-height: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 14px; line-height: 15px;"&gt;where search.lst :&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 14px; line-height: 15px;"&gt;&lt;br /&gt;TimeCreated&lt;br /&gt;Security ID:&lt;br /&gt;Account Name:&lt;br /&gt;Account Domain:&lt;br /&gt;Logon ID:&lt;br /&gt;Logon Type:&lt;br /&gt;Logon GUID:&lt;br /&gt;Process Name:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Now I get the desired 'sleep' events into spreadsheet format. (&lt;a href="http://thinking-about-network-security.blogspot.com/2011/06/get-winevent-part-iii-querying-event.html"&gt;My original concern&lt;/a&gt;&amp;nbsp;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;was understanding a why my Windows 7 PC spontaneously "resumes from sleep" by itself and seemingly commences a log-on.)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$EventLogonIDs="1","42"&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;$MultipleIDLogEntries=Get-WinEvent -FilterHashtable @{Logname='system';Id=@($EventLogonIDs)}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;foreach ($item in &amp;nbsp;$MultipleIDLogEntries) {($item | Select TimeCreated, Message | fl * | findstr /I /G:search.lst) -replace" &amp;nbsp;","" -join "," | out-file -append test6.csv }&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 14px; line-height: 15px;"&gt;where search.lst :&lt;br /&gt;&lt;br /&gt;TimeCreated&lt;br /&gt;sleep&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Now I mux the two data sets and output the combined csv:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$a=gc .\test5.csv&lt;/b&gt;&lt;br /&gt;&lt;b&gt;$b=gc .\test6.csv&lt;/b&gt;&lt;br /&gt;&lt;b&gt;$c=$a+$b&lt;/b&gt;&lt;br /&gt;&lt;b&gt;$c | out-file test7.csv&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Once I translate the csv to a spreadsheet's native format, add column headers, format the Date/Time Column (the unique identifier for our purposes) and sort by Date/Time, I have a story book of events for the muxed security (e.g. 'logon') and system (e.g. 'sleep') events:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-TDvgNkUeoxE/ThOfctu8Z5I/AAAAAAAAH2A/LUqc1Lr2rYA/s1600/MuxedEvents.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="186" src="http://2.bp.blogspot.com/-TDvgNkUeoxE/ThOfctu8Z5I/AAAAAAAAH2A/LUqc1Lr2rYA/s640/MuxedEvents.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Next we need to discuss how to add additional Security auditing events to our storybook in &lt;a href="http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_14.html"&gt;Part E&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-192983098450413441?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/192983098450413441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_05.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/192983098450413441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/192983098450413441'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_05.html' title='Get-Winevent Part III: Querying the Event Log for Logons (Part D)'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-TDvgNkUeoxE/ThOfctu8Z5I/AAAAAAAAH2A/LUqc1Lr2rYA/s72-c/MuxedEvents.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-555655168441437652</id><published>2011-07-02T21:16:00.000-07:00</published><updated>2011-07-05T16:46:59.735-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Get-WinEvent Logon'/><title type='text'>Get-Winevent Part III: Querying the Event Log for Logons (Part C)</title><content type='html'>To list Opcodes, Event IDs, Event Descriptions from any group of provider's (e.g. Securit*) events, you can use:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$ProviderNames=get-winevent -listprovider microsoft-windows-Securit* | % {$_.Name}&lt;/b&gt;&lt;br /&gt;&lt;b&gt;$ProviderNames | % {((get-winevent -listprovider $_).events) | format-table @{Name="Opcode"; Expression = {$_.Opcode.Name}},ID,Description -auto -wrap}&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;To create a list of EventIDs from the Security Log for which want more information, we could download &amp;nbsp;"&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=21561"&gt;Windows 7 and Windows Server 2008 R2 Security Event Descriptions&lt;/a&gt;" &amp;nbsp;&amp;nbsp;or we could select the string log from our provider query:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$ProviderNames | % {((get-winevent -listprovider $_).events) | format-table @{Name="Opcode"; Expression = {$_.Opcode.Name}},ID,Description | findstr "win:"} | out-file &amp;nbsp;SecurityIDs.txt&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Select-string "log" -path SecurityIDs.txt | ft -auto Line&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4611 A trusted logon process has been registered with the Local ...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4624 An account was successfully logged on....&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4625 An account failed to log on....&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4634 An account was logged off....&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4647 User initiated logoff:...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4648 A logon was attempted using explicit credentials....&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4672 Special privileges assigned to new logon....&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4774 An account was mapped for logon....&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4775 An account could not be mapped for logon....&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4908 Special Groups Logon table modified....&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4964 Special groups have been assigned to a new logon....&lt;br /&gt;&lt;br /&gt;Now we query all of our particular IDs in question using the search list for findstr below:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$LogonIDs="4611","4624","4625","4634","4647","4648","4672","4774","4775","4908","4964"&lt;/b&gt;&lt;br /&gt;&lt;b&gt;foreach ($item in $LogonIDs) {(Get-WinEvent -max 100 -FilterHashtable @{Logname='security';Id=$item} | Select TimeCreated,Message | fl * | findstr /G:search.lst) -replace" &amp;nbsp;"," " | out-file -append "$item.txt" }&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;where search.lst :&lt;br /&gt;&lt;br /&gt;TimeCreated&lt;br /&gt;Security ID:&lt;br /&gt;Account Name:&lt;br /&gt;Account Domain:&lt;br /&gt;Logon ID:&lt;br /&gt;Logon Type:&lt;br /&gt;Logon GUID:&lt;br /&gt;Process Name:&lt;br /&gt;&lt;br /&gt;This gives us some hits for the EventID numbers in separate files which contain entries that look like this:&lt;br /&gt;&lt;br /&gt;PS C:\ps1&amp;gt;&lt;b&gt; more 4624.txt&lt;/b&gt;&lt;br /&gt;TimeCreated : 7/2/2011 7:25:59 PM&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Security ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S-1-5-18&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RMFVPC$&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Domain: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RMFDEVELOPMENT&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logon ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x3e7&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logon Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Security ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S-1-5-18&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SYSTEM&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Domain: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NT AUTHORITY&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logon ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x3e7&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logon GUID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{00000000-0000-0000-0000-000000000000}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Process Name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C:\Windows\System32\services.exe&lt;br /&gt;....&lt;br /&gt;But this type of query isn't very fast. So we can tuck our array of events inside a '-FilterHashtable' array and then query the message field with '&lt;i&gt;findstr&lt;/i&gt;':&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$LogonIDs="4611","4624","4625","4634","4647","4648","4672","4774","4775","4908","4964"&lt;/b&gt;&lt;br /&gt;&lt;b&gt;$MultipleIDLogEntries=Get-WinEvent -max 100 -FilterHashtable @{Logname='security';Id=@($LogonIDs)}&lt;/b&gt;&lt;br /&gt;&lt;b&gt;($MultipleIDLogEntries | Select TimeCreated,Message | fl * | findstr /G:search.lst) -replace" "," " | out-file -append Events_all.txt&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This output also contain entries that look like this:&lt;br /&gt;&lt;br /&gt;PS C:\ps1&amp;gt;&lt;b&gt; more Events_all.txt&lt;/b&gt;&lt;br /&gt;TimeCreated : 7/2/2011 7:25:59 PM&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Security ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S-1-5-18&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SYSTEM&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Domain: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NT AUTHORITY&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logon ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x3e7&lt;br /&gt;TimeCreated : 7/2/2011 7:25:59 PM&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Security ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S-1-5-18&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RMFVPC$&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Domain: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RMFDEVELOPMENT&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logon ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x3e7&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logon Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Security ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S-1-5-18&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SYSTEM&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Domain: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NT AUTHORITY&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logon ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x3e7&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logon GUID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{00000000-0000-0000-0000-000000000000}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Process Name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C:\Windows\System32\services.exe&lt;br /&gt;&lt;br /&gt;But what we really need is a way to parse this output into a csv... so on to &amp;nbsp;&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; line-height: 14px;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_05.html"&gt;Get-Winevent Part III: Querying the Event Log for Logons (Part D)&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 22px; line-height: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-555655168441437652?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/555655168441437652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_02.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/555655168441437652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/555655168441437652'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_02.html' title='Get-Winevent Part III: Querying the Event Log for Logons (Part C)'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-5792633487727500003</id><published>2011-07-01T07:22:00.000-07:00</published><updated>2011-07-05T09:56:10.569-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Get-WinEvent Logon'/><title type='text'>Get-Winevent Part III: Querying the Event Log for Logons (Part B)</title><content type='html'>This is a long post that I've edited &lt;a href="http://stackoverflow.com/questions/4393437/get-winevent-obtain-interactive-logon-messages-only/6529853#6529853"&gt;from a answer&lt;/a&gt; I gave on &lt;a href="http://stackoverflow.com/"&gt;Stack Overflow&lt;/a&gt;. &amp;nbsp;Although the post is about how to audit logon information in the Security log of Windows 7, it is also about discovering methods to extract critical information from the 'Message' field of a "Logon Type" (&lt;i&gt;ID=4624). &amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Get-WinEvent -max 100 | where { $_.Message | findstr /C:"Logon Type"} &amp;nbsp;| Select Message | fl * | findstr /C:"Logon Type"&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Logon Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;br /&gt;&amp;nbsp; Logon Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;br /&gt;&amp;nbsp; Logon Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;br /&gt;&amp;nbsp; Logon Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;br /&gt;&amp;nbsp; Logon Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;br /&gt;&amp;nbsp; Logon Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;br /&gt;&amp;nbsp; ...&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Get-WinEvent Security -max 100 | Select ID,Level,Message | where { $_.Message | findstr /C:"Logon Type"} &amp;nbsp;| ft -auto -wrap | more&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Id Level Message&lt;br /&gt;&amp;nbsp; -- ----- -------&lt;br /&gt;4624 &amp;nbsp; &amp;nbsp; 0 An account was successfully logged on.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Subject:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Security ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S-1-5-18&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Account Name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RMFVPC$&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Account Domain: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RMFDEVELOPMENT&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Logon ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x3e7&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Logon Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;br /&gt;....&lt;br /&gt;Now I introduce '-FilterHashtable' parameter which greatly speeds up queries. Below are two commands which do essentially the same thing in about the same period of time:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Get-WinEvent -max 100 -FilterHashtable @{Logname='security';ID=4624} | ft TimeCreated,MachineName,Message -auto -wrap | more&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Get-WinEvent -max 100 -FilterHashtable @{Logname='security';ID=4624} | Select TimeCreated,MachineName,Message | ft -auto -wrap | more&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;TimeCreated &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MachineName Message&lt;br /&gt;----------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ----------- -------&lt;br /&gt;6/29/2011 12:36:35 PM rmfvpc &amp;nbsp; &amp;nbsp; &amp;nbsp;An account was successfully logged on.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Subject:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Security ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S-1-5-18&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RMFVPC$&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Account Domain: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RMFDEVELOPMENT&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logon ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x3e7&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logon Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Get-WinEvent -max 100 -FilterHashtable @{Logname='security';ID=4624} | Select TimeCreated,MachineName,Message | Select-string "Logon Type" | more&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;@{TimeCreated=06/29/2011 12:36:35; MachineName=rmfvpc; Message=An account was successfully logged on.&lt;br /&gt;&lt;br /&gt;Subject:&lt;br /&gt;&amp;nbsp; &amp;nbsp; Security ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S-1-5-18&lt;br /&gt;&amp;nbsp; &amp;nbsp; Account Name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RMFVPC$&lt;br /&gt;&amp;nbsp; &amp;nbsp; Account Domain: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RMFDEVELOPMENT&lt;br /&gt;&amp;nbsp; &amp;nbsp; Logon ID: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x3e7&lt;br /&gt;&lt;br /&gt;Logon Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;br /&gt;...&lt;br /&gt;This last script allows me to dump pre-selected information from the logon events Message field into a spreadsheet. Very useful.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;$LogonTypes=Get-WinEvent -FilterHashtable @{Logname='security';Id=4624}&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;foreach ($item in $LogonTypes) {($item | Select TimeCreated, Message | fl * | findstr /G:search.lst) -replace" &amp;nbsp;","" -join "," | out-file -append test3.csv }&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;where search.lst :&lt;br /&gt;&lt;br /&gt;TimeCreated&lt;br /&gt;Security ID:&lt;br /&gt;Account Name:&lt;br /&gt;Account Domain:&lt;br /&gt;Logon ID:&lt;br /&gt;Logon Type:&lt;br /&gt;Logon GUID:&lt;br /&gt;Process Name:&lt;br /&gt;&lt;br /&gt;The result is a spreadsheet that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-wT20ApyN04Y/ThNCEYSjyeI/AAAAAAAAH18/s7-h330dKAA/s1600/LogonEventsSpreadsheet.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="122" src="http://2.bp.blogspot.com/-wT20ApyN04Y/ThNCEYSjyeI/AAAAAAAAH18/s7-h330dKAA/s640/LogonEventsSpreadsheet.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;However, what I need is to be able to search the message field of multiple 'logon' events types...so on to&lt;br /&gt;&lt;h3 class="post-title entry-title" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font: normal normal normal 22px/normal 'Trebuchet MS', Trebuchet, Verdana, sans-serif; line-height: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.75em; position: relative;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event_02.html"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Get-Winevent Part III: Querying the Event Log for Logons (Part C)&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-5792633487727500003?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/5792633487727500003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5792633487727500003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5792633487727500003'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event.html' title='Get-Winevent Part III: Querying the Event Log for Logons (Part B)'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-wT20ApyN04Y/ThNCEYSjyeI/AAAAAAAAH18/s7-h330dKAA/s72-c/LogonEventsSpreadsheet.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-4791166585430112234</id><published>2011-06-28T12:44:00.000-07:00</published><updated>2011-07-05T09:58:40.631-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='&apos;Get-WinEvent&apos; Logons'/><title type='text'>Get-Winevent Part III: Querying the Event Log for Logons (Part A)</title><content type='html'>&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;The following is a digression on using Powershell's where-object (filter) to query System and Administrative events with 'Get-WinEvent'. &amp;nbsp;I like this method of querying the event logs because it is "pipeline" oriented and allows me to re-use/amend/copy previous syntax. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;I was having some concern understanding a mysterious problem: my Windows 7 PC spontaneously un-sleeps itself and seemingly commences a log-on. I wanted to understand why this happened and if there was evidence of ex-filtration or malware.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;With Powershell's 'where-object', I am going to filter select events.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;I can query the entire set of all Windows events, but limit the query with the '&lt;i&gt;-max'&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; parameter, otherwise the query will take much to long.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;To look at events with "Pnp" in the message body, I found I need 'findstr':&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;g&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;et-winevent -max 100 | where {$_.Message | findstr "Pnp"} | Select Timecreated,ID,RecordID, Message | ft -auto -wrap&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;TimeCreated             Id RecordId Message&lt;br /&gt;-----------             -- -------- -------&lt;br /&gt;6/28/2011 10:15:16 AM 2102    14420 Forwarded a finished Pnp or Power operation (22, 2) to the lower driver for device WPDBUSENUMROOT\UMB\2&amp;amp;37C186B&amp;amp;1&amp;amp;STORAGE#VOLUME#_??_RIMSPCI#DISK&amp;amp;VEN_RIC&lt;br /&gt;OH&amp;amp;PROD_MEMORYSTICKSTORAGE&amp;amp;REV_1.00#MS0001# with status 0xC00000BB.&lt;br /&gt;6/28/2011 10:15:16 AM 2100    14419 Received a Pnp or Power operation (22, 2) for device WPDBUSENUMROOT\UMB\2&amp;amp;37C186B&amp;amp;1&amp;amp;STORAGE#VOLUME#_??_RIMSPCI#DISK&amp;amp;VEN_RICOH&amp;amp;PROD_MEMORYSTICKSTORAGE&amp;amp;REV&lt;br /&gt;_1.00#MS0001#.&lt;br /&gt;6/28/2011 10:15:16 AM 2102    14418 Forwarded a finished Pnp or Power operation (22, 2) to the lower driver for device WPDBUSENUMROOT\UMB\2&amp;amp;37C186B&amp;amp;1&amp;amp;STORAGE#VOLUME#_??_RISD#DISK&amp;amp;VEN_RICOH&amp;amp;&lt;br /&gt;PROD_SD#MMCSTORAGE&amp;amp;REV_2.00#0001# with status 0xC00000BB.&lt;br /&gt;6/28/2011 10:15:16 AM 2100    14417 Received a Pnp or Power operation (22, 2) for device WPDBUSENUMROOT\UMB\2&amp;amp;37C186B&amp;amp;1&amp;amp;STORAGE#VOLUME#_??_RISD#DISK&amp;amp;VEN_RICOH&amp;amp;PROD_SD#MMCSTORAGE&amp;amp;REV_2.00#00&lt;br /&gt;01#.&lt;br /&gt;6/27/2011 10:48:10 PM 2102    14416 Forwarded a finished Pnp or Power operation (22, 2) to the lower driver for device WPDBUSENUMROOT\UMB\2&amp;amp;37C186B&amp;amp;1&amp;amp;STORAGE#VOLUME#_??_RISD#DISK&amp;amp;VEN_RICOH&amp;amp;&lt;br /&gt;PROD_SD#MMCSTORAGE&amp;amp;REV_2.00#0001# with status 0xC00000BB.&lt;br /&gt;6/27/2011 10:48:10 PM 2100    14415 Received a Pnp or Power operation (22, 2) for device WPDBUSENUMROOT\UMB\2&amp;amp;37C186B&amp;amp;1&amp;amp;STORAGE#VOLUME#_??_RISD#DISK&amp;amp;VEN_RICOH&amp;amp;PROD_SD#MMCSTORAGE&amp;amp;REV_2.00#00&lt;br /&gt;01#.&lt;br /&gt;6/27/2011 10:48:10 PM 2102    14414 Forwarded a finished Pnp or Power operation (22, 2) to the lower driver for device WPDBUSENUMROOT\UMB\2&amp;amp;37C186B&amp;amp;1&amp;amp;STORAGE#VOLUME#_??_RIMSPCI#DISK&amp;amp;VEN_RIC&lt;br /&gt;OH&amp;amp;PROD_MEMORYSTICKSTORAGE&amp;amp;REV_1.00#MS0001# with status 0xC00000BB.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;But I can also look at "sleep" events with the '&lt;i&gt;-imatch&lt;/i&gt;' operator:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;get-winevent -max 1000 | Select ProcessID,TimeCreated,ID,Task,TaskDisplayName,KeywordsDisplayNames,Message | where {$_.Message -imatch "sleep"} | ft -wrap -auto&lt;/i&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;ProcessId TimeCreated           Id Task TaskDisplayName KeywordsDisplayNames Message--------- -----------           -- ---- --------------- -------------------- -------&lt;br /&gt;1608 6/28/2011 10:15:24 AM  1    0                 {}                   The system has resumed from sleep.&lt;br /&gt;&lt;br /&gt;Sleep Time: ‎2011‎-‎06‎-‎28T05:47:49.589233900Z&lt;br /&gt;Wake Time: ‎2011‎-‎06‎-‎28T17:15:17.711126400Z&lt;br /&gt;&lt;br /&gt;Wake Source: Unknown&lt;br /&gt;4 6/27/2011 10:48:05 PM 42   64                 {}                   The system is entering sleep.&lt;br /&gt;&lt;br /&gt;Sleep Reason: Hibernate from Sleep&lt;br /&gt;1608 6/27/2011 10:47:54 PM  1    0                 {}                   The system has resumed from sleep.&lt;br /&gt;&lt;br /&gt;Sleep Time: ‎2011‎-‎06‎-‎28T05:47:49.589233900Z&lt;br /&gt;Wake Time: ‎2011‎-‎06‎-‎28T05:47:49.587233800Z&lt;br /&gt;&lt;br /&gt;Wake Source: S4 Doze to Hibernate&lt;br /&gt;4 6/27/2011 4:47:43 PM  42   64                 {}                   The system is entering sleep.&lt;br /&gt;&lt;br /&gt;Sleep Reason: Button or Lid&lt;br /&gt;1608 6/27/2011 3:55:48 PM   1    0                 {}                   The system has resumed from sleep.&lt;br /&gt;&lt;br /&gt;Sleep Time: ‎2011‎-‎06‎-‎27T07:04:00.443168300Z&lt;br /&gt;Wake Time: ‎2011‎-‎06‎-‎27T22:55:37.240099500Z&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;                                                                   &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Since the 10:15 AM login is my recent interactive logon and I know I did not logon interactively at 10:48 PM (the night before), &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;I wanted to understand why that was happening at that odd hour in the evening. &amp;nbsp;The next series of commands helped me see if my ID was responsible for a "Logon" or "Special Logon" for that 10:48 PM "Pnp" or "resume from sleep" event:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;get-winevent -ProviderName "Microsoft-Windows-Security-Auditing" -max 100 | Select ProcessID,TimeCreated,ID,Task,TaskDisplayName,KeywordsDisplayNames | where {$_.TaskDisplayName -like "Logon"} | ft -wrap -auto | more&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;ProcessId TimeCreated             Id  Task TaskDisplayName KeywordsDisplayNames&lt;br /&gt;--------- -----------             --  ---- --------------- --------------------&lt;br /&gt;632 6/28/2011 10:31:34 AM 4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/28/2011 10:25:19 AM 4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/28/2011 10:25:05 AM 4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/28/2011 10:22:18 AM 4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/28/2011 10:20:55 AM 4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/28/2011 10:20:54 AM 4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/28/2011 10:18:52 AM 4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/28/2011 10:18:34 AM 4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/28/2011 10:18:34 AM 4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/28/2011 10:18:34 AM 4648 12544 Logon           {Audit Success}&lt;br /&gt;632 6/27/2011 3:58:55 PM  4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/27/2011 3:56:07 PM  4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/27/2011 3:56:07 PM  4624 12544 Logon           {Audit Success}&lt;br /&gt;632 6/27/2011 3:56:07 PM  4648 12544 Logon           {Audit Success}&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;....&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;get-winevent -ProviderName "Microsoft-Windows-Security-Auditing" -max 100 | Select  ProcessID,TimeCreated,ID,Task,TaskDisplayName,KeywordsDisplayNames | where {$_.TaskDisplayName -like "Special Logon"} | ft -wrap -auto | more&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;ProcessId TimeCreated             Id  Task TaskDisplayName KeywordsDisplayNames&lt;br /&gt;--------- -----------             --  ---- --------------- --------------------&lt;br /&gt;632 6/28/2011 10:31:34 AM 4672 12548 Special Logon   {Audit Success}&lt;br /&gt;632 6/28/2011 10:25:19 AM 4672 12548 Special Logon   {Audit Success}&lt;br /&gt;632 6/28/2011 10:25:05 AM 4672 12548 Special Logon   {Audit Success}&lt;br /&gt;632 6/28/2011 10:22:18 AM 4672 12548 Special Logon   {Audit Success}&lt;br /&gt;632 6/28/2011 10:20:55 AM 4672 12548 Special Logon   {Audit Success}&lt;br /&gt;632 6/28/2011 10:20:54 AM 4672 12548 Special Logon   {Audit Success}&lt;br /&gt;632 6/28/2011 10:18:52 AM 4672 12548 Special Logon   {Audit Success}&lt;br /&gt;632 6/28/2011 10:18:34 AM 4672 12548 Special Logon   {Audit Success}&lt;br /&gt;632 6/27/2011 3:58:55 PM  4672 12548 Special Logon   {Audit Success}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;632 6/27/2011 3:56:07 PM  4672 12548 Special Logon   {Audit Success}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;...&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;No evidence of a "Logon" or "Special Logon" at the 10:00 PM hour yesterday!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;As a side note, if I wanted to see more information about "Special Logon" attempts, I could structure a provider query as below, pumping all the information to out-gridview which I could paste and copy into a spreadsheet.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;get-winevent -ProviderName "Microsoft-Windows-Security-Auditing" -max 1000 | Select ProcessID,TimeCreated,ID,Task,TaskDisplayName,KeywordsDisplayNames | where {$_.TaskDisplayName -like "Special Logon"} | ogv&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-U-H_4E666oI/TgoTmOzhI8I/AAAAAAAAH04/1_woN0s_xu4/s1600/SpecialLogon_ogv.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="387" src="http://4.bp.blogspot.com/-U-H_4E666oI/TgoTmOzhI8I/AAAAAAAAH04/1_woN0s_xu4/s640/SpecialLogon_ogv.JPG" width="640" /&gt;&lt;/a&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;If I want to look a little more thoroughly at "Special Logon" events, I can use:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;get-winevent -ProviderName "Microsoft-Windows-Security-Auditing" -max 10 | Select ProcessID,TimeCreated,ID,Task,TaskDisplayName,KeywordsDisplayNames | where {$_.TaskDisplayName -like "Special Logon"} |  fl * | more&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;ProcessId            : 632TimeCreated          : 6/28/2011 10:44:30 AM&lt;br /&gt;Id                   : 4672&lt;br /&gt;Task                 : 12548&lt;br /&gt;TaskDisplayName      : Special Logon&lt;br /&gt;KeywordsDisplayNames : {Audit Success}&lt;br /&gt;&lt;br /&gt;ProcessId            : 632&lt;br /&gt;TimeCreated          : 6/28/2011 10:31:34 AM&lt;br /&gt;Id                   : 4672&lt;br /&gt;Task                 : 12548&lt;br /&gt;TaskDisplayName      : Special Logon&lt;br /&gt;KeywordsDisplayNames : {Audit Success}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;...&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;If I want to look at all details of "Special Logon" event entries:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;get-winevent -ProviderName "Microsoft-Windows-Security-Auditing" -max 100 | Select * | where {$_.TaskDisplayName -like "Special Logon"} |  fl * | more&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Message              : Special privileges assigned to new logon.&lt;br /&gt;&lt;br /&gt;Subject:&lt;br /&gt;Security ID:        S-1-5-18&lt;br /&gt;Account Name:        SYSTEM&lt;br /&gt;Account Domain:        NT AUTHORITY&lt;br /&gt;Logon ID:        0x3e7&lt;br /&gt;&lt;br /&gt;Privileges:        SeAssignPrimaryTokenPrivilege&lt;br /&gt;SeTcbPrivilege&lt;br /&gt;SeSecurityPrivilege&lt;br /&gt;SeTakeOwnershipPrivilege&lt;br /&gt;SeLoadDriverPrivilege&lt;br /&gt;SeBackupPrivilege&lt;br /&gt;SeRestorePrivilege&lt;br /&gt;SeDebugPrivilege&lt;br /&gt;SeAuditPrivilege&lt;br /&gt;SeSystemEnvironmentPrivilege&lt;br /&gt;SeImpersonatePrivilege&lt;br /&gt;Id                   : 4672&lt;br /&gt;Version              : 0&lt;br /&gt;Qualifiers           :&lt;br /&gt;Level                : 0&lt;br /&gt;Task                 : 12548&lt;br /&gt;Opcode               : 0&lt;br /&gt;Keywords             : -9214364837600034816&lt;br /&gt;RecordId             : 16766&lt;br /&gt;ProviderName         : Microsoft-Windows-Security-Auditing&lt;br /&gt;ProviderId           : 54849625-5478-4994-a5ba-3e3b0328c30d&lt;br /&gt;LogName              : Security&lt;br /&gt;ProcessId            : 632&lt;br /&gt;ThreadId             : 752&lt;br /&gt;MachineName          : rmfvpc&lt;br /&gt;UserId               :&lt;br /&gt;TimeCreated          : 6/28/2011 10:44:30 AM&lt;br /&gt;ActivityId           : 4f32adc8-0278-0270-8105-0000ca77ff7e&lt;br /&gt;RelatedActivityId    :&lt;br /&gt;ContainerLog         : security&lt;br /&gt;MatchedQueryIds      : {}&lt;br /&gt;Bookmark             : System.Diagnostics.Eventing.Reader.EventBookmark&lt;br /&gt;LevelDisplayName     : Information&lt;br /&gt;OpcodeDisplayName    : Info&lt;br /&gt;TaskDisplayName      : Special Logon&lt;br /&gt;KeywordsDisplayNames : {Audit Success}&lt;br /&gt;Properties           : {System.Diagnostics.Eventing.Reader.EventProperty, System.Diagnostics.Eventing.Reader.EventProperty, System.Diagnostics.Eventing.Reader.EventProperty, System.Diagnostics.Eventing.Reader.EventProperty...}&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;...&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;This last command is important because it gives a complete readout of the entire event log entry and query fields. But really, I just want to know what happened yesterday around the time my system un-hibernated. For this, I can run a "match" query on a particular date:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;get-winevent -max 1000 | Select ProcessID,TimeCreated,ID,Task,TaskDisplayName,KeywordsDisplayNames | where {$_.TimeCreated -match "6/27/2011"} | ft -wrap -auto | more&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-CwsZ8faJv9c/TgobRqwAKVI/AAAAAAAAH08/ksqmuiWs_Lc/s1600/GetWinEventMatchDateTime.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="398" src="http://2.bp.blogspot.com/-CwsZ8faJv9c/TgobRqwAKVI/AAAAAAAAH08/ksqmuiWs_Lc/s640/GetWinEventMatchDateTime.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Alternatively,I can add the "message" to the query. For security reasons, I will leave this as an exercise for the reader:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;get-winevent  -max 400 | Select ProcessID,TimeCreated,ID,Task,TaskDisplayName,KeywordsDisplayNames,Message | where {$_.TimeCreated -match "6/27/2011"} | ft -wrap -auto&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;At this point, I still do not know what caused the "resume from sleep" event. Please see&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2011/07/get-winevent-part-iii-querying-event.html"&gt;Get-Winevent Part III: Querying the Event Log for Logons (Part B)&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-4791166585430112234?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/4791166585430112234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/06/get-winevent-part-iii-querying-event.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/4791166585430112234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/4791166585430112234'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/06/get-winevent-part-iii-querying-event.html' title='Get-Winevent Part III: Querying the Event Log for Logons (Part A)'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-U-H_4E666oI/TgoTmOzhI8I/AAAAAAAAH04/1_woN0s_xu4/s72-c/SpecialLogon_ogv.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-6948654797678351823</id><published>2011-06-14T11:37:00.000-07:00</published><updated>2011-07-07T09:03:42.118-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Is Digital Security Possible'/><title type='text'>Is Digital Security Possible?</title><content type='html'>&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;"Africa is not a continent which is any longer isolated. It is not a place where people are uninformed. It is the fastest growing market for cellular phones. Information, whether it is in the townships or wherever, now passes very quickly... And this is not an issue which is going to go away. Nor is it an issue that is trivial for those of us that live here as we do here."&lt;/span&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://www.youtube.com/watch?v=mOwZwkhFemQ"&gt;&amp;nbsp;JAMES WOLFENSOHN ex-President of the World Bank&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Below is a philosophical comment I &amp;nbsp;posted on&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://www.darkreading.com/insider-threat/167801100/security/perimeter-security/230500067/nearly-80-percent-of-businesses-have-lost-data-in-past-year.html"&gt; Dark Reading&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;today:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;"It has occurred to me lately (because of the advances and volume increase in penetration and ex-filtration) that the digital industry has falsely assumed that data can be kept private in a networked world; that perhaps the concept of "data security" or "network security" is not achievable or (at best) not achievable at current levels of technology, internet reach, network topology.&lt;br /&gt;If this is the case, we will have to rethink our current goals. Is data security possible? If so, at what costs? Can commercial interests or individual privacy be protected on the internet? If so, what would be the true costs for such protection?&lt;br /&gt;Social and economic inequality, the true driver behind nation state and organized criminal penetration and ex-filtration, may not be an affordable reality in a networked world. Conversely, a secure, networked world may be not an achievable reality in a world of social and economic inequality. Either conclusion has gross implications for the global economy as it now exists."&lt;/i&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;For some long time, in the moments between burying my head in code or research, this rather somber thought has occurred to me. If digital security is not truly possible, would the current world of security architects be able to recognize the futility of their own profession? &amp;nbsp;Probably not, I would answer. Good engineers that we are (in a profit hungry market capitalism), we simply just keep chasing the next big thing or fixing the last defect. &amp;nbsp;But what if it were the case that digital security is &amp;nbsp;not an existential possibility? What if it were the case that the next abstraction, the next algorithm always begat the next penetration or ex-filtration? What if digital security was never truly achievable for any moment but &amp;nbsp;a single point in time?&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Such a realization might change the very nature of system and network architecture. &amp;nbsp; First, we would have to assume that in a networked world there will always be data. The old Unix administrators motto ("There are two types of computer users: those who have lost data and those who will."), would be the starting point for developing the integrity of information systems. How would this effect privacy, commerce, and secrecy? It would tend to devalue the importance of all three. &amp;nbsp;In effect, it would mean we would live in a very public world where the emphasis of commerce and nation building would have to be the equality of social and economic justice. &amp;nbsp;The competitive battles of nation state hackers, spies, and terrorists would have to be devalued. &amp;nbsp;In their place something non-private, non-commercial, and very public would have to come to assume world wide importance.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;I will avoid (as much as possible) tendencies to describe a utopian&amp;nbsp;socialist reality that co-opts the urges of the very bright and nationalistic to commit computer crime. But I will concentrate instead on what the costs of extended information warfare could become in the future to nation states and its peoples. Clearly, we are not going to feed, house,clothe or co-exist very well with the &lt;a href="http://www.youtube.com/watch?v=mOwZwkhFemQ"&gt;nine billion people the World Bank&lt;/a&gt; says will inhabit the Earth by 2050 without evolutionary advances in world health, resource sharing, energy production, climate control or food production.&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="408" src="http://www.youtube.com/embed/mOwZwkhFemQ" width="512"&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Clearly technology and information sharing will be critical to prevent perpetual regional wars and oppression. And yet we cannot continue to possess &amp;nbsp;a much higher standard of living here in the West because of more substantive and efficient network technologies without incurring the jealousy and wrath of those who struggle with much less. &amp;nbsp;If an American corporation invented a 10x improvement in&amp;nbsp;photo-voltaic&amp;nbsp;efficiency&amp;nbsp;tomorrow, could we really keep China, Brazil or Russia or India from ex-filtrating, copying, or co-opting that technology? Recent history would say no and (for better or worse) the concept that a great idea should remain private for the profit of singular developers may be a concept that is now obsolete. (Suddenly, I hear &lt;a href="http://stallman.org/"&gt;Richard Stallman &lt;/a&gt;cheering in the background.)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Perhaps the networked world of commerce and thought now forces us to deal with a not so surprising conclusion: that there is no way to not know the thoughts and need of our brothers and sisters in this world, no matter how far away. But if our thoughts and needs are now ubiquitous, of what use is digital security anyway? &amp;nbsp; We don't maintain security in our families and communities by arming ourselves or walling off our lives from interaction with others. &amp;nbsp;We maintain our prosperity locally by allying and befriending those we know the most. In short, as a species, we function as a pack, tribe, or herd; we take care of the people that are closest to us. How will this ethic function in a world where a rapidly expanding global internet erases those boundaries?&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;We are not thinking about this as security professionals. We just keep thinking about the next fix, the newest hack, the next market opportunity, the next solution. &amp;nbsp;At this rate, we are going to code ourselves into irrelevance. &amp;nbsp;We will no more solve "network security" with our current approach than medical technology can "cure cancer". At some point we will have to deal with the reality that our current security paradigms don't work and that the improvement we see in our fixes provides only temporary solutions to a very&amp;nbsp;intransigent and structural set of problems.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: arial, helvetica, sans-serif; margin-bottom: 1.4em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;div style="font-family: arial, helvetica, sans-serif; margin-bottom: 1.4em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-6948654797678351823?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/6948654797678351823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/06/is-digital-security-possible.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/6948654797678351823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/6948654797678351823'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/06/is-digital-security-possible.html' title='Is Digital Security Possible?'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/mOwZwkhFemQ/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-8741964629342578577</id><published>2011-05-02T12:55:00.000-07:00</published><updated>2011-05-02T12:55:50.254-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='The Security Process'/><title type='text'>Security Process Document</title><content type='html'>I've created  four separate documents outlining &lt;a href="http://rmfdevelopment.com/WhitePapers/ComputerSecuritySmallBusinessProcess.pdf"&gt;The Security Process &lt;/a&gt;for a consultant. The documents  detail work flow from initial client meeting, to engaging &lt;i&gt;&lt;a href="http://rmfdevelopment.com/WhitePapers/ComputerSecuritySmallBusinessProcess.pdf"&gt;The Security Process,&lt;/a&gt; &lt;/i&gt;&lt;span style="font-style: normal;"&gt;and transitioning to monitoring/training of completed work. My text is intended as an outline for consultants and clients interested in understanding the steps of the &lt;/span&gt;&lt;i&gt;&lt;a href="http://rmfdevelopment.com/WhitePapers/ComputerSecuritySmallBusinessProcess.pdf"&gt;The Security Process&lt;/a&gt;.&lt;/i&gt;&lt;span style="font-style: normal;"&gt; The text is intended to function as a guideline to the process of developing security independent of operating system, network or company size. Additionally, the document is designed to function independently of associated disciplines of computer security: cryptography, network security, auditing, forensics, REM (reverse engineering of malware), secure authentication, etc.  This document is an outline only at present.  I hope to update it with more information.&lt;/span&gt;&lt;br /&gt;&lt;div style="font-style: normal;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal;"&gt;Chapters include:&lt;/div&gt;&lt;div style="font-style: normal; margin-top: 0.17in; page-break-after: avoid;"&gt; &lt;span style="font-family: Arial, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;First Contact: Small Business Work Flow for The Security Process&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal;"&gt;Designed to help screen client needs during the first phone call or meeting.&lt;/div&gt;&lt;div style="font-style: normal; margin-top: 0.17in; page-break-after: avoid;"&gt; &lt;span style="font-family: Arial, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;Second Contact: Templates for Managing Expectation For All Clients&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal;"&gt;Designed to generate ideas for the first PowerPoint Presentation.&lt;/div&gt;&lt;div style="font-style: normal; margin-top: 0.17in; page-break-after: avoid;"&gt; &lt;span style="font-family: Arial, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;The Phases of the Security Process&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal;"&gt;A brief overview of the phases in &lt;i&gt;The&lt;/i&gt; &lt;i&gt;Security Process.&lt;/i&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-top: 0.17in; page-break-after: avoid;"&gt; &lt;span style="font-family: Arial, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;Frequently Asked Questions&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal;"&gt;A list of questions you should be able to respond to with some level of competence.&lt;/div&gt;&lt;div style="font-style: normal;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-8741964629342578577?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/8741964629342578577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/05/security-process-document.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8741964629342578577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8741964629342578577'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/05/security-process-document.html' title='Security Process Document'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-1690126592509913735</id><published>2011-02-28T00:49:00.000-08:00</published><updated>2011-02-28T00:49:54.791-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='netmon captures'/><title type='text'>Collating and parsing netmon capture files</title><content type='html'>I have added a &lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/Scan-Capture.ps1"&gt;Powershell function&lt;/a&gt; that uses logparser to mux all the netmon capture files in a directory and list unique IPs and Ports.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-1690126592509913735?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/1690126592509913735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/02/collating-and-parsing-netmon-capture.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1690126592509913735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1690126592509913735'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/02/collating-and-parsing-netmon-capture.html' title='Collating and parsing netmon capture files'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-1865882719672858038</id><published>2011-02-15T16:10:00.000-08:00</published><updated>2011-03-11T15:53:42.217-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7 Firewall;Parsing Logs;Powershell;logparser.exe'/><title type='text'>Parsing Windows 7 Firewall Logs</title><content type='html'>&lt;span style="font-family: Andalus, serif;"&gt;I've talked quite a bit about on this blog about parsing Microsoft's Windows Firewall&lt;span style="font-size: x-small;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-left: 0.49in;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/07/parsing-vista-firewall-logs-part-i.html"&gt;http://thinking-about-network-security.blogspot.com/2009/07/parsing-vista-firewall-logs-part-i.html&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/07/parsing-vista-firewall-logs-part-ii.html"&gt;http://thinking-about-network-security.blogspot.com/2009/07/parsing-vista-firewall-logs-part-ii.html&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/07/parsing-vista-firewall-logs-part-iii.html"&gt;http://thinking-about-network-security.blogspot.com/2009/07/parsing-vista-firewall-logs-part-iii.html&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/08/parsing-vista-firewall-part-iv.html"&gt;http://thinking-about-network-security.blogspot.com/2009/08/parsing-vista-firewall-part-iv.html&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/08/parsing-vista-firewalls-part-v.html"&gt;http://thinking-about-network-security.blogspot.com/2009/08/parsing-vista-firewalls-part-v.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: Andalus, serif;"&gt;There are a number of Microsoft sites with more information on Windows Firewall:&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-left: 0.49in;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif; font-size: 14px;"&gt;&lt;a href="http://technet.microsoft.com/en-us/network/bb545423.aspx"&gt;http://technet.microsoft.com/en-us/network/bb545423.aspx&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif; font-size: 14px;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif; font-size: 14px;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa366453(v=VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa366453(v=VS.85).aspx&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif; font-size: 14px;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif; font-size: 14px;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee663289(v=VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/ee663289(v=VS.85).aspx&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif; font-size: 14px;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif; font-size: 14px;"&gt;&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyId=DF192E1B-A92A-4075-9F69-C12B7C54B52B&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyId=DF192E1B-A92A-4075-9F69-C12B7C54B52B&amp;amp;displaylang=en&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif; font-size: 14px;"&gt; &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: Andalus, serif;"&gt;This is the report output of  &lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/ScanFirewall/"&gt;two scripts&lt;/a&gt; (&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/ScanFirewall/Scan-Firewall.V2.ps1"&gt;1&lt;/a&gt;, &lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/ScanFirewall/Scan-Firewall.V2_logparser2.2.ps1"&gt;2&lt;/a&gt;) designed to help suggest a  "Windows Firewall Log Parsing" Framework. &lt;/span&gt; &lt;br /&gt;&lt;span style="font-family: Andalus, serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;span style="font-family: Andalus, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-F2ma416JqMY/TVsRpOe6URI/AAAAAAAAHfw/2p0tfz2hd-k/s1600/FirewallOutput.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="392" src="http://1.bp.blogspot.com/-F2ma416JqMY/TVsRpOe6URI/AAAAAAAAHfw/2p0tfz2hd-k/s640/FirewallOutput.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Andalus, serif;"&gt;There are several issues with parsing information from Windows Firewall logs:&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family: Andalus, serif;"&gt;Windows Firewall is one of three native sources of network data offered by Microsoft, the other two being Network Monitor and ETL (Kernel TCP/IP and NDIS Capture)Tracing,&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Andalus, serif;"&gt;Windows Firewall must be configured for complete logging and the logging file rotates only one file (*.old) by default.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Andalus, serif;"&gt;The log file can be exceptionally large depending on configuration.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-family: Andalus, serif;"&gt;Processing the 'pfirewall.log'[1] with Powershell was a lengthly affair until multi-core processors and &amp;nbsp;V2. These&amp;nbsp;&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/ScanFirewall/"&gt;two scripts&lt;/a&gt;&amp;nbsp;(&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/ScanFirewall/Scan-Firewall.V2.ps1"&gt;1&lt;/a&gt;,&amp;nbsp;&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/ScanFirewall/Scan-Firewall.V2_logparser2.2.ps1"&gt;2&lt;/a&gt;)&amp;nbsp;, one which uses only Powershell and the other which depends upon Microsoft's logparser2.2, could serve as templates for further processing and analysis. The next step would be to develop a series of rulesets that would parse and count the unique results for ' anomalous' activity. What kind of rule-sets? Here are some thoughts:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;&amp;nbsp;A comparison of destination IPs to the external Firewall 'Block' list.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;A comparison of destination or source IPs to the &lt;a href="http://isc.sans.edu/ipsascii.html"&gt;ISCs (daily list) of top 100 IPs.&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;A comparison of destination or source IPs to the "&lt;a href="http://stopbadware.org/reports/ip.csv"&gt;Stop Badware&lt;/a&gt;" database.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;A subset of IPs known as business competitors.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;A chronology of outbound activity on "known suspect" ports.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;A chronology of outbound activity on "known good" ports used for suspect activity.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Andalus, serif;"&gt;A chronology of outbound activity on either "known good" or "known suspect ports" to targets that are not part of "previously known profile" for those ports.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-family: Andalus, serif;"&gt;Additional rulesets could be developed based on 'tuple' analysis. For example, given the following ordered set:&lt;br /&gt;&lt;b&gt;'DROP UDP 192.168.0.15 255.255.255.255 68 67 RECEIVE'&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: Andalus, serif;"&gt;Would it be expected behavior for the srcIP ("192.168.0.15") to RECEIVE data from the dstIP ("255.255.255.255")?&lt;/span&gt;&lt;/li&gt;&lt;span style="font-family: Andalus, serif;"&gt;&lt;li&gt;Would it be expected behavior for the srcIP ("192.168.0.15") to RECEIVE data from the dstIP ("255.255.255.255") on dstPort ("68")?&lt;/li&gt;&lt;li&gt;What is the expected 'action' for either case? (e.g. DROP or ALLOW)?&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;span style="font-family: Andalus, serif;"&gt;For now, I leave this as an exercise for the user. Also I will leave as an exercise for the user any 'vissec' presentations of this data.. Powershell V2 and Logparser 2.2 are the engines for these scripts, but other data mining techniques (PERL, GAWK, T-SQL, etc) could be more scaleable and useful.&amp;nbsp;Powershell has the advantage of being (1) native to Windows 7, (2) configurable for remote invocation of scripts, (3) configurable as domain based scripting.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family: Andalus, serif;"&gt;&lt;br /&gt;[1] By default located at 'C:\Windows\System32\LogFiles\Firewall\pfirewall.log' &lt;/span&gt; &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-1865882719672858038?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/1865882719672858038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/02/parsing-windows-7-firewall-logs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1865882719672858038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1865882719672858038'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/02/parsing-windows-7-firewall-logs.html' title='Parsing Windows 7 Firewall Logs'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-F2ma416JqMY/TVsRpOe6URI/AAAAAAAAHfw/2p0tfz2hd-k/s72-c/FirewallOutput.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-1554333459193378526</id><published>2011-02-02T15:30:00.000-08:00</published><updated>2012-01-04T16:16:42.319-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='netsh ETL tracing'/><title type='text'>Get-WinEvent, EventLogs, ETL, Providers on Win7 Part II</title><content type='html'>&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;Working with Windows Tracing (ETL) logs&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;This is part of ongoing research project to understand how improved tracing providers in Windows 7 can help detect the presence of malware. &amp;nbsp;Microsoft has been improving event tracing for a number of years. The latest versions allows netsh to invoke multiple providers. After you have chosen your providers, you start the trace either by referencing the provider name or GUID. 'Netsh trace start' allows for keyword or capture filters, which can be useful if you know what specific events for which you need to trace. For this example, we will not create an NDIS capture ('capture=yes') nor will we select keywords or levels for the filters. After a few busy hours, this leads to quite a bit tracing.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;[Cmd.exe]&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;netsh trace show providers | findstr "Network Security IP"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{6E7A2FC0-9244-4EE4-804F-E812924ABF26} &amp;nbsp;Windows NetworkMap Trace&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{D9131565-E1DD-4C9E-A728-951999C2ADB5} &amp;nbsp;Network Profile Manager&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{6B510852-3583-4E2D-AFFE-A67F9F223438} &amp;nbsp;Security: Kerberos Authentication&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{CC85922F-DB41-11D2-9244-006008269001} &amp;nbsp;Local Security Authority (LSA)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{6D04BF88-60A5-4D02-BC5C-94A20BA490EC} &amp;nbsp;IPBusEnum Service Trace&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{94335EB3-79EA-44D5-8EA9-306F49B3A040} &amp;nbsp;Downlevel IPsec Service&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{94335EB3-79EA-44D5-8EA9-306F49B3A041} &amp;nbsp;Downlevel IPsec API&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{EB004A05-9B1A-11D4-9123-0050047759BC} &amp;nbsp;TCPIP Service Trace&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{A7EB57F6-145E-4F18-BD75-DBBF6F7E23A7} &amp;nbsp;WMP Network Sharing Service&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{6165F3E2-AE38-45D4-9B23-6B4818758BD9} &amp;nbsp;Security: TSPkg&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{37D2C3CD-C5D4-4587-8531-4696C44244C8} &amp;nbsp;Security: SChannel&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{FB6A424F-B5D6-4329-B9D5-A975B3A93EAD} &amp;nbsp;Security: WDigest&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{E4FF10D8-8A88-4FC6-82C8-8C23E9462FE5} &amp;nbsp;Downlevel IPsec NetShell Plugin&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{5BBB6C18-AA45-49B1-A15F-085F7ED0AA90} &amp;nbsp;Security: NTLM Authentication&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;netsh trace show providers | findstr "NTLM Security Protocol"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;{C92CF544-91B3-4DC0-8E11-C580339A0BF8} &amp;nbsp;NTLM Security Protocol&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;netsh trace start provider=Microsoft-Windows-Kernel-Network provider=Microsoft-Windows-Kernel-Process provider=Microsoft-Windows-Security-Auditing provider=Microsoft-Windows-Security-Netlogon provider=Microsoft-Windows-TCPIP provider="{C92CF544-91B3-4DC0-8E11-C580339A0BF8}"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;In Powershell V2, 'Get-Winevent' is your ticket to parsing the trace (ETL) file. As a note, you can easily export the ETL format to (the new log format) ETVX and view either file format in Event Viewer. You can also export the file with 'netsh trace convert'. The size of the file increases greatly with the ETVX format. I don't recommend this unless you have a need. &amp;nbsp;Even a 50 MB ETL takes a while to process in Powershell (see below). &amp;nbsp;However, you can view the file and filter per eventID, provider, or otherwise inside the Event Viewer interface and then save the filtered events to a separate log. &amp;nbsp;Below, I show the respective file sizes of an ETL vs. and ETVX format. I then load the 54 MB ETL into a Powershell variable and export it into an ASCII format. This takes eleven minutes on an i5 core laptop.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;[Powershell]&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;(ls NetTrace.etl | % {$_.length})/1MB&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;54.875&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;measure-command {netsh trace convert input=NetTrace.etl output=knpasntlm.evtx dump=EVTX}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Days &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Hours &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Minutes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 8&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Seconds &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 15&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;....&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;(ls .\knpasntlm.evtx &amp;nbsp;| % {$_.length})/1MB&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;883.06640625&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;measure-command {$KNPASNTLM=get-winevent -path 'NetTrace.etl' -oldest}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Days &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Hours &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Minutes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 11&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;....&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;Analyzing the Trace&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;'Get-Winevent' has both XPath and Filterhashtable query options for working with event logs. But for working with raw tracing logs, we also have other some other options. Logparser 2.2, a six year old 'sql' parser works with ETL logs. &amp;nbsp;Once the file is loaded into a Powershell variable, we can query based on properties below. However, rather than create those queries right now, let us look at the properties of our variable and export variable contents to an ASCII file. Once again, this takes some time on a five core laptop.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;$KNPASNTLM | gm | Select Name&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Name&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;----&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;....&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Message&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;ActivityId&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Bookmark&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;ContainerLog&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Id&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Keywords&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;KeywordsDisplayNames&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Level&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;LevelDisplayName&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;LogName&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;MachineName&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;MatchedQueryIds&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Opcode&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;OpcodeDisplayName&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;ProcessId&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Properties&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;ProviderId&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;ProviderName&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Qualifiers&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;RecordId&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;RelatedActivityId&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Task&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;TaskDisplayName&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;ThreadId&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;TimeCreated&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;UserId&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Version&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;measure-command {$KNPASNTLM | Select TimeCreated,ID,RecordID, Message | ft -autosize | out-file -encoding ASCII knpasntlm.ASCII.txt}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Days &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Hours &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Minutes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 6&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Now we have a file we can look at in Linux, BSD, or Cygwin with wc, less, head, tail, awk, grep, etc.:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;[Cygwin]&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;$ wc -l knpasntlm.ASCII.txt&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;491392 knpasntlm.ASCII.txt&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: x-small;"&gt;$ head knpasntlm.ASCII.txt&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: x-small;"&gt;TimeCreated &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Id RecordId Message&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: x-small;"&gt;----------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-- -------- -------&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: x-small;"&gt;1&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;/31/2011 1:31:02 PM 1300 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 TCP: connection 0xfffffa8008e79170 (local=192.168.0.11:1193 remote=74.125.224.23:443) exists. State = EstablishedState. PID = 5776.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:02 PM 1300 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 TCP: connection 0xfffffa8004489cf0 (local=192.168.0.11:1076 remote=74.125.224.54:443) exists. State = EstablishedState. PID = 5776.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:02 PM 1300 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 TCP: connection 0xfffffa8004531cf0 (local=192.168.0.11:1037 remote=74.125.127.100:80) exists. State = CloseWaitState. PID = 4376.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:02 PM 1202 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 IP: Interface rundown: Index = 1, Linkspeed = 0 bps, PhysicalMediumType = NdisPhysicalMediumUnspecified, IP Address = 127.0.0.1 &amp;nbsp; .&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:02 PM 1202 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4 IP: Interface rundown: Index = 12, Linkspeed = 54000000 bps, PhysicalMediumType = NdisPhysicalMediumNative802_11, IP Address = 192.168.0.11 &amp;nbsp; .&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:02 PM 1202 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5 IP: Interface rundown: Index = 1, Linkspeed = 0 bps, PhysicalMediumType = NdisPhysicalMediumUnspecified, IP Address = 0.0.0.0 (Ignore IPv4 address), IPv6 address...&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:02 PM 1202 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6 IP: Interface rundown: Index = 12, Linkspeed = 54000000 bps, PhysicalMediumType = NdisPhysicalMediumNative802_11, IP Address = 0.0.0.0 (Ignore IPv4 address), IPv...&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;$ tail knpasntlm.ASCII.txt&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;1/31/2011 7:53:22 PM &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 491379&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;1/31/2011 7:53:22 PM &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 491380&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;1/31/2011 7:53:22 PM &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 491381&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;1/31/2011 7:53:22 PM &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 491382&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;1/31/2011 7:53:22 PM &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 491383&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;1/31/2011 7:53:22 PM &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 491384&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;1/31/2011 7:53:22 PM &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 491385&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;1/31/2011 7:53:22 PM &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 491386&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;$ grep connection knpasntlm.ASCII.txt &amp;nbsp;| wc -l&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;150079&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: x-small;"&gt;$ grep connection knpasntlm.ASCII.txt &amp;nbsp;| less&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:02 PM 1300 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 TCP: connection 0xfffffa8008e79170 (local=192.168.0.11:1193 remote=74.125.224.23:443) exists. State = EstablishedState. PID = 5776.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:02 PM 1300 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 TCP: connection 0xfffffa8004489cf0 (local=192.168.0.11:1076 remote=74.125.224.54:443) exists. State = EstablishedState. PID = 5776.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:02 PM 1300 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 TCP: connection 0xfffffa8004531cf0 (local=192.168.0.11:1037 remote=74.125.127.100:80) exists. State = CloseWaitState. PID = 4376.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:19 PM 1158 &amp;nbsp; &amp;nbsp; &amp;nbsp;682 TCP: connection 0xfffffa8004489cf0 delivery 0xfffffa8004489e50 satisfied 0x35 bytes 0x17a requested. IsFullySatisfied = 0. RcvNxt = 2280417497.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:19 PM 1074 &amp;nbsp; &amp;nbsp; &amp;nbsp;685 TCP: connection 0xfffffa8004489cf0: Received data with number of bytes = 53. ThSeq = 2280417497.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:19 PM 1156 &amp;nbsp; &amp;nbsp; &amp;nbsp;686 TCP: connection 0xfffffa8004489cf0, delivery 0xfffffa8004489e50, Request 0xfffffa80040fb1a0 &amp;nbsp;posted for 0x145 bytes, flags = 0. RcvNxt = 2280417550.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:45 PM 1158 &amp;nbsp; &amp;nbsp; 1097 TCP: connection 0xfffffa8004489cf0 delivery 0xfffffa8004489e50 satisfied 0x35 bytes 0x145 requested. IsFullySatisfied = 0. RcvNxt = 2280417550.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: xx-small;"&gt;1/31/2011 1:31:45 PM 1074 &amp;nbsp; &amp;nbsp; 1100 TCP: connection 0xfffffa8004489cf0: Received data with number of bytes = 53. ThSeq = 2280417550.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit; font-size: x-small;"&gt;....&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;$ &amp;nbsp;grep -f search knpasntlm.ASCII.txt &amp;nbsp;| grep received | awk -F":" {'print $5'} | awk {'print $3'} | sort -nr | uniq -c | sort -nr | less&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; 2416&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; 1696 192.168.0.15&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; 1403 192.168.0.11&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;586 224.0.0.252&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;527 67.192.97.131&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;403 74.125.224.54&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;333 74.125.127.83&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;313 74.125.53.19&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;227 192.168.0.255&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;174 74.125.155.191&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;132 184.73.205.16&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;128 74.125.127.17&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;120 239.255.255.250&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;107 208.71.123.76&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;103 96.17.109.9&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;....&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;To be continued...&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-1554333459193378526?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/1554333459193378526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/02/get-winevent-eventlogs-etl-providers-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1554333459193378526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1554333459193378526'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/02/get-winevent-eventlogs-etl-providers-on.html' title='Get-WinEvent, EventLogs, ETL, Providers on Win7 Part II'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-9219367353905082260</id><published>2011-01-23T17:39:00.000-08:00</published><updated>2011-03-11T15:54:11.826-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='&apos;Get-WinEvent&apos; ETL Providers Event Logs'/><title type='text'>Get-WinEvent, EventLogs, ETL, Providers on Win7</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;'Get-WinEvent' in Powerhsell 2 when combined with ETL on Windows 7 allows exceptional event log queries. This function allows the administrator to create an array of all Event Logs and sort by 'time created' all those records created in the last (1) day:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;function global:LatestLogEntries&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; [CmdletBinding()]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; Param(&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; [Parameter(Mandatory=$true,ValueFromPipeline=$true)]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; [int32] $param1,&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; [string] $ErrorActionPreference="silentlycontinue"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;$LogNames=(Get-Winevent -listlog &amp;nbsp;* )&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;$goback = (get-date) - (new-timespan -days $param1 )&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;$LogNames | % {get-winevent -FilterHashTable &amp;nbsp;@{LogName=$_.LogName;StartTime=$goback}}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;i&gt;&amp;nbsp;LatestLogEntries 1 | sort -descending -property TimeCreated | ft -auto TimeCreated,LogName,ProviderName,RecordID,Message | more&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_-L4HUu8oKmI/TTzVcaZtggI/AAAAAAAAHd0/Dhz9dddnkiI/s1600/NetSecIPEntries.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://4.bp.blogspot.com/_-L4HUu8oKmI/TTzVcaZtggI/AAAAAAAAHd0/Dhz9dddnkiI/s640/NetSecIPEntries.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;There are over six hundred providers shipped with Windows 7. This function chooses all those providers nominally relevant to Network,Security, and IP and allows the administrator to sort by 'time created' the maximum amount of entries specified:&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;function global:NetSecIP_Entries&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;{&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; [CmdletBinding()]&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; Param(&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; [Parameter(Mandatory=$true,ValueFromPipeline=$true)]&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; [int32] $param1,&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; [string] $ErrorActionPreference="silentlycontinue"&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;$Providers=Get-WinEvent -ListProviders *&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;$NetworkSecIP_Providers= $Providers | % {$_.Name} | findstr "Network Sec IP"&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;foreach ($provider_message in $NetworkSecIP_Providers) {get-winevent -max $param1 -provider $provider_message}&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;NetSecIP_Entries 20 | sort -descending -property TimeCreated | ft -auto TimeCreated,LogName,ProviderName,RecordID,Message | more&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; font-size: small; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_-L4HUu8oKmI/TTzVcaZtggI/AAAAAAAAHd0/Dhz9dddnkiI/s1600/NetSecIPEntries.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://4.bp.blogspot.com/_-L4HUu8oKmI/TTzVcaZtggI/AAAAAAAAHd0/Dhz9dddnkiI/s640/NetSecIPEntries.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-9219367353905082260?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/9219367353905082260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/01/get-winevent-in-powerhsell-2-when.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/9219367353905082260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/9219367353905082260'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2011/01/get-winevent-in-powerhsell-2-when.html' title='Get-WinEvent, EventLogs, ETL, Providers on Win7'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTzVcaZtggI/AAAAAAAAHd0/Dhz9dddnkiI/s72-c/NetSecIPEntries.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-1072443358936215731</id><published>2010-12-15T21:22:00.000-08:00</published><updated>2010-12-20T19:15:07.341-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lsof for Powershell'/><title type='text'>Powershell LSOF/Parsing Netstat Part II</title><content type='html'>Two 'lsof for Powershell' scripts covering v4 and v6 have been placed here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/goog_1679262786"&gt;h&lt;/a&gt;&lt;a href="http://rmfdevelopment.com/PowerShell_Scripts/PS_LSOF.ps1"&gt;http://rmfdevelopment.com/PowerShell_Scripts/PS_LSOF.ps1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://rmfdevelopment.com/PowerShell_Scripts/PS_LSOF_gwmi.ps1"&gt;http://rmfdevelopment.com/PowerShell_Scripts/PS_LSOF_gwmi.ps1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a second update to this script which matches the port to the process in Powershell by parsing netstat for TCP and UDP and then appending 'ps' or 'gwmi' information associated with the process related to that port. &amp;nbsp;There's nothing in this function (but sorted port order) which carries through a relational tie from port to process information. There is a lot of information produced in this script, as I print all of netstat -ano and then query the corresponding network process with either 'ps' or 'gwmi'. (Click to enlarge):&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_-L4HUu8oKmI/TRAbA5-cM6I/AAAAAAAAHOA/3E8_bV3mzPw/s1600/PS_lsof_gwmi.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="331" src="http://3.bp.blogspot.com/_-L4HUu8oKmI/TRAbA5-cM6I/AAAAAAAAHOA/3E8_bV3mzPw/s640/PS_lsof_gwmi.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-1072443358936215731?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/1072443358936215731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/12/powershell-lsofparsing-netstat-part-ii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1072443358936215731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1072443358936215731'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/12/powershell-lsofparsing-netstat-part-ii.html' title='Powershell LSOF/Parsing Netstat Part II'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_-L4HUu8oKmI/TRAbA5-cM6I/AAAAAAAAHOA/3E8_bV3mzPw/s72-c/PS_lsof_gwmi.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-6773678039583932433</id><published>2010-10-23T19:10:00.000-07:00</published><updated>2010-12-15T21:33:17.121-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Powershell LSOF'/><category scheme='http://www.blogger.com/atom/ns#' term='Parsing Netstat'/><title type='text'>Powershell LSOF / Parsing Netstat</title><content type='html'>This &lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/parse-netstat.ps1"&gt;script&lt;/a&gt;, &lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/parse-netstat.ps1"&gt;parse-netstat.ps1&lt;/a&gt;, successfully parses 'netstat -ano' for each PROTO (TCP,TCPv6,UDP, UDPv6) and then uses 'ps' to enumerate ID,NAME,PATH,FileVersion for the process associated with each networked PID. Thus we have a basic Powershell LSOF utility with room for calculated properties and additional text parsing. There is no spec of regex anywhere in my text parsing of netstat. &amp;nbsp;Sample output:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;PS C:\ps1&amp;gt; .\parse-netstat.ps1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;TCP Local Ports:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;135&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;445&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1025&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1026&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1027&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1028&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1031&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;9000&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;24800&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;47001&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;139&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;24800&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;139&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1095&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1099&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1100&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1101&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1102&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1679&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1706&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;TCP PIDS:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;Id Name &amp;nbsp; &amp;nbsp; Path &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FileVersion&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;-- ---- &amp;nbsp; &amp;nbsp; ---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-----------&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1012 svchost &amp;nbsp;C:\Windows\system32\svchost.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6.0.6000.16386 (vista_rtm.061101-2205)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; 4 System&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;684 wininit &amp;nbsp;C:\Windows\system32\wininit.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6.0.6000.16386 (vista_rtm.061101-2205)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;460 svchost &amp;nbsp;C:\Windows\System32\svchost.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6.0.6000.16386 (vista_rtm.061101-2205)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;760 lsass &amp;nbsp; &amp;nbsp;C:\Windows\system32\lsass.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6.0.6000.16386 (vista_rtm.061101-2205)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;12 svchost &amp;nbsp;C:\Windows\system32\svchost.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6.0.6000.16386 (vista_rtm.061101-2205)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;740 services C:\Windows\system32\services.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6.0.6000.16386 (vista_rtm.061101-2205)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; 4 System&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;4244 synergys C:\Program Files (x86)\Synergy+\bin\synergys.exe&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; 4 System&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; 4 System&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;4244 synergys C:\Program Files (x86)\Synergy+\bin\synergys.exe&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; 4 System&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;552 Picasa3 &amp;nbsp;C:\Program Files (x86)\Google\Picasa3\Picasa3.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.6.105.67&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;552 Picasa3 &amp;nbsp;C:\Program Files (x86)\Google\Picasa3\Picasa3.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.6.105.67&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;552 Picasa3 &amp;nbsp;C:\Program Files (x86)\Google\Picasa3\Picasa3.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.6.105.67&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;552 Picasa3 &amp;nbsp;C:\Program Files (x86)\Google\Picasa3\Picasa3.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.6.105.67&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;552 Picasa3 &amp;nbsp;C:\Program Files (x86)\Google\Picasa3\Picasa3.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.6.105.67&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; 4 System&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;4460 chrome &amp;nbsp; C:\Users\Admin\AppData\Local\Google\Chrome\Application\chrome.exe 0.0.0.0&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-6773678039583932433?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/6773678039583932433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/10/powershell-lsof-parsing-netstat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/6773678039583932433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/6773678039583932433'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/10/powershell-lsof-parsing-netstat.html' title='Powershell LSOF / Parsing Netstat'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-8632174768412574987</id><published>2010-10-11T21:42:00.000-07:00</published><updated>2011-03-11T15:55:18.407-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GetOwnerModuleFromTcpEntry  Powershell iphlpapi.dll'/><title type='text'>Accessing (or not) GetOwnerModuleFromTcpEntry from Powershell</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Normally on XP SP2, Vista, Win7 'netstat -ano' or 'netstat -anob' gives us the connected sockets, the PID of listening applications. With the '-b' option, netstat makes an attempt at finding the owner of the socket probably through the &lt;a href="http://www.blogger.com/goog_637293559"&gt;'&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;strong&gt;&lt;a href="http://www.blogger.com/goog_637293559"&gt;GetOwnerModuleFromTcpEntry&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;a href="http://www.blogger.com/goog_637293559"&gt;&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa366003(v=VS.85).aspx"&gt;function [which] retrieves data about the module that issued the context bind for a specific IPv4 TCP endpoint in a MIB table row.'&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;found in &lt;a href="http://msdn.microsoft.com/en-us/library/aa366401(v=VS.85).aspx"&gt;iphlpapi.dll&lt;/a&gt;&amp;nbsp;(IP Helper). Finding this same information with Powershell I have found to be more than difficult. It is easy enough to find the listening and connected sockets with &lt;b&gt;[System.NET.NetworkInformation.IPGlobalProperties]::GetIPGlobalProperties().&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/List-Connections.ps1"&gt;List-Connections.ps1&lt;/a&gt; will produce a listing comparable to netstat. However, I can't find the MIB table entry from the process to the socket (or the converse) in either '&lt;b&gt;ps&lt;/b&gt;' or '&lt;b&gt;gwmi win32_process&lt;/b&gt;'. My workaround is to use netstat from cmd.exe where &lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/gwmi_netstat_ano.cmd"&gt;gwmi_netstat_ano.cmd&lt;/a&gt; is:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;for /f "tokens=1-6" %%a in ('netstat -ano ^| findstr TCP') do @echo %%e &amp;gt; ano.list.txt&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;for /f "tokens=1-6" %%a in ('netstat -ano ^| findstr UDP') do @echo %%d &amp;gt;&amp;gt; ano.list.txt&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;or where &lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/gwmi_tcpvcon_ano.cmd"&gt;gwmi_tcpvcon_ano.cmd&lt;/a&gt; is:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt; &lt;i&gt;@del /q ano.list.txt&lt;/i&gt;&lt;br /&gt;&lt;i&gt;@path C:\tools\SysinternalsSuite\;%path%&lt;/i&gt;&lt;br /&gt;&lt;i&gt;for /f "delims=, tokens=1-5" %%a in ('tcpvcon -acn ^| findstr TCP') do @echo %%c &amp;gt;&amp;gt; ano.list.txt&lt;/i&gt;&lt;br /&gt;&lt;i&gt;for /f "delims=, tokens=1-5" %%a in ('tcpvcon -acn ^| findstr UDP') do @echo %%c &amp;gt;&amp;gt; ano.list.txt&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/gwmi_netstat_ano.ps1"&gt;This powershell script&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; runs the commands in '&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/gwmi_netstat_ano.cmd"&gt;gwmi_netstat_ano.cmd&lt;/a&gt;' and processes the 'netstat -ano' output with 'gwmi win32_process':&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;Microsoft.PowerShell.Management\Start-Process $pwd\gwmi_netstat_ano.cmd -argument /Q &amp;nbsp;-nonewwindow&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;$ano_list = gc ano.list.txt | sort | get-unique&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;$ano_proc = foreach ($ano in $ano_list) {gwmi win32_process |&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;Select Name,ProcessId,HandleCount,ThreadCount,WriteOperationCount,ReadOperationCount,CommandLine | ? {$_.ProcessID -eq "$ano"}}&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;write $ano_proc | sort -property ProcessID | ft -auto&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;# or alternatively&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;foreach ($id in $ano_list) {get-wmiObject win32_process -filter "ProcessID=$id" | Select Name,ProcessID,Commandline}&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;PS C:\ps1: .\&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/gwmi_netstat_ano.ps1"&gt;gwmi_netstat_ano.ps1&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;C:\ps1: for /F "tokens=1-6" %a in ('netstat -ano | findstr TCP') do @echo %e &amp;gt; ano.list.txt&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;C:\ps1: for /F "tokens=1-6" %a in ('netstat -ano | findstr UDP') do @echo %d &amp;gt;&amp;gt; ano.list.txt&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ProcessId HandleCount ThreadCount WriteOperationCount ReadOperationCount CommandLine&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--------- ----------- ----------- ------------------- ------------------ -----------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;System &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5381 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 151 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 62649 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2192&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;svchost.exe &amp;nbsp; &amp;nbsp; &amp;nbsp;1164 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 368 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1902 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2335 C:\Windows\system32\svchost.exe -k LocalService&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;svchost.exe &amp;nbsp; &amp;nbsp; &amp;nbsp;1304 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 700 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;27 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 398 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2119 C:\Windows\system32\svchost.exe -k NetworkService&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;svchost.exe &amp;nbsp; &amp;nbsp; &amp;nbsp;3168 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1234 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;49 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12312 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;42668 C:\Windows\system32\svchost.exe -k netsvcs&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;opera.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3684 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 849 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;39 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;112787 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;65814 "C:\Program Files (x86)\Opera\opera.exe"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;ftp.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3796 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 128 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5 ftp &amp;nbsp;rmfdevelopment.com&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ProcessID Commandline&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--------- -----------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;svchost.exe &amp;nbsp; &amp;nbsp; &amp;nbsp;1164 C:\Windows\system32\svchost.exe -k LocalService&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;svchost.exe &amp;nbsp; &amp;nbsp; &amp;nbsp;1304 C:\Windows\system32\svchost.exe -k NetworkService&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;svchost.exe &amp;nbsp; &amp;nbsp; &amp;nbsp;3168 C:\Windows\system32\svchost.exe -k netsvcs&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;opera.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3684 "C:\Program Files (x86)\Opera\opera.exe"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;ftp.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3796 ftp &amp;nbsp;rmfdevelopment.com&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;System &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;( A script like &lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/Get-Svchost.ps1"&gt;Get-Svchost.ps1&lt;/a&gt; can help open up the incantations of svchost.exe.)&amp;nbsp;I find the cmd.exe workaround I use here unfortunate as a security professional, because it means I am unable to use Powershell to get the MIB table entry from&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/aa366380(v=VS.85).aspx"&gt;GetOwnerModuleFromTcpEntry&lt;/a&gt;,&amp;nbsp;information which is critical to understanding malware. Sure, I can parse this information from netstat, but this blows up any chance of scripting detection &amp;nbsp;anywhere near real-time. Perhaps someone has an answer...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-8632174768412574987?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/8632174768412574987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/10/accessing-or-not-getownermodulefromtcpe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8632174768412574987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8632174768412574987'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/10/accessing-or-not-getownermodulefromtcpe.html' title='Accessing (or not) GetOwnerModuleFromTcpEntry from Powershell'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-9160978764032905050</id><published>2010-09-24T15:26:00.000-07:00</published><updated>2011-03-11T15:56:29.355-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Check-TCPUDPClient.ps1'/><title type='text'>Check-TCPUDPClient.ps1</title><content type='html'>The output &lt;a href="http://rmfdevelopment.com/PowerShell_Scripts/Check-TCPUDPClient.ps1"&gt;from the script below&lt;/a&gt; is designed to be a framework to check TCP and UDP open ports under connection. It makes use of whatever TCP and UDP Client sockets code is native to Powershell 2.0. My original conception was to create a scripted 'fuzzer' that would send non-arbitrary data to open ports to test or provoke library module loading. &amp;nbsp;Powershell's socket facilities are impressive for a scripted language. I don't know how much documentation there is for TCP/IP. &amp;nbsp;No error checking implemented.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://rmfdevelopment.com/PowerShell_Scripts/Check-TCPUDPClient.ps1"&gt;Check-TCPUDPClient.ps1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;.\Check-TCPUDPClient.ps1 rmfvista&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Listening TCP Ports:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;135&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;139&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;445&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1025&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1026&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1027&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1028&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1029&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;7800&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;9000&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;47001&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Listening UDP Ports:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;123&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;137&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;138&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;500&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1900&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;4500&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;5355&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;50353&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;55326&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Connected TCPPorts:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;RMFVista 127.0.0.1:7801 127.0.0.1:7800&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;RMFVista 127.0.0.1:7800 127.0.0.1:7801&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;c6.59.85ae.static.theplanet.com 174.133.89.198:80 192.168.0.13:1031&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;h108.www5.itahost.com 85.13.200.108:110 192.168.0.13:8125&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;pz-in-f18.1e100.net 74.125.127.18:443 192.168.0.13:9104&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;pz-in-f189.1e100.net 74.125.127.189:443 192.168.0.13:9105&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;pz-in-f18.1e100.net 74.125.127.18:443 192.168.0.13:9107&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;nuq04s01-in-f102.1e100.net 74.125.19.102:80 192.168.0.13:9120&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;RMFVista.rmfdevelopment.com 192.168.0.13:47001 192.168.0.13:9131&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;RMFVista.rmfdevelopment.com 192.168.0.13:47001 192.168.0.13:9142&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;RMFVista.rmfdevelopment.com 192.168.0.13:9131 192.168.0.13:47001&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;RMFVista.rmfdevelopment.com 192.168.0.13:9142 192.168.0.13:47001&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;TCP Ports:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;TCP Port 135 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;TCP Port 139 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;TCP Port 445 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;TCP Port 1025 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;TCP Port 1026 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;TCP Port 1027 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;TCP Port 1028 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;TCP Port 1029 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Exception calling "Connect" with "2" argument(s): "No connection could be m&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;At C:\Ps1\Check-TCPUDPClient_006.ps1:77 char:36&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; $Connection = $TCPclient.Connect &amp;lt;&amp;lt;&amp;lt;&amp;lt; ($ip,$_)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;+ CategoryInfo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: NotSpecified: (:) [], MethodInvocationExcepti&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;+ FullyQualifiedErrorId : DotNetMethodException&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;TCP Port 7800 closed&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;TCP Port 9000 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;TCP Port 47001 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;UDP Ports:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;UDP Port 123 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;UDP Port 137 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;UDP Port 138 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;UDP Port 500 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;UDP Port 1900 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;UDP Port 4500 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;UDP Port 5355 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;UDP Port 50353 open&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;UDP Port 55326 open&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-9160978764032905050?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/9160978764032905050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/09/check-tcpudpclientps1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/9160978764032905050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/9160978764032905050'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/09/check-tcpudpclientps1.html' title='Check-TCPUDPClient.ps1'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-8876034736017512072</id><published>2010-07-31T00:55:00.000-07:00</published><updated>2010-08-13T17:45:15.579-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Threads'/><category scheme='http://www.blogger.com/atom/ns#' term='Modules'/><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><category scheme='http://www.blogger.com/atom/ns#' term='Process'/><title type='text'>Looking at Process, Threads, Modules with Powershell 2.0</title><content type='html'>I have published&amp;nbsp;"&lt;a href="http://rmfdevelopment.com/WhitePapers/LookingatProcessesThreadsModules.pdf"&gt;Looking at Processes, Modules, and Threads with Powershell 2.0 Part I&lt;/a&gt;". &amp;nbsp;The paper concerns itself with comparing Processes, Modules, and Threads and offers some discussion for comparing their changes over time. See also:&lt;br /&gt;&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/diff_PMT.ps1"&gt;http://www.rmfdevelopment.com/PowerShell_Scripts/diff_PMT.ps1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://rmfdevelopment.com/PowerShell_Scripts/diff_PMT_adv.ps1"&gt;http://rmfdevelopment.com/PowerShell_Scripts/diff_PMT_adv.ps1&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-8876034736017512072?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/8876034736017512072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/07/looking-at-process-threads-modules-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8876034736017512072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8876034736017512072'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/07/looking-at-process-threads-modules-with.html' title='Looking at Process, Threads, Modules with Powershell 2.0'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-8996416581248027477</id><published>2010-06-19T18:43:00.000-07:00</published><updated>2010-06-22T13:51:44.470-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Argus'/><title type='text'>Argus!!!</title><content type='html'>I have been reading &lt;a href="http://www.amazon.com/Real-Digital-Forensics-Computer-Security/dp/0321240693/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1276987968&amp;amp;sr=8-1"&gt;Real Digital Forensics&lt;/a&gt; and came across the recommended use of &lt;a href="http://www.qosient.com/argus/"&gt;Argus&lt;/a&gt; ("Audit Record Generation and Utilization System"). Argus is fast, wide and deep network analysis of pcap files. &amp;nbsp;It took me some time to compile and start to make sense of it, although there is a &lt;a href="http://nsmwiki.org/Argus"&gt;relevant and clever wiki page&lt;/a&gt; and a good collection of &lt;a href="http://www.qosient.com/argus/publications.shtml"&gt;recent articles&lt;/a&gt; explaining research, university and real world use. My discussion below concerns Argus auditing functionality.&lt;br /&gt;&lt;br /&gt;Argus dumps your pcap file into a compressed argus formatted file which carries every piece of session information an inquisitive NSM forensic could possibly want from a network trace including time-slices, TCP options, anonymization, geolocation, and graphing . Here are some basic examples I walked myself through. The first step is to write the pcap file to an argus file using 'argus'.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;/usr/local/sbin/argus -d -r 08Mar1142PST2010.in.1268074842 -w  08Mar1142PST2010.in.1268074842.argus&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Next I use 'ra' (read argus) &amp;nbsp;to read the packet data. &amp;nbsp;You can specify fields and bpf style filters. Here I specify (append) a filter ('ip proto 6')&lt;i&gt;&amp;nbsp;&lt;/i&gt;for only TCP packets &amp;nbsp;(e.g grep TCP /etc/protocols):&lt;br /&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;ra -n  -r 08Mar1142PST2010.in.1268074842.argus - ip proto 6 | less&lt;/i&gt;&lt;br /&gt;19:08:09.660222  e s       tcp     207.44.254.106.56813     -&amp;gt;       192.168.0.12.3246          3        186   REQ&lt;br /&gt;19:12:01.707471  e         tcp    204.236.155.168.12200     -&amp;gt;       192.168.0.12.3246          1         60   REQ&lt;br /&gt;19:32:55.259094  e         tcp    204.236.155.168.12200     -&amp;gt;       192.168.0.12.3246          1         60   REQ&lt;br /&gt;19:33:44.995964  e         tcp     221.192.199.35.12200     -&amp;gt;       192.168.0.12.8000          1         60   REQ&lt;br /&gt;19:34:36.506022  e         tcp     221.192.199.35.12200     -&amp;gt;       192.168.0.12.80            1         60   REQ&lt;br /&gt;19:53:52.914418  e         tcp    204.236.155.168.12200     -&amp;gt;       192.168.0.12.3246          1         60   REQ&lt;br /&gt;&lt;br /&gt;Here I specify source address, destination port and connection state fields with the '-s' option and sort the result by source address and destination port before using 'uniq -c' to rank those fields.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;ra -n -s saddr dport state  -r 08Mar1142PST2010.in.1268074842.argus - ip proto 6 | sort -k1,2 -nr |  uniq -c  | sort -nr | less&lt;/i&gt;&lt;br /&gt;149      221.195.73.86 8000     REQ&lt;br /&gt;100       192.168.0.12 80       ACC&lt;br /&gt;81      222.45.112.59 2479     REQ&lt;br /&gt;80      222.45.112.59 8085     REQ&lt;br /&gt;80      222.45.112.59 3246     REQ&lt;br /&gt;76    204.236.155.168 3246     REQ&lt;br /&gt;&lt;br /&gt;I am using 'rasort' to something similar here but appending grep to filter only those source addresses with a connected state.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;i&gt;rasort -n -s saddr dport state -r 08Mar1142PST2010.in.1268074842.argus - ip proto 6 | sort -k1 -nr | uniq -c | sort -nr | grep CON | less&lt;/i&gt;&lt;br /&gt;14       74.125.19.19 19412    CON&lt;br /&gt;14       74.125.19.17 20073    CON&lt;br /&gt;13      85.13.200.108 19216    CON&lt;br /&gt;13      85.13.200.108 19024    CON&lt;br /&gt;13       74.125.19.83 19145    CON&lt;br /&gt;13       74.125.19.83 18961    CON&lt;br /&gt;&lt;br /&gt;I am not quite clear when to use 'rasort'&amp;nbsp; versus 'ra' with sort and uniq appended. &amp;nbsp;There is also 'ratop' . May take some time to sort out the best scripts for top talkers. Like 'ra', I can tell 'rasort' to include specific field (-s switch) and then specify &amp;nbsp;the field(s) to sort by (-m &amp;nbsp;switch). I am still using 'uniq -c | sort -r' .&lt;br /&gt;&lt;br /&gt;&lt;i&gt;rasort -s saddr dport proto bytes stat -m dport saddr &amp;nbsp;-r &lt;/i&gt;&lt;i&gt;08Mar1142PST2010.in.1268074842.argus | grep -v -f file | uniq -c | sort -r | less&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt; &lt;/i&gt;149      221.195.73.86 8000      tcp         60   REQ&lt;br /&gt;81      222.45.112.59 2479      tcp         60   REQ&lt;br /&gt;80      222.45.112.59 8085      tcp         60   REQ&lt;br /&gt;80      222.45.112.59 3246      tcp         60   REQ&lt;br /&gt;76    204.236.155.168 3246      tcp         60   REQ&lt;br /&gt;76      222.45.112.59 9415      tcp         60   REQ&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So here I apply a bpf filter for &lt;i&gt;dst port 22&lt;/i&gt; and the '-z' to see TCPstate changes :&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;rasort -nn -s saddr dport proto bytes state -m dport saddr -z  -r 08Mar1142PST2010.in.1268074842.argus  - dst port 22 | uniq -c | sort -nr&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;3    125.141.195.190 22          6         62     s&lt;br /&gt;3    114.202.247.235 22          6         62     s&lt;br /&gt;3     58.217.255.103 22          6         62     s&lt;br /&gt;3      97.163.189.33 22          6         62     s&lt;br /&gt;2     94.158.184.183 22          6         62     s&lt;br /&gt;2     61.151.246.140 22          6         62     s&lt;br /&gt;&amp;nbsp; &lt;br /&gt;Argus, baby!! Fast, wide and deep!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-8996416581248027477?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/8996416581248027477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/06/argus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8996416581248027477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8996416581248027477'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/06/argus.html' title='Argus!!!'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-426239039721824236</id><published>2010-06-14T17:10:00.000-07:00</published><updated>2011-03-11T15:56:02.272-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='*NIX find'/><title type='text'>the 'find' command for security...Part I</title><content type='html'>&lt;span class="Apple-style-span"&gt;&lt;span style="font-size: small;"&gt;These are some meditations on using the *NIX 'find' command for security...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;T&lt;/span&gt;&lt;/span&gt;hese are very quick ways of find the 'last access' on every file. 'Stat -x' is for OpenBSD. The grep 'file' contains:&lt;br /&gt;File:&lt;br /&gt;Access:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;for i in `find /`; do echo $i `stat -x $i | grep "Access"`;done&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;find &amp;nbsp;/ | xargs stat -x | grep -f file | tr -d "[\042]"&lt;/b&gt;&lt;/i&gt;&lt;i&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;On Linux or Cygwin:&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;for i in `find /cygdrive/C/Security`; do echo $i `stat $i | grep "Access" | grep -v Gid`;done&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/&lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;cygdrive/C/Security Access: 2010-06-14 15:58:04.293000000 -0700&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;i&gt;&lt;i&gt; &lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/cygdrive/C/Security/.ImplementingSecurityDuringWebDesign.txt.swp Access: 2009-12-08 18:33:47.445000000 -080&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/cygdrive/C/Security/.PapersToAuthor.txt.swo Access: 2009-12-08 18:30:19.533000000 -0800&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/cygdrive/C/Security/.PapersToAuthor.txt.swp Access: 2009-12-07 12:23:46.045000000 -080&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;find /cygdrive/C/Security | xargs stat | grep -f file | grep -v Gid: | tr -d "[\042]"&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/span&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/span&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/div&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;File: `/cygdrive/C/Security/004.log'&lt;/span&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;Access: 2010-05-17 11:57:27.217000000 -0700&lt;/span&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt; &lt;span class="Apple-style-span" style="font-style: normal;"&gt;File: `/cygdrive/C/Security/05.13.10.log'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;Access: 2010-05-13 11:47:53.292000000 -0700&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;File: `/cygdrive/C/Security/05.14.10.log'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;Access: 2010-05-14 09:27:55.329000000 -0700&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important; font-size: small; font-style: normal;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;....&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="display: inline !important; font-size: small; font-style: normal;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;div style="display: inline !important; font-size: small; font-style: normal;"&gt;&lt;/div&gt;&lt;/i&gt;&lt;br /&gt;Now, I am looking at ways to use the find command per user. The purpose of this experiment is to understand why I get such different results for commands that would &lt;i&gt;seemingly&lt;/i&gt; return only more detail for the same result...&lt;/i&gt;&lt;br /&gt;&lt;i&gt;f&lt;b&gt;ind / -user rferrisx&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;find / -exec ls -l {} \; | awk '$3=="rferrisx" {print $3" "$9}' &lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;find / -user rferrisx -exec ls -lhuS {} \; | awk '{print $3" "$5" "$9}'&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;bash-4.0# find / -user rferrisx&lt;/i&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/home/rferrisx&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/home/rferrisx/.ssh&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/home/rferrisx/.ssh/authorized_keys&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/home/rferrisx/.Xdefaults&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/home/rferrisx/.cshrc&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/home/rferrisx/.login&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/home/rferrisx/.mailrc&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/home/rferrisx/.profile&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/home/rferrisx/.Xauthority&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/dev/ttyp0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;bash-4.0# find / -exec ls -l {} \; | awk '$3=="rferrisx" {print $3" "$9}'&lt;/i&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx rferrisx&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx .Xauthority&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx .Xdefaults&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx .cshrc&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx .login&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx .mailrc&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx .profile&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx .ssh&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx authorized_keys&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx /home/rferrisx/.ssh/authorized_keys&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;....&lt;/span&gt;&lt;br /&gt;&lt;i&gt; &lt;/i&gt;&lt;br /&gt;&lt;i&gt;bash-4.0# find / -user rferrisx -exec ls -lhuS {} \; | awk '{print $3" "$5" "$9}'&lt;/i&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;root 28.6M 08Mar1142PST2010.in.1268074842&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;root 18.2M 08Mar1137PST2010.out.1268074837&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;root 2.7M 08Mar1142PST2010.in.log&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;root 1.6M 08Mar1142PST2010.in.p0f&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;root 258K 08Mar1137PST2010.out.log&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;root 154K 08Mar1137PST2010.out.p0f&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx 773B .cshrc&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx 512B .ssh&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx 398B .login&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rferrisx 218B .profil&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;e&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-426239039721824236?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/426239039721824236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/06/find-command-for-securitypart-i.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/426239039721824236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/426239039721824236'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/06/find-command-for-securitypart-i.html' title='the &apos;find&apos; command for security...Part I'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-3628820227544264447</id><published>2010-06-02T11:24:00.000-07:00</published><updated>2010-06-14T17:57:06.293-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows times-stamping'/><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><category scheme='http://www.blogger.com/atom/ns#' term='rtime.cmd'/><title type='text'>time stamping windows directory and file names</title><content type='html'>This is something I have&lt;a href="http://horizontal-logic.blogspot.com/2008/05/okay-so-lets-try-to-start-rewriting.html"&gt; blogged about before&lt;/a&gt;, but I thought it worth posting again. &amp;nbsp;Special characters need to be eliminated to create a time stamp that can be used as a Windows file name. The `&lt;a href="http://thinking-about-network-security.blogspot.com/search?q=date+%2B%22"&gt;date&lt;/a&gt;` program in Unix has a number of very useful options for this. &amp;nbsp;Windows cmd shell is more limited. This is what I use:&lt;br /&gt;&lt;br /&gt;::&lt;i&gt; rtime.cmd&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;@echo off&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;set realdate=%date:/=.%&lt;/i&gt;&lt;br /&gt;&lt;i&gt;set realdate=%realdate:* =%&lt;/i&gt;&lt;br /&gt;&lt;i&gt;set realtime=%time::=.%&lt;/i&gt;&lt;br /&gt;&lt;i&gt;set realtime=%realtime:* =%&lt;/i&gt;&lt;br /&gt;&lt;i&gt;set timestamp=%realdate%.%realtime%&lt;/i&gt;&lt;br /&gt;&lt;i&gt;echo %timestamp%&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;This command script uses 'variable substitution' from the set command to remove special characters&amp;nbsp;(e.g. : &amp;nbsp;/ )&amp;nbsp;unacceptable&amp;nbsp;as Windows file or directory names . This line:&lt;br /&gt;&lt;i&gt;set timestamp=%realdate%.%realtime%&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;can be changed as needed for more CSV compatible logging:&lt;br /&gt;&lt;i&gt;set timestamp="%realdate%","%realtime%"&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;Once cached, it runs pretty fast and is suitable for lightweight logging:&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;$ time /cygdrive/C/Security/rtime.cmd&lt;br /&gt;06.02.2010.11.04.05.99&lt;br /&gt;&lt;br /&gt;real &amp;nbsp; &amp;nbsp;0m0.202s&lt;br /&gt;user &amp;nbsp; &amp;nbsp;0m0.015s&lt;br /&gt;sys &amp;nbsp; &amp;nbsp; 0m0.031s&lt;br /&gt;&lt;br /&gt;$ time /cygdrive/C/Security/rtime.cmd&lt;br /&gt;06.02.2010.11.04.12.65&lt;br /&gt;&lt;br /&gt;real &amp;nbsp; &amp;nbsp;0m0.062s&lt;br /&gt;user &amp;nbsp; &amp;nbsp;0m0.000s&lt;br /&gt;sys &amp;nbsp; &amp;nbsp; 0m0.015s&lt;br /&gt;&lt;br /&gt;$ time /cygdrive/C/Security/rtime.cmd&lt;br /&gt;06.02.2010.11.04.14.68&lt;br /&gt;&lt;br /&gt;real &amp;nbsp; &amp;nbsp;0m0.062s&lt;br /&gt;user &amp;nbsp; &amp;nbsp;0m0.000s&lt;br /&gt;sys &amp;nbsp; &amp;nbsp; 0m0.015s&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-3628820227544264447?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/3628820227544264447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/06/time-stamping-windows-directory-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3628820227544264447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3628820227544264447'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/06/time-stamping-windows-directory-and.html' title='time stamping windows directory and file names'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-2702311352956041184</id><published>2010-05-25T19:50:00.000-07:00</published><updated>2010-05-26T08:38:18.941-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lsof tcpdump'/><title type='text'>piping tcpdump output to lsof</title><content type='html'>This simple Bash script will output the &lt;i&gt;lsof &lt;/i&gt;end of any foreign network connection:&lt;br /&gt;[Set to the interface of your choice]&lt;br /&gt;&lt;i&gt;while [ 1 ]&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;do&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for i in `tcpdump -i rl0 -c 1 -l dst $(hostname) | awk '{print $2}' | awk -F"." '{print $1"."$2"."$3"."$4}'`&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do lsof -i@$i&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;done&lt;/i&gt;&lt;br /&gt;&lt;i&gt;done&lt;/i&gt;&lt;br /&gt;with time/date stamp added and headers removed:&lt;br /&gt;&lt;i&gt;while [ 1 ]&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;do&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for i in `tcpdump -i rl0 -c 1 -l dst $(hostname) | awk '{print $2}' | awk -F"." '{print $1"."$2"."$3"."$4}'`&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do echo `date -u` `lsof -i@$i | grep -v PID`&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;done&lt;/i&gt;&lt;br /&gt;&lt;i&gt;done&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Run like this:&lt;br /&gt;&lt;i&gt;./tcp_lsof.sh &amp;gt;&amp;gt; tcp.lsof.log &amp;amp;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;the script produces output like this:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;COMMAND &amp;nbsp; PID &amp;nbsp; &amp;nbsp; USER &amp;nbsp; FD &amp;nbsp; TYPE &amp;nbsp; &amp;nbsp; DEVICE SIZE/OFF NODE NAME&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;sshd &amp;nbsp; &amp;nbsp;18392 rferrisx &amp;nbsp; &amp;nbsp;5u &amp;nbsp;IPv4 0xd699ac80 &amp;nbsp; &amp;nbsp; &amp;nbsp;0t0 &amp;nbsp;TCP rmflaptop.rmfdevelopment.com:ssh-&amp;gt;192.168.0.3:13974 (ESTABLISHED)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;sshd &amp;nbsp; &amp;nbsp;29850 &amp;nbsp; &amp;nbsp; root &amp;nbsp; &amp;nbsp;5u &amp;nbsp;IPv4 0xd699ac80 &amp;nbsp; &amp;nbsp; &amp;nbsp;0t0 &amp;nbsp;TCP rmflaptop.rmfdevelopment.com:ssh-&amp;gt;192.168.0.3:13974 (ESTABLISHED)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;or&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Wed May 26 15:22:06 UTC 2010 sshd 9448 root 5u IPv4 0xd699ac80 0t0 TCP rmflaptop.rmfdevelopment.com:ssh-&amp;gt;192.168.0.3:15729 (ESTABLISHED)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;sshd 29734 rferrisx 5u IPv4 0xd699ac80&amp;nbsp;0t0 TCP rmflaptop.rmfdevelopment.com:ssh-&amp;gt;192.168.0.3:15729 (ESTABLISHED)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; Wed May 26 15:22:07 UTC 2010 sshd 9448 root 5u IPv4 0xd699ac80 0t0 TCP rmflaptop.rmfdevelopment.com:ssh-&amp;gt;192.168.0.3:15729 (ESTABLISHED)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;sshd 29734 rferrisx 5u IPv4 0xd699ac80&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-2702311352956041184?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/2702311352956041184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/05/piping-tcpdump-output-to-lsof.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2702311352956041184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2702311352956041184'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/05/piping-tcpdump-output-to-lsof.html' title='piping tcpdump output to lsof'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-81571190542650119</id><published>2010-05-19T23:06:00.000-07:00</published><updated>2010-05-19T23:06:10.870-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Test Harness;Vista;work needed'/><title type='text'>A prototype test harness...but needs lots of work</title><content type='html'>&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;I have spent too much time here in the last few days working on a test harness for live network files in Vista. As a prototype, &lt;/span&gt;&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/nhf_sec.cmd"&gt;&lt;span style="font-size: small;"&gt;what I have written may be useful.&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small;"&gt; However, numerous problems were uncovered. &amp;nbsp;The idea was this: At any moment they are a discoverable set of files that are being accessed by the network. In theory, you should be able to list those files and then query them for their integrity. &lt;/span&gt;&lt;span style="font-size: small;"&gt;The heart of this is something like: &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;em&gt;icacls %dir_file% &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;   &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;(&lt;/em&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size: small;"&gt;if /I [%filetype% EQU [regular sfc /verifyfile=%dir_file% )     &amp;amp;(&lt;br /&gt;if /I [%filetype% EQU [regular accesschk -qv %dir_file% )        &amp;amp;(&lt;br /&gt;if /I [%filetype% EQU [regular sigcheck -q %dir_file% )&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Definitely some useful information&lt;/span&gt;&lt;em&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;span style="font-size: small;"&gt;is returned. But the &lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/nhf_sec.cmd"&gt;project &lt;/a&gt;will have to be rewritten in a faster language with better string support. Interesting to see what information it did return. Like the file -&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: small;"&gt;C:\Windows\System32\nsi.dll - below.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;Running icacls, sfc, accesschk, sigcheck for FileType,FileID,Path: regular 1220: "C:\Windows\System32\nsi.dll      "&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;filetype=regular&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;C:\Windows\System32\nsi.dll       NT SERVICE\TrustedInstaller:(F)&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;                                  BUILTIN\Administrators:(RX)&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;                                  NT AUTHORITY\SYSTEM:(RX)&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;                                  BUILTIN\Users:(RX)&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;Successfully processed 1 files; Failed processing 0 files&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;Windows Resource Protection could not perform the requested operation.&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;C:\Windows\System32\nsi.dll&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;  Medium Mandatory Level (Default) [No-Write-Up]&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;  RW NT SERVICE\TrustedInstaller&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_ALL_ACCESS&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;  R  BUILTIN\Administrators&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_EXECUTE&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_LIST_DIRECTORY&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_READ_ATTRIBUTES&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_READ_DATA&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_READ_EA&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_TRAVERSE&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        SYNCHRONIZE&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        READ_CONTROL&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;  R  NT AUTHORITY\SYSTEM&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_EXECUTE&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_LIST_DIRECTORY&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_READ_ATTRIBUTES&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_READ_DATA&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_READ_EA&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_TRAVERSE&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        SYNCHRONIZE&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        READ_CONTROL&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;  R  BUILTIN\Users&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_EXECUTE&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_LIST_DIRECTORY&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_READ_ATTRIBUTES&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_READ_DATA&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_READ_EA&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        FILE_TRAVERSE&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        SYNCHRONIZE&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        READ_CONTROL&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;c:\windows\system32\nsi.dll:&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        Verified:       Signed&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        Signing date:   8:08 AM 1/19/2008&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        Strong Name:    Unsigned&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        Publisher:      Microsoft Corporation&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        Description:    NSI User-mode interface DLL&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        Product:        Microsoft« Windows« Operating System&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        Version:        6.0.6001.18000&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;        File version:   6.0.6001.18000 (longhorn_rtm.080118-1840)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-81571190542650119?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/81571190542650119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/05/prototype-test-harnessbut-needs-lots-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/81571190542650119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/81571190542650119'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/05/prototype-test-harnessbut-needs-lots-of.html' title='A prototype test harness...but needs lots of work'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-5221915321001225845</id><published>2010-05-17T20:49:00.000-07:00</published><updated>2010-05-17T20:49:04.621-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Automobile hacking...'/><title type='text'>Car hacking....</title><content type='html'>"Indeed, we have demonstrated the ability to systematically control a wide array of components including engine, brakes, heating and cooling, lights, instrument panel, radio, locks, and so on. Combining these we have been able to mount attacks that represent potentially significant threats to personal safety. For example, we are able to forcibly and completely disengage the brakes while driving, making it difficult for the driver to stop. Conversely, we are able to forcibly activate the brakes, lurching the driver forward and causing the car to stop suddenly."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.autosec.org/pubs/cars-oakland2010.pdf"&gt;Great Reading! Great Research!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;How would you like to pwn your first car?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-5221915321001225845?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/5221915321001225845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/05/car-hacking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5221915321001225845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5221915321001225845'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/05/car-hacking.html' title='Car hacking....'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-9067277387092422987</id><published>2010-05-07T12:44:00.000-07:00</published><updated>2010-05-10T11:53:34.947-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tasklist'/><category scheme='http://www.blogger.com/atom/ns#' term='accesschk'/><category scheme='http://www.blogger.com/atom/ns#' term='lsof for Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='openfiles'/><category scheme='http://www.blogger.com/atom/ns#' term='netstat'/><title type='text'>lsof for Windows subsitute</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;5/10/2010 update to this post (see below)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;I've created a &lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/"&gt;couple of Vista cmd&lt;/a&gt; files that pump netstat output to tasklist to help substitute for the missing`lsof  -Ts` in Linux (see below). The TCP/TCPv6 output logs the time, IP address (foreign endpoint), application information. The (stateless) UDP/UDPv6 output just logs time and application information. &amp;nbsp;(See output below). The value of logging network endpoints and their process information is incalculable in security. Mark Russinovich's &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx"&gt;procmon&lt;/a&gt; (when run with the network filter) does this quite thoroughly. &amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=983b941d-06cb-4658-b7f6-3088333d062f&amp;amp;displaylang=en"&gt;Microsoft's Netmon 3.3&lt;/a&gt; correlates endpoint data packets to most applications.  However, I was interesting in developing something cmd line, perhaps not so heavy, using all native Vista commands. The crux of the scripts are:&lt;br /&gt;&lt;span style="font-size: small;"&gt; &lt;br /&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;:: pipe appropriate netstat output to tasklist&lt;br /&gt;for /f "tokens=1-5" %%a in ('@netstat -%netstat_option% -p %connection_type% ^| findstr /V Active ^| findstr /V Proto') do set EP=%%c&amp;amp; set PID=%%e&amp;amp; call :loop&lt;br /&gt;.. &lt;br /&gt;::log Endpoint and network process PID&lt;br /&gt;@echo "%timestamp%","%EP%", | findstr /V "ECHO" &lt;br /&gt;@tasklist /FO CSV /V /FI "PID eq %PID%" /NH&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size: small;"&gt; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;With an automated check of network %PID% in place, you can add options to check/log the open files of each network application with the (very slow) 'openfiles' command:&lt;br /&gt;[The '&lt;i&gt;openfiles&lt;/i&gt;' cmd works once global flags are enabled.]&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;for /f "tokens=1-5" %a in ('openfiles /query /FO TABLE /NH /V') do @if %c==%PID% echo %e &amp;gt;&amp;gt; temp&lt;br /&gt;...&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size: x-small;"&gt;C:\Users\Admin\AppData\Local\Google\Chrome\Application\4.1.249.1064&lt;/span&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size: small;"&gt;Adding Mark Russinovich's &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb664922.aspx"&gt;accesschk&lt;/a&gt; will show the security permissions on those files:&lt;/span&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;for /f %i in ('more temp') do @accesschk -qv %i | more&lt;br /&gt;....&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size: x-small;"&gt;C:\Users\Admin\AppData\Local\Google\Chrome\Application\4.1.249.1064\avcodec-52.dll&lt;br /&gt;Medium Mandatory Level (Default) [No-Write-Up]&lt;br /&gt;RW RMFVista\Admin&lt;br /&gt;FILE_ALL_ACCESS&lt;br /&gt;RW NT AUTHORITY\SYSTEM&lt;br /&gt;FILE_ALL_ACCESS&lt;br /&gt;RW BUILTIN\Administrators&lt;br /&gt;FILE_ALL_ACCESS&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;....&lt;br /&gt;The cmd files can be found here:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/ano_TCP.cmd"&gt;http://www.rmfdevelopment.com/PowerShell_Scripts/ano_TCP.cmd&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/ano_UDP.cmd"&gt;http://www.rmfdevelopment.com/PowerShell_Scripts/ano_UDP.cmd&lt;/a&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;5/10/2010 update:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;An update which takes any of four arguments (TCP,TCPv6,UDP, UDPv6) and logs to a CSV file output as below can be found at&amp;nbsp;&lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/ano_all.cmd"&gt;http://www.rmfdevelopment.com/PowerShell_Scripts/ano_all.cmd&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;ano_all.cmd output for TCP&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;"05.10.2010_11.35.21.34","LISTENING","0.0.0.0:1029","0.0.0.0:0","services.exe","740","Services","0","9,532"&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-size: small;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;"05.10.2010_11.35.21.82","LISTENING","0.0.0.0:9000","0.0.0.0:0","System","4","Services","0","21,204"&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;"05.10.2010_11.35.22.34","LISTENING","192.168.0.3:139","0.0.0.0:0","System","4","Services","0","21,204"&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;"05.10.2010_11.35.22.84","CLOSE_WAIT","192.168.0.3:1059","174.133.89.198:80","pctsSvc.exe","856","Services","0","195,660"&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;"05.10.2010_11.35.23.33","ESTABLISHED","192.168.0.3:1072","85.13.200.108:21","ftp.exe","2568","Console","1","6,388"&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;"05.10.2010_11.35.23.82","ESTABLISHED","192.168.0.3:1080","74.125.155.139:80","chrome.exe","4404","Console","1","62,576"&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;"05.10.2010_11.35.24.31","ESTABLISHED","192.168.0.3:1082","72.14.213.191:80","chrome.exe","4404","Console","1","62,576"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;ano_TCP.cmd output for TCP&lt;/b&gt;&lt;br /&gt;(note: It would be trivial to add the connection state as well. I did in &lt;a href="http://www.rmfdevelopment.com/PowerShell_Scripts/ano_all.cmd"&gt;ano_all.cmd&lt;/a&gt; as remarked above -RMF)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;"05.06.2010_21.30.31.74","174.133.89.198:80",&lt;br /&gt;"pctsSvc.exe","3368","Services","0","24,588 K","Unknown","NT AUTHORITY\SYSTEM","0:15:51","N/A"&lt;br /&gt;"05.06.2010_21.30.32.20","72.14.213.99:80",&lt;br /&gt;"Picasa3.exe","4248","Console","1","128,588 K","Running","RMFVista\Admin","0:02:16","Picasa 3"&lt;br /&gt;"05.06.2010_21.30.32.69","72.14.213.101:80",&lt;br /&gt;"chrome.exe","4232","Console","1","79,432 K","Running","RMFVista\Admin","0:01:49","Network Security - Google Chrome"&lt;br /&gt;"05.06.2010_21.30.33.15","74.125.127.191:80",&lt;br /&gt;"chrome.exe","4232","Console","1","79,432 K","Running","RMFVista\Admin","0:01:49","Network Security - Google Chrome"&lt;br /&gt;"05.06.2010_21.30.33.60","74.125.127.105:443",&lt;br /&gt;"chrome.exe","4232","Console","1","79,432 K","Running","RMFVista\Admin","0:01:49","Network Security - Google Chrome"&lt;br /&gt;"05.06.2010_21.30.34.12","74.125.127.139:80",&lt;br /&gt;"chrome.exe","4232","Console","1","79,432 K","Running","RMFVista\Admin","0:01:49","Network Security - Google Chrome"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;b&gt;ano_UDP.cmd output for UDP&lt;/b&gt; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;(note: No foreign IP addresses ever shows up in Microsoft's netstat for protocol UDP...as far as I can tell.)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;"05.06.2010_21.29.42.51","*:*",&lt;br /&gt;"nc.exe","4120","Console","1","572 K","Unknown","RMFVista\Admin","0:00:00","N/A"&lt;br /&gt;"05.06.2010_21.29.44.07","*:*",&lt;br /&gt;"svchost.exe","1196","Services","0","3,400 K","Unknown","NT AUTHORITY\LOCAL SERVICE","0:00:01","N/A"&lt;br /&gt;"05.06.2010_21.29.44.50","*:*",&lt;br /&gt;"svchost.exe","636","Services","0","52,188 K","Unknown","NT AUTHORITY\SYSTEM","0:07:36","N/A"&lt;br /&gt;"05.06.2010_21.29.44.99","*:*",&lt;br /&gt;"svchost.exe","636","Services","0","52,188 K","Unknown","NT AUTHORITY\SYSTEM","0:07:36","N/A"&lt;br /&gt;"05.06.2010_21.29.45.42","*:*",&lt;br /&gt;"svchost.exe","1288","Services","0","17,136 K","Unknown","NT AUTHORITY\NETWORK SERVICE","0:00:03","N/A"&lt;br /&gt;"05.06.2010_21.29.45.87","*:*",&lt;br /&gt;"VCSW.exe","5644","Services","0","3,540 K","Unknown","NT AUTHORITY\SYSTEM","0:00:04","N/A"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;lsof (Linux 4.78) sample output&lt;/b&gt; &lt;br /&gt;&lt;i&gt;lsof -Ts | grep -i Firefox | grep IPv4&lt;/i&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;firefox 5756 root 5lu IPv4 22403 TCP 192.168.0.5:40814-&amp;gt;nuq04s01-in-f113.le100.net:www (ESTABLISHED)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-9067277387092422987?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/9067277387092422987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/05/lsof-for-windows-subsitute.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/9067277387092422987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/9067277387092422987'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/05/lsof-for-windows-subsitute.html' title='lsof for Windows subsitute'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-5550378248255757200</id><published>2010-04-25T21:27:00.000-07:00</published><updated>2010-04-25T21:27:58.395-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LinuxFest Northwest'/><title type='text'>Day 2 at LinuxFest</title><content type='html'>Another great day at Linux Fest! I attended excellent presentations on Digital Forensics by Hal Pomeranz and Brian Pate (2 hours), both of which were very useful and felt very "hands on". &amp;nbsp;I can't say enough good things about LinuxFest. The organizers are doing Whatcom County business development a tremendous favor. &amp;nbsp;In reality, I think the Chamber of Commerce and the City of Bellingham should be helping to fund this volunteer supported event every quarter. &amp;nbsp;Talent comes from all over the Northwest: Seattle, Portland, &amp;nbsp;Tri-Cities, Olympia, Bothell, Mt. Vernon, you name it. &amp;nbsp;I made contacts, met vendors, passed out business cards and had great discussions. Learned a lot as well.&lt;br /&gt;&lt;br /&gt;Thank you LinuxFest NorthWest!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-5550378248255757200?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/5550378248255757200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/day-2-at-linuxfest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5550378248255757200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5550378248255757200'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/day-2-at-linuxfest.html' title='Day 2 at LinuxFest'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-4948175575879539843</id><published>2010-04-24T23:14:00.000-07:00</published><updated>2010-04-24T23:14:48.887-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LinuxFest Northwest'/><title type='text'>Brilliant Day 1 at LinuxFest NorthWest</title><content type='html'>I had a brilliant first day at LinuxFest NorthWest. I sat through five presentations on privacy and computer security in Haskell 115 at Bellingham Technical College. Brian Alseth of ACLU of Washington delivered the usual terrifying description of how data mining is&amp;nbsp; destroying privacy.&amp;nbsp; John Lock talked about Web Commerce Security. Gary Smith of PNL gave and excellent talk on Linux Server Hardening. Hal Pomeranz finished up the day with two hours on SE Linux. Wow! What a beast SE Linux is...&lt;br /&gt;&lt;br /&gt;LinuxFest...a great thing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-4948175575879539843?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/4948175575879539843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/brilliant-day-1-at-linuxfest-northwest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/4948175575879539843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/4948175575879539843'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/brilliant-day-1-at-linuxfest-northwest.html' title='Brilliant Day 1 at LinuxFest NorthWest'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-9018537943836858639</id><published>2010-04-21T12:17:00.000-07:00</published><updated>2010-04-22T09:06:22.503-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Joanna Rutkowska;metaphysics of network security'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;universal privelege&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;Security by Isolation&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='ITL'/><title type='text'>Joanna Rutkowska and ITL and "Security by Isolation"</title><content type='html'>A day spent reading the &lt;a href="http://theinvisiblethings.blogspot.com/"&gt;research of Joanna Rutkowska&lt;/a&gt; and her &lt;a href="http://invisiblethingslab.com/itl/Welcome.html"&gt;Invisible Things Lab&lt;/a&gt; is a day spent improving your IQ.&amp;nbsp;Ms. Rutkowska is famous for describing vulnerabilities in&amp;nbsp;SMM,&amp;nbsp;BIOS, and VM hypervisors. &amp;nbsp;In short, rather than attack the Operating System (although she has done some of that as well), she and her team attack the layer between the Operating System and the hardware; specifically &lt;b&gt;rings -1, -2, -3&lt;/b&gt; to use her terminology. &amp;nbsp;Her work has led her to some drastic conclusions about hardware and digital security. &amp;nbsp;In Joanna's universe, it is not that "game is over" but that the digital industry has never really fielded a team that could win yet. To do something about this, she and her team have developed a &amp;nbsp;customized version of Linux (&lt;a href="http://qubes-os.org/"&gt;Qubes-OS&lt;/a&gt;); partitioning off OS components into VMs to prevent the spread of malware through the access of "&lt;b&gt;universal&amp;nbsp;privilege&lt;/b&gt;" (my own term).&lt;br /&gt;&lt;br /&gt;What do I mean by "&lt;b&gt;universal privilege&lt;/b&gt;"? [Beware, the author's own untutored verbiage is to follow...]&amp;nbsp;Computers are strange but beautiful machines. &amp;nbsp;When the first computational devices were built, we wanted to send in questions and retrieve answers. After computer scientists achieved this breakthrough, they spent the next half century attempting to generate increasing profits by increasing the speed at which answers to their questions would be returned. And they did a damn fine job at this. The increase in computational speed has to count as the single greatest technical advancement of our species by this point in history. Watch any movie about the Hubble or the Mars Rover and ask yourself: How would that happen without digital data? We have designed our computational efforts as if we were children with thirsty minds and ravenous social needs; ready to exercise our "&lt;b&gt;universal privilege&lt;/b&gt;" to discuss/communicate/download whatever our minds and souls desire.&lt;br /&gt;&lt;br /&gt;Security is mainly the story of protection. Secrecy is mainly the story of compartmentalization. In contrast to the development of computational speed, we've done a poor job at protection and compartmentalization of computers and their networks. &amp;nbsp;In fact, we've been so concerned about the spread of information, we've done everything possible to unleash the flow of digital data across the world. &amp;nbsp;PCs and Servers are now everywhere, in every complex product, in every country. Our computer networks are now the most tangible and real-time evidence of our civilization. Computers still retain all of the "strange and beautiful" architecture designed upon the premise that we want very little between our computers and fast answers to our questions. &amp;nbsp;We are by nature social creatures with unbounded curiosity and potentially unbounded need for "end to end" trust. Unfortunately, the reality of unconstrained digital response has helped created powerful &amp;nbsp;offensive weaponry in the untrustworthy world we live in.&lt;br /&gt;&lt;br /&gt;So now back to &lt;b&gt;universal&amp;nbsp;privilege &lt;span class="Apple-style-span" style="font-weight: normal;"&gt;and &lt;/span&gt;&lt;a href="http://theinvisiblethings.blogspot.com/"&gt;Joanna Rutkowska&lt;/a&gt; and her team at &lt;a href="http://invisiblethingslab.com/itl/Welcome.html"&gt;Invisible Things Lab&lt;/a&gt;. &lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&amp;nbsp;Eschewing (in part) the drive for secure code and secure micro-kernels, Joanna and her team attempt to do the following:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #4c4c4c; font-family: &amp;quot;ArialMT&amp;quot;, Arial, sans-serif; font-size: 13px; font-weight: 400; line-height: 18px;"&gt;&lt;span class="style_1" style="color: #2e80cc; font-weight: 700; opacity: 1;"&gt;&lt;a href="http://www.blogger.com/goog_1890784664"&gt;"Qubes&lt;/a&gt;&lt;/span&gt;&lt;a href="http://www.blogger.com/goog_1890784664"&gt;&amp;nbsp;implements&amp;nbsp;&lt;/a&gt;&lt;span class="style_2" style="color: #ff6666; font-weight: 700; opacity: 1;"&gt;&lt;a href="http://www.blogger.com/goog_1890784664"&gt;Security by Isolation&lt;/a&gt;&lt;/span&gt;&lt;a href="http://www.blogger.com/goog_1890784664"&gt;&amp;nbsp;approach. To do this, Qubes utilizes virtualization technology, to be able to isolate various programs from each other, and even sandbox many system-level components, like networking or storage subsystem, so that their compromise don’t affect the integrity of the rest of the system.&lt;/a&gt;&lt;/span&gt;&lt;a href="http://qubes-os.org/Architecture.html"&gt;"&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;They achieve this "&lt;b&gt;security by isolation&lt;/b&gt;" by compartmentalizing their OS into&amp;nbsp;&lt;a href="http://qubes-os.org/files/doc/arch-spec-0.3.pdf"&gt;secure virtual machines&lt;/a&gt;. It is a &amp;nbsp;timely idea. As if to prove this, the &lt;a href="http://blogs.zdnet.com/security/?p=6087"&gt;NSF gave a $1.5 M dollar grant to an University of Illinois &lt;/a&gt;researcher nearly days after &lt;a href="http://invisiblethingslab.com/itl/Welcome.html"&gt;ITL&lt;/a&gt;'s announcement of Qubes to do something similar. "S&lt;b&gt;ecurity by isolation&lt;/b&gt;" is an ancient concept thoroughly deployed by computer and software architecture at all levels. There are numerous examples: CPUs break down access to the processor into "Rings" (0-3). &amp;nbsp;Operating Systems break down execution in kernel and userland and then compartmentalize execution further. Some kernels just boot the most basic OS components, (Most desktop OS kernels are monolithic). Software compartmentalizes (perhaps 'componentizes') itself into functions, system calls, objects, and libraries. Some software, like Java and C#, works hard at making code live in a secure 'sandbox'. Part of the developmental reason for object oriented programming (originally) was (marginally) security-based: 'encapsulation'. Networking software has followed the trend of security by compartmentalization from switch fabric to firewalls to NAC. Hosted services, in some very real sense, are a form of "&lt;b&gt;security by isolation&lt;/b&gt;".&lt;br /&gt;&lt;br /&gt;In reality, we continue to invent "&lt;b&gt;security by isolation&lt;/b&gt;" in kernels, software layers, networks, network components, firewalls, and virtual machines. As processor speed grows in an untrustworthy world, the desktop and network will always continue to need the most advanced compartmentalization to protect them from the expanding digitized world. To this end, our "&lt;b&gt;universal privilege&lt;/b&gt;" to keep asking questions of each other will always be haunted by the&amp;nbsp;necessity of &amp;nbsp;"&lt;b&gt;security by isolation".&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-9018537943836858639?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/9018537943836858639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/joanna-rutkowska-and-itl-and-security.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/9018537943836858639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/9018537943836858639'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/joanna-rutkowska-and-itl-and-security.html' title='Joanna Rutkowska and ITL and &quot;Security by Isolation&quot;'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-7467768698290928046</id><published>2010-04-18T09:29:00.000-07:00</published><updated>2010-04-18T09:39:52.415-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tcpslice'/><category scheme='http://www.blogger.com/atom/ns#' term='ipsumdump'/><title type='text'>tcpslice II</title><content type='html'>&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;More uses for tcpslice, ipsumdump, BASH 4.1 :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;[This gives you today's top source IP and source IP Port combination:&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;/usr/sbin/tcpslice `date +%Y"y"%m"m"%d"d"` $BASH_ARGV | ipsumdump --no-headers -sD -&lt;/i&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;./todays_dump.sh MarApr.snort.in.tcpd | sort -nr | uniq -c | sort -nr&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13 85.144.201.237 7959&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 95.179.99.147 5900&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 64.206.157.2 23&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 222.45.112.59 8085&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 109.187.8.70 5900&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 98.247.214.152 23 ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;This gives you today's top source IP and source IP location:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;/usr/sbin/tcpslice `date +%Y"y"%m"m"%d"d"` $BASH_ARGV |&lt;br /&gt;for i in `ipsumdump --no-headers -s -`&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do echo $i : $(printf "%s" `./geoip.sh $i | awk -F":" '{print $2}' | awk -F"," '{print $1","$2","$3}' ` )&amp;nbsp; &lt;br /&gt;done&lt;/i&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;./tgeodump.sh MarApr.snort.in.tcpd | sort -nr | uniq -c | sort -nr&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13 85.144.201.237 : NL,07,Amsterdam&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12 222.45.112.59 : CN,22,Beijing&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4 222.215.230.49 : CN,32,Chengdu&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 95.179.99.147 : RU,43,Lipetsk&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 64.206.157.2 : US,NH,Nashua&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 109.187.8.70 : IPAddressnotfound,,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 98.247.214.152 : US,WA,Bothell ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;where 'geoip.sh' is:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt; &lt;i&gt;geoiplookup -f /usr/local/share/GeoIP/GeoLiteCity.dat $1&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;I note that file names like this '08Mar1142PST2010.in.1268074842' don't process through tcpslice. &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-7467768698290928046?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/7467768698290928046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/more-uses-for-tcpslice-ipsumdump-bash-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/7467768698290928046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/7467768698290928046'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/more-uses-for-tcpslice-ipsumdump-bash-4.html' title='tcpslice II'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-1351329308438904703</id><published>2010-04-14T11:39:00.000-07:00</published><updated>2010-04-19T10:21:42.350-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tcpslice'/><category scheme='http://www.blogger.com/atom/ns#' term='ingress snort logs'/><category scheme='http://www.blogger.com/atom/ns#' term='ipsumdump'/><title type='text'>tcpslice</title><content type='html'>&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="ftp://ftp.ee.lbl.gov/tcpslice.tar.gz"&gt;&lt;span class="Apple-style-span"&gt;Tcpslice&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; is a useful tool from &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://ee.lbl.gov/"&gt;&lt;span class="Apple-style-span"&gt;LBL network group&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; that allows you to carve up a large pcap file format into time slices.&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;To look at the start and finish time stamps of the entire pcap file in various time formats:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;tcpslice -r Marchrferrisx.snort.in&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Marchrferrisx.snort.in  Mon Mar  8 11:08:09 2010        Mon Apr  5 09:09:37 2010&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;tcpslice -t Marchrferrisx.snort.in&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Marchrferrisx.snort.in  2010y03m08d11h08m09s660222u     2010y04m05d09h09m37s390876u&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;tcpslice -R Marchrferrisx.snort.in&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;Marchrferrisx.snort.in  1268075289.660222       1270483777.39087&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;6&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;To return data from a particular time slice to a file with BPF filters use syntax like this:&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;tcpslice 1257347146.060 1257347146.061 inputFile.tcpd | tcpdump -r - -w outputFile.tcpd 'host 192.168.1.175&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;'&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;(Check out &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://www.bothunter.net/live/"&gt;&lt;span class="Apple-style-span"&gt;bothunter logs&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; for more examples like this..)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;In this example, I want all the packets that are not IPv6 for one date:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;/usr/sbin/tcpslice 2010y04m05d Marchrferrisx.snort.in | /usr/sbin/tcpdump -r - 'not(ip6)' | less&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;reading from file -, link-type EN10MB (Ethernet)&lt;br /&gt;01:06:17.290514 IP 125.141.195.190.35460 &amp;gt; 192.168.0.12.ssh: S 1607742099:1607742099(0) win 65535 &lt;/span&gt;&lt;/span&gt;&lt;mss 1460,nop,nop,sackok=""&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;01:40:16.181816 IP c-98-247-214-152.hsd1.wa.comcast.net.catchpole &amp;gt; 192.168.0.12.telnet: SWE 498716114:498716114(0) win 5840&lt;br /&gt;01:40:19.172942 IP c-98-247-214-152.hsd1.wa.comcast.net.catchpole &amp;gt; 192.168.0.12.telnet: SWE 498716114:498716114(0) win 5840&lt;br /&gt;01:44:01.423708 IP hn.kd.ny.adsl.x11 &amp;gt; 192.168.0.12.ms-sql-s: S 833421312:833421312(0) win 16384&lt;br /&gt;03:37:06.073237 IP 75.125.252.76.http &amp;gt; 192.168.0.12.48532: S 1175613974:1175613974(0) ack 143375003 win 14420&lt;br /&gt;04:07:03.019711 IP 222.45.112.59.12200 &amp;gt; 192.168.0.12.ssm-els: S 363594672:363594672(0) win 8192 ...&lt;/span&gt;&lt;/span&gt;&lt;/mss&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Now I want all ms-sql-s destination packets from the ingress pcap that are not IPv6 for all of March:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;/usr/sbin/tcpslice 2010y04m01d 2010y04m31d Marchrferrisx.snort.in | /usr/sbin/tcpdump -r - -n 'dst port(1433)'&lt;br /&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;reading from file -, link-type EN10MB (Ethernet)&lt;br /&gt;18:33:42.614843 IP 125.46.78.100.x11 &amp;gt; 192.168.0.12.ms-sql-s: S 908984320:908984320(0) win 16384&lt;br /&gt;23:38:50.771853 IP 61.183.172.35.x11 &amp;gt; 192.168.0.12.ms-sql-s: S 47316992:47316992(0) win 16384&lt;br /&gt;03:35:18.351118 IP 121.12.125.7.x11 &amp;gt; 192.168.0.12.ms-sql-s: S 640548864:640548864(0) win 16384&lt;br /&gt;11:09:45.631103 IP 218.61.127.71.x11 &amp;gt; 192.168.0.12.ms-sql-s: S 1613627392:1613627392(0) win 16384&lt;br /&gt;00:47:21.207593 IP 218.90.163.66.x11 &amp;gt; 192.168.0.12.ms-sql-s: S 648937472:648937472(0) win 16384&lt;br /&gt;08:56:05.732622 IP 61.183.172.35.x11 &amp;gt; 192.168.0.12.ms-sql-s: S 47316992:47316992(0) win 16384&lt;br /&gt;18:06:53.798198 IP 59.51.114.39.x11 &amp;gt; 192.168.0.12.ms-sql-s: S 648937472:648937472(0) win 16384 ...&lt;span class="Apple-style-span" style="color: #333333; line-height: 20px; white-space: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: #333333; line-height: 20px; white-space: normal;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: #333333; line-height: 20px; white-space: normal;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;Something similar, but a little cleaner, can be done with &lt;/span&gt;&lt;a href="http://www.cs.ucla.edu/%7Ekohler/ipsumdump/" style="color: #999999; text-decoration: none;"&gt;&lt;span class="Apple-style-span"&gt;ipsumdump:&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif; margin: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; white-space: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;/usr/sbin/tcpslice 2010y04m01d 2010y04m31d Marchrferrisx.snort.in | ipsumdump -tsD | grep -w 1433&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif; margin: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; white-space: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"&gt;1270172022.614843 125.46.78.100 1433&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif; margin: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; white-space: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"&gt;1270190330.771853 61.183.172.35 1433&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif; margin: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; white-space: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"&gt;1270204518.351118 121.12.125.7 1433&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif; margin: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; white-space: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"&gt;1270231785.631103 218.61.127.71 1433&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif; margin: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; white-space: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"&gt;1270280841.207593 218.90.163.66 1433&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif; margin: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; white-space: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"&gt;1270310165.732622 61.183.172.35 1433&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif; margin: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; white-space: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"&gt;1270343213.798198 59.51.114.39 1433 ...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/pre&gt;&lt;pre style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-1351329308438904703?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/1351329308438904703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/tcpslice.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1351329308438904703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1351329308438904703'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/tcpslice.html' title='tcpslice'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-8848130500868444261</id><published>2010-04-10T19:31:00.000-07:00</published><updated>2010-04-12T12:08:33.579-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='one year anniversary'/><title type='text'>One year anniversary</title><content type='html'>&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Today is the one year anniversary of this blog.  This is my 48th post in that time period. According to Google Analytics, 1,250 “absolute unique visitors”  have provided for 1,566 visits  from 781 unique cities  from 78 unique countries. 72 page titles were viewed a total of 2,241 times. Here are some of the most popular pages:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/07/parsing-vista-firewall-logs-part-iii.html"&gt;&lt;i&gt;&lt;b&gt;/2009/07/parsing-vista-firewall-logs-part-iii.html  &lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/05/i-receive-lots-of-6000-port-scans-on-my.html"&gt;&lt;i&gt;&lt;b&gt;/2009/05/i-receive-lots-of-6000-port-scans-on-my.html&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/09/network-monitor-api-part-ii.html"&gt;&lt;i&gt;&lt;b&gt;/2009/09/network-monitor-api-part-ii.html&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/05/host-protection-working-with-microsofts.html"&gt;&lt;i&gt;&lt;b&gt;/2009/05/host-protection-working-with-microsofts.html&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/09/ive-spent-last-three-weeks-building.html"&gt;&lt;i&gt;&lt;b&gt;/2009/09/ive-spent-last-three-weeks-building.html&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/05/bash-40awkgeoiplookup-and-pcregrep-are.html"&gt;&lt;i&gt;&lt;b&gt;/2009/05/bash-40awkgeoiplookup-and-pcregrep-are.html&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/05/brief-anatomy-of-malware-detection-and.html"&gt;&lt;i&gt;&lt;b&gt;/2009/05/brief-anatomy-of-malware-detection-and.html&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/05/homegrown-tcpdumpsnort-analysis.html"&gt;&lt;i&gt;&lt;b&gt;/2009/05/homegrown-tcpdumpsnort-analysis.html&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/2009/06/viisualizing-sips-over-timeportip-range.html"&gt;&lt;i&gt;&lt;b&gt;/2009/06/viisualizing-sips-over-timeportip-range.html&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Actually, I have no idea what to make of any of these numbers.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-8848130500868444261?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/8848130500868444261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/one-year-anniversary.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8848130500868444261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8848130500868444261'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/one-year-anniversary.html' title='One year anniversary'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-4423885245554133742</id><published>2010-04-05T10:37:00.000-07:00</published><updated>2010-04-05T10:37:09.356-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sorting ingress source IPs'/><category scheme='http://www.blogger.com/atom/ns#' term='Eddie Kohler; ipsumdump'/><title type='text'>More fun with ipsumdump</title><content type='html'>More fun with ipsumdump. Below, sorting March ingress by COUNT(SIP), COUNT(&lt;i&gt;S&lt;/i&gt;Port), Sorted GeoIP location. All very fast.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;ipsumdump -s --no-headers&amp;nbsp; Marchrferrisx.snort.in |&lt;/i&gt;&lt;br /&gt;&lt;i&gt; sort -nr | uniq -c | sort -nr | less&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 626 75.125.252.73&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 384 74.125.19.191&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 358 125.45.109.196&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 286 66.165.46.165&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 242 74.125.127.191&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 234 74.125.53.191&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 138 67.214.120.156&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 138 204.236.155.168&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 127 67.228.177.148&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 120 74.125.19.19&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 107 173.14.243.230&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 105 221.195.73.86&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 103 221.192.199.35&lt;br /&gt;&lt;br /&gt;....&lt;br /&gt;&lt;br /&gt;ipsumdump -S --no-headers&amp;nbsp; Marchrferrisx.snort.in |&lt;br /&gt;sort -nr | uniq -c | sort -nr &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; 6523 80&lt;br /&gt;&amp;nbsp;&amp;nbsp; 1669 443&lt;br /&gt;&amp;nbsp;&amp;nbsp; 1220 12200&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 553 63585&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 468 19150&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 459 19099&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 238 6000&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 198 19135&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 156 19134&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 93 21&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 46 110&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 34 5242&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30 9875&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21 52079&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21 35356&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20 1935&lt;br /&gt;&lt;br /&gt;&lt;i&gt;for i in `ipsumdump -s --no-headers&amp;nbsp; Marchrferrisx.snort.in |&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sort -nr | uniq |sort -nr`&lt;/i&gt;&lt;br /&gt;&lt;i&gt; do&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $i `geoip.sh $i | awk -F: '{print $2$3}'`&lt;/i&gt;&lt;br /&gt;&lt;i&gt;done&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;222.86.62.237 CN, N/A, N/A, N/A, 35.000000, 105.000000, 0, 0&lt;br /&gt;222.59.176.26 CN, 04, Wuxi, N/A, 31.577200, 120.293900, 0, 0&lt;br /&gt;222.59.176.105 CN, 04, Wuxi, N/A, 31.577200, 120.293900, 0, 0&lt;br /&gt;222.45.112.59 CN, 22, Beijing, N/A, 39.928902, 116.388298, 0, 0&lt;br /&gt;222.45.112.221 CN, 22, Beijing, N/A, 39.928902, 116.388298, 0, 0&lt;br /&gt;222.41.8.67 CN, 22, Beijing, N/A, 39.928902, 116.388298, 0, 0&lt;br /&gt;222.37.37.33 CN, 22, Beijing, N/A, 39.928902, 116.388298, 0, 0&lt;br /&gt;222.34.103.72 CN, 22, Beijing, N/A, 39.928902, 116.388298, 0, 0&lt;br /&gt;222.243.14.144 CN, 11, Xupu, N/A, 27.909401, 110.585800, 0, 0&lt;br /&gt;222.219.236.209 CN, 22, Beijing, N/A, 39.928902, 116.388298, 0, 0&lt;br /&gt;222.215.230.49 CN, 32, Chengdu, N/A, 30.666700, 104.066597, 0, 0&lt;br /&gt;222.215.230.170 CN, 32, Chengdu, N/A, 30.666700, 104.066597, 0, 0&lt;br /&gt;222.214.218.188 CN, 32, Chengdu, N/A, 30.666700, 104.066597, 0, 0&lt;br /&gt;222.211.69.13 CN, 32, Chengdu, N/A, 30.666700, 104.066597, 0, 0&lt;br /&gt;222.208.183.218 CN, 32, Chengdu, N/A, 30.666700, 104.066597, 0, 0&lt;br /&gt;222.186.25.143 CN, 22, Beijing, N/A, 39.928902, 116.388298, 0, 0&lt;br /&gt;222.186.24.37 CN, 22, Beijing, N/A, 39.928902, 116.388298, 0, 0&lt;br /&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-4423885245554133742?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/4423885245554133742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/more-fun-with-ipsumdump.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/4423885245554133742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/4423885245554133742'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/more-fun-with-ipsumdump.html' title='More fun with ipsumdump'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-5814455217370638015</id><published>2010-04-02T21:10:00.000-07:00</published><updated>2010-04-02T21:10:24.042-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='&quot;One Page Checklist for Securing and Cleaning a Malware Infected Windows PC&quot;'/><title type='text'>"One Page Checklist for Securing and Cleaning a Malware Infected Windows PC"</title><content type='html'>&lt;div align="left" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;"&gt;&lt;span style="font-size: small;"&gt;A "&lt;/span&gt;&lt;a href="http://www.rmfnetworksecurity.com/CleaningUpAMalwareInfectedWindowsPC.pdf"&gt;&lt;span style="font-size: small;"&gt;One Page Checklist for Securing and Cleaning a Malware Infected Windows PC&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small;"&gt;" is available. &amp;nbsp;From the paper:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, monospace;"&gt;&lt;span style="font-size: small;"&gt;In  this process, you are looking for outbound and inbound communication  and connection attempts that seem suspicious – data transfers that  you can not account for, processes that seem inexplicable, or  unsigned files. You may or may not see logon attempts, registry  changes, file creation, file access, file permission changes. You  may need to correlate &lt;/span&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;Network Monitor&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size: small;"&gt; logs with network  ingress and egress firewall logs. Additional info at:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, monospace;"&gt;&lt;a href="http://www.rmfnetworksecurity.com/"&gt;&lt;span style="font-size: small;"&gt;http://www.rmfnetworksecurity.com&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, monospace;"&gt;&lt;a href="http://thinking-about-network-security.blogspot.com/"&gt;&lt;span style="font-size: small;"&gt;http://thinking-about-network-security.blogspot.com&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, monospace;"&gt;&lt;a href="http://groups.google.com/group/small-business-threats?hl=en&amp;amp;pli=1"&gt;&lt;span style="font-size: small;"&gt;http://groups.google.com/group/small-business-threats&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-5814455217370638015?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/5814455217370638015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/one-page-checklist-for-securing-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5814455217370638015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/5814455217370638015'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/04/one-page-checklist-for-securing-and.html' title='&quot;One Page Checklist for Securing and Cleaning a Malware Infected Windows PC&quot;'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-2163095266138559754</id><published>2010-03-31T04:03:00.000-07:00</published><updated>2010-03-31T04:03:51.736-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Logon screen error;'/><title type='text'>Vista logon.scr error</title><content type='html'>Vista, as most of us know, will take a machine out of standby (light sleep), to install the "Tuesday updates". After it reboots, I see this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_-L4HUu8oKmI/S7MraepVSII/AAAAAAAAGJc/YfWgv4Eu5HQ/s1600/ScrSoft1003ce9e.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://4.bp.blogspot.com/_-L4HUu8oKmI/S7MraepVSII/AAAAAAAAGJc/YfWgv4Eu5HQ/s400/ScrSoft1003ce9e.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Logon screen error are traditionally dangerous because they have been used to bypass the logon screen.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-2163095266138559754?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/2163095266138559754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/03/vista-logonscr-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2163095266138559754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2163095266138559754'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/03/vista-logonscr-error.html' title='Vista logon.scr error'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_-L4HUu8oKmI/S7MraepVSII/AAAAAAAAGJc/YfWgv4Eu5HQ/s72-c/ScrSoft1003ce9e.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-2144334682207867065</id><published>2010-03-22T14:12:00.000-07:00</published><updated>2010-03-22T15:57:52.801-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='data breaches; ITRC;2010'/><title type='text'>Data Breaches 2010</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Below is a list of 171 data breaches&lt;i&gt; id&lt;/i&gt;&lt;i&gt;entified by public records&lt;/i&gt;&amp;nbsp;found by the &lt;a href="http://www.idtheftcenter.org/index.html"&gt;ID Theft Resource Center&lt;/a&gt;&amp;nbsp;for the first two and one half months of 2010. &lt;a href="http://www.idtheftcenter.org/index.html"&gt;ITRC&lt;/a&gt; has a justice department grant to catalog all known data breaches from credible sources. &lt;a href="http://www.idtheftcenter.org/index.html"&gt;ITRC&lt;/a&gt; is a donor sponsored, multi-venue, non-profit working to resolve identity theft. &amp;nbsp;If you are a public or private sector enterprise of any type - banking, financial services, insurance, University, medical provider, HMO, governmental department, law firm, hotelier, or non-profit - you will find analogs to your business in this list.&amp;nbsp;I encourage you to &lt;a href="http://www.idtheftcenter.org/ITRC%20Breach%20Report%202010.pdf"&gt;read through this list&lt;/a&gt; if you have any network or data exposure and ask yourself:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: 13px; font-weight: bold;"&gt;What information assets does my group have to lose?&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: 13px; font-weight: bold;"&gt;How could we lose them?&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;ITRC20100316-01 John Hancock Financial Services&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;ITRC20100315-02 TD Bank PA Yes&lt;/div&gt;&lt;div&gt;ITRC20100311-01 US Bank OH&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100310-05 Securities and Exchange Commission&lt;/div&gt;&lt;div&gt;ITRC20100310-04 Assurity Financial Services US&lt;/div&gt;&lt;div&gt;ITRC20100309-10 Virgin Money USA Inc&lt;/div&gt;&lt;div&gt;ITRC20100309-01 Ally Bank US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100308-16 Wells Fargo - Law&lt;/div&gt;&lt;div&gt;ITRC20100308-14 Partnership Federal Credit Union&lt;/div&gt;&lt;div&gt;ITRC20100308-09 Telhio Credit Union OH&lt;/div&gt;&lt;div&gt;ITRC20100308-08 M&amp;amp;T Bank MD&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100305-08 BlackRock US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100226-01 CitiGroup US&lt;/div&gt;&lt;div&gt;ITRC20100224-01 SunTrust Banks FL&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100218-08 ING Fund US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100201-03 Ameriquest Mortgage MN&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100126-07 Gregory Navone, First Interstate&lt;/div&gt;&lt;div&gt;ITRC20100114-02 Lincoln National Financial Securities&lt;/div&gt;&lt;div&gt;ITRC20100113-02 Suffolk County National Bank&lt;/div&gt;&lt;div&gt;ITRC20100104-01 Eastern Bank Corp MA&lt;/div&gt;&lt;div&gt;ITRC20100316-03 Beecher Carlson Holdings US&lt;/div&gt;&lt;div&gt;ITRC20100316-02 Beer &amp;amp; Wine Hobby&lt;/div&gt;&lt;div&gt;ITRC20100315-01 Littleton Pizza Hut franchisee&lt;/div&gt;&lt;div&gt;ITRC20100312-01 MonoPrice.com US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100310-08 Experian US&lt;/div&gt;&lt;div&gt;ITRC20100310-07 GroupM US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100310-06 Citco - Evanston Capital&lt;/div&gt;&lt;div&gt;ITRC20100310-03 Kraft Foods US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100310-01 Thrivent Financial PA None&lt;/div&gt;&lt;div&gt;ITRC20100309-15 AlixPartners LLP US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100309-14 T-Mobile MD&lt;/div&gt;&lt;div&gt;ITRC20100309-13 Hotels.com - vendor US&lt;/div&gt;&lt;div&gt;ITRC20100309-12 LitCon Group VA&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100309-11 AT&amp;amp;T - unknown vendor&lt;/div&gt;&lt;div&gt;ITRC20100309-08 California Business Bureau Medical&lt;/div&gt;&lt;div&gt;ITRC20100309-07 Wolters Kluwer - CCH&lt;/div&gt;&lt;div&gt;ITRC20100309-06 Center for American Progress&lt;/div&gt;&lt;div&gt;ITRC20100309-05 Ameriprise Financial - vendor&lt;/div&gt;&lt;div&gt;ITRC20100309-03 Priceline.com US -&lt;/div&gt;&lt;div&gt;ITRC20100309-02 United Guaranty Residential Insurance&lt;/div&gt;&lt;div&gt;ITRC20100308-15 Coffee.org US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100308-13 LampSource US &amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100308-12 Ameriprise Financial US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100308-11 Bristol-Myers Squibb Company US&lt;/div&gt;&lt;div&gt;ITRC20100308-10 MoneyGram International US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100308-07 National Audubon Society AZ&lt;/div&gt;&lt;div&gt;ITRC20100308-06 Willard InterContinental Hotel DC&lt;/div&gt;&lt;div&gt;ITRC20100308-05 Ameriprise Financial Inc US&lt;/div&gt;&lt;div&gt;ITRC20100308-04 Cell Phone Kiosk -&lt;/div&gt;&lt;div&gt;ITRC20100308-03 Arrow Electronics NY&lt;/div&gt;&lt;div&gt;ITRC20100308-01 Los Angeles Westin Bonaventure&lt;/div&gt;&lt;div&gt;ITRC20100305-12 Uniformed Services Benefit Association&lt;/div&gt;&lt;div&gt;ITRC20100305-11 Nuance Communications US Yes&lt;/div&gt;&lt;div&gt;ITRC20100305-10 FCI USA LLC US&lt;/div&gt;&lt;div&gt;ITRC20100305-09 Genworth Financial, Life Insurance&lt;/div&gt;&lt;div&gt;ITRC20100305-07 Thermo Fisher Scientific Inc&lt;/div&gt;&lt;div&gt;ITRC20100305-05 Moses,Phillips, Young, Brannon and&lt;/div&gt;&lt;div&gt;ITRC20100305-04 Easybakeware.com US&lt;/div&gt;&lt;div&gt;ITRC20100305-02 Hancock Fabrics US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100304-03 Vernon Sales Promotion US&lt;/div&gt;&lt;div&gt;ITRC20100301-07 Feeney Agency PA&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100301-06 McGraw-Hill Construction UT&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100301-05 Erisa Pension Systems -&lt;/div&gt;&lt;div&gt;ITRC20100301-02 MSO of Puerto Rico&lt;/div&gt;&lt;div&gt;ITRC20100301-01 MSO of Puerto Rico&lt;/div&gt;&lt;div&gt;ITRC20100226-02 Wyndham Hotels US&lt;/div&gt;&lt;div&gt;ITRC20100225-01 Law Firms, Smyrna GA&lt;/div&gt;&lt;div&gt;ITRC20100224-02 Association for the Blind&lt;/div&gt;&lt;div&gt;ITRC20100223-24 Mid America Kidney Stone&lt;/div&gt;&lt;div&gt;ITRC20100223-17 Merkle Direct Marketing -&lt;/div&gt;&lt;div&gt;ITRC20100223-16 Health Services for Children&lt;/div&gt;&lt;div&gt;ITRC20100223-12 Public Employee Health Insurance&lt;/div&gt;&lt;div&gt;ITRC20100223-07 Private Practice, Wilmington NC&lt;/div&gt;&lt;div&gt;ITRC20100223-02 Educators Mutual Insurance Association&lt;/div&gt;&lt;div&gt;ITRC20100219-02 H&amp;amp;R Block IN Yes&lt;/div&gt;&lt;div&gt;ITRC20100218-09 Cullman Dairy Queen AL&lt;/div&gt;&lt;div&gt;ITRC20100218-07 Galeton, Gloves Inc US&lt;/div&gt;&lt;div&gt;ITRC20100218-06 Daedalus Books US&lt;/div&gt;&lt;div&gt;ITRC20100218-05 TGI Friday's - West&lt;/div&gt;&lt;div&gt;ITRC20100218-04 Eclipse Property Solutions FL&lt;/div&gt;&lt;div&gt;ITRC20100218-02 Small Dog Electronics US&lt;/div&gt;&lt;div&gt;ITRC20100212-03 Macy's - St Louis&lt;/div&gt;&lt;div&gt;ITRC20100212-01 Equifax US&lt;/div&gt;&lt;div&gt;ITRC20100209-13 Ozarks Area Community Action&lt;/div&gt;&lt;div&gt;ITRC20100209-11 St. Clair Winery &amp;amp;&lt;/div&gt;&lt;div&gt;ITRC20100209-10 Highmark US &amp;nbsp;-&lt;/div&gt;&lt;div&gt;ITRC20100209-06 Ceridian US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100209-03 AvMed Health Plans FL&lt;/div&gt;&lt;div&gt;ITRC20100202-03 Innotek US&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100202-02 P.F. Chang's Bistro&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100119-04 ExposeObama.com &amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100119-03 Time Customer Service&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100119-02 Goodwill - Kent County&lt;/div&gt;&lt;div&gt;ITRC20100111-01 Metropark NY&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100104-02 Moriarty &amp;amp; Primack MA&lt;/div&gt;&lt;div&gt;ITRC20100305-01 New Mexico State University&lt;/div&gt;&lt;div&gt;ITRC20100301-04 Bennett College NC&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100219-01 Valdosta State University GA&lt;/div&gt;&lt;div&gt;ITRC20100218-01 Southern Illinois University IL&lt;/div&gt;&lt;div&gt;ITRC20100209-14 Kansas City Art Institute&lt;/div&gt;&lt;div&gt;ITRC20100209-04 University of Texas El&lt;/div&gt;&lt;div&gt;ITRC20100202-01 West Virginia University WV&lt;/div&gt;&lt;div&gt;ITRC20100201-04 Columbia University&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100201-02 Humboldt State University CA&lt;/div&gt;&lt;div&gt;ITRC20100126-05 University of Missouri MO&lt;/div&gt;&lt;div&gt;ITRC20100114-03 Eugene School District OR&lt;/div&gt;&lt;div&gt;ITRC20100114-01 Western Michigan University MI&lt;/div&gt;&lt;div&gt;ITRC20100316-04 St. Louis Metropolitan Police&lt;/div&gt;&lt;div&gt;ITRC20100305-06 Anne Arundel County's Fire&lt;/div&gt;&lt;div&gt;ITRC20100304-01 SC Department of Health&lt;/div&gt;&lt;div&gt;ITRC20100301-03 Arkansas Guard, Camp Robinson&lt;/div&gt;&lt;div&gt;ITRC20100223-25 New York Department of&lt;/div&gt;&lt;div&gt;ITRC20100223-14 Alaska Department of Health&lt;/div&gt;&lt;div&gt;ITRC20100223-13 Brooke Army Medical Center&lt;/div&gt;&lt;div&gt;ITRC20100222-01 TennCare TN Yes -&lt;/div&gt;&lt;div&gt;ITRC20100218-03 West Memphis Police Department&lt;/div&gt;&lt;div&gt;ITRC20100209-09 Social Security Administration NY&lt;/div&gt;&lt;div&gt;ITRC20100209-08 Wyoming Department of Health&lt;/div&gt;&lt;div&gt;ITRC20100209-07 Ohio Department of Administrative&lt;/div&gt;&lt;div&gt;ITRC20100209-02 D.C. Office of Tax&lt;/div&gt;&lt;div&gt;ITRC20100209-01 CA Department of Health&lt;/div&gt;&lt;div&gt;ITRC20100201-01 Iowa Racing and Gaming&lt;/div&gt;&lt;div&gt;ITRC20100128-01 PricewaterhouseCoopers - Alaska state&lt;/div&gt;&lt;div&gt;ITRC20100127-01 US Department of Commerce&lt;/div&gt;&lt;div&gt;ITRC20100126-08 New York Department of&lt;/div&gt;&lt;div&gt;ITRC20100126-06 Minnesota Department of Labor&lt;/div&gt;&lt;div&gt;ITRC20100126-04 Seattle Municipal Court WA&lt;/div&gt;&lt;div&gt;ITRC20100126-02 Internal Revenue Service -&lt;/div&gt;&lt;div&gt;ITRC20100126-01 Columbus Health Department OH&lt;/div&gt;&lt;div&gt;ITRC20100119-01 City of Oakridge OR&lt;/div&gt;&lt;div&gt;ITRC20100107-01 Housing Authority of New&lt;/div&gt;&lt;div&gt;ITRC20100104-03 Transportation Security Administration (TSA)&lt;/div&gt;&lt;div&gt;ITRC20100311-07 BlueCross BlueShield of RI&lt;/div&gt;&lt;div&gt;ITRC20100311-06 Center for Neurosciences AZ&lt;/div&gt;&lt;div&gt;ITRC20100311-05 Advanced NeuroSpinal Care CA&lt;/div&gt;&lt;div&gt;ITRC20100311-04 Lucille Packard Children's Hospital&lt;/div&gt;&lt;div&gt;ITRC20100311-03 University of New Mexico&lt;/div&gt;&lt;div&gt;ITRC20100311-02 North Carolina Baptist Hospital&lt;/div&gt;&lt;div&gt;ITRC20100310-02 Quest Diagnostics - AmeriPath&lt;/div&gt;&lt;div&gt;ITRC20100309-16 Empi Recovery Services -&lt;/div&gt;&lt;div&gt;ITRC20100309-04 DaVita - Renal Treatment&lt;/div&gt;&lt;div&gt;ITRC20100308-02 University of Texas Southwestern&lt;/div&gt;&lt;div&gt;ITRC20100305-03 Wake Forest University Baptist&lt;/div&gt;&lt;div&gt;ITRC20100302-01 Diabetes Direct FL&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100226-03 Shands HealthCare FL&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100225-02 University of Washington Medical&lt;/div&gt;&lt;div&gt;ITRC20100223-23 Private Practice Torrance #5&lt;/div&gt;&lt;div&gt;ITRC20100223-22 Private Practice Torrance #4&lt;/div&gt;&lt;div&gt;ITRC20100223-21 Private Practice Torrance #3&lt;/div&gt;&lt;div&gt;ITRC20100223-20 Private Practice Torrance #2&lt;/div&gt;&lt;div&gt;ITRC20100223-19 Private Practice, Torrance #1&lt;/div&gt;&lt;div&gt;ITRC20100223-18 City of Hope National&lt;/div&gt;&lt;div&gt;ITRC20100223-15 Cogent Healthcare of Wisconsin,&lt;/div&gt;&lt;div&gt;ITRC20100223-11 BlueCross BlueShield - DC,&lt;/div&gt;&lt;div&gt;ITRC20100223-10 Children's Medical Center of&lt;/div&gt;&lt;div&gt;ITRC20100223-09 Concentra TX&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100223-08 Advocate Health Care IL&lt;/div&gt;&lt;div&gt;ITRC20100223-06 Blue Island Radiology Consultants,&lt;/div&gt;&lt;div&gt;ITRC20100223-05 Private Practice, Stoughton MA&lt;/div&gt;&lt;div&gt;ITRC20100223-04 Cardiology Consultants FL Yes&lt;/div&gt;&lt;div&gt;ITRC20100223-01 Ashley and Gray DDS&lt;/div&gt;&lt;div&gt;ITRC20100222-02 Group Health WA&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100212-02 University of Texas Medical&lt;/div&gt;&lt;div&gt;ITRC20100209-12 Greensburg Dental Practices PA&lt;/div&gt;&lt;div&gt;ITRC20100209-05 Abbott Medical Optics CA&lt;/div&gt;&lt;div&gt;ITRC20100128-02 University of California -&lt;/div&gt;&lt;div&gt;ITRC20100127-02 University Medical Clinic -&lt;/div&gt;&lt;div&gt;ITRC20100126-09 Methodist Hospital - Texas&lt;/div&gt;&lt;div&gt;ITRC20100126-03 Unknown Dentist TX&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100113-01 Kaiser HMO CA&amp;nbsp;&lt;/div&gt;&lt;div&gt;ITRC20100105-01 Massachusetts Eye and Ear&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-2144334682207867065?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/2144334682207867065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/03/data-breaches-2010.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2144334682207867065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2144334682207867065'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/03/data-breaches-2010.html' title='Data Breaches 2010'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-2045782820478526305</id><published>2010-03-18T11:58:00.000-07:00</published><updated>2010-03-18T12:00:14.045-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GeoIP'/><category scheme='http://www.blogger.com/atom/ns#' term='Eddie Kohler; ipsumdump'/><title type='text'>ipsumdump..</title><content type='html'>It is easy to be fond of professor Eddie Kohler's &lt;a href="http://www.cs.ucla.edu/%7Ekohler/ipsumdump/"&gt;ipsumdump&lt;/a&gt;.&amp;nbsp; Take your monthly egress pcap file and filter it through something like this:&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;for i in `ipsumdump -s --no-headers $1 | sort -n | uniq`&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do&amp;nbsp; echo $i, `./geoip.sh $i | awk '{print $1""$7""$8" "$9""$10""$11}'` &lt;br /&gt;done&lt;br /&gt;( where geoip.sh is geoiplookup -f /usr/local/share/GeoIP/GeoLiteCity.dat $1 )&lt;br /&gt;&lt;br /&gt;and what you are quickly returned something like this:&lt;br /&gt;&lt;br /&gt;10.10.10.2, GeoIPAddressnot found&lt;br /&gt;12.129.147.95, GeoIPVA,Ashburn, 20147,39.033501,-77.483803,&lt;br /&gt;12.130.131.98, GeoIPCA,San Bruno,94066,37.622799,&lt;br /&gt;12.130.81.249, GeoIPNY,Brooklyn, N/A,40.652500,-73.955399,&lt;br /&gt;12.149.161.248, GeoIPCA,Mountain View,94043,37.419201,&lt;br /&gt;12.25.91.250, GeoIPCT,Stamford, N/A,41.083099,-73.538803,&lt;br /&gt;12.25.93.2, GeoIPNY,Newburgh, 12550,41.537498,-74.051201,&lt;br /&gt;24.123.206.230, GeoIPIN,Lawrenceburg, 47025,39.162300,-84.891098,&lt;br /&gt;24.226.158.219, GeoIPQC,Richmond, N/A,45.666698,-72.150002,&lt;br /&gt;24.43.25.8, GeoIPCA,Los Angeles,N/A,34.041599,&lt;br /&gt;24.43.43.169, GeoIPCA,Los Angeles,N/A,34.041599,&lt;br /&gt;38.103.25.181, GeoIPVA,Alexandria, N/A,38.790901,-77.094704,&lt;br /&gt;38.106.23.79, GeoIPN/A,N/A, N/A,38.000000,-97.000000,&lt;br /&gt;41.208.20.155, GeoIP06,Alberton, N/A,-26.233299,28.133301,&lt;br /&gt;58.19.117.118, GeoIP12,Wuhan, N/A,30.583300,114.266701,&lt;br /&gt;58.215.75.62, GeoIP22,Beijing, N/A,39.928902,116.388298,&lt;br /&gt;59.181.103.140, GeoIP16,Bombay, N/A,18.975000,72.825798,&lt;br /&gt;59.36.98.195, GeoIP30,Dongguan, N/A,23.048901,113.744598,&lt;br /&gt;59.51.114.39, GeoIP11,Changsha, N/A,28.179199,113.113602,&lt;br /&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-2045782820478526305?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/2045782820478526305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/03/ipsumdump.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2045782820478526305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2045782820478526305'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/03/ipsumdump.html' title='ipsumdump..'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-3175878659580522080</id><published>2010-03-16T23:34:00.000-07:00</published><updated>2010-03-16T23:34:50.394-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Social Networking; EFF;Privacy'/><title type='text'>How the FEDS use social networking...</title><content type='html'>What type of security risk is social networking? A &lt;a href="http://www.wired.com/images_blogs/threatlevel/2010/03/social-networking-for-law-enforcement.pdf"&gt;document &lt;/a&gt;obtained by the &lt;a href="http://www.eff.org/"&gt;EFF&lt;/a&gt; and posted on &lt;a href="http://www.wired.com/threatlevel/2010/03/undercover-feds-on-facebook/#more-14333"&gt;Wired's Threat Level blog &lt;/a&gt;details how FBI and Secret Service are using social networking sites to obtain information. Here's a &lt;a href="http://www.wired.com/images_blogs/threatlevel/2010/03/social-networking-for-law-enforcement.pdf"&gt;sample from the document&lt;/a&gt;:&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;"Overview of Key Social Networking Sites&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;GETTING INFO FROM FACEBOOK&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&amp;nbsp;Data is organized by user ID or group ID&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&amp;nbsp;Standard data productions (per LE guide):&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt; &lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt; Neoprint, Photoprint, User Contact Info, Group Contanct Info, IP Logs&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&amp;nbsp;HOWEVER, Facebook has other data available.&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&amp;nbsp;Often cooperative with emergency requests."&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;So glad to hear that FEDS are getting co-operation from Facebook. Think for a moment what this other data might be: your chats? your friend searches? your browsing? I have to wonder what Facebook "IP Logs" look like....&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-3175878659580522080?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/3175878659580522080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/03/how-feds-use-social-networking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3175878659580522080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3175878659580522080'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/03/how-feds-use-social-networking.html' title='How the FEDS use social networking...'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-3570651976498068805</id><published>2010-02-26T16:31:00.000-08:00</published><updated>2010-03-16T01:41:47.949-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Small Business Owners'/><title type='text'>Some Thoughts on Computer Defense for Small Business</title><content type='html'>I have written a paper targeted for small business owners:&amp;nbsp;"&lt;a href="http://rmfnetworksecurity.com/BasicSafeComputing.pdf"&gt;Some Thoughts on Computer Defense for Small Business&lt;/a&gt;"&lt;br /&gt;&lt;br /&gt;"The problem of computer security will continue to increase in intensity in the coming years. Geo-political conflict, an increasing wealth divide between North and South in an increasingly networked world, and increasingly sophisticated threats will challenge the most well prepared specialists to secure your network. &amp;nbsp;The passage of time has only made the following Unix administrator's adage become more true: &amp;nbsp; “There are two kinds of computer users: those who have lost data and those who will.” &amp;nbsp;Which part of that data loss cycle is your destiny?" &lt;a href="http://rmfnetworksecurity.com/BasicSafeComputing.pdf"&gt;read more&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-3570651976498068805?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/3570651976498068805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/some-thoughts-on-computer-defense-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3570651976498068805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3570651976498068805'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/some-thoughts-on-computer-defense-for.html' title='Some Thoughts on Computer Defense for Small Business'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-655442564017483178</id><published>2010-02-24T12:46:00.000-08:00</published><updated>2010-02-26T23:16:37.262-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bot Hunter;SRI; APT;'/><title type='text'>Advanced Persistent Threat IV</title><content type='html'>&lt;div&gt;&lt;a href="http://mtc.sri.com/"&gt;SRI's Malware Threat Center&lt;/a&gt;&amp;nbsp;has issued version 1.5 of&amp;nbsp;&lt;a href="http://www.bothunter.net/"&gt;Bot Hunter&lt;/a&gt;. Bot Hunter uses a proprietary algorithm with data collection facilities of a customized Snort to determine the botnet communication on Windows hosts and at Unix bastion at the egress of your network. &amp;nbsp;You can review the data it collects from its&lt;a href="http://www.bothunter.net/live/"&gt;&amp;nbsp;honey net&lt;/a&gt;. &amp;nbsp;Here's a picture of it running on Vista:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_-L4HUu8oKmI/S4WO6OeoHhI/AAAAAAAAF9M/GuxSfYCeZrc/s1600-h/BotHunter.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="225" src="http://4.bp.blogspot.com/_-L4HUu8oKmI/S4WO6OeoHhI/AAAAAAAAF9M/GuxSfYCeZrc/s400/BotHunter.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Update: 02/27/10&amp;nbsp;&amp;nbsp;And so I had a 1.10 Score. (Below) &amp;nbsp;Bot Net Hunter reported that a Microsoft IP &lt;b&gt;conducted an outbound scan of 18 IPs. &lt;/b&gt;Something to think about...&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;OUTBOUND SCAN (spp)&lt;/div&gt;&lt;div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;207.46.16.248 (2) (20:05:49.902 PST)&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; event=777:7777005 (2) {udp} E5[bh] &lt;b&gt;Detected moderate malware port scanning of 18 IPs &lt;/b&gt;(11 /24s) (# pkts S/M/O/I=0/52/4/0): 137u:52, [] MAC_Src: 00:16:EA:4C:F3:AE&lt;/div&gt;&lt;div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;Funny, I had Netmon 3.3 &amp;nbsp;running, but it didn't catch that IP at that time This turned out to be a Microsoft DNS IP:&lt;/div&gt;&lt;div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;9:41:51.287&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;192.168.0.14&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;80 (0x50)&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;207.46.16.248&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;207.46.16.248&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;msdn.microsoft.akadns.net&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;00-09-5B-00-F3-DA&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;msdn.microsoft.akadns.net&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;5599 (0x15DF)&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-655442564017483178?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/655442564017483178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/advanced-persistent-threat-iv.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/655442564017483178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/655442564017483178'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/advanced-persistent-threat-iv.html' title='Advanced Persistent Threat IV'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_-L4HUu8oKmI/S4WO6OeoHhI/AAAAAAAAF9M/GuxSfYCeZrc/s72-c/BotHunter.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-2210061800748374583</id><published>2010-02-16T20:05:00.000-08:00</published><updated>2010-02-16T20:05:28.650-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='APT;Snort;Data Protection'/><title type='text'>Advanced Persistent Threat Part III</title><content type='html'>It certainly is possible to examine host or network outbound conversations. &amp;nbsp; &amp;nbsp;But we then have to determine which outbound conversations are legitimate. &amp;nbsp; Current AV software attempts to block access to potentially 'known dangerous' or 'pre-determined dangerous' &amp;nbsp;malware sites but such judgements are apparently failing to prevent APT from sending stolen data to weigh stations. &amp;nbsp;On OpenBSD if we are looking at &amp;nbsp;outbound connections, we might sniff as thus using Snort:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/usr/local/bin/snort -D -vdeXX -l . -L `date "+%d%b%H%S%Z%Y.out"` -i dc0 &amp;nbsp;'port not(whois or domain or router) and not(broadcast or arp) and not(dst net 192.168.0.0/24 or 224.0.0.0/24 or 239.0.0.0/8)'&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On Vista, we might have two interfaces (wired and wireless) we need to examine:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;start /min cmd /c C:\snort\bin\snort.exe &amp;nbsp;-vdeXX -l . &amp;nbsp;-i 1 &amp;nbsp;port not(whois or domain or router or 5353) and not(broadcast or arp) and not(dst net 192.168.0.0/24 or 224.0.0.0/24 or 239.0.0.0/8)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;start /min cmd /c C:\snort\bin\snort.exe &amp;nbsp;-vdeXX -l . &amp;nbsp;-i 2 &amp;nbsp;port not(whois or domain or router or 5353) and not(broadcast or arp) and not(dst net 192.168.0.0/24 or 224.0.0.0/24 or 239.0.0.0/8)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We can look at the logs. And we are surprised by the number of outbound connections we make:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;C:\Snort\bin&amp;gt;snort -v -q -r snort.log.1266372570 | find "-&amp;gt;" | gawk -F"-&amp;gt;" '{print $2}' | sort /R | uniq -c | sort /R&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;327 &amp;nbsp;74.125.103.208:80&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;133 &amp;nbsp;74.202.67.83:80&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;105 &amp;nbsp;216.35.221.76:80&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;100 &amp;nbsp;198.104.200.154:80&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; 51 &amp;nbsp;72.21.91.19:80&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; 32 &amp;nbsp;96.17.70.50:80&lt;br /&gt;....&lt;br /&gt;&lt;br /&gt;Perhaps one solution to APT would be some real time co-ordination between sites suspected of being data theft transfer stations and real-time (firewall or host) blocking of the data-transfer to those hosts/servers. &amp;nbsp;This type of solution has some headwind but may need to be implemented on a individual or corporate basis to prevent "incidental blacklisting". &amp;nbsp;Other solutions might include:&lt;br /&gt;&lt;br /&gt;(1) real time packet examination of data for critical or sensitive information&lt;br /&gt;(2) heuristic detection of data flows that seems 'abnormal'&lt;br /&gt;(3) heuristic detection of file access that seems 'abnormal'&lt;br /&gt;&lt;br /&gt;The industry awaits such solutions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-2210061800748374583?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/2210061800748374583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/advanced-persistent-threat-part-iii.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2210061800748374583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2210061800748374583'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/advanced-persistent-threat-part-iii.html' title='Advanced Persistent Threat Part III'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-8974514901467216102</id><published>2010-02-12T13:35:00.000-08:00</published><updated>2010-02-12T13:35:43.007-08:00</updated><title type='text'>Advanced Persistent Threat Part II</title><content type='html'>These thoughts occur to me this week in reading the &lt;a href="http://blogsearch.google.com/blogsearch?hl=en&amp;amp;ie=UTF-8&amp;amp;q=Advanced+Persistent+Threat&amp;amp;btnG=Search+Blogs"&gt;numerous blog posts &lt;/a&gt;on &lt;b&gt;&lt;a href="http://en.wikipedia.org/wiki/Advanced_Persistent_Threat"&gt;APT&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/b&gt;and&amp;nbsp;the &lt;a href="http://www.mandiant.com/services/advanced_persistent_threat/"&gt;Mandiant Report&lt;/a&gt;.&amp;nbsp;Somehow my research made me think of &amp;nbsp;the &lt;a href="http://en.wikipedia.org/wiki/Iago"&gt;bane of Othello the Moor&lt;/a&gt;&amp;nbsp;(&lt;b&gt;&amp;nbsp;"Iago" ).&lt;/b&gt;&amp;nbsp;Very loosely translated from Latin, "&lt;b&gt;Iago&lt;/b&gt;" &amp;nbsp;might mean "&lt;b&gt;I am nothing&lt;/b&gt;". Often it is &amp;nbsp;more commonly translated as "&lt;b&gt;supplanter&lt;/b&gt;" or "&lt;b&gt;heel grabber&lt;/b&gt;".&lt;br /&gt;&lt;br /&gt;(1) I don't have a binary, technical threat analysis,&amp;nbsp;disassembled&amp;nbsp;stub, class diagram or detection method for &lt;b&gt;APT.&lt;/b&gt;&lt;br /&gt;(2) I don't know any host based security products that would block "illegitimate &lt;a href="http://en.wikipedia.org/wiki/Advanced_Persistent_Threat"&gt;APT&lt;/a&gt;" (outgoing traffic) on ports 80 and 443 from a legitimate user space request. &amp;nbsp;How would developers even implement such a service? If you could trace all events to an un-hijacked input device, you could block any events that are not desktop based. &amp;nbsp;This would probably put updates,software installations,sandbox scripts in a pickle. Therefore, is this a problem in search of a network based solution?&lt;br /&gt;(3) I propose we solve the debate about how "&lt;a href="http://en.wikipedia.org/wiki/Advanced_Persistent_Threat"&gt;APT&lt;/a&gt; style" threats can be distinguished from other threats by&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;(a) ranking the level of resources needed to complete them or&lt;/li&gt;&lt;li&gt;(b) the level of functional immunity granted their&amp;nbsp;perpetrators&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;(4) I don't know yet how to prototype or replicate an APT in my lab. &amp;nbsp;Therefore, How do I know it exists outside of the conceptualization of others?&lt;br /&gt;(5) Ten years ago last August I received this comment while working with an IDS developer: "This product will stop the script kiddies and most of the uber-hackers. &amp;nbsp;Then there's the "Men in Black". &amp;nbsp;I have no idea how we stop them."&lt;br /&gt;&lt;br /&gt;- "Iago"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-8974514901467216102?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/8974514901467216102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/advanced-persistent-threat-part-ii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8974514901467216102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/8974514901467216102'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/advanced-persistent-threat-part-ii.html' title='Advanced Persistent Threat Part II'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-2816271738475560920</id><published>2010-02-09T17:27:00.000-08:00</published><updated>2010-02-09T17:27:30.508-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advanced Persistent Threat;'/><title type='text'>Advanced Persistent Threat</title><content type='html'>The news on &amp;nbsp;"&lt;a href="http://www.google.com/search?hl=en&amp;amp;safe=off&amp;amp;q=advanced+persistent+threat&amp;amp;btnG=Search&amp;amp;aq=f&amp;amp;aqi=&amp;amp;oq="&gt;Advanced Persistent Threat&lt;/a&gt;" has been broken in a big way by Google and the recent &lt;a href="http://www.mandiant.com/services/advanced_persistent_threat/"&gt;Mandiant report&lt;/a&gt;. &amp;nbsp;More comments will follow at a later date. &amp;nbsp;But some occur to me now:&lt;br /&gt;&lt;br /&gt;(1)&amp;nbsp;Our current desktop and server Operating Systems are not secure.&lt;br /&gt;(2) Computer networks are insecure for most organizations and at many levels.&lt;br /&gt;(3) Digital data can no longer be protected against a determined foe.&lt;br /&gt;(4) Security researchers and visionaries should receive more funding. Lots.&lt;br /&gt;&lt;br /&gt;Order and read the &lt;a href="http://www.mandiant.com/services/advanced_persistent_threat/"&gt;Mandiant Report&lt;/a&gt;. Then imagine what a resourced foe could do if they believed the security of their nation-state depended upon seemless corporate intrusions. &amp;nbsp;Now imagine those techniques automated and in the wild. &amp;nbsp;In order for the world to have safe computing systems, our government and industry needs to sponsor more research and decriminalize vulnerability research. Otherwise, no data will ever be secret or protected again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-2816271738475560920?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/2816271738475560920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/advanced-persistent-threat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2816271738475560920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2816271738475560920'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/advanced-persistent-threat.html' title='Advanced Persistent Threat'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-1029376351437356282</id><published>2010-02-08T10:39:00.000-08:00</published><updated>2010-04-19T10:16:22.731-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bank Fraud;Money Mules;Small Business'/><title type='text'>Defending Against the Small Business Threat</title><content type='html'>&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 19px;"&gt;&lt;a href="http://online.wsj.com/article/SB10001424052748703483604574630690362605018.html?mod=WSJ_newsreel_smallbiz"&gt;"Do you expect I'm going to solve this? I'm going to take on these Russian thieves? Clearly I'm not going to [be able to] do it."&lt;/a&gt;&amp;nbsp;-small business owner defrauded by malware and "money mules" &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;A great and overdue article in the Wall Street Journal this morning: &amp;nbsp;"&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 22px;"&gt;&lt;a href="http://online.wsj.com/article/SB10001424052748703483604574630690362605018.html?mod=WSJ_newsreel_smallbiz"&gt;Wanted: Defense Against Online Bank Fraud&lt;/a&gt;". &amp;nbsp; The article discusses a now popular cyber-crime&amp;nbsp;&lt;a href="http://voices.washingtonpost.com/securityfix/2009/09/money_mules_carry_loot_for_org.html"&gt;first popularized in 2008&lt;/a&gt;&amp;nbsp;which is initiated by an online theft/fraud of insecured ATM/payroll data on user/client/small business PCs. &amp;nbsp;Fake payroll members are created and then [recruited] "&lt;a href="http://en.wikipedia.org/wiki/Money_mule"&gt;money mules&lt;/a&gt;" cash out fraudulent&amp;nbsp;paychecks from ATM terminals across the globe. &amp;nbsp;If the fraud is timed right, a small business can lose large sums from their payroll accounts within 24 hours or less. The FBI and the IC3 has been warning about this for some time:&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;br style="font-family: Arial,Helvetica,sans-serif;" /&gt;&lt;/span&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 22px;"&gt;&lt;a href="http://www.fbi.gov/pressrel/pressrel09/ach_110309.htm"&gt;http://www.fbi.gov/pressrel/pressrel09/ach_110309.htm&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://www.ic3.gov/media/2009/091103-1.aspx"&gt;http://www.ic3.gov/media/2009/091103-1.aspx&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;br style="font-family: Arial,Helvetica,sans-serif;" /&gt;&lt;/span&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 22px;"&gt;Small businesses during a recession make &amp;nbsp;excellent targets. &amp;nbsp;It is a bit like capitalizing on sick children. &amp;nbsp;Large businesses and banks know the value of security infrastructure and development. They have lots to lose and they have been high priority targets in the past. (And they have just received big chunks of "Stimulus funding." ) Most small business employ limited staff, have a few PCs (perhaps running some accounting software), maybe some server or cloud infrastructure investments, and a web site or web/commerce site. &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 22px;"&gt;The few aggressive owners/proprietors that investigate securing their infrastructure may have done so on a "self-help" basis - implementing firewalls, &lt;a href="http://en.wikipedia.org/wiki/Unified_threat_management"&gt;UTM&lt;/a&gt;, anti-virus, anti-spyware. &amp;nbsp;But even these self-motivated individuals are in no way prepared to be the targets of dedicated information warfare from skilled global criminal enterprises originating in eastern Europe, South America, Russia, China, etc.&amp;nbsp;Thus, in less than 24 hours, small business payroll accounts, many of these derived from &amp;nbsp;'bridge loans' from local banks, are wiped out. &amp;nbsp;The targeting of small business by cyber-criminals is an "anti-stimulus" effort; functioning to effectively siphon funds from a&amp;nbsp;weakened&amp;nbsp;American economy.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-1029376351437356282?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/1029376351437356282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/defending-against-small-business-threat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1029376351437356282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/1029376351437356282'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2010/02/defending-against-small-business-threat.html' title='Defending Against the Small Business Threat'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-2602069749245847455</id><published>2009-12-15T10:08:00.000-08:00</published><updated>2009-12-15T10:08:33.553-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security;Hotmail;Microsoft'/><title type='text'>Security as Interdepartmental conflict...</title><content type='html'>I received this message in my hotmail this morning:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_-L4HUu8oKmI/SyfOKYcGv5I/AAAAAAAAFLA/w1mqAuzDKYA/s1600-h/CalendarUnsafe.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_-L4HUu8oKmI/SyfOKYcGv5I/AAAAAAAAFLA/w1mqAuzDKYA/s640/CalendarUnsafe.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Why does Microsoft get dinged for this type of presentation? Why does it happen? On a small scale it was probably because the hotmail Calendar team wasn't talking with the hotmail Security team. &amp;nbsp;But that doesn't answer much. &amp;nbsp;Computer security is still, in almost all industries and architectures, and "add-in". &amp;nbsp;It is overlaid on top of existing products and architectures. &amp;nbsp;The "security guys" are on separate teams, their training is exclusive, their recommendations are "integrated" into existing products. The practice of security &amp;nbsp;never fully integrates into test suites for most product development because &amp;nbsp;it can't be marketed like a popsicle. &amp;nbsp;It is sold as an immunity, a dose of antibiotic, a pill. &amp;nbsp; Compatibility of security architecture with existing product development has ambiguous ownership.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-2602069749245847455?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/2602069749245847455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2009/12/security-as-interdepartmental-conflict.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2602069749245847455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/2602069749245847455'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2009/12/security-as-interdepartmental-conflict.html' title='Security as Interdepartmental conflict...'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_-L4HUu8oKmI/SyfOKYcGv5I/AAAAAAAAFLA/w1mqAuzDKYA/s72-c/CalendarUnsafe.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-824947933137958097</id><published>2009-12-05T22:20:00.000-08:00</published><updated>2009-12-05T22:20:45.427-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cell Tracking'/><title type='text'>Cell Tracking</title><content type='html'>This is the link to an absolutely extraordinary post &amp;nbsp;on privacy by Christopher Soghoian:&lt;br /&gt;&lt;a href="http://paranoia.dubfire.net/2009/12/8-million-reasons-for-real-surveillance.html"&gt;http://paranoia.dubfire.net/2009/12/8-million-reasons-for-real-surveillance.html &lt;/a&gt;. Mr. Soghoian's post describes the evolution of "Cell Tracking", an issue the EFF has discussed for a number of years at &lt;a href="http://www.eff.org/issues/cell-tracking"&gt;http://www.eff.org/issues/cell-tracking&lt;/a&gt;. An exceptional video on current status of the law&amp;nbsp; for "cell tracking" &amp;nbsp;and "mobility tracking" can be found here: &amp;nbsp;&lt;a href="http://www.youtube.com/watch?v=YFo2VcfWCBQ&amp;amp;feature=channel/"&gt;http://www.youtube.com/watch?v=YFo2VcfWCBQ&amp;amp;feature=channel/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The information reminds me that the OS inside most cell-phones is a literal "black box". &amp;nbsp;Because I run midpssh, I can usually find cell's IP address in the netstat tables of my SSH Server. I can see there may be some filtered ports on my phone.&amp;nbsp; But I cannot:&lt;br /&gt;(1) access a console or ssh prompt&lt;br /&gt;(2) run a network sniffer or IDS on my cell phone to see if someone is "pinging" my location or hacking me.&lt;br /&gt;&lt;br /&gt;Your cell phone is a tracking device that forbids you from root access.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-824947933137958097?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/824947933137958097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2009/12/cell-tracking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/824947933137958097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/824947933137958097'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2009/12/cell-tracking.html' title='Cell Tracking'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-3686747739858339876</id><published>2009-11-30T21:15:00.000-08:00</published><updated>2009-11-30T21:15:08.951-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='net helpmsg;Windows Error Messages;Silliness'/><title type='text'>"The specified uptodateness vector is corrupt."</title><content type='html'>I haven't posted in awhile. &amp;nbsp;Time to get back into the swing of things with a little pre-Christmas Season silliness. &amp;nbsp;Occasionally, the practice of network security makes us all a little goofy.  Seemingly random pursuits overtake us. Silly thoughts fill our console.  Perhaps this is a result of low light in the northern latitudes this time of year...In any event, should use wish to query all of the messages available in the "net helpmsg" file on Windows Vista, you can run a command like this:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;for /l %i in (1,1,16000) do  @( echo %i &amp;amp;&amp;amp; net helpmsg %i  ) 2&amp;gt;NUL&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;This will give a formatted output of every existing net help msg and all numbers that are not so..  Keep in mind that there are most probably less than 5000 of these messages, however they are numbered somewhat inconsistently in the sequence between 1 - 16,000. With cygwin or GNUWin32 utilities loaded you could add:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;for /l %i in (1,1,16000) do  @( echo %i &amp;amp;&amp;amp; net helpmsg %i  ) 2&amp;gt;NUL | egrep -B 2 -i [a-z] | tr -d /-/- | tr -d \r&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This would produce a long list of only those numbers with messages and, after some substantial period of time and processor use, would yield some very interesting reading. Here are a few of my favorites:&lt;br /&gt;&lt;br /&gt;581 &lt;br /&gt;A Windows Server has an incorrect configuration.&lt;br /&gt;&lt;br /&gt;593 &lt;br /&gt;NTVDM encountered a hard error.&lt;br /&gt;&lt;br /&gt;597 &lt;br /&gt;The parameter(s) passed to the server in the clientserver shared memory window were invalid. Too much data may have been put in the shared memory window.&lt;br /&gt;&lt;br /&gt;598 &lt;br /&gt;The stream is not a tiny stream.&lt;br /&gt;&lt;br /&gt;611&lt;br /&gt;There is an IP address conflict with another system on the network&lt;br /&gt;&lt;br /&gt;612 &lt;br /&gt;There is an IP address conflict with another system on the network&lt;br /&gt;&lt;br /&gt;615&lt;br /&gt;The policy of your user account does not allow you to change passwords too frequently.&lt;br /&gt;This is done to prevent users from changing back to a familiar, but potentially discovered, password.&lt;br /&gt;If you feel your password has been compromised then please contact your administrator immediately to have a new one assigned.&lt;br /&gt;&lt;br /&gt;617 &lt;br /&gt;You have attempted to change your password to one that you have used in the past.&lt;br /&gt;The policy of your user account does not allow this. Please select a password that you have not previously used.&lt;br /&gt;&lt;br /&gt;629 &lt;br /&gt;A group marked use for deny only cannot be enabled.&lt;br /&gt;&lt;br /&gt;670 &lt;br /&gt;WOW Assertion Error.&lt;br /&gt;&lt;br /&gt;677 &lt;br /&gt;{Too Much Information}&lt;br /&gt;The specified access control list (ACL) contained more information than was expected.&lt;br /&gt;&lt;br /&gt;678 &lt;br /&gt;This warning level status indicates that the transaction state already exists for the registry subtree, but that a transaction commit was previously aborted.&lt;br /&gt;The commit has NOT been completed, but has not been rolled back either (so it may still be committed if desired).&lt;br /&gt;&lt;br /&gt;680 &lt;br /&gt;{GUID Substitution}&lt;br /&gt;During the translation of a global identifier (GUID) to a Windows security ID (SID), no administrativelydefined GUID prefix was found.&lt;br /&gt;A substitute prefix was used, which will not compromise system security. However, this may provide a more restrictive access than intended.&lt;br /&gt;&lt;br /&gt;704 &lt;br /&gt;{Redundant Read}&lt;br /&gt;To satisfy a read request, the NT faulttolerant file system successfully read the requested data from a redundant copy.&lt;br /&gt;This was done because the file system encountered a failure on a member of the faulttolerant volume, but was unable to reassign the failing area of the device.&lt;br /&gt;&lt;br /&gt;705 &lt;br /&gt;{Redundant Write}&lt;br /&gt;To satisfy a write request, the NT faulttolerant file system successfully wrote a redundant copy of the information.&lt;br /&gt;This was done because the file system encountered a failure on a member of the faulttolerant volume, but was not able to reassign the failing area of the device.&lt;br /&gt;&lt;br /&gt;730 &lt;br /&gt;The system has awoken&lt;br /&gt;&lt;br /&gt;746 &lt;br /&gt;{Connect Failure on Primary Transport}&lt;br /&gt;An attempt was made to connect to the remote server hs on the primary transport, but the connection failed.&lt;br /&gt;The computer WAS able to connect on a secondary transport.&lt;br /&gt;&lt;br /&gt;1265 &lt;br /&gt;The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.&lt;br /&gt;&lt;br /&gt;1274 &lt;br /&gt;The group policy framework should call the extension in the synchronous foreground policy refresh.&lt;br /&gt;&lt;br /&gt;1282 &lt;br /&gt;The system detected an overrun of a stackbased buffer in this application. This overrun could potentially allow a malicious user to gain control of this application.&lt;br /&gt;&lt;br /&gt;1292 &lt;br /&gt;An operation attempted to exceed an implementationdefined limit.&lt;br /&gt;&lt;br /&gt;1349&lt;br /&gt;The type of the token is inappropriate for its attempted use.&lt;br /&gt;&lt;br /&gt;1350 &lt;br /&gt;Unable to perform a security operation on an object that has no associated security.&lt;br /&gt;&lt;br /&gt;1353 &lt;br /&gt;The domain was in the wrong state to perform the security operation.&lt;br /&gt;&lt;br /&gt;1370 &lt;br /&gt;An internal security database corruption has been encountered.&lt;br /&gt;&lt;br /&gt;1384 &lt;br /&gt;During a logon attempt, the user's security context accumulated too many security IDs.&lt;br /&gt;&lt;br /&gt;2228 &lt;br /&gt;There are too many names in the user accounts database.&lt;br /&gt;&lt;br /&gt;2385 &lt;br /&gt;The Run server you requested is paused.&lt;br /&gt;&lt;br /&gt;2431 &lt;br /&gt;The alert table is full.&lt;br /&gt;&lt;br /&gt;3013 &lt;br /&gt;The printer driver is known to be unreliable.&lt;br /&gt;&lt;br /&gt;3014 &lt;br /&gt;The printer driver is known to harm the system.&lt;br /&gt;&lt;br /&gt;3029 &lt;br /&gt;Local security could not be started because the user accounts database&lt;br /&gt;(NET.ACC) was missing or corrupted, and no usable backup&lt;br /&gt;database was present.&lt;br /&gt;&lt;br /&gt;THE SYSTEM IS NOT SECURE.&lt;br /&gt;&lt;br /&gt;3060 &lt;br /&gt;The service did not respond to control and was stopped with&lt;br /&gt;the DosKillProc function.&lt;br /&gt;&lt;br /&gt;3194 &lt;br /&gt;Hanging up a stuck session to ***.&lt;br /&gt;&lt;br /&gt;3413 &lt;br /&gt;Your logon time at *** ends at ***.&lt;br /&gt;Please clean up and log off.&lt;br /&gt;&lt;br /&gt;3513 &lt;br /&gt;More data is available than can be returned by Windows.&lt;br /&gt;&lt;br /&gt;3950 &lt;br /&gt;Reissue the given operation as a cached IO operation&lt;br /&gt;&lt;br /&gt;4006 &lt;br /&gt;Replication with a nonconfigured partner is not allowed.&lt;br /&gt;&lt;br /&gt;6628 &lt;br /&gt;Log space is exhausted.&lt;br /&gt;&lt;br /&gt;6730 &lt;br /&gt;The transaction does not have a superior enlistment.&lt;br /&gt;&lt;br /&gt;8606 &lt;br /&gt;Insufficient attributes were given to create an object. This object may not exist because it may have been deleted and already garbage collected.&lt;br /&gt;&lt;br /&gt;8629&lt;br /&gt;The specified uptodateness vector is corrupt.&lt;br /&gt;&lt;br /&gt;8630 &lt;br /&gt;The request to replicate secrets is denied.&lt;br /&gt;&lt;br /&gt;10038 &lt;br /&gt;An operation was attempted on something that is not a socket.&lt;br /&gt;&lt;br /&gt;10059 &lt;br /&gt;Too many references to some kernel object.&lt;br /&gt;&lt;br /&gt;10107 &lt;br /&gt;A system call that should never fail has failed.&lt;br /&gt;&lt;br /&gt;11007 &lt;br /&gt;There are no senders.&lt;br /&gt;&lt;br /&gt;11008 &lt;br /&gt;There are no receivers.&lt;br /&gt;&lt;br /&gt;15250 &lt;br /&gt;The requested system device cannot be identified due to multiple indistinguishable devices potentially matching the identification criteria.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8083286463160428652-3686747739858339876?l=thinking-about-network-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thinking-about-network-security.blogspot.com/feeds/3686747739858339876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thinking-about-network-security.blogspot.com/2009/11/specified-uptodateness-vector-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3686747739858339876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083286463160428652/posts/default/3686747739858339876'/><link rel='alternate' type='text/html' href='http://thinking-about-network-security.blogspot.com/2009/11/specified-uptodateness-vector-is.html' title='&quot;The specified uptodateness vector is corrupt.&quot;'/><author><name>Ryan M. Ferris</name><uri>http://www.blogger.com/profile/03122603266808854365</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='http://4.bp.blogspot.com/_-L4HUu8oKmI/TTUwJCh4LQI/AAAAAAAAHb4/vzx_aHDltF4/S220/SleepingLionWillRise.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083286463160428652.post-7185235036548392140</id><published>2009-09-07T22:27:00.000-07:00</published><updated>2009-09-09T20:52:43.649-07:00</updated><catego
