<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Incident Response howto</title>
	<atom:link href="http://irhowto.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://irhowto.wordpress.com</link>
	<description>Getting IR done using some elbow grease</description>
	<lastBuildDate>Tue, 21 May 2013 23:53:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='irhowto.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Incident Response howto</title>
		<link>http://irhowto.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://irhowto.wordpress.com/osd.xml" title="Incident Response howto" />
	<atom:link rel='hub' href='http://irhowto.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How to use Java in the Enterprise while Limiting Exposure with IE Trusted Sites</title>
		<link>http://irhowto.wordpress.com/2013/03/26/how-to-use-java-in-the-enterprise-while-limiting-exposure-with-ie-trusted-sites/</link>
		<comments>http://irhowto.wordpress.com/2013/03/26/how-to-use-java-in-the-enterprise-while-limiting-exposure-with-ie-trusted-sites/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 01:15:39 +0000</pubDate>
		<dc:creator>twsecblog</dc:creator>
				<category><![CDATA[Defense]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[Enterprise]]></category>
		<category><![CDATA[GPO]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Limit Rights]]></category>

		<guid isPermaLink="false">http://irhowto.wordpress.com/?p=773</guid>
		<description><![CDATA[Summary Java has become a difficult software to wrangle in the past 18 months due to the number of exploits released. Unfortunately, most enterprises have at least one critical application that relies on this technology. To limit its attack surface, I suggest using a whitelist approach. For the most compatibility in corporate environments, I&#8217;m using IE [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=irhowto.wordpress.com&#038;blog=7721318&#038;post=773&#038;subd=irhowto&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h1><span style="line-height:1.4;">Summary</span></h1>
<p>Java has become a difficult software to wrangle in the past 18 months due to the number of exploits released. Unfortunately, most enterprises have at least one critical application that relies on this technology. To limit its attack surface, I suggest using a whitelist approach. For the most compatibility in corporate environments, I&#8217;m using IE as the browser that has Java enabled and manage these settings in GPO. To make sure users do not have other browsers with Java enabled on the same system, we will disable it for both Google Chrome and Mozilla Firefox.</p>
<p>Currently, it does not appear to be a good way to whitelist “Java Web Start” applications. Due to this issue, my recommendation is to currently disable this feature at this time. You may need to create an exempt group if this is a required feature for certain individuals or group in your organizations.</p>
<h2>Deployment Options</h2>
<p>These settings will need to be applied every time Java or when your web browsers are updated at minimum. It&#8217;s best to have these settings applied via GPO or at every log in. The GPO.bat file can be replaced by adding the registry setting into a GPO preference.  The files can be found<a href="http://goo.gl/syrp9"><strong> here.</strong></a></p>
<p><b>Note: Even though these setting have been tested on both XP and Win7 please test them in your environment before deploying. All settings are based on 32-bit Java. If you are running the 64-bit version, these setting can easily be modified to meet that need.</b></p>
<h4>GPO</h4>
<p>To deploy these settings using GPO you will need to:</p>
<ol>
<li>Add to the Trusted Sites</li>
<li>Implement the GPO section for each of the implementation sections below</li>
<li>Deploy the gpo.bat and disable_java_firefox.vbs, via GPO,  The gpo.bat only makes registry changes not directly manageable from GPO.</li>
<li>Disable Java in Chrome.</li>
</ol>
<h4>Windows Batch</h4>
<p>If you are planning to use the batch only option they should be ran with Admin privileges.</p>
<ol>
<li>Add to the Trusted Sites via GPO</li>
<li>Disable Java in Chrome</li>
<li>Copy the java.bat and disable_Java_firefox.vbs to a network share and make sure its ran with Admin privileges on all systems</li>
</ol>
<h1>Implementation</h1>
<h2><span style="text-decoration:underline;">Adding Trusted Sites</span></h2>
<p style="padding-left:30px;"><b>To manage this setting via GPO </b></p>
<p style="padding-left:30px;">User Config &gt; Admin Templates &gt;Windows Components &gt; Internet Explorer &gt;Internet Control Panel &gt;Security Page&gt; Site to Zone Assignment list</p>
<p style="padding-left:30px;">To add a zone the Value name is the site you want to whitelist and the value is what zone you want to add it to. To add to trusted zone always set the value to 2.</p>
<p style="padding-left:30px;">*.wordpress.com 2</p>
<p style="padding-left:30px;">To add a specific site and not an entire domain</p>
<p style="padding-left:30px;"><a href="http://www.mywebsite.com" rel="nofollow">http://www.mywebsite.com</a> 2</p>
<h2><span style="text-decoration:underline;">Disable Java in Firefox</span><a title="" href="#_ftn1"><b><br />
</b></a></h2>
<p style="padding-left:30px;">The Disable_Java_firefox VB <a href="http://publicsoliloquy.blogspot.com/2012/08/wrote-vbs-script-to-loop-through.html">script</a> by @integrisec modifies the pluginreg.dat file in the Mozilla profile directory and sets the Java plugin to disabled. I had to modify the version from his the website to better adjust the disable logic. This is called by my batch script and needs to be in the same directory as the batch file.</p>
<h2><span style="text-decoration:underline;">Disable Java in Chrome</span></h2>
<p style="padding-left:30px;">The easiest way to disable Java in Google chrome is by changing the shortcut to chrome.exe –disable-java. Setup a batch file to copy a new one from a network share to the user&#8217;s desktop/start menu.</p>
<p style="padding-left:30px;"><b>Via GPO</b></p>
<ul style="padding-left:30px;">
<li style="padding-left:30px;">You can change the shortcut using<a href="http://technet.microsoft.com/en-us/library/cc753580.aspx"> GPO</a><a title="" href="#_ftn2"><br />
</a><b></b></li>
<li style="padding-left:30px;">You can fully manage Chrome from GPO if you import the template. This is cumbersome if you are only using this to manage Java, but it you are already managing it this way below are the settings.</li>
</ul>
<p style="padding-left:30px;">Computer Config &gt; Admin Templates &gt; Classic Admin Template &gt;Google &gt; Google Chrome &gt; Specify a list of disable plugins &gt; Enable</p>
<ul style="padding-left:30px;">
<li style="padding-left:30px;">Add *Java*</li>
</ul>
<h1>Internet Explorer</h1>
<p>We are going to lock-down all the ways Java can be <a href="http://www.greyhathacker.net/?p=610">called</a> and make sure that it will use the IE trusted zone list. The post at greyhathacker.net does an awesome job breaking down many of the issues and prevention methods and several of the suggestions are implemented below.</p>
<h2><span style="text-decoration:underline;">Java Applet settings</span><a title="" href="#_ftn4"><b><br />
</b></a></h2>
<p><a href="http://blogs.msdn.com/b/ieinternals/archive/2011/05/15/controlling-java-in-internet-explorer.aspx">Disable</a> the Java applet from running in any zone except in Trusted Zone.</p>
<p><b>Via GPO</b></p>
<p style="padding-left:30px;">Admin Template &gt; Windows Components &gt; Internet Explorer &gt; Internet Control Panel &gt; Security Page</p>
<p style="padding-left:30px;">&gt; Intranet Zone &gt;</p>
<ul style="padding-left:30px;">
<li style="padding-left:30px;">Java Permissions-&gt; Enable Plugin &gt;Disable Java</li>
</ul>
<p style="padding-left:30px;">&gt;Internet Zone &gt;</p>
<ul style="padding-left:30px;">
<li style="padding-left:30px;">Java Permissions-&gt; Enable Plugin &gt;Disable Java</li>
</ul>
<p style="padding-left:30px;">&gt;Trusted Zone</p>
<ul style="padding-left:30px;">
<li style="padding-left:30px;">Java Permissions-&gt; Enable Plugin &gt;Enable Java</li>
</ul>
<p style="padding-left:30px;">&gt;Restricted Zone</p>
<ul style="padding-left:30px;">
<li style="padding-left:30px;">Java Permissions-&gt; Enable Plugin &gt;Disable Java</li>
</ul>
<p><b>Via Registry</b></p>
<p style="padding-left:30px;">For all zones the registry setting 1C00 DWORD value should be set to 0 except for the Trusted and Intranet zone which should be 0&#215;00010000.</p>
<p style="padding-left:30px;">reg add &#8220;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1&#8243; /v 1c00 /t REG_DWORD /d 0&#215;00 /f</p>
<p style="padding-left:30px;">reg add &#8220;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2&#8243; /v 1c00 /t REG_DWORD /d 0&#215;00010000 /f</p>
<p style="padding-left:30px;">reg add &#8220;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3&#8243; /v 1c00 /t REG_DWORD /d 0&#215;00 /f</p>
<p style="padding-left:30px;">reg add &#8220;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4&#8243; /v 1c00 /t REG_DWORD /d 0&#215;00 /f</p>
<h2><span style="text-decoration:underline;">Disable scripting of Java applets in other zones</span></h2>
<p><b>Via GPO</b></p>
<p style="padding-left:30px;">Admin Template &gt; Windows Components &gt; Internet Explorer &gt; Internet Control Panel &gt; Security Page &gt; Internet Zone &gt;</p>
<ul style="padding-left:30px;">
<li style="padding-left:30px;">Scripting for Java applets &gt; Enable Plugin &gt; Disable</li>
</ul>
<p style="padding-left:30px;">&gt; Intranet Zone &gt;</p>
<ul style="padding-left:30px;">
<li style="padding-left:30px;">Scripting for Java applets &gt; Enable Plugin &gt; Disable</li>
</ul>
<p style="padding-left:30px;">&gt;Restricted Zone</p>
<ul style="padding-left:30px;">
<li style="padding-left:30px;">Scripting for Java applets &gt; Enable Plugin &gt; Disable</li>
</ul>
<p><b>Via Registry</b></p>
<p style="padding-left:30px;">reg add &#8220;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1&#8243; /v 1402 /t REG_DWORD /d 0&#215;03 /f</p>
<p style="padding-left:30px;">reg add &#8220;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3&#8243; /v 1402 /t REG_DWORD /d 0&#215;03 /f</p>
<p style="padding-left:30px;">reg add &#8220;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4&#8243; /v 1402 /t REG_DWORD /d 0&#215;03 /f</p>
<h2><span style="text-decoration:underline;">Java Object Tags</span></h2>
<p>Java object tags are handled differently in IE. You will need to modify the ActiveX control to only allow trusted sites to call these objects.</p>
<p><b>Limit Java Objects tags<a title="" href="#_ftn5"><b><br />
</b></a></b></p>
<p>According to <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/05/15/controlling-java-in-internet-explorer.aspx">Microsoft</a>, If you remove the ‘*’ then it will not load the object tags from the Internet zone and only the trusted zone and Intranet zone.</p>
<p><b>Registry Only</b></p>
<p style="padding-left:30px;">reg add &#8220;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{8AD9C840-044E-11D1-B3E9-00805F499D93}\iexplore\AllowedDomains&#8221; /f</p>
<p style="padding-left:30px;">reg delete &#8220;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{8AD9C840-044E-11D1-B3E9-00805F499D93}\iexplore\AllowedDomains\*&#8221; /f</p>
<h2><span style="text-decoration:underline;"><b>Prevent users from adding sites to the trusted<a href="http://blogs.technet.com/b/iede/archive/2010/05/27/activex-per-site-aus-unternehmenssicht.aspx"> Java plug-in list</a>.</b></span><b> <a title="" href="#_ftn6"><b><br />
</b></a></b></h2>
<p>This prevents the <a href="http://msdn.microsoft.com/en-us/library/ee330732(v=vs.85).aspx#information_bar">Security Band</a> from popping up when visiting non-trusted sites.<b></b></p>
<p><b>Registry Only</b></p>
<p style="padding-left:30px;">reg add “HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_SECURITYBAND“ /v iexplore.exe /t REG_DWORD /d 0&#215;00 /f</p>
<h2><span style="text-decoration:underline;">Do not allow users to add/remove sites from the Trusted sites</span></h2>
<p><b>Via GPO</b></p>
<p style="padding-left:30px;">Computer Configuration\Administrative Templates\Windows Components\Internet Explorer &gt; Security Zones: Do not allow users to add/delete sites</p>
<p><b>Via Registry</b></p>
<p style="padding-left:30px;">Reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings” /v Security_options_edit /t REG_DWORD /d 0&#215;01 /f</p>
<h2><span style="text-decoration:underline;">Break Functionality of Java Web Start</span></h2>
<p>Java Web Start downloads a java file and executes java outside the browser. Currently I have not found a way to force this to use IE zones before it’s executed. Therefore we cannot limit its access so we must break this function.</p>
<p><b>Registry Only</b></p>
<p style="padding-left:30px;">reg add &#8220;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\JNLPFile\Shell\Open\Command&#8221; /t REG_SZ /d &#8220;iexplore.exe&#8221; /f</p>
<p style="padding-left:30px;">reg add &#8220;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\JNLPFile&#8221; /t REG_BINARY /v EditFlags /d 00000000 /f</p>
<p style="padding-left:30px;">reg add &#8220;HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\ActiveX Compatibility\{5852F5ED-8BF4-11D4-A245-0080C6F74284}&#8221; /v &#8220;Compatibility Flags&#8221; /t REG_DWORD /d 00000400 /f</p>
<p style="padding-left:30px;">reg add &#8220;HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Internet Explorer\ActiveX Compatibility\{5852F5ED-8BF4-11D4-A245-0080C6F74284}&#8221; /v &#8220;Compatibility Flags&#8221; /t REG_DWORD /d 00000400 /f</p>
<h2><span style="text-decoration:underline;">Disable Java Development Toolkit Active X control</span></h2>
<p><b>Registry Only</b></p>
<p style="padding-left:30px;">Reg add “HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\ActiveX Compatibility\{CAFEEFAC-DEC7-0000-0001-ABCDEFFEDCBA}” /t REG_DWORD /v &#8220;Compatibility Flags&#8221; /d 00000400 /f</p>
<h2><span style="text-decoration:underline;">Sites to test java settings.</span></h2>
<p>Below is a list of sites to test the Java settings are working correctly. While most of these sites simply demonstrate specific ways to call java,<b> </b>sites have not been analyzed for malware and <b>should be considered dangerous. </b>Once configured none of them should be able to load Java in the browser unless it’s listed as a trusted site. Only visit them on a virtual machine and have it reverted back to previous settings once it’s tested.</p>
<p><a href="https://eyeasme.com/Shayne/XHTML/appletObject.html">https://eyeasme.com/Shayne/XHTML/appletObject.html</a></p>
<p><a href="http://www.w3.org/2000/07/8378/object/java/clock">http://www.w3.org/2000/07/8378/object/java/clock</a></p>
<p><a href="http://www.brainjar.com/java/parameters/demo.html">http://www.brainjar.com/java/parameters/demo.html</a></p>
<p><a href="http://www.java.com/en/download/testjava.jsp">http://www.java.com/en/download/testjava.jsp</a></p>
<p><a href="http://www.codebrain.com/java/navajo/index_embed.html">http://www.codebrain.com/java/navajo/index_embed.html</a></p>
<p><a href="http://www.twainconnect.com/jnlp/Default.aspx">http://www.twainconnect.com/jnlp/Default.aspx</a></p>
<p><a href="http://source.db4o.com/db4o/trunk/objectmanager-swing/webstart/sample.html">http://source.db4o.com/db4o/trunk/objectmanager-swing/webstart/sample.html</a></p>
<div></div>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=irhowto.wordpress.com&#038;blog=7721318&#038;post=773&#038;subd=irhowto&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://irhowto.wordpress.com/2013/03/26/how-to-use-java-in-the-enterprise-while-limiting-exposure-with-ie-trusted-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e9ce12907162e3cdffe3cc1ba94b6975?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">twsecblog</media:title>
		</media:content>
	</item>
		<item>
		<title>MySQL Stored Procedure, Prepared Statements and SQL Injection</title>
		<link>http://irhowto.wordpress.com/2012/10/29/mysql-stored-procedure-prepared-statements-and-sql-injection/</link>
		<comments>http://irhowto.wordpress.com/2012/10/29/mysql-stored-procedure-prepared-statements-and-sql-injection/#comments</comments>
		<pubDate>Mon, 29 Oct 2012 00:24:18 +0000</pubDate>
		<dc:creator>twsecblog</dc:creator>
				<category><![CDATA[Defense]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[prepaired statement]]></category>
		<category><![CDATA[sql injection]]></category>
		<category><![CDATA[stored procedure]]></category>

		<guid isPermaLink="false">http://irhowto.wordpress.com/?p=688</guid>
		<description><![CDATA[I&#8217;ve been working on a MySQL project lately. This application does not take input directly from the user, but it still has to query the database to setup variables to then input data. I wanted to be sure that I was using the best technique for preventing SQL injection. Originally I was planning to use [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=irhowto.wordpress.com&#038;blog=7721318&#038;post=688&#038;subd=irhowto&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been working on a MySQL project lately. This application does not take input directly from the user, but it still has to query the database to setup variables to then input data.</p>
<p>I wanted to be sure that I was using the best technique for preventing SQL injection. Originally I was planning to use a stored procedure and escape the input parameter, but I found out about <a href="https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet#Defense_Option_1:_Prepared_Statements_.28Parameterized_Queries.29">prepared statements</a>. It works by setting up the SQL statement and setting a place holder with a &#8216;?&#8217; for input. What this does is tells MySQL to read this as data and prevents attackers from changing the query results.</p>
<pre>'Select * from table where name is ?'</pre>
<p>You can have your VB.net, PHP or other languages build the prepared statement for you, but I wanted to build the logic on the server side. This give the client access to execute the stores procedure and not allow direct permissions to the tables.</p>
<p>The basic <a href="http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-prepared-statements.html">syntax</a> for a prepared statement is you prepare the statement with a name, give the SQL query to preform, execute the statement and then deallocate the statement.</p>
<pre>prepare <strong>id</strong> from
 'select Id from table where <strong>name= ?</strong>' ;
 set <strong>@myname</strong> :='<strong>mycomputer</strong>';
 execute id @myname;
 DEALLOCATE PREPARE id;</pre>
<p>The sql statement above does the following:</p>
<ol>
<li>Sets the name of the statement to &#8220;id&#8221;</li>
<li>Sets the SQL statement and has a place holder for the name in the query</li>
<li>Sets the variable @myname to  &#8220;mycomputer&#8221;</li>
<li>Executes the statement &#8220;id&#8221; using the variable @myname as the query value &#8216;?&#8217;</li>
<li>Removes the prepared statement</li>
</ol>
<p>Using the information above. The statement that is run is</p>
<pre>'select Id from table where name=<strong> mycomputer</strong>' ;</pre>
<p>Now I want to take the prepared statement and make it a stored procedure.</p>
<pre> DROP PROCEDURE IF EXISTS `table`.`get_id`;
 DELIMITER $$
 CREATE PROCEDURE `<strong>IR</strong>`.`<strong>get_id</strong>`(IN input VARCHAR(20), OUT id VARCHAR(5))
 READS SQL DATA
 BEGIN
 SET @input=input;
 prepare id from
 'select Id from table where name= ?' ;
 execute id USING @input;
 DEALLOCATE PREPARE id;
 END$$</pre>
<ol>
<li>If the procedure already exists, delete it</li>
<li>Setup the delimiter for starting and stoping the procedure text</li>
<li>Creates the procedure name get_id in the table. It allows input of up to 20 characters and allows output to be up to 5 characters. By limiting the input and output, if injection is possible, it makes it  more difficult.</li>
<li>Reads data tells MySQL you are only reading data and not updating information</li>
<li>Begin tells MySQL this is the start of the main procedure</li>
<li>Creates a variable input for data that is supplied to the stored procedure</li>
<li> The rest is the same as previously discussed</li>
</ol>
<div>Next, we need to give permission to the user to run the procedure.</div>
<pre>mysql&gt;;;Grant execute on get_id to 'me'@'localhost'</pre>
<p>To run the stored procedure from the MYSQL console, you do the following:</p>
<pre>mysql&gt;;;call get_id('mycomputer', @out);
+-------+
 | @out |
 +------+
 | 1    |
 +------+</pre>
<p>Once you have the output you want from the procedure, you can now call it from any program you want. Some of the more common languages to call stored procedures are:<a href="http://php.net/manual/en/pdo.prepared-statements.php"> PHP</a>, <a href="http://christianasp.net/usingmysql50withaspnet-part2.aspx">ASP</a> and <a href="http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4">VB.net</a></p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=irhowto.wordpress.com&#038;blog=7721318&#038;post=688&#038;subd=irhowto&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://irhowto.wordpress.com/2012/10/29/mysql-stored-procedure-prepared-statements-and-sql-injection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e9ce12907162e3cdffe3cc1ba94b6975?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">twsecblog</media:title>
		</media:content>
	</item>
		<item>
		<title>EMET and IE 0 day ie_execcommand_uaf</title>
		<link>http://irhowto.wordpress.com/2012/09/18/emet-and-ie-0-day-ie_execcommand_uaf/</link>
		<comments>http://irhowto.wordpress.com/2012/09/18/emet-and-ie-0-day-ie_execcommand_uaf/#comments</comments>
		<pubDate>Tue, 18 Sep 2012 16:48:13 +0000</pubDate>
		<dc:creator>twsecblog</dc:creator>
				<category><![CDATA[Pentest]]></category>
		<category><![CDATA[Windows IR]]></category>
		<category><![CDATA[Emet]]></category>
		<category><![CDATA[IR]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[Metasploit]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://irhowto.wordpress.com/?p=755</guid>
		<description><![CDATA[Update: Microsoft has issued a &#8220;Fix it&#8221; for this issue. A offical patch should be in place tomorrow 21-Sept-2012. A new IE zero-day is out and is available from Metasploit.  I needed to find out if EMET would protect against this. My two platforms I tested on were Windows 7 (Full patched) and Windows XP SP3 (fresh [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=irhowto.wordpress.com&#038;blog=7721318&#038;post=755&#038;subd=irhowto&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Update: Microsoft has issued a &#8220;<a href="http://support.microsoft.com/kb/2757760">Fix it&#8221;</a> for this issue. A offical patch should be in place tomorrow 21-Sept-2012.</p>
<p>A new IE zero-day is out and is available from <a href="http://dev.metasploit.com/redmine/projects/framework/repository/revisions/aac41e91fd38f99238971892d61ead4cfbedabb4/entry/modules/exploits/windows/browser/ie_execcommand_uaf.rb">Metasploit</a>.  I needed to find out if <a href="http://irhowto.wordpress.com/?s=emet">EMET</a> would protect against this. My two platforms I tested on were Windows 7 (Full patched) and Windows XP SP3 (fresh install) with IE 7.  I tested EMET 3.0 and EMET 2.1 to make sure that both versions prevented the exploit.</p>
<p>The Metasploit exploit worked flawlessly on Windows 7. I then enabled EMET and added the IE executable to the protected programs.  With both versions of EMET <strong> prevented the exploit</strong>. The odd thing is that EMET 3.0 is suppose to generate a pop-up and create an event log when it catches an exploit. It did not notify me during any of my tests. On Windows XP SP3 with IE 7, as expected, the exploit worked when EMET was not configured. Once setup to protect IE, the exploit<strong> failed to run</strong>.</p>
<p>While having individual users at home switch to another browser (e.g. Chrome) make sense, for large cooperate environments deploying EMET will give you a stop gap for many of the exploits that we see.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=irhowto.wordpress.com&#038;blog=7721318&#038;post=755&#038;subd=irhowto&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://irhowto.wordpress.com/2012/09/18/emet-and-ie-0-day-ie_execcommand_uaf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e9ce12907162e3cdffe3cc1ba94b6975?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">twsecblog</media:title>
		</media:content>
	</item>
		<item>
		<title>Flashback Mac Malware Analysis and Removal</title>
		<link>http://irhowto.wordpress.com/2012/04/05/flashback-mac-malware-analysis-and-removal/</link>
		<comments>http://irhowto.wordpress.com/2012/04/05/flashback-mac-malware-analysis-and-removal/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 02:55:32 +0000</pubDate>
		<dc:creator>twsecblog</dc:creator>
				<category><![CDATA[Mac IR]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[flashback]]></category>
		<category><![CDATA[IR]]></category>
		<category><![CDATA[MAC]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://irhowto.wordpress.com/?p=711</guid>
		<description><![CDATA[Flashback is Mac malware that has recently been showing up with a vengeance. The latest version .K is exploiting a newly patched java vulnerability on OS X.  F-secure recently posted about detecting and removing it from a system. In this post, I&#8217;ll cover some addition artifacts found on an infected machine and include a script to remove it. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=irhowto.wordpress.com&#038;blog=7721318&#038;post=711&#038;subd=irhowto&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Flashback is Mac malware that has recently been showing up with a vengeance. The latest version .K is exploiting a newly patched java vulnerability on OS X.  F-secure recently <a href="http://www.f-secure.com/weblog/archives/00002336.html">posted</a> about detecting and removing it from a system. In this post, I&#8217;ll cover some addition artifacts found on an infected machine and include a script to remove it.</p>
<h3>/Var/log/secure</h3>
<p>When responding to an infected system, I noticed that in the /var/log/secure.log it included a couple of indicators of infection. The indicators below may help you detect infected users if you are using syslog for your OS X devices. Seeing a &#8220;/bin/sh&#8221; followed by the &#8220;suppressing keychain prompt&#8221; within a couple of minutes of each other that has been a solid indicator in the log. When looking through the systems, the suppressing keychain prompt did not show up in a years worth of logs until after it was infected.</p>
<h6>Mar 31 14:17:32 K-MacBook-Pro com.apple.SecurityServer[24]: UID 501 authenticated as user k (UID 501) for right &#8216;system.privilege.admin&#8217; Mar 31 14:17:32 K-MacBook-Pro com.apple.SecurityServer[24]: Succeeded authorizing right &#8216;system.privilege.admin&#8217; by client &#8216;/private/tmp/Software Update&#8217; for authorization created by &#8216;/private/tmp/Software Update&#8217;<br />
Mar 31 14:17:32 K-MacBook-Pro com.apple.SecurityServer[24]: Succeeded authorizing right &#8216;system.privilege.admin&#8217; by client &#8216;/usr/libexec/security_authtrampoline&#8217; for authorization created by &#8216;/private/tmp/Software Update&#8217;<br />
Mar 31 14:17:32 K-MacBook-Pro authexec[318]: <span style="text-decoration:underline;"><strong>executing /bin/sh</strong></span><br />
<strong></strong>Mar 31 14:19:55 K-MacBook com.apple.SecurityServer[25]:<strong><span style="text-decoration:underline;"> suppressing keychain prompt</span> for invalidly signed client /Applications/Safari.app</strong>(658)</h6>
<h3>Mac Times</h3>
<p>I also collected file system MAC times on the infected machine.  You can see the malware being created .QUICKHEALXGEN.png and .QUICKHEALXGEN.xsl. Additionally you see chmod and mv accessed. This matches up with F-secure analysis.</p>
<h6>2012 Mar 31 Sat 14:17:32<br />
102 m.c. drwxr-xr-x 0  0  0  /Applications/Safari.app<br />
374 m.c. drwxr-xr-x 0  0 0  /Applications/Safari.app/Contents<br />
4643 m.c. -rw-rw-rw- 501 20  0 /Applications/Safari.app/Contents/Info.plist<br />
20400 m.c. drwxr-xr-x 0 0   0  /Applications/Safari.app/Contents/Resources<br />
403744 <strong>m</strong>&#8230; -rwxrwxrwx 501 0 0 /Applications/Safari.app/Contents/Resources/ <span style="text-decoration:underline;"><strong>.QUICKHEALXGEN.png</strong></span><br />
26168 <strong>m</strong>&#8230; -rwxrwxrwx 501 0 0 /Applications/Safari.app/Contents/Resources<span style="text-decoration:underline;">/<strong>.QUICKHEALXGEN.xsl</strong></span><br />
<strong></strong> 62656 .a.. -r-xr-xr-x 0 0 0<span style="text-decoration:underline;"><strong> /bin/chmod</strong></span><br />
44848 .a.. -r-xr-xr-x 0 0   0<span style="text-decoration:underline;"><strong>  /bin/mv</strong></span></h6>
<h3>Virus Total</h3>
<p>Submitting the malware to virus total had poor <a href="https://www.virustotal.com/file/b6ef546ce0e287ff7d8a466529aae9cbfaa5b8aeaf0db95c8a8e98176d1f5f52/analysis/">results</a> with only 8 out of 42 detecting it as of April 4th.</p>
<h3>Cleaning Script</h3>
<p>This script has several components: It checks for both types of infections discussed by F-Secure,  backups a copy of the two plist files and names them .infected, prompts user if they want to clean the infection and also prompts the user to disable java in Safari. <strong>While I have tested this script on the cleanup of the Safari Info.plist, I have not seen an infection of the environment.plist. The cleanup should work, but  please test it before you use it. I will not be held liable for any problems. </strong></p>
<p>I have built in a simple update function that will check for a new version using the -u switch at the command line. If a new outbreak happens, I&#8217;ll try and keep it updated. You can submit bug fixes to the blog or to the email address in the script.</p>
<p>To run the program, unzip the download below and double click on the flashback-detect.command file. It will prompt you for your password and check to see if your infected.  You can also run it from terminal using the flashback-detect.sh.</p>
<p>Get the script <a href="http://goo.gl/YRLOd">HERE</a>.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=irhowto.wordpress.com&#038;blog=7721318&#038;post=711&#038;subd=irhowto&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://irhowto.wordpress.com/2012/04/05/flashback-mac-malware-analysis-and-removal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e9ce12907162e3cdffe3cc1ba94b6975?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">twsecblog</media:title>
		</media:content>
	</item>
		<item>
		<title>GSE Orlando 2012</title>
		<link>http://irhowto.wordpress.com/2012/02/13/gse-orlando-2012/</link>
		<comments>http://irhowto.wordpress.com/2012/02/13/gse-orlando-2012/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 17:14:58 +0000</pubDate>
		<dc:creator>twsecblog</dc:creator>
				<category><![CDATA[SANS]]></category>
		<category><![CDATA[2012]]></category>
		<category><![CDATA[GIAC]]></category>
		<category><![CDATA[GSE]]></category>
		<category><![CDATA[Orlando]]></category>

		<guid isPermaLink="false">http://irhowto.wordpress.com/?p=656</guid>
		<description><![CDATA[I recently passed the GSE written portion. While I did not find any surprises on the test, I did think it was a bit harder then just a combination of the GSEC, GCIH and GCIA into one test. I&#8217;m starting my prep for the two day practical. I&#8217;m building my VM&#8217;s (Fedora Core 12, Backtrack 4) to setup a [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=irhowto.wordpress.com&#038;blog=7721318&#038;post=656&#038;subd=irhowto&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I recently passed the <a href="http://www.giac.org/certification/security-expert-gse">GSE</a> written portion. While I did not find any surprises on the test, I did think it was a bit harder then just a combination of the GSEC, GCIH and GCIA into one test.</p>
<p>I&#8217;m starting my prep for the two day practical. I&#8217;m building my VM&#8217;s (Fedora Core 12, Backtrack 4) to setup a lab. My goal is to go through the each learning objective, review some labs from 503 and 504 and finish up with reviewing some of the<a href="http://www.amazon.com/Hackers-Challenge-Incident-Response-Scenarios/dp/0072193840"> Hacker Challenge</a> books.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=irhowto.wordpress.com&#038;blog=7721318&#038;post=656&#038;subd=irhowto&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://irhowto.wordpress.com/2012/02/13/gse-orlando-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e9ce12907162e3cdffe3cc1ba94b6975?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">twsecblog</media:title>
		</media:content>
	</item>
	</channel>
</rss>
