<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title><![CDATA[[SecurityRatty] tag: typical]]></title>
    <link>http://securityratty.com/tag/typical</link>
    <description></description>
    <pubDate>Fri, 19 Sep 2008 07:18:37 +0000</pubDate>
    <generator>iRatty Engine</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <item>
      <title><![CDATA[Anti-Debugging Series - Part I]]></title>
      <link>http://securityratty.com/article/5dc5d012cfad6c070272eeb8f4c0dc2b</link>
      <guid>http://securityratty.com/article/5dc5d012cfad6c070272eeb8f4c0dc2b</guid>
      <description><![CDATA[For those that dont know, anti-debugging is the implementation of one or more techniques within computer code that hinders attempts at reverse engineering or debugging a target process. Typically this...]]></description>
      <content:encoded><![CDATA[<p>For those that don&#8217;t know, anti-debugging is the implementation of one or more techniques within computer code that hinders attempts at reverse engineering or debugging a target process. Typically this is achieved by detecting minute differences in memory, operating system, process information, latency, etc. that occur when a process is started in or attached to by a debugger compared to when it is not. Most research into anti-debugging has been conducted from the vantage point of a reverse engineer attempting to bypass the techniques that have been implemented. Limited data has been presented that demonstrates anti-debugging methods in a high level language that the average developer can understand. It is with this in mind that I hope to begin a series of posts that present some of the methods of anti-debugging in a clear, concise, and well documented fashion. The end goal of this series is to arm developers with the techniques and knowledge that will allow them to add a layer of protection to their software while simultaneous educating reverse engineers in some of the anti-debugging methods used by malware authors today.</p>
<p>Before we delve into the intricacies of individual methods of anti-debugging let&#8217;s use this post to define the classes of anti-debugging that we will be discussing. While other classes may exist, the definition of these classes is an attempt to include the majority of anti-debugging methods in use today. There is some overlap between classifications and we may have left out some methods due to limited exposure or effectiveness.</p>
<p><strong>API Based Anti-Debugging</strong><br />
API based anti-debugging is the most straightforward and possibly the easiest to understand for a typical developer. Using both documented and undocumented API calls, these methods query process and system information to determine the existence or operation of a debugger. From single line calls such as IsDebuggerPresent() and CheckRemoteDebugger() to slightly more complex methods including debugger detaching and CloseHandle() checks. These methods are generally trivial to add to an existing code base and many can even be implemented in as few as two or three lines.</p>
<p><strong>Exception Based Anti-Debugging</strong><br />
Exception based anti-debugging is slightly different than your basic API based techniques. Many times when a debugger is attached to a process, exceptions are trapped and handled by the debugger without regard to passing the exception back to the application for continued execution. Occasionally these exceptions can even crash or terminate a process when run under a debugger and be handled gracefully when running clean. It is these discrepancies that makes exception based anti-debugging techniques possible.</p>
<p><strong>Process and Thread Block Anti-Debugging</strong><br />
Some of the API based anti-debugging methods use published functions to query information from within the process and thread blocks for our running code. Many API based detections can be subverted within a debugger by hooking the API call and returning values that indicate a clean process. One way around this subversion is to directly query the process and thread blocks, bypassing the API calls. Direct analysis of the process and thread blocks, while more complex, can lead to a more accurate and high assurance result.</p>
<p><strong>Modified Code Anti-Debugging</strong><br />
One of the methods that a debugger uses to signal a breakpoint is to insert a break byte into the running code at the location that it wishes to stop execution. The process execution breaks when this value is seen, giving control to the debugger. When the program is resumed, the breakpoint value is removed and replaced with the original byte, the execution backed up one byte, and the program is resumed. Detection of software based breakpoints can be achieved by analyzing the process for modifications from the expected norm.</p>
<p><strong>Hardware and Register Based Anti-Debugging</strong><br />
A second way that a debugger can break the execution of a process is by using a hardware breakpoint. A hardware breakpoint relies upon CPU registers to store the pertinent information and to detect when the target break addresses are seen on the bus. A break interrupt is triggered at the appropriate time based on these register values. Reading or modifying the hardware can allow for the detection of a debugger.</p>
<p><strong>Timing and Latency Anti-Debugging</strong><br />
Finally timing and latency can be used as an effective anti-debugging method. When executing a program within a debugger, specifically when single stepping, a much larger latency occurs between execution of instructions. This latency can be detected and compared against a reasonable threshold to detect the existence of a debugger attached to our process.</p>
<p>Each of the classes of anti-debugging outlined above has merit when used individually to protect a process. While none of them can be assured to ever protect a program from a determined reverse engineer or debugger, implementation of these techniques (or many of them if appropriate) can sufficiently slow down the debugging process and hopefully make the attacker spend his time on other, easier, ventures. In the remainder of this series on anti-debugging we will review in depth some of the more interesting methods of each of the above classes. So bring along your debugger and your development environment and let the games begin.</p>
]]></content:encoded>
      <pubDate>Tue, 02 Dec 2008 17:56:25 +0000</pubDate>
      <category domain="http://securityratty.com/tag/process execution breaks">process execution breaks</category>
      <category domain="http://securityratty.com/tag/execution">execution</category>
      <category domain="http://securityratty.com/tag/process">process</category>
      <category domain="http://securityratty.com/tag/methods query process">methods query process</category>
      <category domain="http://securityratty.com/tag/hardware breakpoint">hardware breakpoint</category>
      <category domain="http://securityratty.com/tag/hardware">hardware</category>
      <category domain="http://securityratty.com/tag/process information">process information</category>
      <category domain="http://securityratty.com/tag/target process">target process</category>
      <category domain="http://securityratty.com/tag/methods">methods</category>
      <source url="http://www.veracode.com/blog/2008/12/anti-debugging-series-part-i/">Anti-Debugging Series - Part I</source>
    </item>
    <item>
      <title><![CDATA[Online Finance Flaws: An Awareness Campaign]]></title>
      <link>http://securityratty.com/article/1aabc5edbe215010d8c71b5aa4aa7551</link>
      <guid>http://securityratty.com/article/1aabc5edbe215010d8c71b5aa4aa7551</guid>
      <description><![CDATA[Here begins a series regarding web application security inadequacies in online financial service offerings. The services to be discussed will include banks, credit unions, credit card companies, and...]]></description>
      <content:encoded><![CDATA[Here begins a series regarding web application security inadequacies in online financial service offerings. The services to be discussed will include banks, credit unions, credit card companies, and others. As the economy struggles profoundly, and much of the blame points at the financial sector, I believe it important to point out the false sense of security so many brand-name financial services wrongly instill in their customers.<br />Often this sense of security is coupled with a typical "security badge" provider, helping drive conversions rather than security, as we will also legitimize how often the badge providers miss the mark on their promises.<br />Accountability in loan making decisions and practices might have prevented the sub-prime market collapse and the subsequent credit crunch that has hogtied our economy. <br />Accountability with regard to web application security while providing online financial services is now all the more important as <a href="http://securitywatch.eweek.com/exploits_and_attacks/as_economy_dives_underground_thrives.html" target="_blank">cybercrime</a> will continue to increase at a pace proportionate to economic woes.<br />Each post relevant to this campaign will include Online Finance Flaw in its title for tracking purposes. <br />Look forward to surprising flaws in financial services brands you'll recognize.<br />Perhaps, the more attention we draw to services that should place security above all else, the more likely it is they'll commit to improving their security posture.<br />Feel free to comment or contribute; we'll begin in a day or two.]]></content:encoded>
      <pubDate>Sat, 29 Nov 2008 19:08:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/web application security">web application security</category>
      <category domain="http://securityratty.com/tag/financial services brands">financial services brands</category>
      <category domain="http://securityratty.com/tag/security badge">security badge</category>
      <category domain="http://securityratty.com/tag/services">services</category>
      <category domain="http://securityratty.com/tag/security posture">security posture</category>
      <category domain="http://securityratty.com/tag/online financial services">online financial services</category>
      <category domain="http://securityratty.com/tag/economy">economy</category>
      <category domain="http://securityratty.com/tag/economy struggles profoundly">economy struggles profoundly</category>
      <source url="http://holisticinfosec.blogspot.com/2008/11/online-finance-flaws-awareness-campaign_29.html">Online Finance Flaws: An Awareness Campaign</source>
    </item>
    <item>
      <title><![CDATA[Rational Risk Management, Angry Italians, and Irrational Security Analysts]]></title>
      <link>http://securityratty.com/article/616867e9cd4e8203d8c23c0bef989749</link>
      <guid>http://securityratty.com/article/616867e9cd4e8203d8c23c0bef989749</guid>
      <description><![CDATA[Hope you all had a great weekend. I had meant to point you earlier to a FAIR analysis that Chris Hayes did over at his Blog . But Ive been a little busy, and before I could mention it, Stuart King put...]]></description>
      <content:encoded><![CDATA[<p>Hope you all had a great weekend.  I had meant to point you earlier to a <strong><a href="http://risktical.com/2008/11/06/security-template-exception-part-2-%E2%80%93-the-assessment/">FAIR analysis that Chris Hayes did over at his Blog</a></strong>.  But I&#8217;ve been a little busy, and before I could mention it, Stuart King <strong><a href="http://www.computerweekly.com/blogs/stuart_king/2008/11/ive-written-up-a-report.html">put up a kind of angry response</a></strong> on his ComputerWorld blog.  Snark aside, there are a couple of other really troubling aspects of Stuart&#8217;s reaction to Chris&#8217; analysis that I thought we could talk about this morning.</p>
<blockquote><p>The problem is that (Chris&#8217; analysis is) completely impractical. I&#8217;ll take a recent, and fairly typical situation as an example. I was taking issue with the manner in which remote access was being provisioned for a third party vendor to connect to a system hosted by one of our European business units. To cut a long story short, it was not only a breach of policy but highly insecure. I wanted the access to be disconnected, the business unit director wanted my risk assessment. And he didn&#8217;t want to wait for it.</p>
<p>To quote Chris Hayes, spending time on working out <em> <strong>the expected effectiveness of controls, over a given timeframe, as measured against a baseline level of force </strong></em>was not going to pacify an angry Italian fearful that my decision was going to cost him money. He wanted my explanation of the risk and more importantly, what I was going to offer as a solution to keep his business functioning</p></blockquote>
<p>As Chris is someone who actually does this for a living in a large company, and this is typical of his actual day job, I really find Stuart&#8217;s &#8220;impractical&#8221; comment to be, um, misinformed.</p>
<p>Also, I think Stuart mistakes the purpose of a risk analysis.  The purpose of the risk analysis is not to force someone to be &#8220;secure&#8221;, but to provide knowledge for decision making.  Using it as a &#8220;hammer&#8221; to knock in the nail of your personal risk tolerance impairs efficiency and in the long run retards &#8220;security&#8221; as it creates political resentment.  Seriously, who cares if something might violate policy or not in a pre-implementation discussion?  Policies are not stone tablets handed down from on high, they are state-in-time codification of the <em><strong>data owners </strong></em>risk tolerance.  This risk tolerance changes sometimes, and that&#8217;s OK.</p>
<p>To that extent, I appreciate (and I&#8217;m sure Chris does, as well) that risk analysis does not create rationality in the data owner.  Someone who sees you as a speedbump on the route to progress they may not be ready to appreciate your point of view even if it is stated in the most rational manner possible.   But it&#8217;s worth noting (and Stuart&#8217;s example is indicative of this point) that <em><strong>risk analysis does not create rationality in the analyst, either</strong></em>.  If one is being so &#8220;security minded&#8221; as to ignore the risk tolerance of the business owner - we&#8217;re bound to get a reaction similar to that Stuart encountered.  In fact, a practical risk analysis like Chris performed on his blog, done in 30 minutes, should identify the critical point of disagreement between Stuart and the data owner (again, Stuart doesn&#8217;t own the data, the agitated Italian does).</p>
<p>But let&#8217;s stay rational and open to alternatives to what Chris offers.  Stuart states his approach to risk analysis as:</p>
<blockquote><p>When I need to document a risk assessment I use a very simple form: list the threats, state the level of vulnerability, list the associated operational costs and potential revenue hits. High, medium, or low risk? Describe the controls and options. Write up who needs to do what, and how much of their time it&#8217;s going to take. Job done.</p></blockquote>
<p>At first glance, I don&#8217;t think what Chris has done is any less efficient, and it provides greater insight (using Frequency and Capability instead of just &#8216;listing the threats&#8217;).  But what is key here is that Chris&#8217; approach is consistent and defensible.  Less generous risk geeks and CSO&#8217;s I know would have no little difficulty with Stuart&#8217;s approach.  But to particularly answer Stuart&#8217;s main objection (impracticality) I would offer that with practice, Chris&#8217; work is probably quicker and easier than Stuart&#8217;s described process as it eliminates much of the ambiguity an immature risk analysis creates - reducing the need for further discussion and arguments with data owners (regardless of disposition or nationality).</p>
<p>Finally the irony of Stuart&#8217;s post is that the reason he had this confrontation may in fact be because he was incapable of bringing a salient model for risk to the table, one that identified the factors that create risk and developed a defensible belief statement concerning risk.   We&#8217;ll never know if one would have helped him in this isolated instance, but I can tell you that in organizations like Chris&#8217;, good risk models and strong risk anlayses create operational efficiencies, reduce costs, and streamlines intra-departmental communications.</p>
]]></content:encoded>
      <pubDate>Mon, 17 Nov 2008 13:43:15 +0000</pubDate>
      <category domain="http://securityratty.com/tag/risk">risk</category>
      <category domain="http://securityratty.com/tag/risk tolerance">risk tolerance</category>
      <category domain="http://securityratty.com/tag/risk models">risk models</category>
      <category domain="http://securityratty.com/tag/practical risk analysis">practical risk analysis</category>
      <category domain="http://securityratty.com/tag/strong risk anlayses">strong risk anlayses</category>
      <category domain="http://securityratty.com/tag/generous risk geeks">generous risk geeks</category>
      <category domain="http://securityratty.com/tag/immature risk analysis">immature risk analysis</category>
      <category domain="http://securityratty.com/tag/quote chris hayes">quote chris hayes</category>
      <category domain="http://securityratty.com/tag/chris hayes">chris hayes</category>
      <source url="http://riskmanagementinsight.com/riskanalysis/?p=520">Rational Risk Management, Angry Italians, and Irrational Security Analysts</source>
    </item>
    <item>
      <title><![CDATA[Blogging from DeepSec 2008 in Vienna]]></title>
      <link>http://securityratty.com/article/295cd975846e9f76da4909bf958b0713</link>
      <guid>http://securityratty.com/article/295cd975846e9f76da4909bf958b0713</guid>
      <description><![CDATA[I am already back stateside from DeepSec and I am now flying to CSI 35th in DC; finally I had time to prepare my DeepSec blog post
First, I enjoyed DeepSec conference and I am grateful for the...]]></description>
      <content:encoded><![CDATA[<p>I am already back stateside from <a href="https://deepsec.net/schedule/">DeepSec</a> and I am now flying to <a href="http://www.csiannual.com">CSI 35th</a> in DC; finally I had time to prepare my <a href="https://deepsec.net/schedule/">DeepSec</a> blog post.</p>  <p>First, I enjoyed <a href="https://deepsec.net/schedule/">DeepSec</a> conference and I am grateful for the invitation to speak there. I love European conferences – and not only for having <em>infinitely</em> (with that being an <em>under</em>-statement of the year) superior coffee during breaks :-)&#160; In particular, I liked the audience for my presentation (slides will be posted here soon) and I think the audience liked my material and myself too :-)</p>  <p>What also impressed me a lot was Ivan Ristic speech, which was the second day keynote. He started by simply stating that ‘security industry has failed’ and that ‘a desktop is lost.’ His proof was in typical numbers like “75% of corporate systems are infected with at least 1 malware piece per system”, “1 million of malware types” and “25,000 unique malware samples a day seen.”&#160; However, he then broadened the subject and talked about how not only “a trusted desktop” is gone, but the entire world of “trust everything [on a system], all the time” is gone (his ideas were similar to what I planned to present in <a href="http://chuvakin.blogspot.com/2008/10/on-hitb-2008-conference.html">my HITB 2008 presentation</a> about “the 0wned world”)</p>  <p>I also like how he positioned all those “security user prompts” (in Vista and even before) as a proof that security technologies have failed and now we have to rely on the user to make security decisions (which will obviously fail as well since users are now fully conditioned to “see a chunk of technical mumbo-jumbo, then click OK”)</p>  <p>It was also interesting how he connected a lot of security failures to his “#1 reason: all programs run with all privileges of the user that runs them.”&#160; In fact, he illustrated it by reminding the audience that “everybody runs untrusted code every day today [web browser + Javascript, etc] while nobody did this 30 years ago.”&#160; He also beat up blackisting as an approach to security (but then again, everybody does it today :-)) - what was interesting that he opined that “we will spend the next 10 years proving that whitelisting will fail just as we spent previous 10 years proving that blacklisting fail.” His main point was that global “onslaught” of whitelisting and code signing will kill all sorts of useful things AND provide little security. </p>  <p>He then called for everybody to think about solving the hard, possibly non-sexy problems. This is the part where I could have used more details :-)</p>  <p>So, a fun speech (even though my telling of it is a bit jumbled… check out his slides whenever they are posted) – and a fun conference overall. Worth a 12 hour flight :-)</p>  <div class="blogger-post-footer">About me: http://www.chuvakin.org</div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?a=82qhN"><img src="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?i=82qhN" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?a=zSLaN"><img src="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?i=zSLaN" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?a=UnExN"><img src="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?i=UnExN" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AntonChuvakinPersonalBlog/~4/455651650" height="1" width="1"/>]]></content:encoded>
      <pubDate>Sun, 16 Nov 2008 19:24:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/security decisions">security decisions</category>
      <category domain="http://securityratty.com/tag/deepsec">deepsec</category>
      <category domain="http://securityratty.com/tag/security industry">security industry</category>
      <category domain="http://securityratty.com/tag/security user prompts">security user prompts</category>
      <category domain="http://securityratty.com/tag/security technologies">security technologies</category>
      <category domain="http://securityratty.com/tag/user">user</category>
      <category domain="http://securityratty.com/tag/deepsec conference">deepsec conference</category>
      <category domain="http://securityratty.com/tag/security failures">security failures</category>
      <source url="http://feeds.feedburner.com/~r/AntonChuvakinPersonalBlog/~3/455651650/blogging-from-deepsec-2008-in-vienna.html">Blogging from DeepSec 2008 in Vienna</source>
    </item>
    <item>
      <title><![CDATA[PasswordTextBox]]></title>
      <link>http://securityratty.com/article/4e1580792b56914339b6489792b99933</link>
      <guid>http://securityratty.com/article/4e1580792b56914339b6489792b99933</guid>
      <description><![CDATA[Chris Sells used to poke fun at me when we worked together in my former life . He used to call my security class, &quot;Essential Access Denied&quot;. His point was a good one: when they aren't applied...]]></description>
      <content:encoded><![CDATA[<p><a href="http://www.sellsbrothers.com/" target="_blank">Chris Sells</a> used to poke fun at me when we worked together in my <a href="http://www.flickr.com/photos/andyrs/240203382/" target="_blank">former life</a>. He used to call my security class, &quot;Essential Access Denied&quot;. His point was a good one: when they aren&#39;t applied carefully, security countermeasures often just get in the way of getting work done. I don&#39;t know about you, but password-mode text boxes in web forms have always been one of those annoyances.</p> <p>I&#39;m not complaining about the fact that I can&#39;t see what I&#39;m typing. I understand and laud that feature, because I don&#39;t want someone looking over my shoulder at the password I&#39;m typing, and this even applies when I&#39;m at home. I love my children, but I certainly don&#39;t want them knowing the password to my bank account!</p> <p>No, what I&#39;m bothered by is how a typical password text box behaves on a form that may incur multiple post-backs before it&#39;s finally submitted. If you use the built in ASP.NET TextBox control, it purposely does not repopulate the password text, which means if you press a button on the form that performs a post-back, or if you have a multi-page form that posts back on every step, that password disappears, and the user typically has to re-enter it. You could solve this with liberal use of ASP.NET Ajax UpdatePanels, but that adds its own complexities. I wanted a simpler solution.</p> <p>So I did a little research to see what others had discovered about this problem, and I ended up deriving my own custom control from TextBox to make a much more user-friendly (and developer-friendly) TextBox control. I called it PasswordTextBox, and it acts just like a TextBox in password mode, but it retains the password while still giving the user the same level of protection the standard TextBox supplies.</p> <p>My PasswordTextBox operates very simply: it stores the password in control state, and renders a series of fixed characters (with the same length as the actual password) into the text box so that it &quot;looks&quot; like the user&#39;s password has been rendered. Since control state is part of view state, and since view state is stored in a hidden field on the form, I encrypt the password before putting it into control state.</p> <p>The result is quite nice - the user can post your form back as many times as she needs to, perhaps moving back and forth across wizard steps or tabs, and when she finally presses the &quot;Finish&quot; button (or whatever you call the last step of your input form), your code will be able to read the password by simply accessing the Text property on the PasswordTextBox. The user will believe that her password is sitting there on the form while she&#39;s working, as the same number of obfuscated characters will show up in the field as she typed in originally (what she doesn&#39;t know is that those characters aren&#39;t her real password anymore, but what she doesn&#39;t know won&#39;t hurt her!)</p> <p>Note that to keep this simple, I used DPAPI to encrypt the password, which suited my purposes. But if you have a web farm, that won&#39;t work well at all if you don&#39;t know which machine the user&#39;s going to post back to, so you&#39;ll want to replace that with something more robust. I could see looking up the &lt;machineKey&gt; for entropy, as that tends to be sync&#39;d already across the farm, but I&#39;ve not yet spent the cycles to go down that road, since unfortunately all of the code for generating keys based on that config section are off limits in ASP.NET (most of the useful stuff is marked internal). I don&#39;t think it&#39;d be that hard to do though.</p> <p>Anyway, without further ado, here&#39;s the code, which you&#39;ll see is quite simple. I&#39;d love feedback, especially if you see any glaring problems with the idea or the implementation!</p><pre class="csharpcode"><span class="kwrd">public</span> <span class="kwrd">class</span> PasswordTextBox : TextBox
{
    <span class="rem">// unlikely that a string of these would be used for a password</span>
    <span class="kwrd">const</span> <span class="kwrd">char</span> PasswordPlaceholderChar = <span class="str">&#39;}&#39;</span>;

    <span class="kwrd">string</span> password; <span class="rem">// stored encrypted in control state</span>

    <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnInit(EventArgs e)
    {
        <span class="kwrd">base</span>.OnInit(e);
        Page.RegisterRequiresControlState(<span class="kwrd">this</span>);
    }

    <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">object</span> SaveControlState()
    {
        <span class="kwrd">byte</span>[] encryptedPassword = ProtectPassword(password);

        <span class="kwrd">object</span> baseControlState = <span class="kwrd">base</span>.SaveControlState();
        <span class="kwrd">if</span> (<span class="kwrd">null</span> == baseControlState)
            <span class="kwrd">return</span> encryptedPassword;
        <span class="kwrd">else</span> <span class="kwrd">return</span> <span class="kwrd">new</span> Pair(baseControlState, encryptedPassword);
    }

    <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> LoadControlState(<span class="kwrd">object</span> savedState)
    {
        <span class="kwrd">byte</span>[] encryptedPassword;

        Pair pair = savedState <span class="kwrd">as</span> Pair;
        <span class="kwrd">if</span> (<span class="kwrd">null</span> != pair)
        {
            <span class="kwrd">base</span>.LoadControlState(pair.First);
            encryptedPassword = pair.Second <span class="kwrd">as</span> <span class="kwrd">byte</span>[];
        }
        <span class="kwrd">else</span> encryptedPassword = savedState <span class="kwrd">as</span> <span class="kwrd">byte</span>[];

        password = UnprotectPassword(encryptedPassword);
    }

    <span class="rem">/// &lt;summary&gt;</span>
    <span class="rem">/// This control always uses TextMode=Password</span>
    <span class="rem">/// &lt;/summary&gt;</span>
    <span class="kwrd">public</span> <span class="kwrd">override</span> TextBoxMode TextMode
    {
        get
        {
            <span class="kwrd">return</span> TextBoxMode.Password;
        }
        set { }
    }

    <span class="rem">/// &lt;summary&gt;</span>
    <span class="rem">/// TextBox doesn&#39;t render value attribute for TextMode=Password</span>
    <span class="rem">/// So we add code that renders a placeholder text instead</span>
    <span class="rem">/// &lt;/summary&gt;</span>
    <span class="rem">/// &lt;param name=&quot;writer&quot;&gt;&lt;/param&gt;</span>
    <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> AddAttributesToRender(HtmlTextWriter writer)
    {
        <span class="kwrd">base</span>.AddAttributesToRender(writer);

        <span class="kwrd">string</span> text = Text;
        <span class="kwrd">if</span> (text.Length &gt; 0)
            writer.AddAttribute(HtmlTextWriterAttribute.Value,
                GetPlaceholderPassword(text));
    }

    <span class="rem">/// &lt;summary&gt;</span>
    <span class="rem">/// TextBox doesn&#39;t save the &quot;Text&quot; viewstate in</span>
    <span class="rem">/// TextMode=Password and we don&#39;t want our behavior to break</span>
    <span class="rem">/// if ViewState is turned off so we store the password in</span>
    <span class="rem">/// Control State, encrypted with MachineKey</span>
    <span class="rem">/// &lt;/summary&gt;</span>
    <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">string</span> Text
    {
        get
        {
            <span class="kwrd">return</span> password ?? <span class="kwrd">string</span>.Empty;
        }
        set
        {
            <span class="rem">// this prevents us overwriting the actual</span>
            <span class="rem">// password with a placeholder</span>
            <span class="kwrd">if</span> (!<span class="kwrd">string</span>.IsNullOrEmpty(password) &amp;&amp;
                <span class="kwrd">value</span>.Equals(GetPlaceholderPassword(password)))
                <span class="kwrd">return</span>;

            password = <span class="kwrd">value</span>;
        }
    }

    <span class="kwrd">private</span> <span class="kwrd">string</span> GetPlaceholderPassword(<span class="kwrd">string</span> realPassword)
    {
        <span class="kwrd">int</span> length = 12;
        <span class="kwrd">if</span> (!<span class="kwrd">string</span>.IsNullOrEmpty(realPassword))
            length = realPassword.Length;

        StringBuilder sb = <span class="kwrd">new</span> StringBuilder();
        sb.Append(PasswordPlaceholderChar, length);

        <span class="kwrd">return</span> sb.ToString();
    }

    <span class="kwrd">public</span> <span class="kwrd">byte</span>[] ProtectPassword(<span class="kwrd">string</span> password)
    {
        <span class="kwrd">if</span> (<span class="kwrd">string</span>.IsNullOrEmpty(password))
            <span class="kwrd">return</span> <span class="kwrd">null</span>;
        <span class="kwrd">byte</span>[] cleartext = Encoding.UTF8.GetBytes(password);
        <span class="kwrd">return</span> ProtectedData.Protect(cleartext, <span class="kwrd">null</span>,
            DataProtectionScope.LocalMachine);
    }

    <span class="kwrd">public</span> <span class="kwrd">string</span> UnprotectPassword(<span class="kwrd">byte</span>[] ciphertext)
    {
        <span class="kwrd">if</span> (<span class="kwrd">null</span> == ciphertext)
            <span class="kwrd">return</span> <span class="kwrd">null</span>;
        <span class="kwrd">byte</span>[] cleartext = ProtectedData.Unprotect(ciphertext, <span class="kwrd">null</span>,
            DataProtectionScope.LocalMachine);
        <span class="kwrd">return</span> Encoding.UTF8.GetString(cleartext);
    }
}
</pre><div style="clear:both;"></div><img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=54154" width="1" height="1">]]></content:encoded>
      <pubDate>Wed, 29 Oct 2008 16:49:54 +0000</pubDate>
      <category domain="http://securityratty.com/tag/password-mode text boxes">password-mode text boxes</category>
      <category domain="http://securityratty.com/tag/text">text</category>
      <category domain="http://securityratty.com/tag/return null">return null</category>
      <category domain="http://securityratty.com/tag/return">return</category>
      <category domain="http://securityratty.com/tag/net">net</category>
      <category domain="http://securityratty.com/tag/net ajax updatepanels">net ajax updatepanels</category>
      <category domain="http://securityratty.com/tag/net textbox control">net textbox control</category>
      <category domain="http://securityratty.com/tag/password">password</category>
      <category domain="http://securityratty.com/tag/textbox control">textbox control</category>
      <source url="http://www.pluralsight.com/community/blogs/keith/archive/2008/10/29/passwordtextbox.aspx">PasswordTextBox</source>
    </item>
    <item>
      <title><![CDATA[NBA Preview and Flashback]]></title>
      <link>http://securityratty.com/article/b7a6f4985a46dfec8a0d683b7d11b6f9</link>
      <guid>http://securityratty.com/article/b7a6f4985a46dfec8a0d683b7d11b6f9</guid>
      <description><![CDATA[NBA starts today, it is always good to have something to look forward to once the weather gets cold in Minnie. I follow two teams. The Celtics who have a decent chance at repeating as champs. KG and...]]></description>
      <content:encoded><![CDATA[<p>NBA starts today, it is always good to have something to look forward to once the weather gets cold in Minnie. I follow two teams. The Celtics who have a decent chance at repeating as champs. KG and Pierce should be back in full force, hopefully Ray Allen holds up. Perkins and Rondo may get a little better with experience. Biggest loss is Posey and we will miss him a lot more than people think. A real glue guy, defense, passing, rebounding, makes the smart plays and as a middleware guy myself I can relate. He will make CP3 even more dangerous.</p><div><br /><div>The other team I follow is the Timberwolves. I think they will be pretty good this year. Al Jefferson is a beast down low. Only four players averaged 20 and 10 last year and he is one. He is the best big man in the post after Duncan. Getting Love and Miller for OJ Mayo was a smart deal by McHale. I think McCants can be a decent instant offense 6th man. Would be good to see Foye step up this year. Weakness looks to be defense</div><br />

*Flashback*&#0160;
</div><div>I am biased but I think the 1980s was the most fun time to watch NBA. Everyone talks about Bird and Magic, but there were a lot of great players back then. Here is my all underrated 1980s team (no Celtics included due to conflict of interest and unobjectivity)</div><br /><div>C: <a href="http://www.youtube.com/results?search_query=moses+malone&amp;search_type=">Moses Malone</a> - beast of a big man, immovable force under the hoop with fantastic foot work for a big man. It is too bad he was traded by Portland because he and Bill Walton would have been the best big man combo of all time. &#0160;&#0160;</div><br /><div>PF: <a href="http://www.youtube.com/watch?v=CO1UvhQMnRk">Bobby Jones</a> - great defender, good rebounder, good passer for a big man. Typical Tar Heel -fundamentally sound. He would be the James Posey of this team. (Runner up: Calvin Natt)</div><br /><div>SF: <a href="http://www.youtube.com/results?search_query=bernard+king&amp;search_type=">Bernard King</a> - what a renaissance. Watch his moves on youtube, he was not that tall like say Alex English but he could go in the lane and score on anybody. Jordan of course is an all around better player but I think King was a better scorer and that is saying something. The playoffs when he was putting up 50 and 60 a night he was a terrifying force.&#0160;

</div><br /><div>SG: <a href="http://www.youtube.com/results?search_query=andrew+toney&amp;search_type=">Andrew Toney</a> - they called him the Boston strangler and as Celtics fan there was no one I was more afraid of. Its a real shame his career got cut short. (Runner up: George Gervin) &#0160;</div><br /><div>PG: <a href="http://www.youtube.com/results?search_query=tiny+archibald&amp;search_type=">Tiny Archibald</a> - Ok, one Celtic, but he is seriously underrated - would go flying into the lane, disappear in the trees, Tiny would fly out the bottom of the pile, and the ball would pop out the top and drop in. Probably the last great player to come out of NYC. (Runner up: Mo Cheeks)</div><br /><div>Sixth Man - <a href="http://www.youtube.com/watch?v=sxpu6cFF2B0">World B. Free</a> - no doubt about this one, he was great as a sixth man. And this guy was plain fun to watch. He would bomb it from 30 feet, when he was on he was a force. He would kick his leg into the defender when he was shooting a j to draw the foul. (Runner up: Michael Cooper)</div>]]></content:encoded>
      <pubDate>Tue, 28 Oct 2008 20:42:50 +0000</pubDate>
      <category domain="http://securityratty.com/tag/guy">guy</category>
      <category domain="http://securityratty.com/tag/real glue guy">real glue guy</category>
      <category domain="http://securityratty.com/tag/nba">nba</category>
      <category domain="http://securityratty.com/tag/1980s team">1980s team</category>
      <category domain="http://securityratty.com/tag/immovable force">immovable force</category>
      <category domain="http://securityratty.com/tag/team">team</category>
      <category domain="http://securityratty.com/tag/force">force</category>
      <category domain="http://securityratty.com/tag/celtics fan">celtics fan</category>
      <category domain="http://securityratty.com/tag/celtics">celtics</category>
      <source url="http://1raindrop.typepad.com/1_raindrop/2008/10/nba-preview-and-flashback.html">NBA Preview and Flashback</source>
    </item>
    <item>
      <title><![CDATA[Expanding Response: Deeper Analysis for Incident Handlers]]></title>
      <link>http://securityratty.com/article/3bd8455fedce6ac873ea3b9f63cd7b90</link>
      <guid>http://securityratty.com/article/3bd8455fedce6ac873ea3b9f63cd7b90</guid>
      <description><![CDATA[To achieve my GCIH Gold, I recently completed a paper called Expanding Response: Deeper Analysis for Incident Handlers , now available in the SANS Reading Room . The premise was to further expand on...]]></description>
      <content:encoded><![CDATA[To achieve my GCIH Gold, I recently completed a paper called <a href="http://www.sans.org/reading_room/whitepapers/incident/32904.php">Expanding Response: Deeper Analysis for Incident Handlers</a>, now available in the <a href="http://www.sans.org/reading_room/">SANS Reading Room</a>. The premise was to further expand on the topics discussed in my <a href="http://holisticinfosec.blogspot.com/2007/12/malware-analysis-tools.html">Malware analysis tools</a> post. This paper includes tools discussed at various times in my <a href="http://holisticinfosec.org/content/view/12/26/">toolsmith</a> column in the <a href="http://issa.org/Members/Journal.html">ISSA Journal</a>, and includes details on <a href="http://qosient.com/argus/">Argus</a>, <a href="http://www.rawpacket.org/projects/hex/hex-livecd/version-20-release">HeX</a>, <a href="http://writequit.org/projects/nsm-console/">NSM-Console</a>, and <a href="http://sourceforge.net/projects/networkminer/">NetworkMiner</a>.<br /><br />Abstract:<br />    <span style="font-style:italic;">"The perspective embraced for this discussion is that of an analyst who is working a process to determine the exact nature of malicious software on his network. He is in receipt of the above mentioned .exe and .pcap files and seeks to further his understanding with the use of less typical tools. She begins the process with the network capture, and then takes a closer look at the binary to see what can be learned and what the impacts of an outbreak on her network might be."</span><br /><br /><a href="http://del.icio.us/post?url=http://holisticinfosec.blogspot.com/2008/10/expanding-response-deeper-analysis-for.html&title=Expanding%20Response:%20Deeper%20Analysis%20for%20Incident%20Handlers " title="Expanding Response: Deeper Analysis for Incident Handlers ">del.icio.us</a> | <a href="http://digg.com/submit?phase=2&amp;url=http://holisticinfosec.blogspot.com/2008/10/expanding-response-deeper-analysis-for.html" title="Expanding Response: Deeper Analysis for Incident Handlers ">digg</a> | <a href="http://slashdot.org/submit.pl?url=http://holisticinfosec.blogspot.com/2008/10/expanding-response-deeper-analysis-for.html">Submit to Slashdot</a>]]></content:encoded>
      <pubDate>Fri, 10 Oct 2008 04:38:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/network">network</category>
      <category domain="http://securityratty.com/tag/paper includes tools">paper includes tools</category>
      <category domain="http://securityratty.com/tag/incident handlers">incident handlers</category>
      <category domain="http://securityratty.com/tag/network capture">network capture</category>
      <category domain="http://securityratty.com/tag/deeper analysis">deeper analysis</category>
      <category domain="http://securityratty.com/tag/paper">paper</category>
      <category domain="http://securityratty.com/tag/gcih gold">gcih gold</category>
      <category domain="http://securityratty.com/tag/includes details">includes details</category>
      <category domain="http://securityratty.com/tag/pcap files">pcap files</category>
      <source url="http://holisticinfosec.blogspot.com/2008/10/expanding-response-deeper-analysis-for.html">Expanding Response: Deeper Analysis for Incident Handlers</source>
    </item>
    <item>
      <title><![CDATA[Sarah Palin and Security Questions]]></title>
      <link>http://securityratty.com/article/1eba1cf0b2be12e62853ecfc357cf52d</link>
      <guid>http://securityratty.com/article/1eba1cf0b2be12e62853ecfc357cf52d</guid>
      <description><![CDATA[I've always looked at security questions used to automate user password recovery with quite a bit of skepticism . What's the point of requiring strong passwords if you allow anyone to reset the...]]></description>
      <content:encoded><![CDATA[<p>I&#39;ve always looked at <a href="http://goodsecurityquestions.com" target="_blank">security questions</a> used to automate user password recovery with <a href="http://www.pluralsight.com/community/blogs/keith/archive/2006/05/24/24964.aspx" target="_blank">quite a bit of skepticism</a>. What&#39;s the point of requiring strong passwords if you allow anyone to reset the password on an account by answering a (potentially inane) question? And just how many good security questions are there, and how many web sites will ask similar questions, allowing the owner of one web site to reset a user&#39;s password at another site that uses the same question? I&#39;m pretty sure that the typical user will tend to select the same security question if it&#39;s available at multiple sites. In many web sites I&#39;ve seen, the security question is clearly the weak link in the chain.</p> <p>Apparently <a href="http://voices.washingtonpost.com/securityfix/2008/10/son_of_tenn_lawmaker_indicted.html?hpid=news-col-blogs" target="_blank">a fellow recently was indicted</a> on charges of <a href="http://blog.wired.com/27bstroke6/2008/09/palin-e-mail-ha.html" target="_blank">hacking</a> into the Republican vice presidential nominee&#39;s Yahoo <a href="http://wikileaks.org/wiki/VP_contender_Sarah_Palin_hacked" target="_blank">email account</a>, by simply doing some research on the Internet to find her birthday, zip code, and the answer to her security question, &quot;Where did you meet your spouse?&quot; All told the attack reportedly took under an hour to complete.</p> <p>Given the level of interest in Palin and other public figures, and the large amount of information about them available to the public, it makes sense that they will be some of the easiest targets for attacks like this.</p><div style="clear:both;"></div><img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=53812" width="1" height="1">]]></content:encoded>
      <pubDate>Thu, 09 Oct 2008 04:09:10 +0000</pubDate>
      <category domain="http://securityratty.com/tag/security question">security question</category>
      <category domain="http://securityratty.com/tag/user">user</category>
      <category domain="http://securityratty.com/tag/security questions">security questions</category>
      <category domain="http://securityratty.com/tag/question">question</category>
      <category domain="http://securityratty.com/tag/typical user">typical user</category>
      <category domain="http://securityratty.com/tag/user password recovery">user password recovery</category>
      <category domain="http://securityratty.com/tag/password">password</category>
      <category domain="http://securityratty.com/tag/yahoo email account">yahoo email account</category>
      <category domain="http://securityratty.com/tag/account">account</category>
      <source url="http://www.pluralsight.com/community/blogs/keith/archive/2008/10/09/sarah-palin-and-security-questions.aspx">Sarah Palin and Security Questions</source>
    </item>
    <item>
      <title><![CDATA[Fort Jennings State Bank Website Hacked, Hosting A Phishing Page For Italian Poste Italiane Bank]]></title>
      <link>http://securityratty.com/article/5d2a0a37ed34d4faf390d37abb5adeb5</link>
      <guid>http://securityratty.com/article/5d2a0a37ed34d4faf390d37abb5adeb5</guid>
      <description><![CDATA[SophosLabs reports an unusual bank phishing spam campaign where particular image phish targets the Italian bank Poste Italiane. The phishing email itself (in Italian) entices users to go to the link...]]></description>
      <content:encoded><![CDATA[SophosLabs reports an unusual bank phishing spam campaign where particular image phish targets the Italian bank Poste Italiane. The phishing email itself (in Italian) entices users to go to the link in order to receive 250 Euros worth of &#8220;loyalty bonus&#8221;. This scheme is fairly typical and the link in the message goes to a [...]]]></content:encoded>
      <pubDate>Wed, 01 Oct 2008 18:56:25 +0000</pubDate>
      <category domain="http://securityratty.com/tag/image phish targets">image phish targets</category>
      <category domain="http://securityratty.com/tag/link">link</category>
      <category domain="http://securityratty.com/tag/spam campaign">spam campaign</category>
      <category domain="http://securityratty.com/tag/fairly typical">fairly typical</category>
      <category domain="http://securityratty.com/tag/italian">italian</category>
      <category domain="http://securityratty.com/tag/euros worth">euros worth</category>
      <category domain="http://securityratty.com/tag/loyalty bonus">loyalty bonus</category>
      <category domain="http://securityratty.com/tag/sophoslabs reports">sophoslabs reports</category>
      <category domain="http://securityratty.com/tag/entices users">entices users</category>
      <source url="http://cyberinsecure.com/fort-jennings-state-bank-website-hacked-hosting-a-phishing-page-for-italian-poste-italiane-bank/">Fort Jennings State Bank Website Hacked, Hosting A Phishing Page For Italian Poste Italiane Bank</source>
    </item>
    <item>
      <title><![CDATA[The Audacity of Capital Markets]]></title>
      <link>http://securityratty.com/article/850f85c1d4f79f75ab94faca2b325146</link>
      <guid>http://securityratty.com/article/850f85c1d4f79f75ab94faca2b325146</guid>
      <description><![CDATA[It it fairly well established that overt risk tasking, greed and corporate arrogance by financial services companies have destroyed the real estate market and crippled the global economy. Countless...]]></description>
      <content:encoded><![CDATA[<p>It it fairly well established that overt risk tasking, greed and corporate arrogance by financial services companies have destroyed the real estate market and crippled the global economy.    Countless millions of folks have lost their homes and life savings.  This corporate arrogance and greed was like a &#8220;greed virus,&#8221; spreading across the world like a plague.</p>
<p>A similar arrogance is happening in CEP-land, where, it seems, each and every financial services event processing application is now a &#8220;CEP application&#8221; just because someone in capital markets puts &#8220;CEP&#8221; in the same paragraph.     I find it ridiculous that the same market of folks who have helped destroy the global economy are now the world&#8217;s self-proclaimed authorities on complex event processing.  Amazing, if you really think about it, isn&#8217;t it?</p>
<p>I read many posts these days by folks in the capital markets trading world, claiming their message routing application is &#8220;CEP,&#8221; or their algo trading application is &#8220;CEP,&#8221;  - feeds and speed, typical of what &#8220;turns on&#8221; the financial services folks.   As an editorial note: I recall when I worked for a software company, folks on the same team who worked on Wall Street would look down on folks with many years of IT experience outside of financial services.   Some would say &#8220;he is only a security guy&#8221; in their attempt to put down anyone who does not have trading floor IT experience on their resume.    I found it all quite ridiculous and foolish.</p>
<p>My resume, for what it is worth, has a number of financial services companies, including either assessing, architecting or building large scale security systems for S.W.I.F.T, Chase or SBC.   This experience does not seem to &#8220;count&#8221; with the trading floor folks, since security is more about getting things right, not just supporting a form of gaming or gambling with other peoples money, with more feeds and speeds the better.</p>
<p>Of late, as I have watched the CEP/EP space evolve,  and unfortunately, I see a similar type of &#8220;capital markets virus&#8221; spreading into CEP-land.   Folks on the trading side of financial services seem to think that whatever they say or do is right, and whatever others outside of the trading side do is wrong.  These folks are quick to ridicule others who have far more experience than they do, outside of the trading floor of capital markets.</p>
<blockquote><p>After all, mostly what they do on the trading side is route orders -  and if a little old lady in a small town in Iowa loses her life savings because of a bad investment decision, it means little to the folks on the trading floor, the market folks are into feeds and speed - just keep the beast alive.  Place your bet on this market or that one!   Away we go, faster and faster!!!!</p></blockquote>
<p>I am sometimes a little sad to observe the same audacity in the CEP world.  Instead of focusing on the hard complex problems that require accuracy, the original set of problems defined when the phrase &#8220;complex event processing&#8221; was minted, the capital market folks have hijacked the term for their marketing purposes in algo trading and order managment systems.  These same people ridicule others who are working to solve the (originally stated) complex event processing problems, problems the capital market traders seemingly cannot understand, since they have never worked on complex network or security management problems.</p>
<p>Nevermind, that these &#8220;ultra low latency&#8221; systems cannot accurately detect a complex money laundering scheme or an elaborate fraud.   Nevermind that these &#8220;CEP engines&#8221; cannot accuracy insure that Average Joe does not lose his hard earned money in a fraud scheme.</p>
<p>I have no problem with folks in capital markets using the term CEP, but they should not ridicule those in technical areas that are not focused on keeping the &#8220;trading beast&#8221; alive so people can lose their life savings in a blink of an eye; but instead focused on solving complex problems such as the class of problems called out when the three letter acronym &#8220;CEP&#8221; was created.</p>
]]></content:encoded>
      <pubDate>Fri, 19 Sep 2008 07:18:37 +0000</pubDate>
      <category domain="http://securityratty.com/tag/capital market folks">capital market folks</category>
      <category domain="http://securityratty.com/tag/market folks">market folks</category>
      <category domain="http://securityratty.com/tag/financial services">financial services</category>
      <category domain="http://securityratty.com/tag/financial services folks">financial services folks</category>
      <category domain="http://securityratty.com/tag/folks">folks</category>
      <category domain="http://securityratty.com/tag/complex">complex</category>
      <category domain="http://securityratty.com/tag/capital markets">capital markets</category>
      <category domain="http://securityratty.com/tag/hard complex">hard complex</category>
      <category domain="http://securityratty.com/tag/complex money">complex money</category>
      <source url="http://www.thecepblog.com/2008/09/19/the-audacity-of-capital-markets/">The Audacity of Capital Markets</source>
    </item>
  </channel>
</rss>
