<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>108.bz &#187; Malware</title>
	<atom:link href="http://www.108.bz/posts/tag/malware/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.108.bz</link>
	<description>Wandering futilities...</description>
	<lastBuildDate>Wed, 08 Sep 2010 13:45:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Detecting malware using Windows Auditing events</title>
		<link>http://www.108.bz/posts/it/detecting-malware-using-windows-auditing-events/</link>
		<comments>http://www.108.bz/posts/it/detecting-malware-using-windows-auditing-events/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 23:58:18 +0000</pubDate>
		<dc:creator>Giuliano</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Malware]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.108.bz/?p=314</guid>
		<description><![CDATA[This post1 explains how to use nmap and smb-check-vulns to scan a network in search of Conficker infected hosts. I thought that the whole Conficker case was over, but hopefully some of the measures I took to deal with it almost an year ago, will still be relevant to other kinds of malware. And, also, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.disordine.com/2010/02/11/come-cercare-luntore-nella-propria-rete/">This</a> post<sup class='footnote'><a href='#fn-314-1' id='fnref-314-1'>1</a></sup> explains how to use nmap and smb-check-vulns to scan a network in search of <a href="http://en.wikipedia.org/wiki/Conficker">Conficker</a> infected hosts. I thought that the whole Conficker case was over, but hopefully some of the measures I took to deal with it almost an year ago, will still be relevant to other kinds of malware. And, also, the method I&#8217;ll show you here differs from the nmap one in that the latter is active, whereas mine is passive. Actively probing an host for vulnerabilities could be very very much alike &#8220;exploiting&#8221; it as malware does, and have similar effects. For instance, a service/process could crash, making it not always advisable to run active scans on your servers subnet. Passive analysis, on the other hand, unobtrusively collects clues about who&#8217;s misbehaving. </p>
<p>During the Conficker/Downadup outburst, we observed that:</p>
<ul>
<li>Antivirus wasn&#8217;t always able to detect/stop it.</li>
<li>The virus was copying files in known directories (<span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">C:\WINDOWS\SYSTEM32</span>) on about to be infected machines.</li>
<li>Security patched hosts were still subject to the remote malicious file copying routine. The copy could either succeed or fail, depending on which permissions had the user that &#8220;runs&#8221; the virus. The copy in itself doesn&#8217;t pose any security concern. Even if no A/V is active on the destination host, but virus exploitable flaws have been patched, malware won&#8217;t be able to activate itself. Otherwise, the A/V would remove suspect files as soon as they are caught, without interfering with our detection purposes.</li>
</ul>
<p>This behaviour makes it possible to use a &#8220;honeypot&#8221; approach. The detecting server can be any production host provided that it is security patched and A/V protected. You could, as we did, choose a Domain Controller and: </p>
<ul>
<li>Run <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">Administrative Tools</span> &rarr; <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">Domain Controller Security Policy</span></li>
<p><a href="http://www.108.bz/wp-content/uploads/2010/03/detectingmalware1.gif"><img src="http://www.108.bz/wp-content/uploads/2010/03/detectingmalware1.gif" alt="" title="detectingmalware1" width="429" height="44" class="alignnone size-full wp-image-322" /></a></p>
<li>Modify the Audit Policy, enabling tracking of successful <i>logon events</i> and <i>object access</i>. By default the OS will only log <i>failures</i>, but that&#8217;s not enough.</li>
<p><a href="http://www.108.bz/wp-content/uploads/2010/03/detectingmalware21.gif"><img src="http://www.108.bz/wp-content/uploads/2010/03/detectingmalware21.gif" alt="" title="detectingmalware2" width="562" height="180" class="alignnone size-full wp-image-329" /></a></p>
<li><i>Object Access</i> is activated at a file/directory level. Open up the Properties of a directory you know is accessed by the virus, click on <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">Security</span>, then <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">Advanced</span>. The <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">Auditing</span> tab is what you&#8217;re interested in. Set things up so that any &#8220;Create File/Write Data&#8221; attempt of Type &#8220;Success&#8221; will be logged. The semantics about how auditing settings are propagated from parent to child works in the same way as NFTS permissions.</li>
<p><a href="http://www.108.bz/wp-content/uploads/2010/03/detectingmalware3.gif"><img src="http://www.108.bz/wp-content/uploads/2010/03/detectingmalware3.gif" alt="" title="detectingmalware3" width="549" height="465" class="alignnone size-full wp-image-324" /></a></p>
<li>From this point on, you should monitor the honeypot server&#8217;s Security Event Log. I wrote a Perl script to do it for me. It works by selecting events with ID 560 and 540, extracting their text and printing just the needed info.</li>
</ul>
<p>Let&#8217;s look at how it&#8217;s used (the only parameter is the hostname/address of the honeypot server):</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\loganalysis&gt;perl ddloganalysis.pl honeypot-srv.domain.lan &gt; ddlog.txt</div></div>
<p>Skimming through the generated log, you&#8217;ll notice the files being dropped into <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">C:\WINDOWS\system32</span> (or any directory you set up for auditing), the user that actually created them and, before (time-wise), from which address the user is coming.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">17/03/2009 16.26.19 &nbsp; 560 : C:\WINDOWS\system32\onevthx.vr (Administrator)<br />
17/03/2009 16.26.18 &nbsp; 540 : &nbsp;(10.1.1.94 - Administrator)<br />
17/03/2009 15.35.24 &nbsp; 560 : C:\WINDOWS\system32\onevthx.vr (SpectrumLT)<br />
17/03/2009 15.35.24 &nbsp; 540 : &nbsp;(10.6.3.6 - SpectrumLT)</div></div>
<p>We successfully used the script to pinpoint the rogue hosts. Deeming it useful, here it is:</p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;height:300px;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!perl</span><br />
<br />
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Win32<span style="color: #339933;">::</span><span style="color: #006600;">EventLog</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> POSIX <a href="http://perldoc.perl.org/functions/qw.html"><span style="color: #000066;">qw</span></a> <span style="color: #009900;">&#40;</span> strftime <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@matches</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#'job$', &nbsp; # useless, since scheduled tasks are always created by SYSTEM</span><br />
&nbsp; &nbsp; <span style="color: #ff0000;">'system32'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #ff0000;">'eicar.com'</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;Usage:<span style="color: #000099; font-weight: bold;">\n</span>$0 servername&quot;</span> <span style="color: #b1b100;">unless</span> <span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ev</span><span style="color: #339933;">=</span>Win32<span style="color: #339933;">::</span><span style="color: #006600;">EventLog</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Security'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;Can't open EventLog<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$recs</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">GetNumber</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$recs</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;Can't get number of EventLog records<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$base</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">GetOldest</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$base</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;Can't get number of oldest EventLog record<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> getts<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$)</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> strftime <span style="color: #ff0000;">'%d/%m/%Y %H.%M.%S'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><a href="http://perldoc.perl.org/functions/localtime.html"><span style="color: #000066;">localtime</span></a> <a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@progress</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'-'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\'</span>,'</span><span style="color: #339933;">|</span><span style="color: #ff0000;">','</span><span style="color: #339933;">/</span><span style="color: #ff0000;">','</span><span style="color: #339933;">-</span><span style="color: #ff0000;">','</span>\<span style="color: #ff0000;">','</span><span style="color: #339933;">|</span><span style="color: #ff0000;">','</span><span style="color: #339933;">/</span><span style="color: #ff0000;">');<br />
<br />
my $x = $recs-1;<br />
my $h;<br />
while ($x &gt;= 0) {<br />
&nbsp; &nbsp; $ev-&gt;Read(EVENTLOG_FORWARDS_READ|EVENTLOG_SEEK_READ,<br />
&nbsp; &nbsp; &nbsp; &nbsp; $base + $x,<br />
&nbsp; &nbsp; &nbsp; &nbsp; $h)<br />
&nbsp; &nbsp; &nbsp; &nbsp; or die &quot;Can'</span>t <a href="http://perldoc.perl.org/functions/read.html"><span style="color: #000066;">read</span></a> EventLog entry <span style="color: #666666; font-style: italic;">#$x\n&quot;;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #000000; font-weight: bold;">STDERR</span> <span style="color: #0000ff;">$progress</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$#progress</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$x</span> <span style="color: #339933;">%</span> <span style="color: #0000ff;">@progress</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Source<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">'Security'</span> <span style="color: #b1b100;">and</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>EventID<span style="color: #009900;">&#125;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">560</span> <span style="color: #b1b100;">or</span> <span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>EventID<span style="color: #009900;">&#125;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">540</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Win32<span style="color: #339933;">::</span><span style="color: #006600;">EventLog</span><span style="color: #339933;">::</span><span style="color: #006600;">GetMessageText</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$h</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>EventID<span style="color: #009900;">&#125;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">560</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Message<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/Object Name:[\t ]*(.*?)\r/gis</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Message<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/Client User Name:[\t ]*(.*?)\r/gis</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$clientusername</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$filename</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://perldoc.perl.org/functions/grep.html"><span style="color: #000066;">grep</span></a> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$m</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$_</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$filename</span> <span style="color: #339933;">=~</span> <span style="color: #339933;">/</span><span style="color: #0000ff;">$m</span><span style="color: #339933;">/</span>i<span style="color: #009900;">&#125;</span> <span style="color: #0000ff;">@matches</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/printf.html"><span style="color: #000066;">printf</span></a> <span style="color: #ff0000;">&quot;%s %5d : %s (%s)<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> getts<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>TimeGenerated<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>EventID<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$filename</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$clientusername</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>EventID<span style="color: #009900;">&#125;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">540</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Message<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/User Name:[\t ]*(.*?)\r/gis</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$username</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Message<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/Workstation Name:[\t ]*(.*?)\r/gis</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$workstation</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Message<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/Source Network Address:[\t ]*(.*?)\r/gis</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$addr</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/printf.html"><span style="color: #000066;">printf</span></a> <span style="color: #ff0000;">&quot;%s %5d : %s (%s - %s)<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> getts<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>TimeGenerated<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$h</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>EventID<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$workstation</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$addr</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$username</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #0000ff;">$workstation</span> <span style="color: #b1b100;">or</span> <span style="color: #0000ff;">$addr</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$x</span><span style="color: #339933;">--;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<a href="http://perldoc.perl.org/functions/exit.html"><span style="color: #000066;">exit</span></a><span style="color: #339933;">;</span></div></div>
<div class='footnotes'>
<div class='footnotedivider'></div>
<ol>
<li id='fn-314-1'>In italian, sorry. Look <a href="http://jahboite.co.uk/blog/2009/03/nmap-4-85beta5-and-conficker.html">here</a> for an english equivalent and <a href="http://nmap.org/nsedoc/scripts/smb-check-vulns.html">here</a> for more info. <span class='footnotereverse'><a href='#fnref-314-1'>&#8617;</a></span></li>
</ol>
</div>
 <img src="http://www.108.bz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=314" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.108.bz/posts/it/detecting-malware-using-windows-auditing-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
