Rediscovery and Security News

First things first: Happy 2012 everyone.

So, this blog has been silent for a little while now. More astute readers might argue along the lines of “hey man! This is supposed to be a technical blog – where are all them technical articles? Have you ran out of material?”.

Take a deep breath, the dreaded, almost compulsory metablogging block after a long pause is coming …

The answer is a big NO! There is an abundance of material that I am proud of BUT a lot of this research has been done while solving problems for paying clients. The problem can be refined as “how do you tip-tap-toe around NDAs and do you choose to do so?”. Smart money says not to do it, so I am not. Keep this point in mind for the latter part of this post.

One of the design decisions for this rebooted blog was that it should confer an era of positivity, at least by security and research standards, which is not the happiest of domains. So, for better or worse, I decided to bottle the acid for some time, even if that meant leaving gems such as the following (courtesy of a well known mailing list) untouched:

I have problems with those that create malware – under the guise of
“security research” – which then gets used by the bad guys.

I’m not saying that one can never stop breaking into things. I just
don’t like the glorification of creating malware by the so-called
“good guys”. If all of that energy instead was placed into prevention,
then we would be better off.

[SNIP]
P.S. One might argue that a whitehat or security researcher can’t
change sides and go into prevention, or in other words, be a Builder
instead of a Breaker. They can’t because they don’t have the skills to
do it.

Finished picking your jaw off the floor? Good! While Cpt. Obvious is on its way with the usual “vuln != exploit != malware” reply, let’s get things moving with a pet peeve of mine that I have not seen addressed.

Almost every time a new security trend comes out, there is nary a hint that this might have been discovered some place else or sometime before. Given that security overlaps a lot with cryptography, I just cannot get around my head around the fact while rediscovery is a well accepted notion within the cryptography field (and this has been proved time and time and time again) that while something you are “discovering” might have been discovered (and countered!) before.

Enter infosec, an ecosystem where NDAs are ten-a-penny, the underground is more tight-lipped than ever, the general consensus is that confidentiality is a necessity and where a lot of “discoveries” are handled either via the black-market (and lack of morals implied therein) or via security brokers. It was all fine and dandy but the introduction of both fame-seeking researchers and “researchers” as well the very fact that infosec makes for entertaining and sensationalist headlines that actually “sell seats in the audience” and everyday we are constantly bombarded with “news” and “research” (use of quotes intentional if you haven’t guessed already) where it can fall into one of the following categories:

  • News from the obvious department. This one is getting more and more annoying lately but it is much too obvious a target
  • Less obvious stuff that falls below the radar of cargo-cult security but still way more likely to have been encountered in the field by serious practitioners who fall into one of the non-disclosure categories listed above
  • Actual new and/or insightful findings, which tend to be lost within the sea of useless information, the stuff that REALLY makes your day
  • Since there is a very fine line between 2 and 3 (again, 1 is way too easy of a target to make fun of or suggest anything) and one can never be sure in such a rapidly and secretive landscape, for the love of $DEITY, next time see something related to infosec findings, keep in the back of your head that this might be a rediscovery and dear reporters, PLEASE DROP THE SENSATIONAL HEADLINES.

    I am not holding my breath that this will ever happen but one can only hope …

    PS:
    Finally, an image courtesy of blackhats.com infosuck webcomic. Not exactly the point that I am trying to convey but the message is quite similar and in any case it is much too funny to be left outside the party.

    P For Paranoia OR a quick way of overwriting a partition with random-like data

    (General Surgeon’s warning: The following post contains doses of paranoia which might exceed your recommended daily dosage. Fnord!).

    A lot of the data sanitisation literature around advises overwriting partitions with random data (btw, SANS Institute research claims that even a pass with /dev/zero is enough to stop MFM but YPMV). So leaving Guttman-like techniques aside, in practice, generation of random data will take a long time in your average system which does not contain a cryptographic accelerator. In order to speed up things, /dev/urandom can be used in lieu of /dev/random, noting that when read, the non-blocking /dev/urandom device will return as many bytes as are requested, even if the entropy pool is depleted . As a result, the result stream is not as cryptographically sound as /dev/random but is faster.

    Assuming that time is of the essence and your paranoia level is low there is an alternative which you can use, both providing random-like data (which means you do not have to fall back to /dev/zero and keep fingers crossed) and being significantly faster. Enter Truecrypt. Truecrypt allows for encrypted partitions using a variety of algorithms that have been submitted to peer review and are deemed secure for general usage. I can hear Johnny sceptical shouting “Hey wait a minute now, this is NOT random data, what the heck are you talking about?”. First of all, Truecrypt headers aside, let’s see what ent reports. For those of you not familiar with ent, it is a tool that performs a statistical analysis of a given file (or bitstream if you tell it so), giving you an idea about entropy and other way way useful statistics. For more information man 1 ent.

    For the purposes of this demonstration, I have created the following files:

  • an AES encrypted container
  • an equivalent size file getting data from /dev/urandom (I know, but I was in a hurry )
  • a well defined binary object in the form of a shared library
  • a system configuration file
  • a seed file which contains a mixture of English, Chinese literature, some C code, strings(1) output from the non-encrypted swap (wink-wink, nudge-nudge)
  • Let’s do some ent analysis and see what results we get (for the hastily un-strict compliant Perl code look at the end of the article)

    ################################################################################
    processing file: P_for_Paranoia.tc 16777216 bytes
    Entropy = 7.999988 bits per byte.

    Optimum compression would reduce the size
    of this 16777216 byte file by 0 percent.

    Chi square distribution for 16777216 samples is 288.04, and randomly
    would exceed this value 10.00 percent of the times.

    Arithmetic mean value of data bytes is 127.4834 (127.5 = random).
    Monte Carlo value for Pi is 3.141790185 (error 0.01 percent).
    Serial correlation coefficient is 0.000414 (totally uncorrelated = 0.0).

    ################################################################################
    processing file: P_for_Paranoia.ur 16777216 bytes
    Entropy = 7.999989 bits per byte.

    Optimum compression would reduce the size
    of this 16777216 byte file by 0 percent.

    Chi square distribution for 16777216 samples is 244.56, and randomly
    would exceed this value 50.00 percent of the times.

    Arithmetic mean value of data bytes is 127.4896 (127.5 = random).
    Monte Carlo value for Pi is 3.143757139 (error 0.07 percent).
    Serial correlation coefficient is -0.000063 (totally uncorrelated = 0.0).

    ################################################################################
    processing file: seed 16671329 bytes
    Entropy = 5.751438 bits per byte.

    Optimum compression would reduce the size
    of this 16671329 byte file by 28 percent.

    Chi square distribution for 16671329 samples is 101326138.53, and randomly
    would exceed this value 0.01 percent of the times.

    Arithmetic mean value of data bytes is 82.9071 (127.5 = random).
    Monte Carlo value for Pi is 3.969926804 (error 26.37 percent).
    Serial correlation coefficient is 0.349229 (totally uncorrelated = 0.0).

    ################################################################################
    processing file: /etc/passwd 1854 bytes
    Entropy = 4.898835 bits per byte.

    Optimum compression would reduce the size
    of this 1854 byte file by 38 percent.

    Chi square distribution for 1854 samples is 20243.47, and randomly
    would exceed this value 0.01 percent of the times.

    Arithmetic mean value of data bytes is 86.1019 (127.5 = random).
    Monte Carlo value for Pi is 4.000000000 (error 27.32 percent).
    Serial correlation coefficient is 0.181177 (totally uncorrelated = 0.0).

    ################################################################################
    processing file: /usr/lib/firefox-4.0.1/libxul.so 31852744 bytes
    Entropy = 5.666035 bits per byte

    Optimum compression would reduce the size
    of this 31852744 byte file by 29 percent.

    Chi square distribution for 31852744 samples is 899704400.21, and randomly
    would exceed this value 0.01 percent of the times.

    Arithmetic mean value of data bytes is 74.9209 (127.5 = random).
    Monte Carlo value for Pi is 3.563090648 (error 13.42 percent).
    Serial correlation coefficient is 0.391466 (totally uncorrelated = 0.0).

    Focusing on entropy, we see that
    Truecrypt: Entropy = 7.999988 bits per byte.
    /dev/urandom: Entropy = 7.999989 bits per byte.

    which are directly comparable (if you are trusting ent that is) and much better than a well structured binary file (5.666035 bits per byte) and heads and shoulders our seed.txt results (which is a conglomerate unlikely to be encountered in practice). Chi-square entropy distribution values are different by a factor of 5 in our example, in favor of /dev/urandom data, which is still way more than the data encountered in our other test cases.

    From the above, there is strong indication that when you need random-like data and /dev/urandom is too slow (for example, as I will elaborate on an upcoming post), for example when you want to “randomize” your swap area, a Truecrypt volume will do in a pinch.

    #!/usr/bin/env perl
    use warnings;
    use File::stat;
    # a 5 min script (AKA no strict compliance) to supplement results for a blog article
    # why perl? Nostalgia :-)

    @subjects = qw(P_for_Paranoia.tc P_for_Paranoia.ur seed /etc/passwd /usr/lib/firefox-4.0.1/libxul.so);
    sub analyzeEnt {
    my($file) = @_;
    my $sz = stat($file)->size;
    my $ent = `ent $file` ."\n";
    print "#" x 80 . "\nprocessing file: $file ". $sz ." bytes\n".$ent;
    }
    foreach my $subject (@subjects) {
    &analyzeEnt($subject);
    }

    [Storage] Ομιλια του Δημαρχου Θεσσαλονικης Μπουταρη σχετικα με το Πανεπιστημιο

    The following is reproduced here for storage purposes, feel free to ignore this post.

    Πόλη και Πανεπιστήμιο

    Η οποιαδήποτε ατζέντα για την νέα Θεσσαλονίκη όπως θέλουμε να την λέμε δεν
    μπορεί παρά να ενσωματώσει προτάσεις, λύσεις και θέματα που αφορούν όχι μόνο το
    τοπικό αλλά και το εθνικό επίπεδο. Το εξέχον παράδειγμα είναι αυτό της
    τριτοβάθμιας παιδείας.
    Η στασιμότητα στην τριτοβάθμια παιδεία αφορά, έχει συνέπειες, όχι μόνο για την
    συνολική ανταγωνιστικότητα της χώρας, την εν γένει ανέλιξη και δυναμισμό της
    Ελληνικής κοινωνίας αλλά και την ικανότητα συγκεκριμένων περιοχών και αστικών
    κέντρων της Ελλάδος να προοδεύσουν.
    Αστικά περιβάλλοντα όπως αυτό της Θεσσαλονίκης δεν έχουν πια την πολυτέλεια να
    συμβιώνουν με μια μετρίων – και χειρότερα – επιδόσεων τριτοβάθμια παιδεία.
    Αντίθετα τους είναι απαραίτητη η διακεκριμένη όσο και πλουραλιστική στην
    διακυβέρνηση της τριτοβάθμια παιδεία μια που:
     Δεν μπορούν να βασιστούν, όπως βασίστηκε η πρωτεύουσα την περίοδο της
    απελευθέρωσης των αγορών, στην αναδιάρθρωση και εκσυγχρονισμό των υπηρεσιών
    και υποδομών (τράπεζες, τηλεπικοινωνίες, κλπ) που παραδοσιακά εδράζουν στην
    Αθήνα. Έχουν άρα μεγαλύτερη ανάγκη της παραγωγής πρωτογένειας από ένα
    ισχυρό πλέγμα πανεπιστημιακών σχολών που μπορεί να μπολιάσει και να
    διαμορφώσει εκ νέου την τοπική επιχειρηματικότητα.
     Δεν μπορούν να συγκρατήσουν τα δυναμικότερο ανθρώπινο δυναμικό τους
    ελλείψει ενός ισχυρού πόλου στην τριτοβάθμια παιδεία που να παράγει την
    πραγματικότητα όσο και την αίσθηση ‘ότι κάτι πάντα συμβαίνει και κάτι συνεχώς
    κινείται’. Έτσι οι ηγεσίες τους διαρρέουν στην πρωτεύουσα ή και στο εξωτερικό
    αποδυναμώνοντας ακόμη περισσότερο την ικανότητα τους να παρακολουθήσουν τις
    εξελίξεις.
     Δεν έχουν την ικανότητα να κάνουν χρήση του γεωγραφικού τους
    πλεονεκτήματος για να προσελκύσουν τις μελλοντικές ηγεσίες των γειτονικών
    χωρών σε σπουδές και να αναβαθμίσουν έτσι ακόμη περισσότερο τις περιφερειακές
    τους σχέσεις, καθώς και να καταστήσουν την παιδεία ως έναν τοπικό όσο και
    δυναμικό κλάδο υπηρεσιών.
    Από τις παραπάνω διαπιστώσεις απορρέει το εξής ένα συμπέρασμα: Ως θέμα αρχής η
    τριτοβάθμια παιδεία και η φύση της εξέλιξης της – όχι μόνο η παρουσία της και μόνο
    όπως μέχρι τώρα αντιμετωπίζεται από τοπικές κοινωνίες – κατ’ εξοχήν αφορά την
    Θεσσαλονίκη, την δεύτερη μεγαλύτερη πόλη της χώρας με το πρώτο μεγαλύτερο
    πανεπιστήμιο της χώρας. Και αφορά βεβαίως εξίσου όλες τις κοινωνίες των πόλεων
    της περιφέρειας που διαθέτουν πανεπιστήμια και πανεπιστημιακές σχολές κάποιου
    μεγέθους και επιπέδου. Κοινωνίες των πόλεων όπως η Ξάνθη, η Κομοτηνή, τα
    Ιωάννινα, η Πάτρα, το Ηράκλειο.
    Σήμερα λοιπόν θα σας μιλήσω όχι μόνο ως ο Δήμαρχος της πόλης που φιλοξενεί το
    μεγαλύτερο πανεπιστήμιο της χώρας αλλά και ως ο Δήμαρχος της πόλης που
    φιλοξενεί το πρώτο τη τάξει πανεπιστήμιο της Ελληνικής περιφέρειας. Διότι ο
    προβληματισμός μου δεν αφορά μόνο την Θεσσαλονίκη. Αντιθέτως αφορά όλες τις
    πόλεις της περιφέρειας που έχουν πανεπιστήμια, αφορά δηλαδή το σύνολο της
    Ελληνικής περιφέρειας.
    Διακυβέρνηση
    Θα αρχίζω από την αναγκαία συνθήκη και μετά θα προχωρήσω στις επαρκείς. Η
    Θεσσαλονίκη δεν θα αποκτήσει το πανεπιστήμιο που χρειάζεται εάν δεν αλλάξει ο
    βασικός όρος της διακυβέρνησης του. Και αυτός είναι ένας. Η σημερινή
    κομματικοποίηση του πανεπιστημίου που προκύπτει από την αναγκαιότητα οι
    πρυτανικές αρχές να εκλέγονται από τις ‘φοιτητικές’ οργανώσεις. Είναι μια
    διευθέτηση που δεν επιδέχεται βελτίωσης και απλά πρέπει να καταργηθεί. Ο λόγος
    είναι ότι θεσμοθετεί την διαχείριση του Ελληνικού πανεπιστημίου στην αρχή της
    σύγκρουσης συμφερόντων, στην πραγματικότητα εξωπανεπιστημιακών και μη
    ακαδημαϊκών. Πολύ απλά η σχέση διδάσκοντος και διδασκόμενου δεν μπορεί να
    συγκεραστεί με την σχέση εκλεγόμενου και εκλογέα, η ιδιότητα του φοιτητή δεν
    είναι συμβατή με την ιδιότητα του ψηφοφόρου. Η απόπειρα του συγκερασμού
    αυτών των δύο ιδιοτήτων έχει βλάψει ανεπανόρθωτα την ιερή σχέση μεταξύ
    διδάσκοντος και διδασκόμενου, υποχρεώνοντας τον διδάσκοντα να αντιμετωπίσει
    μεροληπτικά τον διδασκόμενο μια που οι φιλοδοξίες του για ανέλιξη εξαρτώνται από
    την ψηφοθηρία των κομματικών οργανώσεων. Από την άλλη μεριά έχει ωθήσει τον
    διδασκόμενο να υπονομεύσει την σχέση του με τους συνάδελφους φοιτητές του
    χρησιμοποιώντας την πατρωνία των κομματικών οργανώσεων για να πάρει βαθμούς
    που δεν αξίζει κατά ανάγκη, να διεκδικήσει θέση σε μεταπτυχιακά προγράμματα που
    άλλοι αξίζουν περισσότερο και, στον βαθμό που έχει ακαδημαϊκές φιλοδοξίες, να τις
    προωθήσει και αυτές μέσω της πατρωνίας.
    Όποιος ισχυρίζεται ότι αυτό το σύστημα διακυβέρνησης είναι υγιές ή ότι επιδέχεται
    βελτίωσης πλέον δεν εθελοτυφλεί, απλά ψεύδεται. Και, επειδή συζητούμε για την
    πανεπιστημιακή κοινότητα, όχι μόνο ψεύδεται αλλά και επιδεκτικά αγνοεί την ίδια
    επιστημονική συναίνεση, δηλαδή την έρευνα Ελλήνων συναδέλφων του, στους
    τομείς της πολιτικής οικονομίας, των πολιτικών επιστημών και της κοινωνιολογίας της
    εκπαίδευσης, που έχουν αναδείξει σε σειρά επιστημονικών δημοσιεύσεων σε έγκριτες
    όσο και διεθνείς περιοδικές εκδόσεις τα αρνητικά αποτελέσματα αυτής της
    διακυβέρνησης.
    Πολλοί από εσάς τους ξέρετε, αλλά ας τους αναφέρω. Ο Στέφανος Πεσματζόγλου,
    της Παντείου, έχει αναλύσει πως οι πιέσεις των κομματικών οργανώσεων στα μέλη
    της πανεπιστημιακής κοινότητας έχουν αναστείλει την εξέλιξη των προγραμμάτων
    σπουδών και έχουν καθηλώσει χιλιάδες απόφοιτους ελληνικών πανεπιστημίων στην
    απόκτηση υποτυπωδών και απηρχαιωμένων γνώσεων, όπου η αποφοίτηση έχει
    μοναδική αξία για την πρόσληψη στο Ελληνικό δημόσιο. Με αυτό το κριτήριο οι
    κομματικές οργανώσεις έχουν διαπραγματευτεί, ιδίως στα αρχαιότερα πανεπιστήμια
    μας και τμήματα, που το 70 και τοις εκατό των αποφοίτων κατευθύνεται στον
    δημόσιο τομέα, ένα στενό γνωστικό αντικείμενο και εξετάσεις στην ελάχιστη δυνατή
    υποδιαίρεση αυτού του ήδη υπό σμίκρυνση αντικειμένου. Οι Μητσόπουλος και
    Πελαγίδης του Πανεπιστημίου Αθηνών έχουν αναλύσει σε δημοσιεύσεις τους το πώς
    η σημερινή διακυβέρνηση του Πανεπιστημίου εξυπηρετεί κατά κύριο λόγο όχι την
    παροχή του δημόσιου αγαθού της παιδείας αλλά της προσοδοθηρικές στρατηγικές και
    επιδιώξεις των οργανώσεων, ακαδημαϊκών και κομματικών που το νέμονται. Ο
    Αποστόλης Δημητρόπουλος κοινωνιολόγος της εκπαίδευσης στο Πανεπιστήμιο
    Αθηνών και αυτός, πιο πρόσφατα έχει αναλύσει το πώς η εξάρτηση των πρυτανικών
    αρχών από τις κομματικές οργανώσεις – αυτό το ιδιότυπο σύμφωνο όπως το
    αποκαλεί – έχει καταστήσει τις πρυτανικές αρχές ένα προσωπείο και μόνο των
    πελατειακών συμφερόντων που εκπροσωπούν αυτές οι οργανώσεις, οι οποίες
    μάλιστα έχουν αυτονομηθεί σε σημαντικό βαθμό και από τα κόμματα στα οποία
    εντάσσονται, τέτοια είναι η ισχύς των συμφερόντων που έχουν καταστεί
    διεκδικήσιμα.
    Αναρίθμητοι συνάδελφοι σας, προς μεγάλη τιμή τους, και από όλα τα γνωστικά
    αντικείμενα, έχουν διατυπώσει ανάλογες κριτικές του σημερινού συστήματος
    διακυβέρνησης συμμετέχοντας στον δημόσιο διάλογο, όχι ως ειδικοί της εκπαίδευσης
    αλλά ορμώμενοι από τα βιώματα τους στο πανεπιστήμιο.
    Ποια πρόταση υιοθετώ; Την δια παντός αποχώρηση των κομματικών παρατάξεων,
    των φοιτητικών νεολαιών, από την μέθοδο επιλογής, όποια και αν είναι αυτή, των
    διοικητικών αρχών των τμημάτων, σχολών και πανεπιστημίων της χώρας.
    Μόνο έτσι θα αποκατασταθεί η ακεραιότητα της σχέσης διδάσκοντος και
    διδασκόμενου, της κυρίαρχης σχέσης για ένα πανεπιστημιακό ίδρυμα δηλαδή. Κυρίες
    και κύριοι, η κομματικοποίηση του πανεπιστημίου, είναι ο Μουμπάρακ που έχει
    καθίσει στο σβέρκο της σπουδάζουσας νεολαίας μας. Ήρθε το πλήρωμα του χρόνου
    να τον ξεφορτωθείτε.
    Μαζί με την αποκομματικοποίηση του πανεπιστημίου πρέπει επίσης να διεκδικήσετε
    την από-ασυλοποίηση του πανεπιστημίου που όχι μόνο επιβαρύνει την ήδη
    βεβαρημένη διακυβέρνηση σας και απαξιώνει το σπουδαστικό βίωμα των παιδιών μας
    – των λιγότερο προνομιούχων παιδιών μας που δεν σπουδάζουν υπό ειδυλλιακές
    συνθήκες στα πανεπιστήμια της Δυτικής Ευρώπης και της Βόρειας Αμερικής – αλλά
    και κάνει το πανεπιστήμιο απωθητικό στην κοινωνία της πόλης που το περιβάλλει.
    Ιδίως για εμάς στην Θεσσαλονίκη που έχουμε και το καλύτερο και πιο μεγάλο,
    κεντρικό αστικό κάμπους της χώρας η σημερινή κατάσταση του μας απωθεί από το
    να εμπλακούμε με το πανεπιστήμιο με δημιουργικό τρόπο, μια που το πανεπιστήμιο
    αποπνέει ατμόσφαιρα γκέτο, αλλά και να χαρούμε το απλούστερο, μια βόλτα ένα
    Σαββατοκύριακο στους χώρους ενός όμορφου και περιποιημένου κάμπους. Από-
    ασυλοποιημένο πανεπιστήμιο σημαίνει τελικά και ανοιχτό στην πόλη και την κοινωνία
    της πανεπιστήμιο.
    Θέλω σε αυτό το σημείο να διευκρινίσω ότι δεν διεκδικών και δε θέλω ex officio η
    οποιαδήποτε άλλη συμμετοχή στην διακυβέρνηση του ΑΠΘ και της τριτοβάθμιας
    παιδείας γενικότερα. Όπως έχετε διαπιστώσει έχω και θα συνεχίσω να έχω λόγο για
    την λειτουργία και την κατεύθυνση της τριτοβάθμιας παιδείας στην πόλη μας. Με
    αφήνει παγερά αδιάφορο το να έχω και θεσμική θέση, καρέκλα δηλαδή, σε
    οποιοδήποτε μελλοντικό διοικητικό συμβούλιο του ΑΠΘ. Διεκδικώ δηλαδή την
    παρέμβαση με την έκφραση της άποψης μου, αρχής γενομένης εδώ και τώρα, στο
    Πανεπιστήμιο, Σχολή και Τμήμα από το οποίο αποφοίτησα. Την άσκηση επιρροής
    στην διαμόρφωση συναίνεσης σε κάτι που είναι καθοριστικό για το μέλλον της
    Θεσσαλονίκης. Τίποτα παραπάνω. Τίποτα λιγότερο.
    Τεχνοκρατική Διαχείριση
    Όσων αφορά την τεχνοκρατική διαχείριση του πανεπιστημίου – αυτό που συνηθίζεται
    να αποκαλείται ως ο ‘μάνατζερ’ – δεν είναι δυνατόν να υπερασπιζόμαστε το μαζικό
    και σύγχρονο πανεπιστήμιο χωρίς να πρεσβεύουμε την αποτελεσματική διαχείριση
    του από άτομα που κατέχουν διαπιστωμένα επαρκείς τεχνικές γνώσεις. Η διαχείριση
    της μαζικότητας του σημερινού σύγχρονου πανεπιστημίου προκαλεί την ανάγκη για
    σύνθετες λειτουργίες:
     Στην διοικητική μέριμνα των χιλιάδων φοιτητών που περνούν τις πύλες των
    πανεπιστημίων μας κάθε μέρα.
     Στα συστήματα πληροφορικής που υποστηρίζουν τις διαδικασίες που
    επισύρουν οι δραστηριότητες αυτών των φοιτητών, στην εγγραφή τους στα
    μαθήματα επιλογής τους, στην έγκαιρη και αξιόπιστη καταγραφή των επιδόσεων
    τους, στην αναπαραγωγή των εγγράφων και βοηθημάτων που συνοδεύουν την
    εκπαιδευτική τους δραστηριότητα.
     Στις διαδικασίες κεντροποιημένων και ακέραιων προμηθειών για την διάθεση
    των απαραίτητων αναλώσιμων και μη υλικών που είναι απαραίτητα στην λειτουργία
    αυτού του μαζικού πανεπιστημίου.
    Με το να αρνούμεθα αυτή την τεχνοκρατική διαχείριση δεν επανερχόμενα σε ένα
    ειδυλλιακό πανεπιστήμιο, τύπου ‘Επιστροφής στο Μπράιτσχεντ’, στην Οξφόρδη ή
    την Χαιδελβέργη του πρώτου μισού του 20ου αιώνα, αλλά απλά καταδικάζουμε το
    μαζικό πανεπιστήμιο σε επίπεδο κατώτερο μιας ήδη κακής δημόσιας διοίκησης.
    Ενισχύουμε την πατρωνία που ασκούν πάνω στο φοιτητικό σώμα οι κομματικές
    οργανώσεις που έτσι γίνονται οι διαμεσολαβητές μεταξύ μιας ανεπαρκούς διοικητικής
    μηχανής και του ταλαίπωρου φοιτητή. Σπαταλούμε πολύτιμους και
    δυσαναπλήρωτους πόρους και τους στερούμε από την έρευνα και την διδασκαλία του
    πανεπιστημίου. Υποσκάπτουμε τελικά το δημόσιο αγαθό που λέγεται μαζική
    τριτοβάθμια παιδεία.
    Μπορώ να σας το πω και εγώ με την σημερινή μου ιδιότητα ως Δήμαρχος
    Θεσσαλονίκης – είμαστε στο ίδιο σινάφι πλέον, παράγω και διαθέτω όπως και εσείς
    δημόσια αγαθά και υπηρεσίες – θέλω για να κάνω την δουλειά μου σωστά τους
    καλύτερους λογιστές, τους καλύτερους ειδικούς πληροφορικής, τους καλύτερους
    δικηγόρους και ούτω καθεξής. Όποτε δεν τους έχω αυτό που υποφέρει είναι το
    δημόσιο συμφέρον που εκπροσωπεί ο δήμος Θεσσαλονίκης, υποφέρει δηλαδή ο
    δημότης της πόλης μας και η οικογένεια του.
    Κληροδοτήματα και Χορηγίες
    Όσων αφορά τώρα τις διευρυμένες πηγές χρηματοδότησης σας πέραν δηλαδή της
    κρατικής και Ευρωπαϊκής χρηματοδότησης. Καταρχήν να θυμηθούμε ότι η χορηγική
    δράση δεν είναι ένα ξενόφερτο φρούτο αλλά συνήθεια βαθιά ριζωμένη στον
    Ελληνισμό. Δεν χρειάζεται να πάμε τόσο μακριά όσο η κλασσική Αθήνα – αλλά αν
    θέλετε ας πάμε και ως εκεί – μερικά από τα σημαντικότερα πανεπιστημιακά ιδρύματα
    της χώρας φέρουν ακόμη τα ονόματα των ιδιωτών ιδρυτών τους – Πάντειο,
    Μετσόβιο κλπ. Ακόμη και σήμερα άλλωστε – και είναι ένα αγώνας που θέλω να
    συντρέξω – οι πανεπιστημιακές αρχές της χώρας παλεύουν να εκσυγχρονίσουν τον
    θεσμό των κληροδοτημάτων, ούτως ώστε να ενεργοποιήσουν πόρους που επί του
    παρόντος είναι εν υπνώσει, κυρίως ακίνητες αξίες. Προσπαθούν δηλαδή να
    μεγιστοποιήσουν την ωφέλεια, στην εκπλήρωση της εκπαιδευτικής τους αποστολής,
    των χορηγιών που τους δόθηκαν στο παρελθόν από εύπορους συμπατριώτες μας.
    Δεν προτείνω την άντληση χορηγιών ως άλλοθι για την μείωση των κρατικών
    δαπανών στην παιδεία. Άλλωστε οι ίδιες οι κοινωνίες που παρουσιάζουν τα πιο
    υψηλά ποσοστά χρηματοδότησης στην παιδεία ως ποσοστό του ΑΕΠ παρουσιάζουν
    και τις πιο διευρυμένες πηγές χρηματοδότησης αυτού του αγαθού. Πολύ απλά είναι
    κοινωνίες που διαχέονται από συναίνεση σε όλα τα επίπεδα για τον στρατηγικό και
    αναντικατάστατο ρόλο της παιδείας για την πρόοδο και ευημερία τους. Συναίνεση
    που διατρέχει το εκλογικό σώμα, την πολιτεία, τους απόφοιτους των πανεπιστημίων,
    τις μικρές και μεγάλες επιχειρήσεις, και τις εύπορες εισοδηματικές τάξεις.
    Είναι ανεπίτρεπτο λοιπόν, ιδίως τη σήμερον ημέρα, οι πρυτανικές αρχές της χώρας να
    μην διαθέτουν στρατηγική άντλησης χορηγιών που να απευθύνεται στην βάση των
    αποφοίτων τους, και στους πιο εύπορους εξ αυτών, στα μεγάλα φιλανθρωπικά
    ιδρύματα της χώρας, στις μεγάλες Ελληνικές επιχειρήσεις, στον μεγάλο Ελληνικό
    πλούτο εντός και εκτός των συνόρων της επικράτειας. Και να μην έχουν και τα μέσα
    που να μπορεί να υλοποιήσει την στρατηγική τους, δηλαδή εξειδικευμένες υπηρεσίες
    στην άντληση χορηγιών που είναι μια σύνθετη επιχειρησιακή λειτουργία – τα γνωστά
    ως development offices. Το Ίδρυμα Νιάρχος δωρίζει μισό δις ευρώ για την ανέγερση
    της νέας εθνικής βιβλιοθήκης και όπερας στο Φαληρικό Δέλτα, το Ωνάσειο ξόδεψε
    πάνω από 100 εκ ευρώ για την Στέγη του Πολιτισμού στην Συγγρού μιλώ για λεφτά
    που πηγαίνουν στην παιδεία και στον πολιτισμό για λεφτά που υπό άλλες συνθήκες
    θα μπορούσατε να τα πάρετε εσείς.
    Η χορηγία όμως δεν έχει μόνο την διάσταση άντλησης πόρων. Έχει και την διάσταση
    της παραγωγής πρωτογένειας και της αναβάθμισης της διακυβέρνησης.
    Την διάσταση της πρωτογένειας διότι όσο περισσότερο διαφοροποιείς τις πηγές
    υποστήριξης σου τόσο περισσότερο διαφοροποιείς το εύρος των υποστηριζόμενων
    δράσεων. Και ναι μεν το πανεπιστήμιο πρέπει πάντα να προφυλάγεται, όσων αφορά
    τους όρους με τους οποίους δέχεται υποστήριξη, ένα όμως είναι σίγουρο ότι
    βασιζόμενο σε μια πηγή και μόνο χρηματοδότησης, άντε δύο, εάν συμπεριλάβουμε
    την Ευρωπαϊκή Ένωση, εκ των όντων μεγεθύνει την εξάρτηση τους από αυτούς.
    Μπορώ να σας δώσω το προσωπικό μου παράδειγμα σε αυτό το σημείο. Πιστεύω,
    ότι όταν σαν χορηγός αλλά και με το χρόνο μου υποστήριξα την σύγχρονη τέχνη στα
    τέλη της δεκαετίας του 80 και την προστασία της αρκούδας στα τέλη της δεκαετίες
    του 90 ήμουν χρόνια μπροστά από την πολιτεία – και δυστυχώς και από το ελληνικό
    πανεπιστήμιο. Σε ένα πιο ελκυστικό περιβάλλον όσον αφορά τον προσπορισμό και
    την χρήση των χορηγιών όμως θα μπορούσα να ήμουν μαζί με το πανεπιστήμιο.
    Στο θέμα της διακυβέρνησης τώρα, πίστη μου είναι ότι η διαχείριση μη κρατικών
    πόρων θα ανάγκαζε το πανεπιστήμιο να διευρύνει την χρηστή διαχείριση εν γένει.
    Ήδη στην απορρόφηση των ευρωπαϊκών κονδυλιών είστε πολύ πιο επιμελείς στην
    απόδοση λογαριασμού από ότι είστε στο Υπουργείο Παιδείας, στον Έλληνα
    φορολογούμενο δηλαδή. Αναλόγως όσο περισσότερα χρήματα παίρνετε από τον
    Έλληνα χορηγό – και οι μεγάλοι έλληνες χορηγοί έχουν μηχανισμούς
    παρακολούθησης της υλοποίησης των υπεσχημένων – τόσο περισσότερο θα
    εκσυγχρονίσετε και θα καταστεί χρηστή διαχείριση των δικών σας θεμάτων. Εάν
    μάλιστα αυτή η άντληση χορηγιών συνοδευτεί και από την υποστήριξη από τοπικούς
    φορείς και πολίτες αυτής της πόλης, στην ισχύ του ελέγχου και λογοδοσίας θα
    προστεθεί και το κίνητρο της μη έκθεσης στην τοπική κοινωνία, του να μην γίνουμε
    ρεζίλι με άλλα λόγια στο άμεσο κοινωνικό μας περιβάλλον.
    Οικονομία και Γνώση
    Από οπουδήποτε και εάν προσπορίσετε πόρους όμως είναι καιρός να από-
    ενοχοποιήσουμε την συμβολή του Ελληνικού Πανεπιστημίου στην δημιουργία
    πλούτου – στην δημιουργία πλούτου, σε εθνικό, περιφερειακό, αστικό, εταιρικό και
    ατομικό επίπεδο. Να αποενεχοποιήσουμε επίσης την συμβολή του πανεπιστημίου
    στην δημιουργία πλούτου μέσω της σύμπραξης είτε με την πολιτεία είτε με τον
    ιδιώτη, είτε με την επιχείρηση που είναι υπό τον έλεγχο ελληνικής προέλευσης
    μετόχων είτε αλλοδαπών, δηλαδή πολυεθνικών επιχειρήσεων.
    Η χώρα μας είναι σήμερα πλήρως εξαρτώμενη από χώρες όπως η Γαλλία και η
    Γερμανία η παραγωγικότητα των οποίων βασίζεται απόλυτα σε αυτή την συμβολή. Ο
    Έλληνας πολίτης εξαρτάται σήμερα για το βιός του από πολίτες αυτών των χωρών
    που είναι παραγωγικότεροι – και όχι εργατικότεροι όπως κακώς λέγεται – ακριβώς
    διότι η τριτοβάθμια παιδεία τους επιτρέπει να είναι παραγωγικότεροι, τα πανεπιστήμια
    από τα οποία αποφοίτησαν άνευ ενδοιασμών υποστηρίζουν με το ερευνητικό τους
    έργο τις επιχειρήσεις – γηγενείς ή αλλοδαπές – από τις οποίες εξαρτάται το δικό τους
    βιός. Αλλά και οι νέοι παίκτες τα δημοσιονομικά πλεονάσματα των οποίων
    προσβλέπει η κυβέρνηση για να διασώσει όλους εμάς, αγοράζοντας ομόλογα του
    ελληνικού δημοσίου και επενδύοντας στην Ελλάδα, παίκτες όπως η Κίνα έχουν
    στρατολογήσει την γνώση στην παραγωγική τους μηχανή.
    Δεν είναι τυχαίο από αυτή την άποψη ότι οι πολιτικές δυνάμεις που απεύχονται την
    αλλαγή στο ελληνικό πανεπιστήμιο είναι οι ίδιες αυτές δυνάμεις που δεν προτείνουν
    για την χώρα μας κάποια άλλη χώρα ως μοντέλο που να έχει πετυχημένη σχέση
    μεταξύ γνώσης και παραγωγικής διαδικασίας –και μάλιστα χώρες μικρές όπως η δική
    μας όπως η Φινλανδία ή το Ισραήλ. Ταυτίζονται αντίθετα, στο διεθνές στερέωμα, είτε
    με κινήματα αμφισβήτησης είτε με περιθωριακές χώρες που, συνήθως, υποστηρίζουν
    το βιοτικό επίπεδο τους με το πετρέλαιο που διαθέτουν, όπως η Βενεζουέλα του
    Ούγκο Τσάβεζ ή το Ιράν του Αχμεντίνετζαντ.
    Δεν είναι τυχαίο βεβαίως ότι οι προσπάθειες που κρατούν πάνω από δεκαπέντε
    χρόνια τώρα, στην ίδια την Θεσσαλονίκη και στην Βόρεια Ελλάδα ευρύτερα να
    συνδεθεί η έρευνα και καινοτομία με την παραγωγική διαδικασία απέτυχαν
    παταγωδώς και παρόλο τον προσπορισμό σημαντικών εθνικών και Κοινοτικών πόρων
    για την δημιουργία της ζωνών καινοτομίας. Από το 1985, με όλες τις κυβερνήσεις,
    η χρηματοδότηση από σειρά Ευρωπαϊκών προγραμμάτων, Κοινοτικών Πλαισίων
    Στήριξης, Περιφερειακών Επιχειρησιακών Προγραμμάτων, δεν έκαναν την
    Θεσσαλονίκη και την γύρω περιοχή της πόλο καινοτομίας. Η κεντρική Μακεδονία
    είναι στην θέση 164, από σύνολο 208, στον δείκτη περιφερειακής καινοτομίας της
    Ευρωπαϊκής Ένωσης, και η χώρα μας 25η στην Ένωση, με τελευταίες να την
    ακολουθούν η Βουλγαρία και η Ρουμανία.
    Αξιολογότατοι διεθνώς διακεκριμένοι συνάδελφοι σας όπως οι Παπαμίχος, Καυκαλάς
    και Λαμπριανίδης, συνέταξαν τόμους εκατοντάδων σελίδων, και δεκάδων χιλιάδων
    λέξεων, πάνω σε αυτό στο θέμα της Θεσσαλονίκης ως πόλου καινοτομίας, με
    τελευταίο δείγμα τα σχετικά χωρία του Ρυθμιστικού Σχεδίου Θεσσαλονίκης. Ήρθε η
    ώρα όμως, και αυτό επιτάσσει το πνευματικό θάρρος, να μας πουν αυτό που
    γνωρίζουν σε μία κόλλα χαρτί, σε όχι παραπάνω από 600 λέξεις ενός άρθρου γνώμης
    σε μια εφημερίδα. Να μας πουν ότι ποτέ – μα ποτέ – δεν θα καταφέρουμε να
    κάνουμε καινοτόμα και διεθνώς ανταγωνιστική την οικονομία της Θεσσαλονίκης και
    της Κεντρικής Μακεδονίας εάν δεν αλλάξουμε ριζικά την διακυβέρνηση των
    πανεπιστημίων της πόλης και της περιφέρειας μας. Αναμένω όχι στο ακουστικό μου
    αλλά στην αποδελτίωση μου.
    Κυρίες και κύριοι, από το άρρωστο δένδρο δεν θα βγει το γερό κλαρί. Θέλεις να
    αποκτήσεις Silicon Valley πρέπει να είσαι διατεθειμένος να δώσεις την μάχη για να
    αποκτήσεις ένα CalTech, ένα Stanford, ένα UCLA. Επειδή ακριβώς κανείς από εμάς,
    και όχι μόνο εσείς, δεν δώσαμε μαζί αυτή την μάχη για αυτό η Θεσσαλονίκη και η
    Βόρεια Ελλάδα σήμερα γνωρίζουν την αποβιομηχάνιση, με τις παραγωγικές
    διαδικασίες της Νοτιοανατολικής Ευρώπης να έχουν επικεντρωθεί, λόγω συνδυασμού
    εργατικού κόστους αλλά και αυξημένης τεχνολογικής πρωτογένειας, στην περίπτωση
    της Τουρκίας, εκτός των εθνικών συνόρων μας. Και εδώ φταίει και η επιχειρηματική
    τάξη της πόλης μας διότι για δεκαετίες όταν μιλάει για την ανάπτυξη μιλάει για την
    ΔΕΘ και δεν έχει σχεδόν τίποτα να πει για το ΑΠΘ. Ένα είναι το σημαντικότερο
    αναπτυξιακό μέτρο για την πόλη μας, μία είναι η απολύτως αναγκαία συνθήκη για να
    ορθοποδήσει μακροπρόθεσμα η Θεσσαλονίκη και η Βόρεια Ελλάδα: Nα γίνει το ΑΠΘ
    συνολικά το καλύτερο πανεπιστήμιο της Νοτιοανατολικής Ευρώπης και με παγκόσμιες
    επιδόσεις σε ερευνητικά αντικείμενα αιχμής, στο Χημείο και σε άλλα τμήματα.
    Λέγοντας να απενοχοποιηθεί η σχέση γνώσης και παραγωγικής διαδικασίας δεν
    εννοώ ότι οτιδήποτε γίνεται στο πανεπιστήμιο πρέπει να είναι στραμμένο στην
    οικονομική απόδοση. Κάθε άλλο. Είτε στην έρευνα είτε στην διδασκαλία πρέπει όχι
    μόνο να επιτραπεί αλλά και να ενθαρρυνθεί γενναιόδωρα η απόκτηση και η
    διεύρυνση της γνώσης για την γνώση. Σας διαβεβαιώνω ότι σαν επιχειρηματίας
    πέτυχα διότι μπόρεσα να κάνω όχι αυτό που με ωφέλησε αλλά αυτό που αγάπησα.
    Ακόμη και στον βαθμό που μας ενδιαφέρει το οικονομικό αποτέλεσμα και μόνο πρέπει
    να δώσουμε την δυνατότητα σε δημιουργικούς ανθρώπους, που το οικονομικό
    αποτέλεσμα τους αφήνει παντελώς αδιάφορους, να ασχοληθούν με το μεράκι τους.
    Διότι έτσι ανακαλύπτονται οι Βεργίνες που μετά φέρνουν χιλιάδες τουριστών στην
    Μακεδονία. Διότι έτσι αρθρώνονται οι προτάσεις για την διατήρηση και διάσωση
    παραδοσιακών οικισμών όπως η Άνω Πόλη που εάν τις είχαμε εισακούσει σήμερα η
    Θεσσαλονίκη θα ήταν διεθνής τουριστικός προορισμός. Διότι έτσι γίνονται οι νέες
    ανακαλύψεις που στο πλήρωμα του χρόνου δημιουργούν επιχειρήσεις με εκατοντάδες
    εργαζομένων, που παράγουν πλούτο, φορολογικά έσοδα και κοινωνικό έργο. Και
    διότι έτσι οι πολιτισμένες χώρες όχι μόνο παράγουν τον υλικό πλούτο που τις
    χαρακτηρίζει ως πολιτισμένες αλλά και την σκέψη και δημιουργία που είναι
    απαραίτητες για την αποστασιοποίηση από την επιβίωση και τις επιταγές της.
    Μετατρέποντας την Αποτυχία σε Επιτυχία
    Μπορεί όλα αυτά που διαγράφω – και βεβαίως τα έχουν πει και άλλοι καλύτερα από
    μένα, συνάδελφοι σας επί το πλείστον – να φαντάζουν ως άθλος. Και όμως σε αυτή
    μας την κοινή προσπάθεια για ένα πετυχημένο πανεπιστήμιο, ένα πετυχημένο ΑΠΘ,
    Πανεπιστήμιο Μακεδονίας, Διεθνές Πανεπιστήμιο, ΤΕΙ Θεσσαλονίκης έχουμε ένα
    τεράστιο προβάδισμα. Ποιο είναι αυτό; Η μέχρι τώρα αποτυχία μας. Είναι αυτή η
    αποτυχία που έχει σωρεύσει στο εξωτερικό – στην Δυτική Ευρώπη και Βόρεια
    Αμερική κυρίως – ένα πλήθος Ελλήνων ακαδημαϊκών, χιλιάδων άξιων επιστημόνων, οι
    οποίοι με τις κατάλληλες αρχικές παρεμβάσεις μπορούν να δώσουν γιγαντιαία ώθηση
    και σε όλους εσάς. Καταρχήν, δεν υπάρχει τμήμα ελληνικού πανεπιστημίου που δεν
    έχει προνομιακή πρόσβαση σε πανεπιστήμια και ερευνητικά κέντρα του εξωτερικού
    εξαιτίας ακριβώς αυτής της μακροχρόνιας συσσώρευσης δυναμικού εκτός της
    επικράτειας. Αυτό σημαίνει ότι η σύναψη στρατηγικών συμμαχιών με αλλοδαπά
    ιδρύματα, είτε ερευνητικών είτε διδακτικών συμμαχιών, γίνεται πιο εύκολη και
    απρόσκοπτη. Το θέμα της αξιολόγησης της δικής σας επίδοσης επίσης γίνεται εφικτό
    μια που συνάδελφοι που γνωρίζουν την ελληνική γλώσσα αλλά δεν είναι δέσμιοι
    τοπικών συναλλαγών μπορούν να αναλάβουν αυτό το έργο. Η ανανέωση του
    επιστημονικού δυναμικού, στο πλαίσιο και ερευνητικών προγραμμάτων και
    επισκεπτών καθηγητών και ερευνητών, και όχι μόνον χρονοβόρων διαδικασιών
    πρόσληψης μόνιμου προσωπικού, καθίσταται και αυτή εφικτή. Και βεβαίως εξίσου
    εφικτή είναι και η ανάληψη της ηγεσίας των ιδρυμάτων σας από Έλληνες της
    επιστημονικής διασποράς μας που και γνωρίζουν την χώρα αλά και είναι φορείς
    σύγχρονων μορφών διακυβέρνησης στην τριτοβάθμια παιδεία.
    Αυτή η μετατροπή ενός αιτιατού της αποτυχίας – της μετανάστευσης επιστημονικού
    δυναμικού – σε καίριο αίτιο της επιτυχίας βασίζεται στους όρους που ανέφερα
    παραπάνω: εκτοπισμός της βασικής σύγκρουσης συμφερόντων από το ελληνικό
    πανεπιστήμιο, σύγχρονη τεχνοκρατική διοίκηση, προσπορισμός πολλαπλών πηγών
    χρηματοδότησης. Σε συνθήκες ενάρετου κύκλου η κάθε αλλαγή σε ένα από αυτά τα
    πεδία θα ενισχύει την θετική επίδραση των υπόλοιπων αλλαγών.
    Μαζί για ένα καλύτερο πανεπιστήμιο
    Κυρίες και κύριοι, να είστε σίγουροι ότι στον βαθμό που το πανεπιστήμιο προωθήσει
    το ίδιο τις αναγκαίες αλλαγές στην διακυβέρνηση του θα δημιουργήσει, εδώ στην
    Θεσσαλονίκη αρραγές μέτωπο με την τοπική κοινωνία για την επιτυχία του και την
    εξέλιξη του. Σίγουρα αυτή είναι η υπόσχεση μου σε εσάς, ως Δήμαρχος της
    Θεσσαλονίκης. Μάμε μαζί λοιπόν:
     Πάμε μαζί για να αναμορφώσουμε το καθεστώς των κληροδοτημάτων που θα
    αποδώσει αυτές τις κεφαλαιουχικές υπεραξίες που χρειάζεστε.
     Πάμε μαζί να χτυπήσουμε την πόρτα των μεγάλων χορηγών, εντός και εκτός
    της χώρας μας, για να προσπορίσουμε επιπρόσθετους πόρους για τον άπορο
    φοιτητή, για τον κτιριακό σας εξοπλισμό, τις τεχνολογικές σας υποδομές, την
    ερευνητική σας δραστηριότητα, την διεθνοποίηση σας.
     Πάμε μαζί για να εδραιώσουμε την έννοια της χορηγίας στον πληθυσμό της
    ίδιας της πόλης μας και ιδίως στους εύπορους απόφοιτους του ΑΠΘ που κατοικούν
    στην Θεσσαλονίκη.
     Πάμε μαζί για να εξασφαλίσουμε ότι θα έχετε, εδώ στο κέντρο της πόλης
    αλλά και πέριξ της Θεσσαλονίκης, τον απαραίτητο χώρο για την ανάπτυξη σας.
    Πάμε μαζί όμως με ποιο πανεπιστήμιο:
     Με το πανεπιστήμιο που δεν αποδέχεται την σύγκρουση συμφερόντων και
    την κομματικοποίηση ως καταστατική αρχή της λειτουργίας του.
     Με το πανεπιστήμιο που το ίδιο υιοθετεί την υψηλού επιπέδου τεχνοκρατική
    και χρηστή διαχείριση.
     Με το πανεπιστήμιο που είναι διατεθειμένο να διευρύνει τις πηγές
    χρηματοδότησης τους στην Ελληνική χορηγική κοινότητα.
     Με το πανεπιστήμιο που είναι αποφασισμένο να προσελκύσει στους κόλπους
    τους χιλιάδες διακεκριμένους Έλληνες επιστήμονες του εξωτερικού.
     Με το πανεπιστήμιο που ανεπιφύλακτα στρατεύεται στον αγώνα της χώρας
    να δημιουργήσει μια διεθνώς ανταγωνιστική οικονομία η οποία θα ικανοποιεί τις
    συλλογικές και ατομικές προσδοκίες των Ελλήνων για ικανοποιητικό επίπεδο ζωής και
    της συνεπακόλουθης παροχής ικανοποιητικών δημόσιων αγαθών και υπηρεσιών από
    ένα οικονομικά εύρωστο ελληνικό κράτος.
     Πάμε μαζί με ένα Αριστοτέλειο Πανεπιστήμιο Θεσσαλονίκης, με ένα
    Πανεπιστήμιο Μακεδονίας, με ένα Τμήμα Χημείου, και με όλα τα τμήματα, το κάθε
    αποφασισμένο να πράξει ότι πρέπει για μια πετυχημένη, ευημερούσα, εξωστρεφής
    Θεσσαλονίκη και Βόρεια Ελλάδα.

    A Playstation Network intrusion post-mortem *I* would like to see

    By now, I am sure everyone would have heard how Sony’s Playstation Network (and assorted services) are down for the better part of a week, with no definite restoration date in sight, due to an “external incursion”. Sony was so nice as to offer a FAQ (you might also be interested in this wired article). However, there are a couple of points that I take issue with:

    1) First of all, let’s stop the blame game. All I see so far from major media outlets was “Was it Anonymoys? Was it the rebug firmware modder guys?” (Both of these parties have denied involvement, you can read more about rebug here). Instead of that, can we get some full disclosure on WHAT happened, WHY it has happened and WHAT steps have been undertaken to address so that will never happen again? So far, from Sony’s FAQ:

    Q.3 What is the main reason to this problem? Which parts of the system were vulnerable to the intrusion?
    We are currently conducting a thorough investigation of the situation. Since this is an overall security related issue, we will not comment further on this case.

    When I, among millions of other people, trust my details to a network, I place some trust. When this network is PSN (and it is not like Sony is a Mon-n-Pop shop not able to afford top-notch security equipment and advice, if the PS3 stayed “unhackable” for 4+ years, as far as the general public is concerned, proves that they can allocate enough security resources in what they deem critical). Given that details include:

    Q.6 Does that mean all users’ information was compromised? Tell us more in details of what personal information leaked.

    In terms of possibility, yes. We believe that an unauthorized person has obtained the following information that you provided: name, address (city, state/province, zip or postal code), country, email address, birthdate, PlayStation Network/Qriocity password, login, password security answers, and handle/PSN online ID. It is also possible that your profile data may have been obtained, including purchase history and billing address (city, state/province, zip or postal code). If you have authorized a sub-account for your dependent, the same data with respect to your dependent may have been obtained. If you have provided your credit card data through PlayStation Network or Qriocity, it is possible that your credit card number (excluding security code) and expiration date may also have been obtained.

    I, for one, would like to fully know what intrusion countermeasures are in place so details such as these (can you spell “identity theft”?) are relatively safe. The “you did not have to provide them will all these details” defense simply is not applicable, thanks to the “provide us your details or else you will not be able to deathmatch online” policy of Sony. As was the case with other major data breaches, could that signify that security measures were simply lacking? While this can be (and so far IS) a PR disaster for Sony, a way to regain some “face” is to admit any mistakes, share relevant information for the benefit of the community (both the user community and “infosec” community). As for “but do you really expect to give out a list of countermeasures in place”?, well, security by obscurity never, ever had worked in the past, why should it work now?

    2) While this is not strictly Sony’s fault, and appears to be a standard mode of operation, why the onus of protecting my data is on me, the average user? Again, let’s quote the FAQ:

    Q.9 I want to know if my account has been affected.

    To protect against possible identity theft or other financial loss, we encourage you to remain vigilant to review your account statements and to monitor your credit reports. Additionally, if you use the same user name or password for your PlayStation Network or Qriocity service account for other unrelated services or accounts, we strongly recommend that you change them. When the PlayStation Network and Qriocity services are back on line, we also strongly recommend that you log on to change your password.
    For your security, we encourage you to be especially aware of email, telephone, postal mail or other scams that ask for personal or sensitive information. Sony will not contact you in any way, including by email, asking for your credit card number, social security number or other personally identifiable information. If you are asked for this information, you can be confident Sony is not the entity asking.

    Q.10 What should I do to prevent any unauthorized use of my (credit card) personal information?

    For your security, we encourage you to be especially aware of email, telephone, postal mail or other scams that ask for personal or sensitive information. Sony will not contact you in any way, including by email, asking for your credit card number, social security number or other personally identifiable information. If you are asked for this information, you can be confident Sony is not the entity asking. Additionally, if you use the same user name or password for your PlayStation Network or Qriocity service account for other unrelated services or accounts, we strongly recommend that you change them. When the PlayStation Network and Qriocity services are back on line, we also strongly recommend that you log on to change your password.
    To protect against possible identity theft or other financial loss, we encourage you to remain vigilant to review your account statements and to monitor your credit reports.

    So, a network which has Sony’s backing (read: “practically infinite amount of money”), instead of owing up to their mistakes, assumes a stance which, once you get through all the legalese, effectively amounts to “oh we lost your data and we will not even let you know what measures we had in place to address such attacks and we will not give you a heads up what caused all this, neither we will let you know what we have done to address this issue after the fact, sorry if you get any charges on your credit card or if your details are now in the hands of scammers”. And no Sony, a 20 euro voucher so I get to see Ryu kicking some butt wearing his grandma’s underpants does not really cut it.

    I am very very disappointed. To sum it up, I would really like to see Sony come forward and help us regain some of the trust lost but I am not holding my breath for it.

    APTs – From the soapbox dept.

    Here’s a funny (and completely erroneous) definition of APTs from a well known mailing list

    Advanced = goes through firewall
    Persistent = tried more than once
    Threat = people trying to get into valuable stuff

    (although, in all fairness, APT tends to be an overused acronym)

    Quick script to set up a Wikileaks mirror on Debian

    I am sure that by now, everyone has heard of the Wikileaks so-called “controversy” and noticed that Wikileaks indeed has a hard time (being under some HUGE DDoS attacks, getting kicked out of Amazon and having ICANN drop the domain) so a mirror or two would be welcome. While I do not have the resources to provide a mirror myself, nor the inclination (while in general I am all for full disclosure, I have to yet to made my mind completely on the aforementioned issue), someone out there might have.

    I have found the following shell script online that automates the creation of a wikileaks mirror, hopefully one of the readers will add a mirror. For the latest revisions, feel free to check the original source.

    [update: the author seems to be DrWhax of 2600.nl fame!]

    Without further ado, here is the script!

    PS. If I find some time (which becomes a scarce commodity these days, I will write a post on how to do this on other web server’s, such as lighttpd)

    #### tutorial about how to set up a wikileaks mirror on Debian with Apache webserver ####
    #### see http://213.251.145.96/mass-mirror.html for further information ####
    # create a DNS entry (named ‘wikileaks.mydomain.com’ here) in your DNS provider interface
    # make it reach to your webserver IP
    # login to your webserver
    # create the user that WL will use (named ‘wikileaks’ here)
    useradd -m -d /home/wikileaks wikileaks
    # set the wikileaks ssh public key
    mkdir /home/wikileaks/.ssh
    wget http://213.251.145.96/id_rsa.pub -O /home/wikileaks/.ssh/authorized_keys
    # create the directory which will be used to host the file (name ‘/var/www/wikileaks.mydomain.com/’ here)
    # and give the 'wikileaks' user the permission to write
    mkdir /var/www/wikileaks.mydomain.com
    chown wikileaks:wikileaks /var/www/wikileaks.mydomain.com
    chmod u+w /var/www/wikileaks.mydomain.com
    # set up virtual host (for Apache webserver)
    touch /etc/apache2/sites-available/wikileaks.mydomain.com
    vim /etc/apache2/sites-available/wikileaks.mydomain.com
    # copy the following conf :
    <VirtualHost *:80 >
    ServerName wikileaks.mydomain.com
    DocumentRoot /var/www/wikileaks.mydomain.com

    AllowOverride None

    Order Allow,Deny
    Allow from All
    </VirtualHost>

    # enable the vhost
    ln -s /etc/apache2/sites-available/wikileaks.mydomain.com /etc/apache2/sites-enable/wikileaks.mydomain.com
    # test the syntax
    apache2ctl configtest
    # load the new conf
    apache2ctl graceful
    # go to http://46.59.1.2/mass-mirror.html to register your mirror
    # for the name used in this example, the fields value would be :
    # login : 'wikileaks'

    Hello world demystified

    Hello all,
    in the finest programming tradition, I take it that every time one took a programming course or decided to have a quick look into a programming language, writing a “Hello World” program was one of the first things done.
    However, even in such a small program, do you really know what it does behind the scenes? Yiannis blogged about it here, giving a Java test case (and by the way, allow me to extend my welcome!) and Dimitris provided a C equivalent there. However, let’s do a roundup. After whacking some Perl code, I got the following results

    Let’s start with the old workhorse, Perl:


    ################################################################################
    The Perl version
    ################################################################################
    strace -c -f -q perl hello.pl
    % time seconds usecs/call calls errors syscall
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000029 1 36 13 open
    0.00 0.000000 0 10 read
    0.00 0.000000 0 1 write
    0.00 0.000000 0 23 close
    0.00 0.000000 0 1 execve
    0.00 0.000000 0 1 time
    0.00 0.000000 0 7 7 access
    0.00 0.000000 0 4 brk
    0.00 0.000000 0 4 3 ioctl
    0.00 0.000000 0 1 readlink
    0.00 0.000000 0 2 munmap
    0.00 0.000000 0 1 uname
    0.00 0.000000 0 8 mprotect
    0.00 0.000000 0 4 2 _llseek
    0.00 0.000000 0 4 rt_sigaction
    0.00 0.000000 0 1 rt_sigprocmask
    0.00 0.000000 0 1 getrlimit
    0.00 0.000000 0 31 mmap2
    0.00 0.000000 0 3 3 stat64
    0.00 0.000000 0 22 fstat64
    0.00 0.000000 0 1 getuid32
    0.00 0.000000 0 1 getgid32
    0.00 0.000000 0 1 geteuid32
    0.00 0.000000 0 1 getegid32
    0.00 0.000000 0 1 fcntl64
    0.00 0.000000 0 3 1 futex
    0.00 0.000000 0 1 set_thread_area
    0.00 0.000000 0 1 set_tid_address
    0.00 0.000000 0 1 set_robust_list
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000029 176 29 total
    Hello World!


    ltrace -c -f perl hello.pl
    % time seconds usecs/call calls function
    ------ ----------- ----------- --------- --------------------
    91.07 2.013999 9455 213 calloc
    2.15 0.047513 64 733 pthread_getspecific
    1.44 0.031752 64 492 memcpy
    1.33 0.029410 65 446 malloc
    1.08 0.023974 64 370 memset
    1.05 0.023194 64 357 strlen
    0.33 0.007340 63 115 free
    0.31 0.006860 64 106 memmove
    0.25 0.005633 1126 5 setlocale
    0.19 0.004176 64 65 strrchr
    0.15 0.003260 65 50 strchr
    0.12 0.002586 63 41 strncmp
    0.07 0.001598 61 26 __ctype_toupper_loc
    0.07 0.001586 61 26 __ctype_tolower_loc
    0.04 0.000961 64 15 pthread_mutex_lock
    0.04 0.000951 63 15 pthread_mutex_unlock
    0.04 0.000781 65 12 getenv
    0.02 0.000466 66 7 realloc
    0.02 0.000445 111 4 isatty
    0.02 0.000431 107 4 lseek64
    0.02 0.000358 119 3 read
    0.02 0.000343 114 3 __xstat64
    0.02 0.000332 66 5 __errno_location
    0.01 0.000307 61 5 pthread_mutex_init
    0.01 0.000258 64 4 __sigsetjmp
    0.01 0.000243 121 2 open64
    0.01 0.000229 114 2 close
    0.01 0.000192 64 3 pthread_mutex_destroy
    0.01 0.000155 155 1 readlink
    0.01 0.000135 67 2 strxfrm
    0.01 0.000132 66 2 sysconf
    0.01 0.000127 63 2 localeconv
    0.01 0.000118 118 1 time
    0.01 0.000118 118 1 write
    0.01 0.000114 114 1 fcntl
    0.01 0.000111 111 1 __fxstat64
    0.00 0.000110 110 1 getuid
    0.00 0.000109 109 1 sigaction
    0.00 0.000109 109 1 signal
    0.00 0.000104 104 1 geteuid
    0.00 0.000102 102 1 getegid
    0.00 0.000102 102 1 getgid
    0.00 0.000094 94 1 __register_atfork
    0.00 0.000083 83 1 pthread_setspecific
    0.00 0.000069 69 1 strcmp
    0.00 0.000068 68 1 __ctype_b_loc
    0.00 0.000068 68 1 srand48_r
    0.00 0.000068 68 1 getpid
    0.00 0.000068 68 1 pthread_key_create
    0.00 0.000067 67 1 memchr
    0.00 0.000066 66 1 drand48_r
    0.00 0.000065 65 1 pthread_key_delete
    0.00 0.000064 64 1 nl_langinfo
    ------ ----------- ----------- --------- --------------------
    100.00 2.211604 3157 total
    Hello World!

    Moving up a bit, it is time for some Python statistics:


    ################################################################################
    The Python version
    ################################################################################
    strace -c -f -q python hello.py
    % time seconds usecs/call calls errors syscall
    ------ ----------- ----------- --------- --------- ----------------
    56.25 0.000027 0 177 118 open
    43.75 0.000021 0 88 fstat64
    0.00 0.000000 0 89 read
    0.00 0.000000 0 1 write
    0.00 0.000000 0 59 close
    0.00 0.000000 0 1 execve
    0.00 0.000000 0 10 10 access
    0.00 0.000000 0 6 brk
    0.00 0.000000 0 5 3 ioctl
    0.00 0.000000 0 3 2 readlink
    0.00 0.000000 0 29 munmap
    0.00 0.000000 0 1 uname
    0.00 0.000000 0 11 mprotect
    0.00 0.000000 0 3 _llseek
    0.00 0.000000 0 68 rt_sigaction
    0.00 0.000000 0 1 rt_sigprocmask
    0.00 0.000000 0 1 getcwd
    0.00 0.000000 0 1 getrlimit
    0.00 0.000000 0 57 mmap2
    0.00 0.000000 0 100 52 stat64
    0.00 0.000000 0 1 lstat64
    0.00 0.000000 0 1 getuid32
    0.00 0.000000 0 1 getgid32
    0.00 0.000000 0 1 geteuid32
    0.00 0.000000 0 1 getegid32
    0.00 0.000000 0 4 getdents64
    0.00 0.000000 0 1 fcntl64
    0.00 0.000000 0 3 1 futex
    0.00 0.000000 0 1 set_thread_area
    0.00 0.000000 0 1 set_tid_address
    0.00 0.000000 0 1 set_robust_list
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000048 727 186 total
    Hello world!


    ltrace -c -f python hello.py
    % time seconds usecs/call calls function
    ------ ----------- ----------- --------- --------------------
    35.03 2.118504 1153 1837 free
    34.89 2.109835 1226 1720 strcmp
    10.84 0.655259 63 10259 memcpy
    6.76 0.408768 64 6312 strlen
    3.75 0.226680 63 3556 __ctype_b_loc
    2.30 0.139353 65 2130 memset
    1.75 0.105637 65 1625 malloc
    1.07 0.064819 16204 4 qsort
    0.84 0.050971 65 784 realloc
    0.43 0.025782 65 396 strchr
    0.32 0.019097 119 160 fopen64
    0.24 0.014268 62 227 strcpy
    0.21 0.012702 64 198 strncpy
    0.20 0.011854 81 145 _IO_getc
    0.19 0.011645 66 176 readdir64
    0.19 0.011473 114 100 __xstat64
    0.12 0.007396 108 68 sigaction
    0.12 0.007067 62 113 pthread_self
    0.11 0.006385 145 44 fclose
    0.09 0.005559 173 32 fread
    0.08 0.005079 108 47 __fxstat64
    0.05 0.003305 63 52 fileno
    0.05 0.003187 63 50 __strcpy_chk
    0.05 0.002915 63 46 strrchr
    0.04 0.002119 64 33 __errno_location
    0.03 0.001530 63 24 memchr
    0.03 0.001526 63 24 __rawmemchr
    0.02 0.001389 463 3 setlocale
    0.02 0.001136 63 18 __memcpy_chk
    0.02 0.001092 64 17 sem_post
    0.01 0.000880 62 14 memmove
    0.01 0.000796 66 12 getenv
    0.01 0.000723 65 11 strcat
    0.01 0.000715 71 10 __vsnprintf_chk
    0.01 0.000651 65 10 sem_trywait
    0.01 0.000585 65 9 ferror
    0.01 0.000549 109 5 isatty
    0.01 0.000456 65 7 sem_wait
    0.01 0.000347 86 4 fflush
    0.01 0.000344 114 3 readlink
    0.01 0.000336 67 5 __strncpy_chk
    0.01 0.000329 164 2 opendir
    0.01 0.000320 64 5 __ctype_tolower_loc
    0.00 0.000295 73 4 strerror
    0.00 0.000265 66 4 sigemptyset
    0.00 0.000262 131 2 ftell
    0.00 0.000245 245 1 fseek
    0.00 0.000226 113 2 closedir
    0.00 0.000199 66 3 sem_init
    0.00 0.000199 66 3 strncat
    0.00 0.000196 65 3 flockfile
    0.00 0.000187 62 3 funlockfile
    0.00 0.000182 182 1 __realpath_chk
    0.00 0.000165 165 1 fwrite
    0.00 0.000148 74 2 __strdup
    0.00 0.000133 133 1 geteuid
    0.00 0.000116 116 1 getuid
    0.00 0.000115 115 1 getegid
    0.00 0.000115 115 1 getgid
    0.00 0.000113 113 1 rewind
    0.00 0.000111 111 1 __uflow
    0.00 0.000080 80 1 sysconf
    0.00 0.000075 75 1 getpid
    0.00 0.000074 74 1 __libc_current_sigrtmin
    0.00 0.000069 69 1 __libc_current_sigrtmax
    0.00 0.000069 69 1 clearerr
    0.00 0.000069 69 1 __strcat_chk
    0.00 0.000068 68 1 fputs
    0.00 0.000068 68 1 ungetc
    0.00 0.000068 68 1 nl_langinfo
    ------ ----------- ----------- --------- --------------------
    100.00 6.047275 30341 total
    Hello world!

    Let see some Ruby (see if you can spot something peculiar!)


    ################################################################################
    The Ruby version
    ################################################################################
    strace -c -f -q ruby hello.rb
    % time seconds usecs/call calls errors syscall
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000020 2 11 fstat64
    0.00 0.000000 0 10 read
    0.00 0.000000 0 1 write
    0.00 0.000000 0 11 open
    0.00 0.000000 0 11 close
    0.00 0.000000 0 1 execve
    0.00 0.000000 0 9 9 access
    0.00 0.000000 0 4 brk
    0.00 0.000000 0 1 gettimeofday
    0.00 0.000000 0 2 munmap
    0.00 0.000000 0 1 uname
    0.00 0.000000 0 11 mprotect
    0.00 0.000000 0 5 sigprocmask
    0.00 0.000000 0 14 rt_sigaction
    0.00 0.000000 0 3 rt_sigprocmask
    0.00 0.000000 0 2 getrlimit
    0.00 0.000000 0 26 mmap2
    0.00 0.000000 0 1 getuid32
    0.00 0.000000 0 1 getgid32
    0.00 0.000000 0 2 geteuid32
    0.00 0.000000 0 2 getegid32
    0.00 0.000000 0 2 1 futex
    0.00 0.000000 0 1 set_thread_area
    0.00 0.000000 0 1 set_tid_address
    0.00 0.000000 0 1 set_robust_list
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000020 134 10 total
    Hello World!


    ltrace -c -f ruby hello.rb
    % time seconds usecs/call calls function
    ------ ----------- ----------- --------- --------------------
    90.19 0.008306 8306 1 ruby_init
    8.44 0.000777 777 1 ruby_options
    1.37 0.000126 126 1 ruby_init_stack
    ------ ----------- ----------- --------- --------------------
    100.00 0.009209 3 total
    Hello World!

    Java, which already has been covered:


    ################################################################################
    The Java version
    ################################################################################
    strace -c -f -q java Hello
    % time seconds usecs/call calls errors syscall
    ------ ----------- ----------- --------- --------- ----------------
    99.92 0.490957 3836 128 16 futex
    0.04 0.000193 0 9718 gettimeofday
    0.01 0.000056 0 206 149 open
    0.01 0.000041 3 13 clone
    0.01 0.000040 0 151 111 stat64
    0.01 0.000029 0 768 read
    0.01 0.000029 1 23 munmap
    0.00 0.000023 0 734 _llseek
    0.00 0.000000 0 2 write
    0.00 0.000000 0 56 close
    0.00 0.000000 0 1 unlink
    0.00 0.000000 0 2 execve
    0.00 0.000000 0 20 18 access
    0.00 0.000000 0 1 1 mkdir
    0.00 0.000000 0 13 brk
    0.00 0.000000 0 1 setrlimit
    0.00 0.000000 0 4 readlink
    0.00 0.000000 0 1 ftruncate
    0.00 0.000000 0 4 uname
    0.00 0.000000 0 47 mprotect
    0.00 0.000000 0 2 getdents
    0.00 0.000000 0 2 sched_yield
    0.00 0.000000 0 27 rt_sigaction
    0.00 0.000000 0 48 rt_sigprocmask
    0.00 0.000000 0 1 getcwd
    0.00 0.000000 0 4 getrlimit
    0.00 0.000000 0 126 mmap2
    0.00 0.000000 0 58 1 lstat64
    0.00 0.000000 0 51 fstat64
    0.00 0.000000 0 3 getuid32
    0.00 0.000000 0 2 getgid32
    0.00 0.000000 0 3 geteuid32
    0.00 0.000000 0 2 getegid32
    0.00 0.000000 0 4 madvise
    0.00 0.000000 0 8 getdents64
    0.00 0.000000 0 15 fcntl64
    0.00 0.000000 0 14 gettid
    0.00 0.000000 0 88 sched_getaffinity
    0.00 0.000000 0 2 set_thread_area
    0.00 0.000000 0 2 set_tid_address
    0.00 0.000000 0 19 clock_gettime
    0.00 0.000000 0 1 clock_getres
    0.00 0.000000 0 15 set_robust_list
    0.00 0.000000 0 2 socket
    0.00 0.000000 0 2 2 connect
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.491368 12394 298 total
    Hello World!


    ltrace -c -f java Hello
    % time seconds usecs/call calls function
    ------ ----------- ----------- --------- --------------------
    71.44 2.000665 181878 11 strncmp
    27.65 0.774271 774271 1 pthread_join
    0.20 0.005578 68 82 fgets
    0.13 0.003744 3744 1 dlopen
    0.06 0.001678 279 6 sysconf
    0.06 0.001583 63 25 strlen
    0.05 0.001525 89 17 JLI_MemAlloc
    0.05 0.001490 62 24 JLI_StringDup
    0.05 0.001478 61 24 strcspn
    0.04 0.001228 61 20 strspn
    0.04 0.001075 63 17 JLI_MemFree
    0.03 0.000706 64 11 getenv
    0.02 0.000579 72 8 __sprintf_chk
    0.02 0.000493 61 8 strrchr
    0.02 0.000456 76 6 __strcat_chk
    0.01 0.000370 370 1 pthread_create
    0.01 0.000347 173 2 fclose
    0.01 0.000321 64 5 strchr
    0.01 0.000263 131 2 readlink
    0.01 0.000263 131 2 fopen
    0.01 0.000240 120 2 __xstat
    0.01 0.000234 117 2 access
    0.01 0.000219 109 2 getgid
    0.01 0.000213 106 2 getuid
    0.01 0.000212 106 2 getegid
    0.01 0.000209 104 2 geteuid
    0.01 0.000148 74 2 dlsym
    0.01 0.000147 73 2 strncpy
    0.00 0.000126 63 2 JLI_FreeManifest
    0.00 0.000125 62 2 __strcpy_chk
    0.00 0.000124 62 2 fflush
    0.00 0.000074 74 1 pthread_attr_destroy
    0.00 0.000074 74 1 JLI_WildcardExpandClasspath
    0.00 0.000068 68 1 putenv
    0.00 0.000068 68 1 pthread_attr_init
    0.00 0.000067 67 1 strcat
    0.00 0.000065 65 1 pthread_attr_setdetachstate
    0.00 0.000065 65 1 getpid
    0.00 0.000064 64 1 pthread_attr_setstacksize
    ------ ----------- ----------- --------- --------------------
    100.00 2.800655 303 total
    Hello World!

    C (can you spot the gcc switch I used btw?)


    ################################################################################
    The C version
    ################################################################################
    strace -c -f -q ./helloC
    % time seconds usecs/call calls errors syscall
    ------ ----------- ----------- --------- --------- ----------------
    -nan 0.000000 0 1 read
    -nan 0.000000 0 1 write
    -nan 0.000000 0 2 open
    -nan 0.000000 0 2 close
    -nan 0.000000 0 1 execve
    -nan 0.000000 0 3 3 access
    -nan 0.000000 0 1 brk
    -nan 0.000000 0 1 munmap
    -nan 0.000000 0 4 mprotect
    -nan 0.000000 0 7 mmap2
    -nan 0.000000 0 3 fstat64
    -nan 0.000000 0 1 set_thread_area
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000000 27 3 total
    Hello World!


    ltrace -c -f ./helloC
    % time seconds usecs/call calls function
    ------ ----------- ----------- --------- --------------------
    100.00 0.000426 426 1 __printf_chk
    ------ ----------- ----------- --------- --------------------
    100.00 0.000426 1 total
    Hello World!

    Assembly

    ################################################################################
    The assembly version
    ################################################################################
    strace -c -f -q ./helloAsm
    % time seconds usecs/call calls errors syscall
    ------ ----------- ----------- --------- --------- ----------------
    -nan 0.000000 0 1 write
    -nan 0.000000 0 1 execve
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000000 2 total
    Hello World!


    ltrace -c -f ./helloAsm
    ltrace: Couldn't find .dynsym or .dynstr in "./helloAsm"
    % time seconds usecs/call calls function
    ------ ----------- ----------- --------- --------------------
    ------ ----------- ----------- --------- --------------------
    100.00 0.000000 0 total

    Obviously, this is not a comparative post, all the languages mentioned have their own design goals and not all implementations are equivalent.

    CPython threading vs multiprocessing – the 5 minute introduction

    MJC brought to my attention the following piece of code which attempts to provide some empirical data comparing the use of threads vs processes in CPython.

    This code, which I understand that it is stored for historical purposes, has some bugs, which I have pointed out in the comment section, but this is not the point of this article (something like this would be not constructive). I believe that a far better contribution would be to write a short piece attempting to point out a few “gotchas”.

    Bit rot took hold and the post above has disappeared but the rest of the article still applies …

    For the rest of this small article, I assume that you are familiar with how threads work in CPython, especially the GIL “issue”. If you are not then, in layman’s terms, the GIL lock is one big lock that ensures that only one thread is executing per Python interpreter, in order to facilitate more efficient garbage collection. It should be clarified that the GIL lock applies to CPython and not Jython, which manages to “map” python threads to “true-parallelizable-per-core-as-they-were-used-to-be” threads. Jython comes with a performance penalty though so YMMV. (NB: Ruby 1.8.x suffers from the same “issue” so no smug Ruby fans need apply :) ) To sum it up, in CPython, only one thread is allowed to use the python interpreter at any given time. “What” I can hear you lamenting “this will kill my threading performance”. However, keep on reading, all is not lost.

    First of all, the GIL ensures that only one thread is executing Python bytecode. However, obviously, this is a performance killer in CPU intensive applications, if you are solving an I/O bound problem then the effect is reduced. If you are using CPython to interface with C code (something that CPython does implicitly for certain library calls), once you have reached C territory you are GIL-free. In order to overcome this limitation, the multiprocessing module was introduced, a module that shares the API with threading module. Multiprocessing attempts a workaround of the GIL limitation by spawning a new python interpreter in a separate process. In a multicore system, this allows for parallelism, much better than threads. However, someone might assume at first that “wow, since a design goal of the API was to be nearly identical, now I can do something along the lines of :s/threading.Thread/multiprocessing.Process/g and I am home free and reap all the performance benefits”.

    Not so fast, junior.

    Access in global variables is the same when using threading, however if you are using multiprocessing you have to specify explicitly what is shared between the various python interpreters, which adds a bit of code complexity . A nice security side-effect of using multiprocessing, as opposed to threads, is that by controlling what is really shared between processes you get a poor-man’s sandbox for free. (I will update this blog post with some practical examples a bit later)

    One might be able to get a few small speedups and proper process control by using a process pool (e.g. you definitely do not want your program to start creating processes uncontrollably, you might hit OS limits or worse have a HIDS detect a privilege abuse or something similar). Given the fact that creating a new process is a somewhat costly operation, in the simplest form, you just create a bunch of them upfront, have them “sleeping” and assign tasks as needed. Given that there are a lot of thread pool implementations out there and that the multiprocessing API closely matches, one should be able to code something like that in a small amount of time. A nice trick that I have seen in practice is fire up X processes, where X is the number of cores and then assign a thread pool to each of them.

    Closing, in a multicore system, when solving CPU intensive problems, you are likely to get speed improvements by using multiprocessing as opposed to threads. As with all forms of parallel programming, subtle bugs might be introduced. I hope that my post gave a nice starting point for some “gotchas”

    Some random thoughts on Greek startups

    [The article below is somewhat of a rant, read it at your own peril and yes I know this is not the proper way to resume blogging after months and months of inactivity]
    So it seems that the Greek IT market lately has seen an influx of “startups”. Their implied cause appears to be quite a noble one, “be not what is traditionally associated with the words “Greek IT” (or “get-rich-quick-or-die-trying” for the more pragmatic amongst you). However, the whole thing reeks of the “Johnny-come-lately” syndrome, at least for me. Below is a partial list of my pet-peeves:

    1) i-somethings will NOT make you a millionaire. Sure, there are more than enough success stories doing the rounds but the whole market is rather hit-n-miss, with the miss part taking the lion’s share. There is at least one book about it, read it please.

    2) Copying SF/CA lingo wholesale does not magically transform an economy (and its main constituents, the people) to a more advanced one. I have seen more Something-Ninjas lately that I did in my childhood (and boy, I was a HUGE Ninja flick fan, I have seen them all and took the Ninjutsu lessons to prove it, complete with a laminated “NINJA” card). People mean connections and connections might mean all the difference in the world

    3) In order for startups to flourish, you do not only need an idea and a shiny business plan, you need smart people (actually “smart and get things done!”, to somewhat narrow it down) to do the actual work. In fact, I will be more than willing to assume the somewhat controversial view that mediocre ideas with good execution will beat goodideas with mediocre execution. So the problem is, where can you find such smart people (even not in the Spolskean sense of absolute brilliance) and get them to work for your project on “Greek startup pay” (incidentally, we do not offer “Greek startup pay” or “Greek pay”, for the local standards we pay well)?

    3.5) To expand on the previous point using some anecdotal data, I am in charge of the second interview round (the technical one) for our project. I believe that I like to give people a chance, I do not care as much about experience as I care about actual ability to adapt and improvise.The hiring route is the “traditional” one (some generic ad posted plus whatever contacts one of the guys was willing to dig up). As of now, I have yet to see a candidate that blows me away and screams “INSTANT HIRE”. (Full Disclosure: we are not located in Athens, however we offset this one by being heavily involved with the local University, which is a good one). In fact, most of the (few!) applications we receive fail to pass the first round altogether, which can be summarized as “we buy you coffee, we REALLY WANT to hire you so please help us do so by demonstrating basic ability so we can see if you are up for the tasks at hand” (This one deserves a separate blog post).

    PS, you can wager that our hiring process is broken (which indeed it is in more than one place) but I see a lot of people relying on good-ole nepotism to get ahead, neglecting personal and professional skills. I will not even comment on so-called start-ups that will recruit anyone (elitism is a virtue if you are a startup).

    4) “You ain’t gonna need it” should be etched in the brain of every new start-up. Copying blindly the technology list (the buzzword parade, if you prefer) from other successful startups does not guarantee success. I am all for “bleeding-edge” technologies, however it is highly unlikely that a Greek start-up needs all of the following: five-nines,three-letter-agency-security, scalability that can rival Skynet of Terminator fame, all that made by two guys working for 900 Euros a month each (I have heard this figure quoted, as a “competitive salary figure”).

    5) Speaking of money, in order to make money, you need to spend money. Sorry, but say Google or Facebook, indeed got (and spent in all the right places, having been taught their lesson from the dot com bubble) some serious $$$ in their infancy to get the ball rolling. Efficiency and cutting some corners is one thing. Being cheap/under-resourced is another ballgame altogether.

    Is there a Greek startup that actually transcends the aforementioned shortcomings and already should have been in your radar for the past couple of years? Yes! But again, most “startup-ites/σταρταπακηδες” I know (you know them, the guys that come to work with a new idea every day that will make them millionaires and usually involves “buzzword of the month”) only got wind of it a few days ago when they got name dropped from the Greek Prime Minister)

    [Update Sun Sep 26 EEST 2010]

    While this post did not gathered the number of comments I would have like to have seen, there was a interesting conversation over twitter with dfunc. dfunc believes that I am overly harsh, quoting “regarding your startups-post, times are tough for everyone here esp. for the startups.”. Now first things first, indeed the article was a bit of a rant, and at least partially fueled by a conversation at a certain Greek startup site and some conversations with some 2nd degree colleagues. This post was not meant in any to disrespect the hard work and plain cojones (oops!, I guess I should have labeled this one NSFW or something), in fact I used the line “be not what is traditionally associated with the words “Greek IT”. So with this out of the way, I will offer some additional insight to my definitely not complete list of pet peeves.

    So, dfunc writes “Regarding the iSomething COs, they develop products so their startup period is much tougher than that of service providers.” Now, while this line is correct, is my biggest pet-peeve of all. For some reason or another, the iSomething is supposed to have a pretty low barrier of entry (notice the supposed, I do not personally subscribe to that train of thought, I believe that *any* software that has a degree of ingenuity and quality is far from trivial to design, implement, secure and deploy). This, by definition, leads to a hit-driven market, where you have a few hits and a zillion of misses. While you get the illusion that you have a “get-rich-quick” scheme, statistics imply that you are most likely to end up in the dustbin than being a high earner. And I will restate my assumption again: “In order to get $$$ you must spend $$$”. So, given the risk that goes with the territory, I fail to see why almost every other Greek startup out there is aiming for the iSomething market.

    Finally, “A new business should have a plan (“orama”) to where it’s heading. I agree with u on that some of these share an unrealistic plan” – Amen, even if I believe that “some of these” should have been “most of these”.

    Support Written Declaration 12

    Read it

    ACT

    Follow

    Get every new post delivered to your Inbox.