<?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>Allen Pomeroy &#187; scripts</title>
	<atom:link href="http://www.networkforensics.us/tag/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.networkforensics.us</link>
	<description>Blog of an IT security specialist  .: beta :.</description>
	<lastBuildDate>Tue, 08 Jun 2010 16:59:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=1230</generator>
		<item>
		<title>bash_history</title>
		<link>http://www.networkforensics.us/2010/01/bash_history/</link>
		<comments>http://www.networkforensics.us/2010/01/bash_history/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 17:42:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=103</guid>
		<description><![CDATA[Here&#8217;s some notable cli entries that I refer to occassionally: Mac OS X: sudo /usr/sbin/sysctl -w net.inet.ip.fw.enable=1 sudo /sbin/ipfw -q /etc/firewall.conf sudo ifconfig en0 lladdr 00:1e:c2:0f:86:10 sudo route add -net 10.2.1.0/24 10.3.1.1 Linux:]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s some notable cli entries that I refer to occassionally:</p>
<p>Mac OS X:<br />
<code><br />
sudo /usr/sbin/sysctl -w net.inet.ip.fw.enable=1<br />
sudo /sbin/ipfw -q /etc/firewall.conf<br />
sudo ifconfig en0 lladdr 00:1e:c2:0f:86:10<br />
sudo route add -net 10.2.1.0/24 10.3.1.1<br />
</code><br />
Linux:</p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2010/01/bash_history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IMAP mailstore migration .. again</title>
		<link>http://www.networkforensics.us/2009/11/imap-mailstore-migration-again/</link>
		<comments>http://www.networkforensics.us/2009/11/imap-mailstore-migration-again/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 02:47:07 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=97</guid>
		<description><![CDATA[So last weekend, I discovered that Spamhaus decided it would be a good idea to place all of the public IP addresses for Slicehost (my Linux VPS hoster) into their Spamhaus block list (SBL). This covered both my slice in Dallas and the one in St. Louis &#8211; meaning an impressive chunk of inbound mail [...]]]></description>
			<content:encoded><![CDATA[<p>So last weekend, I discovered that <strong><a title="www.spamhaus.org" href="http://www.spamhaus.org/" target="_blank">Spamhaus</a></strong> decided it would be a good idea to place all of the public IP addresses for <a title="www.slicehost.com" href="http://www.slicehost.com" target="_self">Slicehost</a> (my Linux VPS hoster) into their Spamhaus block list (<a title="http://www.spamhaus.org/sbl/index.lasso" href="http://www.spamhaus.org/sbl/index.lasso">SBL</a>). This covered both my slice in Dallas and the one in St. Louis &#8211; meaning an impressive chunk of inbound mail to my domains was being trashed by the sending MTA and an even bigger chunk of my outbound mail was being outright rejected since the sending IP&#8217;s were on the SBL.  Slicehost worked hard to convince Spamhaus to recind the blocklist, so the Slicehost IP&#8217;s got moved over to the less-nasty-but-you&#8217;re-still-probably-a-spamming-dirtbag <a title="PBL" href="http://www.spamhaus.org/pbl/index.lasso" target="_blank">Policy Block list</a> (PBL) assuming affected IP owners would request to be removed from that list.</p>
<blockquote><p><em><strong>Sample query to see if you&#8217;re on any Spamhaus block list:  http://www.spamhaus.org/query/bl?ip=10.11.12.13</strong></em></p></blockquote>
<p>It seems it&#8217;s time to relinquish the care and feeding of my own Postfix mail system and turn to a hosted solution.  This means I need to migrate about 5GB of IMAP store to another site (again).  Last time I did a wholesale migration, I used <em><strong><a href="http://freshmeat.net/projects/imapsync/">imapsync</a></strong></em> to make the transition painless.  In the code example below, an SSL connection to the IMAPS server at imap-server.sourcedomain.com is made with username@sourcedomain.com and the password stored in the plaintext file secret1.  An SSL connection is made to the target system (which happens to be the server on which the imapsync tool is running, but could just as easily be another IMAPS server somewhere on a network accessible to the host where imapsync is running).  The &#8211;delete and &#8211;expunge1 arguments will clean the successfully moved messages from IMAP store #1 .. so be sure you have your messages on the target successfully!  Imapsync can be run iteratively to ensure you have got all the messages from your source.</p>
<p><code><br />
/usr/bin/imapsync \<br />
--host1 imap-server.sourcedomain.com \<br />
--ssl1 \<br />
--authmech1 LOGIN \<br />
--user1 username@sourcedomain.com --passfile1 secret1 \<br />
--host2 127.0.0.1 --user2 username@targetdomain.com --passfile2 secret2 \<br />
--ssl2 \<br />
--delete --expunge1 \<br />
--buffersize=128<br />
</code><br />
And one can use the<br />
<code><br />
--dry<br />
</code><br />
option to just test the process but not actually move any of the messages.</p>
<p>So that&#8217;s it &#8211; I&#8217;m about half way though migrating my current IMAP stores over to a hosted mail solution, so that I don&#8217;t need to keep up with the increasing level of care and feeding that running your own mail service requires.  Before I get too many darts about that .. I first started running my own personal MTA in 1995, adding spam and av filtering over time, and adding substantial redundancy (servers, sites, storage) so I could rely on it and fix things that broke as I had time rather than right when they broke (which was <em><strong>always</strong></em> at a bad time).  My new hosted solution takes over from two VPS servers running Postfix, Spamassassin, ClamAV, Greylisting with the IMAP store replicated across data centers in different states (15 minute rsyncs).  So soon, the (hopefully) last Allen Pomeroy owned and operated MTA can be turned off, while I get to work on fun stuff, rather than figuring out why my email is bouncing.  :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/11/imap-mailstore-migration-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sifting through Checkpoint FW1 logs</title>
		<link>http://www.networkforensics.us/2009/09/sifting-through-checkpoint-fw1-logs/</link>
		<comments>http://www.networkforensics.us/2009/09/sifting-through-checkpoint-fw1-logs/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 19:28:22 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[fw]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=83</guid>
		<description><![CDATA[Once the ASCII log files are available for processing, my fw1logsearch.pl script can be used to find complex patterns of interest.]]></description>
			<content:encoded><![CDATA[<p>Recently I found myself in the unhappy position of needing to sift through slightly more than a billion Checkpoint Firewall-1 log lines, looking for specific patterns of access.  The problem was that many of the exported fwm log files had differing column positions and there had been many ruleset changes over the course of 11 months worth of log data.  Many of the excellent FW1 log summarization tools (such as <a href="http://ginini.com/software/fwlogsum/">Peter Sundstrom&#8217;s fwlogsum</a>) didn&#8217;t handle the hundreds of files and differing column positions.</p>
<blockquote><p><em>The final scripted solution was processing over 11,000 lines/second .. and still took over 23 hours for the first run.</em></p></blockquote>
<p>Log file exports via fwm logexport can have variable column positioning, except for record ID number &#8220;num&#8221;, which is *always* column number one.  I see three viable alternatives to the changing column position in the ASCII log files exported via fwm &#8211; so we can automate the log processing:</p>
<li>Export the FW1 log file to ASCII via<br />
<code>fwm logexport -i fw1-binary-logfile -o fw1-ascii-logfile.txt -n -p</code></li>
<ol>
<li>Parse the header line (line #1) of every log file and dynamically map (rearrange) the columns to a pre-determined standard in memory before further processing (painful, expensive)</li>
<li>Tell Checkpoint fwm to export in a fixed column ordering
<ul>create<br />
<code>logexport.ini</code><br />
and place in<br />
<code>$FWDIR/conf directory</code></ul>
<ul>eg. fwmgmtsrv:<br />
<code>C:\WINDOWS\FW1\R65\FW1\conf</code></ul>
<ul>logexport.ini:</ul>
<ul> <code>[Fields_Info]<br />
included_fields = num,date,time,orig,origin_id,type,action,alert,i/f_name,<br />
i/f_dir,product,rule,src,dst,proto,service,s_port,xlatesrc,xlatedst,<br />
nat_rulenum,nat_addtnl_rulenum,xlatesport,xlatedport,user,<br />
partner,community,session_id,ipv6_src,ipv6_dst,<br />
srckeyid,dstkeyid,CookieI,CookieR,msgid,elapsed,<br />
bytes,packets,start_time,snid,ua_snid,d_name,id_src,ua_operation,<br />
sso_type_desc,app_name,auth_domain,uname4domain,wa_headers,<br />
result_desc,r_dest,comment,url,redirect_url,enc_desc,e2e_enc_desc,<br />
auth_result,attack,log_sys_message,<br />
rule_uid,rule_name,service_id,resource,reason,cat_server,<br />
dstname,SOAP Method,category,ICMP,message_info,<br />
TCP flags,rpc_prog,Total logs,<br />
Suppressed logs,DCE-RPC Interface UUID,Packet info,<br />
message,ip_id,ip_len,ip_offset,fragments_dropped,during_sec</code></ul>
</li>
<li>Use OPSEC LEA tools to extract event log records instead of export via fwm logexport</li>
</ol>
<p>Once the ASCII log files are available for processing, my <strong><span style="color: #0000ff;"><a href="http://www.networkforensics.us/software/checkpoint/fw1logsearch.pl">fw1logsearch.pl</a></span></strong> script can be used to find complex patterns of interest.  Any matching records found by fw1logsearch will be output with an initial FW1 header line so that fw1logsearch can be used iteratively, to build very complex search criteria.  fw1logsearch can also write out a discard file allowing completely negative logic searches resulting in 100% of the input data separated into a match file and a didn&#8217;t match file.  Some examples of how I&#8217;ve used it are shown here:<br />
<code><br />
gunzip -c fwlogs/2009*gz | \<br />
fw1logsearch.pl --allinclude \<br />
-S '10\.1\.1[1359]\.|10\.2\.1[01]\.|192\.168\.2[245]\.' \<br />
-d '10\.1\.1[1359]\.|10\.2\.1[01]\.|192\.168\.2[245]\.' \<br />
-p '^1310$|^1411$|^1812$|^455' | \<br />
fw1logsearch.pl -S '192\.168\.22\.14$|10\.2\.11\.12$' |\<br />
fw1logsearch.pl --allexclude \<br />
-S '^192\.168\.24\.12$' -P '^1310$' --rejectfile 192-168-24-12-port-1310.txt<br />
</code><br />
Line by line:<br />
1. Unzip the compressed ASCII log files, feed them to the first instance of fw1logsearch.pl<br />
2. First fw1logsearch &#8211; all conditions must be true for any events to match<br />
Source address must NOT be in any of the following regex ranges:<br />
10.1.11.* 10.1.13.* 10.1.15.* 10.1.19.*<br />
10.2.10.* 10.2.11.*<br />
192.168.22.* 192.168.24.* 192.168.25.*<br />
Destination address must be in one of the same following regex ranges.<br />
Service (destination port) must be one of:<br />
Exactly port: 1310, 1411, 1812, or any port starting with 455<br />
No protocol is specified, so it will match either TCP or UDP</p>
<p>fw1logsearch.pl will output any matching events to stdout, including a FW1 log header line, so the next instance of fw1logsearch.pl  continues filtering the result set.</p>
<p>3. The second fw1logsearch.pl specifies Source Address must not be any of the following<br />
192.168.22.14</p>
<p>10.2.11.12</p>
<p>4. The last fw1logsearch.pl excludes port 1310 from 192.168.24.12, and puts all those records into a separate reject file, while writing the other records to stdout.</p>
<p>This script has been used to process over 4 billion records within the project I wrote it for &#8211; and precisely found all the use of particular business cases I needed to modify.  The result was zero outages and no unintended business interruption.</p>
<p>Basic syntax/help file:</p>
<p>Usage:  fw1logsearch.pl<br />
[-a|--incaction|-A|--excaction &lt;action regex&gt;]<br />
[-p|--incservice|-P|--excservice &lt;dst port regex&gt;]<br />
[-b|--incs_port|-B|--excs_port &lt;src port regex&gt;]<br />
[-s|--incsrc|-S|--excsrc &lt;src regex&gt;]<br />
[-d|--incdst|-D|--excdst &lt;dst regex&gt;]<br />
[-o|--incorig|-O|--excorig &lt;fw regex&gt;]<br />
[-r|--incrule|-R|--excrule &lt;rule-number regex&gt;]<br />
[-t|--incproto|-T|--excproto &lt;proto regex&gt;]</p>
<p>[--dnscache &lt;dns-cache-file&gt;]<br />
[--resolveip]<br />
[--allinclude]<br />
[--allexclude]<br />
[--rejectfile &lt;file&gt;]<br />
[--debug &lt;level&gt;]</p>
<p>fw1logsearch.pl will search a fwm logexport text file for regex patterns specified for supported columns (such as service, src, dst, rule, action, proto and orig).</p>
<p>Include and exclude regex matches may be specified on the same line, although they both will include (print) a line or exclude (reject) a line based on single matches.  Allinclude or Allexclude must be specified to force a match<br />
only on all specified column regex patterns.</p>
<p>Regex patterns can be enclosed with single quotes to include characters that are special to the shell, such as the &#8216;or&#8217; (|) operator.</p>
<p>Header will be output only if there are any matching lines.</p>
<p>Example invocations:<br />
$ cat 2008-07-07*txt | \<br />
fw1logsearch.pl \<br />
-p &#8217;53|domain&#8217; \<br />
-d &#8217;192.168.1.2|host1|10.10.1.2|host2&#8242; \<br />
-o &#8217;192.168.2.3|10.10.2.4|10.10.4.5&#8242; \<br />
-S &#8217;64.65.66.67|32.33.34.35|10.10.*|192.168.*&#8217; \<br />
&#8211;resolveip<br />
Will require destination port (service) to be 53, destination IP to be any of 192.168.1.2, host1, 10.10.1.2, or host2  the reporting firewall (origin) to be any of 192.168.2.3, 10.10.2.4, or 10.10.4.5  and the source IP must not be<br />
any of 64.65.66.67, 32.33.34.35, 10.10.*, or 192.168.*  Any lines that match this criteria, will display and the orig, src, and dst columns will use the default DNS cache file (dynamically built/managed) to perform name resolution, replacing the IP addresses where possible.</p>
<p>Include regex patterns:<br />
-a  &#8211;incaction    Rule action (accept, deny)<br />
-b  &#8211;incs_port    Source port (s_port)<br />
-p  &#8211;incservice   Destination port (service)<br />
-s  &#8211;incsrc       Source IP|hostname<br />
-d  &#8211;incdst       Destination IP|hostname<br />
-o  &#8211;incorig      Reporting FW IP|hostname<br />
-r  &#8211;incrule      Rule number that triggered entry<br />
-t  &#8211;incproto     Protocol of connection</p>
<p>Exclude regex patterns:<br />
-A  &#8211;excaction    Rule action (accept, deny)<br />
-B  &#8211;excs_port    Source port (s_port)<br />
-P  &#8211;excservice   Destination port (service)<br />
-S  &#8211;excsrc       Source IP|hostname<br />
-D  &#8211;excdst       Destination IP|hostname<br />
-O  &#8211;excorig      Reporting FW IP|hostname<br />
-R  &#8211;excrule      Rule number that triggered entry<br />
-T  &#8211;excproto     Protocol of connection</p>
<p>Other options:<br />
&#8211;debug {level} Turn on debugging<br />
&#8211;dnscache      Specify location of DNS cache file to be used with<br />
the Resolve IPs option<br />
&#8211;resolveip     Resolve IPs for orig, src, and dst columns AFTER filtering<br />
&#8211;rejectfile    Write out all rejected lines to a specified file</p>
<p>Download <span style="color: #0000ff;"><a href="http://www.networkforensics.us/software/checkpoint/fw1logsearch.pl">fw1logsearch.pl</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/09/sifting-through-checkpoint-fw1-logs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mac OS X 10.5 Command Line notes</title>
		<link>http://www.networkforensics.us/2009/06/mac-os-x-command-line-notes/</link>
		<comments>http://www.networkforensics.us/2009/06/mac-os-x-command-line-notes/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 00:24:54 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.us/?p=81</guid>
		<description><![CDATA[Encrypted Filesystems with Sparse Bundles Mac OS X offers encrypted filesystems through sparse bundles.  To mount up a sparse bundle, given the password used to create the bundle, use the hdiutil: hdiutil attach -verbose -readonly /path/to/sparse.bundle.directory This will mount up the sparse bundle located at the directory path specified.  To unmount the sparse bundle, use: [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Encrypted Filesystems with Sparse Bundles</strong><br />
Mac OS X offers encrypted filesystems through sparse bundles.  To mount up a sparse bundle, given the password used to create the bundle, use the hdiutil:</p>
<blockquote><p>hdiutil attach -verbose -readonly /path/to/sparse.bundle.directory</p></blockquote>
<p>This will mount up the sparse bundle located at the directory path specified.  To unmount the sparse bundle, use:</p>
<blockquote><p>hdiutil detach /Volume/sparse.bundle.name</p></blockquote>
<p><strong>Adding entries to /etc/hosts</strong><br />
Although simply editing /etc/hosts should work, there are times where the new entries may not be recognized, in these cases the OS X name cache daemon needs to be kicked:</p>
<blockquote><p>dscacheutil -flushcache</p></blockquote>
<p><strong>Mac OS X Hostnames</strong><br />
Although you can change the hostname of your Mac OS X device through the System Control Panel -&gt; Sharing, the following command line can lock the name so DHCP and other dynamic networking protocols don&#8217;t mess up your hostname (from <a title="http://ma.tt/2004/07/os-x-hostname/" href="http://ma.tt/2004/07/os-x-hostname/">RichardBronosky</a>):</p>
<blockquote><p>sudo hostname my-permanent-name</p>
<p>sudo scutil –set LocalHostName $(hostname)</p>
<p>sudo scutil –set HostName $(hostname)</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/06/mac-os-x-command-line-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Synchronizing directories</title>
		<link>http://www.networkforensics.us/2009/05/synchronizing-directories/</link>
		<comments>http://www.networkforensics.us/2009/05/synchronizing-directories/#comments</comments>
		<pubDate>Sun, 24 May 2009 17:46:52 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.us/?p=67</guid>
		<description><![CDATA[Fast way to synchronize the content of your iTunes libraries &#8211; this doesn&#8217;t sync the playlists or any iTunes meta information (and you may need to perform an Add to Library .. to import any new content). This was just a quick and dirty way to sync up my iTunes downloads with another iTunes library [...]]]></description>
			<content:encoded><![CDATA[<p>Fast way to synchronize the content of your iTunes libraries &#8211; this doesn&#8217;t sync the playlists or any iTunes meta information (and you may need to perform an Add to Library .. to import any new content).  This was just a quick and dirty way to sync up my iTunes downloads with another iTunes library at home.  This assumes that you&#8217;ve opened up the ability to Remote Login (ssh) to the target Mac (topic for another time).</p>
<blockquote>
<pre>rsync -av -e ssh "Music/iTunes/iTunes Music/" ahull@10.20.1.103:"/Users/ahull/Music/iTunes/iTunes\ Music"</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/05/synchronizing-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux iptables notes</title>
		<link>http://www.networkforensics.us/2009/05/linux-iptables-notes/</link>
		<comments>http://www.networkforensics.us/2009/05/linux-iptables-notes/#comments</comments>
		<pubDate>Fri, 15 May 2009 14:37:23 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[fw]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.ca/blog/?p=32</guid>
		<description><![CDATA[Add local redirection of low port to unpriv high port Remove any existing entries: iptables -t nat -D PREROUTING &#8211;src 0/0 -p tcp &#8211;dport 25 -j REDIRECT &#8211;to-ports 11025 2&#62; /dev/null iptables -t nat -D PREROUTING &#8211;src 0/0 -p tcp &#8211;dport 80 -j REDIRECT &#8211;to-ports 8080 2&#62; /dev/null Add new redirects: iptables -t nat -I [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Add local redirection of low port to unpriv high port </strong></p>
<p>Remove any existing entries:</p>
<p>iptables -t nat -D PREROUTING &#8211;src 0/0 -p tcp &#8211;dport 25 -j REDIRECT  &#8211;to-ports 11025 2&gt; /dev/null<br />
iptables -t nat -D PREROUTING &#8211;src 0/0 -p  tcp &#8211;dport 80 -j REDIRECT &#8211;to-ports 8080 2&gt; /dev/null</p>
<p>Add new redirects:<br />
iptables -t nat  -I PREROUTING &#8211;src 0/0 -p tcp &#8211;dport 25 -j REDIRECT &#8211;to-ports 11025<br />
iptables -t nat -I PREROUTING &#8211;src 0/0 -p tcp &#8211;dport 80 -j REDIRECT  &#8211;to-ports 8080</p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/05/linux-iptables-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reducing malware risk by removing local Administrator privileges</title>
		<link>http://www.networkforensics.us/2009/05/reducing-malware-risk-by-removing-local-administrator-privileges/</link>
		<comments>http://www.networkforensics.us/2009/05/reducing-malware-risk-by-removing-local-administrator-privileges/#comments</comments>
		<pubDate>Thu, 14 May 2009 21:20:57 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.ca/blog/?p=17</guid>
		<description><![CDATA[Running day-to-day with a Windows account that has Administrator privileges is a recipe for disaster.  Casual browsing of a website that is infected or inadvertent opening of infected attachments can result in an infection through the user&#8217;s Administrator privileges.  Something like 92% of Microsoft critical vulnerabilities announced in 2008 could have been mitigated by operating [...]]]></description>
			<content:encoded><![CDATA[<p>Running day-to-day with a Windows account that has Administrator privileges is a recipe for disaster.  Casual browsing of a website that is infected or inadvertent opening of infected attachments can result in an infection through the user&#8217;s Administrator privileges.  Something like 92% of Microsoft critical vulnerabilities announced in 2008 could have been mitigated by operating day-to-day as a normal user.  Splitting your accounts into a normal account and admin account is a good idea, but it can lead to some headaches when the normal user needs to run temporarily as Administrator.</p>
<p>Fortunately there are some work arounds that can be used to temporarily elevate the user&#8217;s privileges to Administrator.  Most of these involve the RUNAS command:</p>
<p><strong>File explorer<br />
</strong>If you&#8217;re running IE7 under WinXP, in order to run Windows Explorer with the runas command, it must be run as a separate process. A quick way to do this, without having to change your Folder Options settings, would be to run an instance of Explorer with the undocumented parameter /separate, like this:</p>
<blockquote>
<pre>runas /user:domain\username "explorer /separate"</pre>
</blockquote>
<p><strong>Command Line Prompt<br />
</strong>You can add a shortcut on the task bar with the following syntax to get an Administrator cmd prompt:</p>
<blockquote>
<pre>%windir%\system32\runas.exe /user:yourdomain\a-someuser cmd</pre>
</blockquote>
<p>yourdomain is the name of your AD domain if you have one, if not, leave it out.  a-someuser is a suggested naming convention for the Administrator account associated with the user named someuser.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/05/reducing-malware-risk-by-removing-local-administrator-privileges/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using tr to emulate dos2unix</title>
		<link>http://www.networkforensics.us/2009/05/using-tr-to-emulate-dos2unix/</link>
		<comments>http://www.networkforensics.us/2009/05/using-tr-to-emulate-dos2unix/#comments</comments>
		<pubDate>Thu, 14 May 2009 20:08:00 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.ca/blog/?p=10</guid>
		<description><![CDATA[As pointed out in many postings and sites, one can use tr to remove octal 015 (^M or CR) tr -d '\015' &#60; oldfile &#62; newfile]]></description>
			<content:encoded><![CDATA[<p>As pointed out in many postings and sites, one can use tr to remove octal 015 (^M or CR)</p>
<blockquote>
<pre>tr -d '\015' &lt; oldfile &gt; newfile</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/05/using-tr-to-emulate-dos2unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
