Search This Blog

Monday, December 26, 2011

The bioinformatics sysadmin craftmanship: The MRS v5 platform: Part 1

I always wanted to gather my thoughts on the process of installing the Maartens Retrieval System (MRS) properly on a RHEL server platform. This series of articles describe the procedure in detail and can serve as a guide for the system administrator and/or power user that wishes to install a production grade MRS server. Although MRS is relatively simple to install, there are a few gotchas and complexities, especially when you do not install it on a Debian based platform (including Ubuntu).

In the first part of the article series, I shall describe MRS version 5, in a few words and discuss a regular production setup you should consider, in order to ensure that you have a reliable MRS engine running.

Please do not send me questions directly if you have various MRS issues beyond the setup stage (comments are welcome). Subscribe and ask your questions to the mrs-user discussion list for that purpose, where I normally participate in the discussions.


MRS: What is it and why life scientists need it?

I have gathered some useful background information in these MRS lecture notes. A video of the course is also available. Here I shall just state the basics.

In the bioinformatics world, biological sequence, disease and genome repositories are an important tool for the life scientist. Note that I use the term 'repository' and not another word such as 'database'. We have not got to the database business yet. What we know is that the era of molecular and genomic medicine is here and thus being able to search/reference/associate sequence/genome and disease information is important.

Now, think about your favorite search engine (Google, Yahoo, etc) and then narrow your scope to life science information. This is the purpose of MRS. It is a simple system that allows you to search various life science information repositories. Most of these repositories are given in what we call 'flatfile' format: usually a human readable text which contains a consistent record format, but not enough structure to be able to search the file(s) in question and make them useful for the scientists.

An index is what we need to apply on these flatfiles and make them searchable. MRS does exactly that amongst many other things and we can now talk about life science databases. So, it is a set of tools that provides access to:

  • i)An engine that indexes the flatfiles, as well as keeping them up-to-date.
  • ii)A set of tools to present a simple web interface, to facilitate a web search pretty much like you perform your searches in your web browser with your preferred search engine.
  • iii)A set of tools that allow you to perform programmatic searches, ie searches that can be issued in a repeated way from a script/batch mode.
  • iv)BLAST and Clustalw functionality to perform biological sequence homology search and alignment from a single interface.

MRS is not the only system to give you this kind of functionality. In fact, Entrez and SRS are two examples of a free and a commercial solution respectively that are comprehensive and will probably suit most of your needs. In addition, a growing number of web services (as in SOAP/REST)  can facilitate easy information access to biological databases. Examples include EBI's ENA browser and other similarly crafted tools, which can facilitate programmatic access to large datasets.

So, if other resources can provide free access to relevant information, why should you invest in effort and hardware to use MRS? The answer is along the following lines:

i)If you have power bioinformaticians in house that need persistent and concurrent programmatic access to large biological databases AND/OR
ii)You need to facilitate simple web access to life scientists for your own sequence data

MRS is one of the most computationally efficient engines to address both of these issues. In terms of issue i), programmatic access is not always available at large from public resources (there is a quota on how many questions you can ask over a public web service given a certain amount of time to prevent resource utilization). In addition, network bandwidth could restrict you from retrieving a large number of sequences/info.  This is an important factor if you run a departmental/workgroup computing setup, where your local bioinformatician can issue several hundred thousands queries on data sets that can reach TiBs of information.


What kind of computing gear do you need to run MRS?

Although MRS is fairly efficient, running it on a dedicated server grade machine is a must. This is especially true for the dataset indexing processes, where large amounts of RAM maybe required to crunch a large flatfile repository such as the EMBL Nucleotide or Genbank data sets. The table below provides an overview of the minimum computing requirements required for various aspects of the MRS operation.




The hardware impact of MRS can be measured in terms of the:

  • Disk space: This is Directly Attached (DAS) or network filesystem storage, in order to store the flatfiles and indices of the various datasets.
  • RAM: The amount of RAM needed to perform the indexing operations and/or have people using the system at the same time (MRS queries). A query could be an index or full text search on the datasets, an NCBI BLAST operation, or a CLUSTAL operation. 
  • CPU cores: The number of CPU cores required by the various indexing/quering processes. 


It is important to understand the disk space requirements for hosting the MRS datasets, especially the well known/standard ones (it is possible to build your own datasets). For example, in order to host the EMBL nucleotide dataset, you need to count for the space to download its compressed flatfiles plus the space required to generate and store the MRS EMBL index. At the time of writing,  the release 110 compressed flatfiles are worth 177 Gb. The index is worth approximately 980 Gb. So immediately after crunching the EMBL dataset for the first time, you are writing off just over 1 Tb of disk space.

Is that all? Well, not exactly. During the index generation stage you might also have to deal with:
  • lots of temporary files that are created and then merged into the main index. 
  • If you data set should have NCBI BLAST indices (MRS can take care of that automatically for you by running the formatdb process. 
  • In addition, the next time you upgrade the version of EMBL, you will need to keep the old index on disk. Your users will be using the server in the meantime and as the download indexing process takes at least 3-5 days, you might not have the choice of deleting the old index and flatfiles and wait for the new one to download and be crunched. 
Hence, an estimate for a full production cycle for the EMBL release 111 could consume at most:
old MRS index + new flatfiles compressed + new MRS Index + temp files + BLAST indices = 
980 + 190 + 1100 + 100 + 50 = 2429 Gb = 2.4 Tb

At the end of the version EMBL 111 indexing process, only 1.3 Tb will be left permanently on disk, which shows the efficiency of MRS: an uncompressed version of all the flatfiles will be more than that.  That´s why I state a minimum of 2 Tb disk space is required for now. Factor in the increase of datasets on a yearly basis and any hosting of your own datasets and you will need to dedicate 9 -10 Tb in a nice hardware disk controller that can support nested RAID, on a single volume/partition/filesystem, in order to ensure that you remain production ready for the next couple of years. I would go either for RAID 50 or RAID 60.

Moving on to RAM requirements, well the more RAM you have, the better for you. However RAM is not always as inexpensive as disk space, so the very minimum requirement you should have is 32 Gb of RAM. Why? Well, take a look at the screenshot below.


This terminal 'top' command screenshot shows the EMBL data indexing process (mrs-build) grabbing a 21Gb RAM chunk, on a system with 32 Gb of physical RAM. MRS large dataset indexing is a very RAM hungry process. Thus, if you want the server to be able to be responsive (queries) and/or crunch more than one index in parallel, you should really have more than 32 Gb of RAM plus an adequate amount of swap. 

Finally, 8 cores could do for doing one thing at the time. Again, as we RAM, the more the better, however if you have at least 16 cores, you should be able to ensure that you should serve adequately a small group ( <= 20 ) of users. 

One final thing you should note about MRS is that the index generation process is not scalable CPU and I/O wise. You can have at most up to 8 cores to build the index of a large dataset.  This means that if you want to generate the index of large datasets, it is not worth launching multiple mrs index building processes in parallel. This will not speed up things.  In contrast, MRS queries can scale. This means that user queries can be executed in parallel and dealt effectively if your system is loaded with lots of CPUs/cores RAM and a capable disk controller. 

In the next part (Part 2) of the article series, we will be setting up an MRS v5 server.
 

Sunday, December 25, 2011

A christmas post

To the readers of the blog: Have a very nice Christmas holiday and charge your batteries for 2012. Thank you for the blog hits!


Sunday, December 4, 2011

Can you crack it? GCHQ challenge

Yes, we can! We send our GCHQ friends, a nice cup of tea. Happy listening! :-)


Monday, November 14, 2011

RHEL 6 Part IV: Placing XFS into production and measuring performance

Making an XFS filesystem for a production environment

It's about time we see some actions apart from the first sysadmin impressions on RHEL 6, as described in the previous article of the series. One of the first fundamental differences between RHEL 5 and 6 is the support for XFS filesystem deployments. Why would you care to support XFS? Well simply, apart from the multi-threaded performance, if you are an ext4 kind of guy and you are likely to store more than 16 TiB on a volume, then XFS is your best choice (actually ext4 can support filesystems up to 1 EiB, however the accompanying filesystem utilities and the support on these utilities limit the supported size of a volume down to 16TiB).

Another kind of 'gotcha' (which I really dislike with RedHat) is that in RHEL 6, you should not take support of XFS for granted, unless your license includes the duties paid for the appropriate layered product, which is called "Scalable File System Add-On" (my own translation: "Give us your money if you want fs support over 16 TiB" :-) ). If you have paid for a basic RHEL 6 license, your RHN registered your machine, mkfs.xfs is missing from your root path and a yum search xfsprogs returns nothing, you know that you need to look into your pocket and not the yum repository config.

If you do not want to spend money and willing to risk running an XFS installation without support, head over to the nearest CentOS 6 repository, download the xfsprogs and xfsprogs-devel RPMs, do a yum install with these two RPMs and you will be good to go.

I used a simple Directly Attached Storage setup of a Dell PowerEdge R815 server, fitted with an H800 PERC SAS 6Gb controller driving a single Dell MD1200 cabinet fitted with 12 x 2Tb Nearline 6Gb SAS drives. Four of them were used for the purposes of the test in RAID0 config. In order to be precise, for those of you familiar with the OMSA setup, here is the exact config as reported by the omreport storage vdisk OMSA command:


ID                  : 2
Status              : Ok
Name                : EMBNETGALAXY
State               : Ready
Encrypted           : Not Applicable
Layout              : RAID-0
Size                : 7,450.00 GB (7999376588800 bytes)
Device Name         : /dev/sdd
Bus Protocol        : SAS
Media               : HDD
Read Policy         : Read Ahead
Write Policy        : Write Back
Cache Policy        : Not Applicable
Stripe Element Size : 256 KB
Disk Cache Policy   : Enabled


Returning back to the OS land, the first step is to connect the built hardware virtual disk (vdisk) to LVM2, so I can have the luxury of expanding the filesystem size at will in the future.

[root@biotin src]# pvcreate /dev/sdd
  Physical volume "/dev/sdd" successfully created
[root@biotin src]# vgcreate VGEMBGalaxy /dev/sdd
  Volume group "VGEMBGalaxy" successfully created
[root@biotin src]# lvcreate -L 5T -n LVembgalaxy VGEMBGalaxy
  Logical volume "LVembgalaxy" created


At that point, I have tagged the hardware created vdisk (/dev/sdd) as an LVM physical volume, created my Volume Group and made a Logical Volume of 5 Tbytes, in order to build my XFS filesystem (I am not going to use the full size of the PV, in order to demonstrate XFS expansion later on). Now, let's build the actual XFS filesystem:

[root@biotin src]# mkfs.xfs -d su=256k,sw=4 /dev/VGEMBGalaxy/LVembgalaxy
meta-data=/dev/VGEMBGalaxy/LVembgalaxy isize=256    agcount=5, agsize=268435392 blks=  sectsz=512   attr=2
data=    bsize=4096   blocks=1342176960, imaxpct=5 sunit=64     
swidth=256 blks naming   =version 2              bsize=4096   ascii-ci=0
log=internal log           bsize=4096   blocks=521728, version=2 
sectsz=512   sunit=64 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
This actually builts the XFS filesystem on top of the LVM Logical Volume (/dev/VGEMBGalaxy/LVembgalaxy). You might have noticed that the specified stripe unit (su) size and the number of disks (sw) match the config of the H800 vdisk, as given earlier on by the output of the omreport storage vdisk command. Good system practice dictates that these parameters are passed to the mkfs.xfs utility, in order to improve filesystem performance.

We are now ready to mount the filesystem, so we make sure the mountpoint exists and enter an entry to the /etc/fstab:

/dev/VGEMBGalaxy/LVembgalaxy    /storage/tools          xfs rw,nobarrier,inode64            0 0

Note the nobarrier and inode64 flags. The first (which is also applicable to ext4 filesystems) makes sure that you get a bit of extra performance boost, if and only if your disk controller cache memory is battery backed (and the battery is good AND you have a UPS to shutdown your system properly). The same objective is set by using the inode64 flag, although it can break some older applications (old NFS v3 clients that NFS import the XFS partition, applications whose binaries are older than 4-5 years and write locally on the disk). A mount -a later and you should be able to see the XFS filesystem accessible:

[root@biotin src]# df -h 
Filesystem            Size  Used Avail Use% Mounted on
...
/dev/mapper/VGEMBGalaxy-LVembgalaxy
                      5.0T   33M  5.0T   1% /storage/tools

One thing that you will also note, is that the default settings give you a substantially large number of available inodes, always in comparison to ext4 based similarly sized filesystems:

[root@biotin src]# df -ih
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/mapper/VGext4a-LVarea1
                        346M      12    346M    1% /storage/area1
/dev/mapper/VGext4b-LVarea2
                        346M      11    346M    1% /storage/area2
/dev/mapper/VGEMBGalaxy-LVembgalaxy
                        1.0G       3    1.0G    1% /storage/tools
 
Now, let's say that all is good, you go ahead and use the filesystem and after some time your users fill up the volume. How about expanding the volume and add say a couple of TiBs, to give them some breathing space? Sure, quite easily, without even taking off-line (unmounting the filesystem). First, we extend the LV:

[root@biotin src]# lvextend -L+2T /dev/VGEMBGalaxy/LVembgalaxy
  Extending logical volume LVembgalaxy to 7.00 TiB
  Logical volume LVembgalaxy successfully resized

And then tell XFS to grow up to the size of the extended LV by doing a:

[root@biotin src]# xfs_growfs /storage/tools/
meta-data=/dev/mapper/VGEMBGalaxy-LVembgalaxy isize=256    agcount=5, agsize=268435392 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=1342176960, imaxpct=5
         =                       sunit=64     swidth=256 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal               bsize=4096   blocks=521728, version=2
         =                       sectsz=512   sunit=64 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 1342176960 to 1879048192


Now, a df -h confirms the almost instant resize operation:

[root@biotin src]# df -h
Filesystem            Size  Used Avail Use% Mounted on
...
/dev/mapper/VGEMBGalaxy-LVembgalaxy
                      7.0T   33M  7.0T   1% /storage/tools

Quick, simple and efficient. The sort of thing you would expect from a scalable filesystem.


Measuring the performance envelope of XFS

So what XFS can really do in terms of performance? There is useful info on the web and many sysadmins have tried to compare and contrast XFS against the popular ext4 filesystem. Here is my method:

I employ iozone, a well tested filesystem benchmarking tool on an ext4 volume and then on the newly constructed XFS volume. Both volumes are configured with exactly the same RAID config (RAID 0 and 4 disks), they run on the same type of hardware, they have the same fs block size (4kbytes).

The mount flags for the ext4 filesystem were:

rw,noatime,nobarrier,data=writeback

and for the XFS filesystem:

rw,nobarrier,inode64

The benchmarks are run in the following order:

  • first the ext4 benchmark is run 
  • a reboot of the box follows to make sure we do not have any VFS cache/memory issues affecting the results
  • the XFS volume benchmark is run. 
During both tests all other I/O activity is excluded on the box ( no users login and services are kept to a minimum. You might also find useful to disable SELinux. There is always the option of running the benchmarks in single user mode, but I wanted to monitor the box remotely, as I was writing this  ).

This pro the entire procedure is repeated five times and the arithmetic mean of the results is reported on the graph results.

Both tests were performed by using the following iozone command:


nohup ./iozone -S 512 -f volume_file_path -P0 -Ra -i0 -i1 -i2 -i4 -n 512g -g 1024g -y64k -q512k > fileresultsFSTYPE.xls &


The iozone manual will help you decipher the meaning of the switch options, but briefly, the command encompasses some parameters that ensure we get meaningful results, given the size of RAM of the server, the processor cache size and the test conditions. The volume_file_path is the absolute path of the volume where the test file should reside (the volume/partition you should test).

Please note that these tests take weeks to complete properly, so should you wish to perform similar tests on a system, make sure you schedule enough downtime to complete them without additional activity on the box.

Here are the results.


These should make the difference clear, showing in summary that as far as sequential I/O performance is concerned, XFS is better. For random I/O performance (smaller figures on the right, we have also better speed for random writes on XFS.


Want a scalable solution that can give you a descent performance and have been so far on ext4, while your single volume data production rises? Think again and consider XFS!








Monday, October 24, 2011

Η Ελλάδα που δεν μπήκε ποτε στην ΕΕ και η ΕΕ που δεν έγινε ποτέ ένωση

Δε θέλω να περιαυτολογήσω και να κάνω τον ξέρολα. Όμως αναφέρθηκα  στο μπλόγκ αυτό (23 Ιουλίου του 2010) στο τραγικά επίκαιρο ενδεχόμενο κηδεμονίας της χώρας με ένα ηχητικό ντοκουμέντο του Μ. Χατζιδάκι, που μίλαγε για μια Ευρωπαική επαρχεία (προς το τέλος του κειμένου). Ο αείμνηστος συνθέτης είχε πολύ δίκιο. Παρόλη τη σοφία του όμως δεν μίλησε για κάτι που κανένας δεν περίμενε, ούτε ο ίδιος ο Χ. Σμίτ, όταν με μια ράθυμη φράση του κατέδειξε το τεράστιο κενό της διοικητικής εξουσίας στην Ευρωπαική Ένωση.


Σήμερα, πέρα απο τα υπόλοιπα υπαρξιακά προβλήματα της Ελληνικής Κοινοβουλευτικής δραστηριότητας, το μεγαλύτερο ταμπού για τον Έλληνα Πρωθυπουργό είναι η παραδοχή της ανάγκης κηδεμονίας της χώρας. Όχι μόνο διότι αυτή αποτελεί την πλέον αδιαμφισβήτητη απόδειξη αποτυχίας των Ελληνικών οικονομικών επιτελείων απο τη δεκαετία του 1980 έως σήμερα, αλλά και γιατί εκλαμβάνεται ως απώλεια εθνικής κυριαρχίας, κάτι που συχνά αναμεταδίδεται απο τα Μέσα Μαζικής Ενημέρωσης.

Η δική μου άποψη είναι ότι όταν τα πράγματα στενεύουν κάποιος πρέπει να είναι ψύχραιμος και πραγματιστής. Η ψυχραιμία συνιστά την αποφυγή κάθε είδους ακρότητας σε λόγια και έργα (απεργίες, καταστροφές περιουσιών, προπυλακισμούς βουλευτών αλλά και απο την άλλη μεριά 'Βενιζελικές' τακτικές διακοπής διαπραγμάτευσης με την τρόικα για το θεαθήναι).

Ο πραγματισμός συνιστά ότι ο Πρωθυπουργός πρέπει να παραδεχθεί δημόσια την ανάγκη Οικονομικής Κηδεμονίας. Όχι έτσι, άκριτα, αλλά υπο προυποθέσεις. Πρέπει ο Έλληνας Πρωθυπουργός και ο αρχηγός της Αξιωματικής Αντιπολίτευσης να σταματήσουν τον κομματικό κλεφτοπόλεμο και να πείσουν την Ευρώπη (μαζί με άλλα στελέχη) για ενιαία οικονομική διαχείριση. Δεν νοείται οικονομική και νομισματική σύγκλιση με διαχειριστές δύο ταχυτήτων. Αυτά που λέει ο Ρεν περι μη θεσμικότητας κηδεμονίας μιας χώρας είναι αποτυχημένα παιχνίδια απόκρυψης της αλήθειας. Η αλήθεια είναι μοναδική και ορατή:

Ή απο κοινού συμφωνείτε να ενισχύσετε το EFSF, να κουρέψετε γενναία τα δάνεια του Νότου και να θέσετε τον έλεγχο στις Βρυξέλλες, ή κλείστε το μαγαζί και αφήστε μας να ζήσουμε τη ζωή μας (άν τολμάτε). Η δύναμη της Ένωσης, έστω και στην παρούσα προβληματική μορφή είναι ακόμα το ισχυρότερο διαπραγματευτικό χαρτί της Ελλάδας. Εαν οι Παπανδρέου και Σαμαράς δεν το παίξουν καλά τώρα, δε θα υπάρχει πολιτικό μέλλον για αυτούς και τις παρατάξεις τους. Ούτως η άλλως η Ελλάδα θα επιβιώσει. Το θέμα είναι εαν οι δυό τους θα είναι απάνω στο τρένο ή θα το κοιτάνε να φεύγει απο την πλατφόρμα του σταθμού.

 

Wednesday, September 21, 2011

H Kάισα Έκις Έκμαν για την Ελλάδα, το χρέος της την ΕΕ και το ΔΝΤ.



Το άρθρο που ακολουθεί δημοσιεύτηκε απο την Κάισα Έκις Έκμαν (γνωστή δημοσιογράφο και συγγραφέα της Σουηδίας) στις 8 Αυγούστου 2011 στην έγκυρη σουηδική εφημερίδα Dagens Nyheter (Tα νέα της ημέρας) και περιγράφει την κατάσταση στην Ελλάδα αντικειμενικά, κόντρα στην κυρίαρχη προπαγάνδα των ευρωπαϊκών ΜΜΕ (και των σουηδικών ΜΜΕ δυστυχώς μεταξύ αυτών). Ευχαριστώ θερμά το φίλο και συνάδερφο Ιορδάνη Ακριτίδη για την αποστολή του και παραθέτω τη μετάφραση. ΓΜ
 

Η Ελλάδα βυθίζεται όλο και περισσότερο στην οικονομική κρίση. Η Κάισα Έκις Έκμαν επισκέφτηκε μια παρεξηγημένη χώρα με ένα διερρηγμένο κοινωνικό συμβόλαιο, όπου όλοι συμφωνούν μεταξύ τους. Πώς θα νιώθαμε αν όλα όσα μας ανήκαν πουλιόνταν για να ξεπληρώσουμε δάνεια από τα οποία δεν είδαμε ποτέ όφελος; Αν οι μισθοί μας μειώνονταν στο μισό και τα λεφτά πήγαιναν κατευθείαν σε ξένες τράπεζες;  Και αν εμείς, ενώ προετοιμαζόμασταν να ζήσουμε στο οριο διαβίωσης, ως επιστέγασμα όλων αποκαλούμασταν τεμπέληδες και κακομαθημένοι;  Αν κάποιος εξοικειωθεί με αυτή την κατάσταση, μπορεί να αποκτήσει μια ιδέα πώς είναι να είσαι Έλληνας αυτή τη στιγμή.

Έχω μόλις επιστρέψει από την Ελλάδα. Σε μία χώρα που βρίσκεται σε κρίση επικρατεί μια ιδιαίτερη ατμόσφαιρα.  Μια καχεξία και απελπισία, αναμεμιγμένη με την πολιτική αφύπνιση που ακολουθεί μεγάλα γεγονότα και προκαλεί ευφορία.  Ξαφνικά, οι χαμηλοί μισθοί και η δυσκολία πληρωμής των λογαριασμών, από ατομικό πρόβλημα του καθενός, απέκτησαν κοινό πολιτικό περιεχόμενο.  Ορισμένοι σκέφτονται να μεταναστεύσουν.  Άλλοι να ρίξουν την κυβέρνηση.

Μια αναγκαία αντιασφυξιογόνα μάσκα κρέμεται σε πολλά σπίτια, ως ανάμνηση των διαδηλώσεων των 28 και 29 Ιούνη, οπότε το κοινοβούλιο υπερψήφισε το πακέτο στήριξης προς την Ελλάδα. Δεν νομίζω ότι έχω βρεθεί παλιότερα σε χώρα όπου όλοι μα όλοι που συνάντησα να συμφωνούν.  Είναι όλοι αγανακτισμένοι με το ευρώ, με τη Γερμανία, με την κυβέρνησή τους και με τους εαυτούς τους που την ψήφισαν.  Ύστερα από μια βδομάδα στην Αθήνα, μπορώ να πω ότι αν ήμουν Ελληνίδα, θα ήμουν κι εγώ αγανακτισμένη.

Αυτά που μαθαίνουμε για την Ελλάδα από τις σουηδικές εφημερίδες είναι πάνω κάτω ότι οι Έλληνες δουλεύουν πολύ λίγο και αμείβονται πολύ καλά. Ο υπουργός Οικονομικών της χώρας μας, Άντρες Μπόρι, έχει δηλώσει ότι «οι Έλληνες βγαίνουν στη Σύνταξη στα 40». Στο άρθρο «Ερωτήσεις και Απαντήσεις για την Ελλάδα» της 17/6 στην Dagens Nyheter γραφόταν ότι οι μισθοί στην Ελλάδα έχουν αυξηθεί κατακόρυφα».  Η καγκελάριος της Γερμανίας Άνγκελα Μέρκελ έκανε έκκληση στους Έλληνες να δουλεύουν περισσότερο και να μην κάνουν τόσο πολύ καιρό διακοπές.  Όλα αυτά καρυκευμένα με τη συνηθισμένη μπούρδα περί ενός τεράστιου και μη αποτελεσματικού κράτους.  Τώρα θα αναλάβει η Ευρωπαϊκή Ένωση και θα τους δανείσει ακόμα περισσότερα χρήματα, αυτό θα μπορούσε να βάλει σε μια τάξη τα πράγματα, άρα γιατί διαμαρτύρονται;  

Τι τραγικός αχταρμάς παραπληροφόρησης!  Και τι τραγική έλλειψη αλληλεγγύης προς μία χώρα που οφείλουμε τώρα να υποστηρίξουμε!  Οι Έλληνες εργάζονται τις περισσότερες ώρες στην Ευρώπη - 42 ώρες τη βδομάδα σύμφωνα με τη Eurostat, την στατιστική υπηρεσία της Ευρωπαϊκής Ένωσης.  Το μέσο κατά κεφαλήν εισόδημα είναι 803 ευρώ. Το πραγματικό όριο ηλικίας δεν είναι τα 40 χρόνια, όπως ισχυρίζεται ο Άντερς Μπόρι, αλλά τα 61,4. Πρόκειται δηλαδή για έναν από τους πιο σκληρά εργαζόμενους και ταυτόχρονα πιο χαμηλά αμειβόμενους λαούς της Ευρώπης.  Όμως έχουν μια χώρα που εξαρτάται από τον τουρισμό και όχι από κάποια αμιγώς δικιά της μεγάλη παραγωγή. Και μια χώρα με ένα διερρηγμένο κοινωνικό συμβόλαιο. Όπου ο κόσμος δεν εμπιστεύεται το κράτος ενώ το κράτος δεν παρέχει στους πολίτες του ούτε τις βασικές κοινωνικές υπηρεσίες.  Και το οποίο, ως επιστέγασμα όλων, βρίσκεται στη θηλιά του ευρώ.

Κάθε εθνικό νόμισμα μπορεί να παρομοιαστεί με ενα ρούχο.  Κάθε χώρα φορούσε μέχρι πρότινος το ρούχο που της ταίριαζε.  Μπορούσε να το στενέψει και να το φαρδύνει αν ήταν ανάγκη.  Για παράδειγμα, μπορούσε να υποτιμήσει το νόμισμά της σε περίοδο κρίσης, ή να αυξομειώνει τα επιτόκια ανάλογα με τι ανάγκες της.  Όταν όμως εισήχθη το ευρώ, όλες οι χώρες έπρεπε ξαφνικά να φορέσουν τα ίδια ρούχα.  Μόνο που τα μέτρα των ρούχων πάρθηκαν για να ταιριάζουν σε ορισμένες μόνο χώρες - όπως τη Γερμανία και τη Γαλλία.  Για άλλες χώρες, όπως η Ελλάδα, το εν λόγω κουστούμι δεν ταίριαζε.

Η Ελλάδα κυβερνάται για δεκαετίες από δύο «δυναστείες» - τη συντηρητική Νέα Δημοκρατία και το σοσιαλδημοκρατικό ΠΑΣΟΚ, με δύο οικογένειες στην κορυφή, μία στο κάθε κόμμα.  Και οι δύο κυβερνήσεις έχουν πάρει μεγάλα δάνεια, αλλά λίγοι ξέρουν τι δρόμο πήραν τα χρήματα των δανείων.  Πολλά από αυτά έχουν εξαφανιστεί στη διαφθορά και σε σκοτεινά συμβόλαια. Λέγεται ότι η κατασκευή ενός δρόμου στην Ελλάδα κοστίζει πολύ περισσότερο απ' ότι στις υπόλοιπες χώρες της Ευρωπαϊκής Ένωσης, καθώς παρεμβάλλονται πάρα πολλοί μεσάζοντες. Ο λαός δεν θέλει να πληρώνει φόρους μιας και δεν παίρνει τίποτα ως ανταπόδοση από το κράτος.  Ένα μεγάλο μέρος των φορολογικών εσόδων πηγαίνει στη στήριξη μιας κρατικής γραφειοκρατίας που υπάρχει για να εξυπηρετεί μόνο τον εαυτό της.  
Ταυτόχρονα οι βασικές κοινωνικές υπηρεσίες αποτελούν πονεμένη ιστορία για τον κόσμο. Ένας ασθενής πρέπει να πληρώσει φακελάκι στο γιατρό για να τον φροντίσει, ενώ οι Έλληνες μαθητές χρειάζονται ιδιαίτερα μαθήματα για να ανταποκριθούν στις σχολικές εξετάσεις.  Και μέσα σ' όλα αυτά, ήρθε η οικονομική κρίση το 2008.  Η Ελλάδα, η οικονομία της οποίας εξαρτάται από τον τουρισμό, επλήγη ακόμα πιο σκληρά.

Υπό άλλες συνθήκες, η κυβέρνηση θα μπορούσε να υποτιμήσει το εθνικό νόμισμα για βγει η χώρα από την κρίση.  Όμως μετά την εισαγωγή του ευρώ, κάτι τέτοιο είναι αδύνατο.  Η Ελλάδα περιορίζεται από το κουστούμι της το οποίο δεν μπορεί να βγάλει.  Κι έτσι το κουστούμι καταστρέφεται - μόνο που αυτό δεν επιτρέπεται να συμβεί, καθώς το ίδιο φοράνε και οι υπόλοιπες χώρες της Ευρωπαϊκής Ένωσης.  Είναι προτιμότερο λοιπόν να πετσοκοφτεί αυτός που το φοράει. Αυτό ονομάζεται «εσωτερική υποτίμηση» και σημαίνει απλά ότι αντί να υποτιμηθεί η αξία του νομίσματος περικόπτεται το εισόδημα του λαού.  Κατ' απαίτηση της Ευρωπαϊκής Ένωσης, του Διεθνούς Νομισματικού Ταμείου (ΔΝΤ) και της Ευρωπαϊκής Κεντρικής Τράπεζας, οι Έλληνες κρατικοί γραφειοκράτες εβαλαν σε εφαρμογή ένα σχέδιο.  Οι μισθοί θα συμπιεστούν και μεγάλα τμήματα γης θα ιδιωτικοποιηθούν.  Παραλίες, αεροδρόμια, εθνικές οδοί και κατά το ήμισυ όλες οι δημόσιες επιχειρήσεις θα ξεπουληθούν.

Στην πλατεία Συντάγματος κυκλοφορεί μια φήμη ότι η Ακρόπολη θα εξαγοραστεί από μια γερμανική εταιρεία.  Έμενα στο σπίτι κάποιων νέων που ανήκουν στη «γενιά των 700 ευρώ». Σύντομα θα μεταμορφωθούν στη «γενιά των 500 ευρώ».  Είναι στην ηλικία μου - 30 χρονών και πάνω - όχι τόσο νέοι τελικά, όμως νιώθουν πιο νέοι απ' ότι είναι καθώς ακόμα αναρωτιούνται τι θα κάνουν στο μέλλον.  Κανείς τους δεν έχει παιδιά.  Το να κάνουν παιδιά είναι κάτι αδιανόητο γι' αυτούς.  Είναι μορφωμένοι, έχουν πολλά χρόνια πανεπιστημιακών σπουδών στο ενεργητικό τους, όμως  δουλεύουν ευκαιριακά ως διακοσμητές γάμων.  Ο ασφαλέστερος τρόπος να βρουν μια σταθερή δουλειά ήταν παλιότερα δια μέσου του κράτους, όμως αυτό πρόκειται τώρα να αλλάξει.  Η κατάσταση αυτή δεν είναι εντελώς άγνωστη.  Το ίδιο ισχύει για τη γενιά μας σε όλη την Ευρώπη.  Μόνο που στην Ελλάδα συμπιέζονται επιπλέον οι μισθοί μέχρι το κατώτερο όριο, με πρόσχημα την κρίση.

Στην πλατεία Συντάγματος διοργανώνεται κάθε απόγευμα συνέλευση.  Όταν βρέθηκα εκεί στα μέσα του Ιούλη, ο αρχικός ενθουσιασμός είχε κάπως υποχωρήσει.  Οι συμμετέχοντες δεν ήταν πια χιλιάδες, παρά εκατοντάδες.  Ο καθένας μπορούσε να πάρει το λόγο και να μιλήσει ενώ τα θέματα ήταν διάφορα: από προτάσεις για γενική απεργία μέχρι εκκλήσεις να μην κλέβονται αντικείμενα από τους συγκεντρωμένους στην πλατεία.  Ορισμένες ελληνικές λέξεις στριφογυρίζουν επίμονα στο μυαλό μου.  Μία από αυτές είναι ο «Ισημερινός», που σημαίνει Εκουαδόρ.  Ο πρόεδρος του Εκουαδόρ, Ραφαέλ Κορέα, ήταν ένας μεγάλος ήρωας για την πλατεία.  Τρεις στους τέσσερις Έλληνες επιθυμούν η Ελλάδα να ακολουθήσει το παράδειγμα του Εκουαδόρ και της Αργεντινής: να κηρύξει στάση πληρωμών του χρέους.  Ένας στους τέσσερις θέλει να φύγει η χώρα από το ευρώ.  Αυτό που πρέπει να καταλάβει κανείς είναι ότι οι Έλληνες δεν είναι εξοργισμένοι με ένα αναγκαίο κακό - παρά με ένα μη αναγκαίο κακό.

Το πακέτο στήριξης που δόθηκε στην Ελλάδα δεν επιλύει την κρίση, παρά αναγκάζει τη χώρα να βυθιστεί βαθύτερα σ' αυτήν.  Αντί να γίνουν επενδύσεις στην ύπαιθρο, να φτιαχτεί κάποια παραγωγή που να μην βασίζεται στον τουρισμό, να χτιστεί κράτος πρόνοιας και να γεμίσει ο λαός αισιοδοξία, περικόπτονται τα εισοδήματα του κόσμου.
Το ΔΝΤ, διαβόητο για τις πολιτικές λεηλασίας του στον τρίτο κόσμο, τα μάζεψε και έφυγε από τη Λατινική Αμερική.  Τώρα κατασπαράσσει τα άκρα της Ευρώπης.  Θα το αφήσουμε αυτό να συμβεί;
 

Saturday, July 23, 2011

Lessons from the Oslo incident



I have lived in Oslo for 9 years now and having not experienced something like that before closely (like most Norwegians), I must admit I am quite shocked. The picture above summarizes the human tragedy, which is worth a thousand words. Whilst every human being with reasoning ability and sanity mourns for the tragedy, the media pointlessly try to find who is really behind the attack. Does it really make a difference if the killer(s) are from nation A or B, or support the extreme view X and Y? Lives are lost anyway.


If there is a lesson to be taught out of whatever comes out of investigating this is that lunacy driving by fanaticism has no national, religious or social borders. I realized that as I watched this morning a mother on a bike accompanied her small daughter (also on a bike), wondering freely on the streets of Blindern, a few Kilometers away from the terror scene. Because that is the real value of Norway. It's not its Oil Ministry or Oil Fund, not the Government, not the buildings and shops. It is the people and their open way of leaving. And I am afraid the lunatic(s) targeted the right place.


When the Prime Minister said that he cannot predict how this would change the Norwegian society, he was careful, answering along the lines of the fact that nobody can be a prophet, quite reasonable to understand. However, I hope that Norway would not become a "police state". This is the only worthy privilege that one distinctively gets by living in Oslo. If that is lost, forget the oil fund, all the money in the world and more importantly all the people that are not with us who really worked to preserve it!

Thursday, April 28, 2011

China: A nation of cyber attackers or the 'Wild West' of vulnerable systems?

An ascending nation creates waves in World Politics. At least, that is the case with China and the way it provokes the US Government when it comes to Cyber attack issues. There is one side (that of the US government) which states that China is the powerhouse of a new Cold War in the cyber front. On the other hand, a credible investigation finds that the Chinese government seems totally unprepared to fend off coordinated attacks on Chinese networks.

Well, they are both right. The mixup is in the detail of WHO attacks what. The fact that China (and many other countries) have a large number of vulnerable systems makes it an ideal ground to base the front end of large cyber attacks for two reasons:


  • It requires little effort to locate thousands of vulnerable systems.
  • It breaks the chain of evidence that leads to the real source of the attacks.
Both of these points are really important in the wishlist of a botnet/malware writer/coordinator: If I wanted to DDoS a site, would I target systems in a country where few vulnerable systems can be found, or in countries where most of the systems come from pirated copies (or at best unpatched copies of genuine software)?

The important point in my view is to really investigate how the chain of evidence can be preserved in these kinds of attacks. What Dillon Deresford found is really not surprising and it explains why China is often the ground for cyber attacks. The important thing is that someone should explain to US Federal funded bodies that instead of accusing a country at large, they should also investigate whether US based attackers use Chinese networks to attack US networks. Proving or disproving this possibility will be a winner and the greatest challenge of all. With many important changes in the global network infrastructure (IPv6 is already here), it will be interesting to see if an order or further chaos will emerge with every little device having a globally routable IP.


Saturday, March 5, 2011

Μια λύση για το θέμα των απεργών πείνας





To θέμα των απεργών πείνας είναι ίσως η πιο επικίνδυνη προβοκάτσια που έχει αντιμετωπίσει η Ελλάδα στη σύγχρονη ιστορία της. Σε όλους είναι πλέον φανερές οι πιθανές συνέπειες (ανθρώπινες πρώτα απο όλα αλλά και αυτές της δημιουργίας αναταραχών) θανάτου ενός ανθρώπου. Δείχνει το πόσο αμήχανα και άστοχα η κυβέρνηση της χώρας προσπάθησε να διαχειριστεί ένα θέμα ανθρώπινο, οικονομικό και διοικητικό.

Σε αυτή την κατάσταση που φτάσαμε, η λύση είναι μόνο μια και μου προξενεί έκπληξη το γεγονός οτι κανένας απο τους ακριβοπληρωμένους συμβούλους των Υπουργείων δεν την έχει υποδείξει και έχει ως εξής.

Κάθε άνθρωπος, εξαντλημένος, πιεσμένος για οποιονδήποτε λόγο, όταν φτάνει σε σημείο να μην τρώει απο επιλογή του για βδομάδες και φτάνει σε σημείο κατάρρευσης, χρήζει άμεσης ιατρικής βοήθειας, γιατί δεν έχει σώας τας φρένας. Οι απεργοί πείνας, μέσα στη δυστυχία τους για την οποία κανένας δεν μπορεί να αμφιβάλλει, υποκινούνται απο κάποιους που τους υπέδειξαν μια επικίνδυνη για τη ζωή τους στρατηγική, η οποία τους έπεισε οτι θα λύσουν το πρόβλημά τους. Κάθε λογικός άνθρωπος γνωρίζει ότι άνθρωποι που έχουν φτάσει στην εξαθλίωση και δεν έχουν ελπίδα, είναι σημείο εκμετάλλευσης. Αυτό συμβαίνει με τους απεργούς πείνας σε αυτή την περίπτωση και επομένως ένα οργανωμένο κράτος έχει την ευθύνη ΜΕΤΑ ΒΙΑΣ να τους θέσει σε παρακολούθηση απο ψυχολόγους και ψυχίατρους, διότι οι άνθρωποι δεν είναι καλά.

Ίσως είναι απολυταρχική αυτή η λύση, όμως νομίζω οτι επιβάλλεται και για τη διάσωση της ζωής ανθρώπων που ΔΕΝ γνωρίζουν ποιο είναι το συμφέρον τους αλλά και για την ασφάλεια της χώρας. Διότι εαν πεθάνει ένας απο αυτούς, οι άμοιροι λιγοστοί Έλληνες πολίτες που ζουν και εργάζονται στο κέντρο της Αθήνας θα την πληρώσουν άμεσα με το χειρότερο τρόπο, πέρα απο αυτά που πληρώνουν κάθε μέρα εξαιτείας της απουσίας οργανωμένης διαχείρισης του μεταναστευτικού.

Αίσθηση μου προκάλεσε το γεγονός οτι σε νοσοκομειακό γιατρό ο οποίος καταγγέλθηκε απο συναδέρφους του γιατί άφησε δίσκο με ΦΑΓΗΤΟ μπροστά απο άτομο που ΗΤΑΝ στο νοσοκομείο,ΔΕΝ έτρωγε και κινδύνευε να πεθάνει!!! Οι άνθρωποι που έκαναν αυτοί την καταγγελία έχουν ξεφύγει απο κάθε έννοια λογικής. Διότι η λογική λέει ότι συμπαράσταση και φροντίδα για έναν δυστυχή άνθρωπο δεν είναι να του δώσεις ένα κρεβάτι και να τον παρακολουθείς να πεθαίνει, αλλά να τον κάνεις να φάει, να σταθεί στα πόδια του και να καταλάβει το συμφέρον του.

Αφού λοιπόν γίνει αυτό και αποφευχθούν τα χειρότερα ο ΥΠΕΞ ή ο ίδιος ο Πρωθυπουργός να κάνει 2 κινήσεις.

1. Να μεθοδεύσει με τη συνδρομή της Ιταλίας και Ισπανίας μια συνέντευξη στο BBC ή και σε άλλο παγκόσμιο τηλεοπτικό δίκτυο και να δείξει στον κ. Μπαρόζο και στους αριστοκράτες των Βρυξελών τι σημαίνει δράμα και να ζητήσει ΤΡΙΠΛΑΣΙΑΣΜΟ της Frontex στα σύνορα όλης της επικράτειας και να απαιτήσει απο κοινού με Ιταλία και Ισπανία την προώθηση των ανθρώπων αυτών σε Γερμανία και Σκανδιναβικές χώρες, με το σκεπτικό του ότι οι οικονομίες τους είναι πιο κραταιές.

2. Να καλέσει σε βοήθεια το World Food Program ώστε να συμβάλλει στη σίτηση αυτών των ανθρώπων, μέχρι να προωθηθούν κάπου αλλού.

Αν υπάρχει λογική ακόμα στο μυαλό κάποιων, νομίζω ότι υπάρχει ελπίδα. Αλλιώς η Ελλάδα θα μείνει στη σύγχρονη Ιστορία ώς το μόνο κράτος μέλος της Ευρωπαικής Ένωσης που θα αφήσει ανθρώπους να πεθάνουν, μην αναγνωρίζοντας ότι τους έχει γίνει πλύση εγκεφάλου!

Wednesday, February 23, 2011

Γιατί το ΠΑΣΟΚ και όχι η κρίση οδηγεί τη χώρα στο αδιέξοδο



Με αυτό το δυσάρεστο στιγμιότυπο στο οποίο η οργή λαού συναντά τα ψεύδη των κυβερνώντων καταλαβαίνει κανείς που και πως οδηγείται η χώρα στο αδιέξοδο.  Να κάνουμε ένα φλάσμπακ στην τελευταία προεκλογική περίοδο, οταν ο  Γ. Παπανδρέου διεκδικούσε την άνοδο στην εξουσία, λέγοντας το περίφημο "λεφτά υπάρχουν".



Για να είναι ειλικρινής, ναι, χρησιμοποιήθηκε προπαγανδιστικά και λανθασμένα το "λεφτά υπάρχουν". Διότι αυτό που κόβονταν σκόπιμα απο τα σποτάκια και την ομιλία του ΓΑΠ, ήταν το "αν τα διεκδικήσεις, αν τα προσελκύσεις με επενδύσεις, αν νοικοκυρέψεις το κράτος.", όπως φαίνεται απο το σποτάκι πιο πάνω. Και συμφώνησα τότε. Και συμφωνώ και τώρα.

Λεφτά όντως υπήρξαν. Το θέμα είναι τι έγιναν. Και το τι γίνονται αυτά τα χρυσά χρήματα που δανειζόμαστε δείχνει πως αυτή η κυβέρνηση πέταξε στο καλάθι την τελευταία ευκαιρία.

Νοικοκύρεψε ο ΓΑΠ το κράτος; Όχι. Ήδη ένα χρόνο μετά τον ερχομό του ΠΑΣΟΚ στην εξουσία, κανείς δεν ήξερε τι πλήρωνε το κράτος στις ΔΕΚΟ, όπως προκύπτει απο σχετικό άρθρο της Καθημερινής. Θυμάμαι δε στέλεχος του Γενικού Λογιστηρίου του Κράτους να βγαίνει με στόμφο και να λέει πόσο δύσκολη είναι η κατάσταση με τα επιδόματα και πως είναι αδύνατον να ξέρει ποια Ευρώ πάνε σε ποιούς. Εγώ θα ντρεπόμουνα άν ήμουν διευθυντής να το πω αυτό δημόσια. Απο την άλλη μεριά, συνειδητοποίησα πόσο δύσκολο είναι να αλλάξεις σε ένα μόλις χρόνο τα κακώς κείμενα δεκαετιών. 4 μήνες μετά, μέσα στο δύσκολο 2011, η Κυβέρνηση ακόμα δεν ξέρει τι γίνεται με
τις πληρωμές.

Και δεν είναι μόνο αυτό, αλλά προέκυψε και το θέμα της αξιοποίησης της ακίνητης περιουσίας του Δημοσίου, με το θέατρο δηλώσεων μεταξύ θερμόαιμων δήθεν υπερασπιστών της Εθνικής κυριαρχίας και των κακών αιμοδιψούντων "τροικανών". Δεν πουλιέται τίποτα είπαν, λες και αυτοί δεν είχαν εξετάσει το ενδεχόμενο να πουλήσουν. Απόδειξη, το άρθρο αυτό που επαληθεύει χωρίς καμία αμφιβολία ότι ο ίδιος ο Πρωθυπουργός το συζήτησε με τον αντιπρόεδρο των ΗΠΑ το Σεπτέμβριο του 2010. Μίλαγαν τότε για 270 δισεκατομμύρια Ευρώ. Τώρα τα έριξαν στα 50. Γιατι απλούστατα δεν έχουν ιδέα τι μπορεί να πωληθεί και σε ποια τιμή.

Εαν λοιπόν χρειαζόμαστε παραπάνω απο 1 χρόνο για να δούμε βασικά πράγματα, τότε ή καθόμαστε σε μια ασύγκριτα μυθική περιουσία, τόσο μεγάλη, που η καταγραφή της απαιτεί χρόνια ή κάποιοι αδράνησαν και αδρανούν εις βάρος της χρυσής δόσης του δανείου ΔΝΤ/ΕΕ. Το δεύτερο είναι το πιθανότερο.

Στο θέμα των επενδύσεων, τα πράγματα είναι τόσο τραγελαφικά, που πραγματικά, έχοντας απο πρώτο χέρι εμπειρία, αναρρωτιέμαι άν η Κυβέρνηση πραγματικά θέλει και μπορεί να προσελκύσει επενδύσεις μεγάλης κλίμακας. Να αναφέρω το φιάσκο του Αστακού, τα γραφειοκρατικά εμπόδια επενδυτών σε φωτοβολταικά, το γεγονός ότι η χώρα μας βρίσκεται πιο κάτω απο τη Μποτσουάνα στη λίστα του Forbes που κατατάσσει χώρες για την ευκολία ίδρυσης επιχειρήσεων και τέλεσης επιχειρηματικών συνδιαλλαγών. Να αναφέρω επίσης και την απαράδεκτη φορολογία σε νέες επιχειρήσεις, για την οποία μίλησα σε προηγούμενο άρθρο.

Επομένως εγώ δεν βλέπω την ανάπτυξη και την σύντομη επιστροφή στις αγορές που επιδικώκει η Κυβέρνηση. Βλέπω μόνο ένα τσούρμο νευρικών και χωρίς στρατηγική προσώπων, που έχουν συνειδητοποιήσει ότι πρέπει να συγκρουστούν με τους κρατιστές χαραμοφάηδες συνδικαλιστές που οι ίδιοι ανέδειξαν απο το 1981 και μετά. Αυτοί που ονομάζουν τη χρεοκοπία αναδιάρθρωση, την είσοδο στο μνημόνιο πατριωτικό καθήκον και την πολιτική τους ταυτότητα "σοσιαλιστική".

Saturday, February 5, 2011

Catching an undesired guest in the penguin /tmp room

You might have come across LUARM, a prototype I have built to make an insider misuse detection platform. To cut the long story short, I have looked at various audit log engines and for good reasons, I decided to write my own one, as I found that most of them are really inadequate to provide useful logging in order to:
  • Perform a good post mortem analysis of a security incident,
  • Link events to user entities (accountability),
  • Be able to use the logged data to perform event correlation easily.
There are of course many other goals of the prototype that I am hoping to present at the USENIX Security 11 event, if the paper is ready on time. What I wish to show here is how a good structure of an audit log makes life easier, with or without insiders in mind.

Using LUARM, I managed to catch a compromised penguin carrying a Perl IRC bot like this one. It  did get into the system, because a XAMPP server was running with lots of outdated components, especially when it comes to PHP, introducing many exploitable vulnerabilities . OK, the point is that we compile from source, we always update frequently, we take care of he permissions of /tmp dirs, etc,etc, that every professional sysadmin should know...But, sooner or later, you are going to miss something here and there, only to discover it from logs (or a network traffic log). Here is what happens with LUARM.

Before I start describing the incident, I should say a few words about LUARM, so you get a basic idea of how it works...Not that it is complicated, and of course the sources are at Sourceforge, but just for starters.



The above figure displays the module client-server architecture of the LUARM audit engine. On the left, we can see a set of audited computer clients. Every client is running a unique instance of a set of monitoring scripts. Each of the client scripts audits a particular system level aspect of the operating system: 'netactivity.pl' audits the addition and creation of endpoints, 'fileactivity.pl' records various file operations, 'psactivity.pl' provides process execution audit records and 'hwactivity.pl' keeps a log of hardware devices that are connected or disconnected from the system. The right hand side contains the centralized server part of the architecture where audit data are stored, maintained and queried in a MySQL based RDBMS (other RDBMS systems could be used as well). The Perl programming language is used to implement the modules and the communication between client and server is performed via a Perl DBI interface. 

On the server side we store the audit data, in order to safeguard audit integrity and audit volume scalability. Each client authenticates to the LUARM server using separate, unique credentials that do not interfere with the authentication domain of the client.

Starting with the database of the infected host in question, we sit at the basic MySQL console on the LUARM server and we try to get our bearings on the netinfo table, as my NIDS gave an alert about some unusual traffic patterns towards a number of hosts, the most persistent of them were the hosts 'undernet.irc.justedge.net' and 'dana.basefreak.nl', so we ask LUARM to verify activity towards these hosts :

mysql> show tables;
+---------------------+
| Tables_in_panoitpsl |
+---------------------+
| fileinfo            |
| groupinfo           |
| hostinfo            |
| hwinfo              |
| netinfo             |
| netint              |
| netroute            |
| psinfo              |
+---------------------+
8 rows in set (0.00 sec)
mysql> describe netinfo;
+--------------+-------------+------+-----+---------+----------------+
| Field        | Type        | Null | Key | Default | Extra          |
+--------------+-------------+------+-----+---------+----------------+
| endpointinfo | bigint(20)  | NO   | PRI | NULL    | auto_increment |
| cyear        | smallint(6) | NO   |     | NULL    |                |
| cmonth       | tinyint(4)  | NO   |     | NULL    |                |
| cday         | tinyint(4)  | NO   |     | NULL    |                |
| chour        | tinyint(4)  | NO   |     | NULL    |                |
| cmin         | tinyint(4)  | NO   |     | NULL    |                |
| csec         | tinyint(4)  | NO   |     | NULL    |                |
| transport    | tinytext    | NO   |     | NULL    |                |
| sourceip     | tinytext    | NO   |     | NULL    |                |
| sourcefqdn   | tinytext    | YES  |     | NULL    |                |
| sourceport   | smallint(6) | NO   |     | NULL    |                |
| destip       | tinytext    | NO   |     | NULL    |                |
| destfqdn     | tinytext    | YES  |     | NULL    |                |
| destport     | smallint(6) | NO   |     | NULL    |                |
| ipversion    | tinyint(4)  | NO   |     | NULL    |                |
| username     | tinytext    | NO   |     | NULL    |                |
| pid          | smallint(6) | NO   |     | NULL    |                |
| application  | tinytext    | NO   |     | NULL    |                |
| dyear        | smallint(6) | YES  |     | NULL    |                |
| dmonth       | tinyint(4)  | YES  |     | NULL    |                |
| dday         | tinyint(4)  | YES  |     | NULL    |                |
| dhour        | tinyint(4)  | YES  |     | NULL    |                |
| dmin         | tinyint(4)  | YES  |     | NULL    |                |
| dsec         | tinyint(4)  | YES  |     | NULL    |                |
| md5sum       | text        | NO   |     | NULL    |                |
+--------------+-------------+------+-----+---------+----------------+
25 rows in set (0.00 sec)


mysql> select COUNT(*) from netinfo where destfqdn='undernet.irc.justedge.net' ; 
+----------+
| COUNT(*) |
+----------+
|      963 |
+----------+
1 row in set (0.13 sec)
mysql> select COUNT(*) from netinfo where destfqdn='dana.basefreak.nl ' ;
+----------+
| COUNT(*) |
+----------+
|     1408 |
+----------+
1 row in set (0.12 sec)

Indeed, LUARM verifies a lot of hits towards these hosts, so given the fishy names, we need to dig out more from the LUARM endpoint information. In particular, we need to see which username and application created these endpoints, so we issue the following SQL queries, limiting the number of results to 5 (to prevent flooding our console with endpoint info):

mysql> select application,username,pid from netinfo where destfqdn='dana.basefreak.nl' LIMIT 5;
+-------------+----------+------+
| application | username | pid  |
+-------------+----------+------+
| crond       | nobody   | 7371 |
| crond       | nobody   | 7371 |
| crond       | nobody   | 7371 |
| crond       | nobody   | 7371 |
| crond       | nobody   | 7371 |
+-------------+----------+------+
5 rows in set (0.11 sec)
mysql> select application,username,pid from netinfo where destfqdn='undernet.irc.justedge.net' LIMIT 10;
+-------------+----------+------+
| application | username | pid  |
+-------------+----------+------+

| crond       | nobody   | 21995 |
| crond       | nobody   | 21995 |
| crond       | nobody   | 21995 |
| crond       | nobody   | 21995 |
| crond       | nobody   | 21995 |
+-------------+----------+-------+
5 rows in set (0.12 sec)

So, we have now a username of 'nobody' a crond application which appear to relate to these endpoints via two distinct PIDs, 7371 and 21995. We have to find out what did these two processes do, as this is something but not very helpful. Thus, we need to jump to the psinfo table:

mysql> describe psinfo;
+-----------+--------------+------+-----+---------+----------------+
| Field     | Type         | Null | Key | Default | Extra          |
+-----------+--------------+------+-----+---------+----------------+
| psentity  | bigint(20)   | NO   | PRI | NULL    | auto_increment |
| md5sum    | text         | NO   |     | NULL    |                |
| username  | tinytext     | NO   |     | NULL    |                |
| pid       | smallint(6)  | NO   |     | NULL    |                |
| ppid      | smallint(6)  | NO   |     | NULL    |                |
| pcpu      | decimal(3,1) | NO   |     | NULL    |                |
| pmem      | decimal(3,1) | NO   |     | NULL    |                |
| command   | text         | NO   |     | NULL    |                |
| arguments | mediumtext   | NO   |     | NULL    |                |
| cyear     | smallint(6)  | NO   |     | NULL    |                |
| cmonth    | tinyint(4)   | NO   |     | NULL    |                |
| cday      | tinyint(4)   | NO   |     | NULL    |                |
| cmin      | tinyint(4)   | NO   |     | NULL    |                |
| chour     | tinyint(4)   | NO   |     | NULL    |                |
| csec      | tinyint(4)   | NO   |     | NULL    |                |
| dyear     | smallint(6)  | YES  |     | NULL    |                |
| dmonth    | tinyint(4)   | YES  |     | NULL    |                |
| dday      | tinyint(4)   | YES  |     | NULL    |                |
| dhour     | tinyint(4)   | YES  |     | NULL    |                |
| dmin      | tinytext     | YES  |     | NULL    |                |
| dsec      | tinyint(4)   | YES  |     | NULL    |                |
+-----------+--------------+------+-----+---------+----------------+
21 rows in set (0.00 sec)
mysql> select COUNT(*) from psinfo where username='nobody' ;
+----------+
| COUNT(*) |
+----------+
|       57 |
+----------+
1 row in set (0.05 sec)

Well, we have had 57 intercepted executions of processes with that network credentials, which means that some of these will give us more info. So, we can expand the info on these 57 processes by issuing a:

mysql> select command,username,arguments,pid,ppid from psinfo where username='nobody' \G;

.... and amongst the many results from httpd apache we, we see the following:

*************************** 56. row ***************************
  command: /usr/bin/perl
 username: nobody
arguments: ./x 79.125.109.171 0 0
      pid: 9253
     ppid: 8343
*************************** 57. row ***************************
  command: /usr/bin/perl
 username: nobody
arguments: ./x 85.121.125.74 0 0
      pid: 29312
     ppid: 8343
57 rows in set (0.05 sec)
Clearly, we have traced down the offending application now, when it tried to communicate with the command servers (85.121.125.74 and 79.125.109.171). A quick navigation to the /tmp dir shows the culprit and the way to clean the perl bot infested penguin. Note how the psinfo table gives a pid and a Parent PID (ppid). Using that information in conjunction with the username and endpoint info, we can make very powerful an fast correlations on host events. As an example, let's take the pid 23913 and check to see the source, destination and exact time information of the endpoints created by that process:

mysql> select sourceport,destport,cday,chour,cmin  from netinfo where username='nobody' AND pid='29312' \G;

...........
*************************** 523. row ***************************
sourceport: 32767
  destport: 6670
      cday: 5
     chour: 7
      cmin: 12
*************************** 524. row ***************************
sourceport: 32767
  destport: 6670
      cday: 5
     chour: 7
      cmin: 13
*************************** 525. row ***************************
sourceport: 0
  destport: 0
      cday: 5
     chour: 19
      cmin: 0
525 rows in set (0.13 sec)
.......

I am sure some of you will say that a competent sysadmin could find that by simply looking at looking at a couple of files such as the Apache Logs for example. Sure, a competent sysadmin is likely to have faced a perl IRC bot before. However, what if you had to deal with something that you were not familiar with on a very busy box that was compromised and the logs were erased or logrotated. Are many tools able to offer you that level of detail and correlation? Think again and whether you look at legitimate users or general system auditing issues, give LUARM a go!