Home    About me    Publications    Blog    Undergrad memories

Fabio Ruini's blog

'cause Italians blog better

Archivio per maggio, 2012

Il terremoto infinito

Quando, nonostante le continue scosse di assestamento, sembrava che la situazione stesse pian piano tornando alla normalità, ecco l’evento che non ti aspetti. Nel modenese il terremoto si ripresenta, con una scarica che, a detta degli esperti, sembra essere del tutto indipendente da quella che ha colpito il 20 maggio scorso. E questa volta i danni sono seri. La scossa, 5.8 gradi della scala Richter, rade al suolo gli edifici più fragili. Tra i quali tanti capannoni industriali, chiese e campanili. E si porta con se anche la vita di 16 persone, perlopiu’ lavoratori.

Tgniv bota!

Share

Security Summit, phrack and The Hacker Manifesto

Another one got caught today, it’s all over the papers. “Teenager Arrested in Computer Crime Scandal”, “Hacker Arrested after Bank Tampering”…

Damn kids. They’re all alike.

But did you, in your three-piece psychology and 1950′s technobrain, ever take a look behind the eyes of the hacker? Did you ever wonder what made him tick, what forces shaped him, what may have molded him?

I am a hacker, enter my world…

Mine is a world that begins with school… I’m smarter than most of the other kids, this crap they teach us bores me…

Damn underachiever. They’re all alike.

I’m in junior high or high school. I’ve listened to teachers explain for the fifteenth time how to reduce a fraction. I understand it. “No, Ms. Smith, I didn’t show my work. I did it in my head…”

Damn kid. Probably copied it. They’re all alike.

I made a discovery today. I found a computer. Wait a second, this is cool. It does what I want it to. If it makes a mistake, it’s because I screwed it up. Not because it doesn’t like me… Or feels threatened by me.. Or thinks I’m a smart ass.. Or doesn’t like teaching and shouldn’t be here…

Damn kid. All he does is play games. They’re all alike.

And then it happened… a door opened to a world… rushing through the phone line like heroin through an addict’s veins, an electronic pulse is sent out, a refuge from the day-to-day incompetencies is sought… a board is found. “This is it… this is where I belong…” I know everyone here… even if I’ve never met them, never talked to them, may never hear from them again… I know you all…

Damn kid. Tying up the phone line again. They’re all alike…

You bet your ass we’re all alike… we’ve been spoon-fed baby food at school when we hungered for steak… the bits of meat that you did let slip through were pre-chewed and tasteless. We’ve been dominated by sadists, or ignored by the apathetic. The few that had something to teach found us willing pupils, but those few are like drops of water in the desert.

This is our world now… the world of the electron and the switch, the beauty of the baud. We make use of a service already existing without paying for what could be dirt-cheap if it wasn’t run by profiteering gluttons, and you call us criminals. We explore… and you call us criminals. We seek after knowledge… and you call us criminals. We exist without skin color, without nationality, without religious bias… and you call us criminals. You build atomic bombs, you wage wars, you murder, cheat, and lie to us and try to make us believe it’s for our own good, yet we’re the criminals.

Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.

I am a hacker, and this is my manifesto. You may stop this individual, but you can’t stop us all… after all, we’re all alike.

Quello che avete appena avuto modo di leggere qui sopra altro non e’ se non “The Hacker Manifesto“, il grido di battaglia elaborato nel lontano 1986 da The Mentor (al secolo Loyd Blakenship) e pubblicato sulla e-zine underground phrack. Perche’ ve lo ritrovate in questo post, vi state chiedendo? Perche’ ho appena scoperto che phrack e’ di nuovo tra noi. Dopo oltre un anno di silenzio e’ stata infatti pubblicata lo scorso aprile l’edizione numero 68, contenente una serie di articoli come sempre interessantissimi. I temi trattati sono ovviamente d’attualità e, come curioso segno del passare del tempo, vi e’ spazio anche per l’analisi di un rootkit per il kernel di Android. Superfluo aggiungere che tutti gli appassionati di cyber-security troveranno pane per i loro denti.

Sempre in tema sicurezza mi preme segnalare inoltre un’iniziativa questa volta tutto italiana. Si tratta del Security Summit, periodica conferenza degli addetti del settore della Penisola, e la cui prossima edizione si terra’ a Roma i prossimi 6 e 7 giugno. Sul sito Internet e’ possibile scaricare gli atti delle edizioni passate, compresa quella tenutasi a Milano lo scorso marzo dove spicca il plenary talk di Michael Kemp degli xiphos research labs. Anche qui tanto materiale per coloro affetti dal “crimine della curiosita’”.

Share

Selection methods for GAs

Ancora un estratto della mia tesi nel post di oggi. L’argomento e’ sulla carta abbastanza banale, ragion per cui nella prima stesura del mio lavoro non l’avevo approfondito più di tanto. Ma una delle cose che il mio external examiner ha richiesto, invece, e’ proprio di estendere un po’ quanto scritto sulla teoria di base degli algoritmi genetici. Ecco a voi, pertanto, il nuovo paragrafo della mia tesi tutto dedicata ai metodi di selezione nei GA.

Selection is the process which guarantees that the fittest individuals have, on average, a larger amount of descendants compared to the less fit individuals. Various mechanisms (often defined as “schemes”) can be used to implement selection. Originally, Holland used a fitness-proportionate selection method in which the expected value (i.e. the expected number of times an individual is selected for reproduction) was simply calculated as the fitness of the individual divided by the average fitness of the entire population. Over the years, many more sophisticated selection methods have been introduced. A list including the most popular ones nowadays follows.

  • fitness-proportionate selection: “modern” fitness-proportionate selection methods are often implemented using the method of “roulette wheel” sampling. According to this methodology each individual is assigned a slice of a circular roulette wheel, the size of the slice being proportional to the individual’s fitness (see Figure 1.15).

    Figure 1.15: Graphical representation of the fitness-proportionate roulette wheel selection scheme

    The wheel is then rotated N times (where N is the size of the population) and every individual on which the marker stops at any spin enters the pool of parents for the next generation. Although this approach, statistically, will lead to every individual having the expected number of offspring, the small population sizes typically used in GAs makes it possible for unlikely spins of the roulette wheel to introduce severe biases in the evolutionary process by selecting not-so-fit individuals. This problem is refered to with the term “spread” (referring to the range of possible actual values given an expected value).

    An alternative sampling method developed to cope with the above drawbacks is the “stochastic universal sampling” (SUS) [1]. Where fitness-proportionate selection by means of roulette wheel chooses several solutions from the population by repeated random sampling, SUS uses a single random value to sample all of the solutions by choosing them at evenly spaced intervals. To do so, the imaginary roulette wheel does not use a single marker, rather N of them, equally spaced.

    As pointed out by Hancock [2], notwithstanding which sampling method is used fitness-proportionate selection suffers from “premature convergence” due to scaling problems. Premature convergence [3, 4] is a phenomenon taking place when an evolutionary algorithm gets stuck in a point of local optima of the search space, without being able to reach the gloabl optima, i.e. the best solution that the algorithm could potentially find (we will get back on this point in a following subsection of this paragraph). This problem can be partially mitigated in different ways. For example adopting scaling methods that map “raw” fitness values to expected values. A classical example of scaling method is the “sigma-scaling” [5, 6] which helps to keep the selection pressure (i.e. the degree to which highly fit individuals are allowed many offspring) high and pretty much constant over time. This goal is achieved calculating individual’ expected value as a function of several parameters, specifically its fitness, the average population fitness and the standard deviation. Another way to address this issue is by using methods that vary the selection pressure according to the evolutionary dynamics. An example of such approach is the “Boltzmann selection”, which allows the less fit individuals to reproduce at a similar rate to the one assigned to fitter individuals during the early stages of the evolution in order to mantain a certain level of variation within the population until a certain stage is reached;

  • rank selection: although from some points of view it might somewhat be considered just another variation of the fitness-proportionate selection created to prevent premature convergence, rank selection rank selection [7] works in a slightly different way. In rank selection there is no need for scaling, as the individuals are ranked based on their fitness values. The expected value for each individual is calculated according to its rank. Making the absolute fitness information disappear, ranking helps in reducing the selection pressure when the fitness variance is high;
  • tournament selection: both fitness-proportionate and rank selection methods are quite expensive in computational terms, as they require passing several times through the entire population performing different kinds of computations. From this point of view, tournament selection [8] is a significantly more efficient solution. According to this selection scheme two individuals are chosen at random from the population and a random value r, uniformely distributed between 0 and 1, is calculated. Depending on whether this value is above or below an arbitrary threshold fixed by the experimenter, one of the two individuals is selected to be a parent. After the instance of the “tournament” the two individuals selected are brought back into the original population to be, potentially, selected again;
  • steady-state selection: the selection schemes we have seen so far operates within the context of algorithms that tend to recreate entirely new populations at every generation. When steady-state selection [9] is used, only a few individuals are selected. These are the least fit individuals that are going to be replaced. This procedure provides several advantages in specific domains, as for example when evolving rule-based or classifier systems (see for example [?]).

Elitism [11], a simple tweak in the evolutionary algorithms that forces it to preserve unmodified the fittest individual at any given generation, is a commonly adopted modification to the selection operators described above.

An empirical comparison between alternative selection schemes is the subject of the extensive work carried out by Hancock [2].

Interestingly enough, in the scientific literature there is disagreement concerning whether to consider the selection a “genetic operator” or not. In this thesis we have decided to consider selection and elitism two operators on their own, and “genetic operators” those (listed in next subparagraph) that actively produce modifications on the indviduals’ genomes.

Bibliography:
[1] Baker, J. Reducing Bias and Inefficiency in the Selection Algorithm. In Proceedings of ICGA 1987, Second International Conference on Genetic Algorithms and their Application (1987), pp. 14–21.
[2] Hancock, P. J. B. An empirical comparison of selection methods in evolutionary algorithms. In Evolutionary Computing: AISB Workshop, T. Fogarty, Ed. Springer-Verlag, Berlin, Germany, 1994.
[3] Juan, L., Zixing, C., and Jianqin, L. Premature Convergence in Genetic Algorithm: Analysis and Prevention Based on Chaos Operator. In Proceedings of the 3rd World Congress on Intelligent Control and Automation (2000), pp. 495–499.
[4] Rocha, M., and Neves, J. Preventing Premature Convergence to Local Optima in Genetic Algorithms via Random Offspring Generation. Lecture Notes in Computer Science 1611 (1999), 127–136.
[5] Forrest, S. Scaling Fitnesses in the Genetic Algorithm. Documentation for Prisoners Dilemma and Norms Programs that Use the Genetic Algorithm, 1985.
[6] Goldberg, D. E. Genetic Algorithms in Search, Optimization, and Machine Learning. Addison-Wesley, 1989.
[7] Baker, J. Adaptive Selection Methods for Genetic Algorithms. In Proceedings of ICGA 1985, First International Conference on Genetic Algorithms (1985), pp. 101–111.
[8] Goldberg, D., and Deb, K. A Comparative Analysis of Selection Schemes Used in Genetic Algorithms. In Foundations of Genetic Algorithms, B. Spatz, Ed. Morgan Kaufmann Publishers, Inc., 1991, pp. 69–93.
[9] Vavak, F., and Fogarty, T. A comparative study of steady state and generational genetic algorithms for use in nonstationary environments. Evolutionary Computing 1143 (1996), 297–304.
[10] Geyer-Schulz, A. Holland Classifier Systems. In Proceedings of APL ’95, the International Conference on Applied Programming Languages (1995), pp. 43–55.
[11] Jong, K. D. Analysis of the Behavior of a Class of Genetic Adaptive Systems. PhD thesis, University of Michigan, MI, USA, 1975.

Share

L’Emiliano

A volte bastano due cose soltanto, un’immagine ed una parola, per poter dire tantissimo. Per trasmettere un messaggio che va ben oltre a cio’ che e’ immediatamente visibile. Un messaggio che veicola non tanto un’informazione, quanto piuttosto un intero insieme di valori. Un esempio e’ quello che ci viene dato dalla bellissima la copertina della Gazzetta di Modena di oggi.

La parola chiave e’ coraggio. E ci trasmette l’immagine di un popolo, quello emiliano, che ha il lavoro nel proprio DNA. Coraggio, c’e’ da lavorare. Di un popolo che anche di fronte alle peggiori disgrazie non si lascia andare ad una facile autocommiserazione, ma piuttosto si rimbocca le maniche per cercare di far tornare tutto alla normalità il prima possibile. Coraggio, sistemiamo la faccenda. Un popolo che nasce contadino e che in quanto tale conosce la natura, la rispetta ed e’ abituato ad affrontare con razionalità e lucidità gli scherzi che quest’ultima può giocare. Coraggio, ci siamo già passati. Di un popolo che non si lascia scomporre, e che guarda avanti, sempre e comunque. Coraggio, al priva ander pes.

Orgoglioso, ancora una volta, di essere emiliano.

Share

La bomba di Brindisi

Risveglio shockante, questa mattina, per via delle notizie che arrivano dall’Italia. Inutile ripercorrere la cronaca dell’evento che ormai conoscerete tutti, ovvero la bomba esplosa all’esterno di un istituto professionale di Brindisi, che ha ucciso una 16enne e ferito altre sue compagne.

Dato il nome della scuola colpita (intitolata a Giovanni Falcone ed alla moglie), la ricorrenza del ventennale della sua morte il prossimo mercoledì’, e’ stato naturale pensare immediatamente ad un attacco (dimostrativo?) maturato in ambiente mafioso. Ma ad un’analisi anche solo un poco più approfondita, questa attribuzione non sembra reggere. Troppo insolito il target scelto, poco “professionali” le modalità’ adottate per la costruzione dell’ordigno (interessante il fatto che, a quanto si dice, gli investigatori si sono immediatamente concentrati sul cercare di capire quale fosse stato l’innesco utilizzato, se un telecomando o un timer, con il primo che apparentemente viene collegato ad operazioni di alto livello).

Vi e’ poi anche la dinamica temporale da tenere in considerazione. Se e’ vero che la carica esplosiva e’ stata innescata da un timer come sembra emergere dalle prime indiscrezioni, allora come mai quell’orario, le 7.50? E’ vero che gli studenti tendono ad assembrarsi nei pressi dell’ingresso prima dell’inizio delle lezioni (le 8, in questo caso). Ma e’ anche abbastanza evidente come, nel caso in cui si fosse voluto massimizzare il numero di persone coinvolte, sarebbe stato sufficiente ritardare l’esplosione di 5 minuti. Farla esplodere 10 minuti prima, escludendo banali errori di “orologio fuori sincrono”, significa voler causare un danno grosso, ma cercare al tempo stesso di contenerne la portata. Questo sembrerebbe sposare la tesi dell’attentato dimostrativo che ha erroneamente causato più danno rispetto a quanto fosse stato preventivato.

Ma dove sono da ricercarsi gli esecutori ed eventualmente i mandanti? La mancanza, almeno fino a questo momento, di una qualsivoglia rivendicazione rende lo scenario alquanto confuso. Da un lato sembrano essere da escludere le piste legate alla criminalità organizzata (ovviamente desiderosa di mantenere un low profile per poter portare avanti i propri affari, oltre ai punti sottolineati sopra), così come gli ambienti anarco-insurrezionalisti. Dall’altro lato, se questi non sono stati i mandanti/esecutori dell’attentato, allora chi c’e’ dietro? Terrorismo di matrice islamica? Al momento i media non sembrano prendere in considerazione questa ipotesi, o per non creare allarmismo o semplicemente perché campata per aria. Un ordigno costituito da tre bombole a gas e’ perfettamente compatibile con l’operare di un singolo o di un piccolo gruppo privo di significative disponibilità’ economiche ed abbiamo inoltre Inspire che di recente aveva suggerito di includere anche le scuole ai target dei jihadisti. Ma ci sono ovviamente anche altre ipotesi da vagliare. Come quella della bravata finita male, organizzata da ragazzini che giocano a fare i gangster. Oppure quella che vede coinvolto il semplice squilibrato che mosso da motivi personali si improvvisa Unabomber.

Per quanto riguarda le prime analisi che la rete sta sfornando, interessante mi sembra essere quella che ci fornisce il blog di Panorama.it, il quale insiste sul tasto del “movente minimo”. Superficiale, come al solito, Beppe Grillo che si limita ad un’invettiva sul “cui prodest” invocando poteri occulti e suggerendo, non si sa bene sulla base di quali dati, che un attentato di questo tipo fosse nell’aria. Un punto che viene ripreso anche da Enzo Di Frenna su IlFatto.it, in un articolo che a mio avviso pare del tutto visionario, ma che evidentemente alcuni possono invece trovare plausibile.

Share

Pagina successiva »