Quantcast
Channel: Planet Grep
Viewing all 4959 articles
Browse latest View live

Dries Buytaert: Acquia's next phase

$
0
0

In 2007, Jay Batson and I wanted to build a software company based on open source and Drupal. I was 29 years old then, and eager to learn how to build a business that could change the world of software, strengthen the Drupal project and help drive the future of the web.

Tom Erickson joined Acquia's board of directors with an outstanding record of scaling and leading technology companies. About a year later, after a lot of convincing, Tom agreed to become our CEO. At the time, Acquia was 30 people strong and we were working out of a small office in Andover, Massachusetts. Nine years later, we can count 16 of the Fortune 100 among our customers, saw our staff grow from 30 to more than 750 employees, have more than $150MM in annual revenue, and have 14 offices across 7 countries. And, importantly, Acquia has also made an undeniable impact on Drupal, as we said we would.

I've been lucky to have had Tom as my business partner and I'm incredibly proud of what we have built together. He has been my friend, my business partner, and my professor. I learned first hand the complexities of growing an enterprise software company; from building a culture, to scaling a global team of employees, to making our customers successful.

Today is an important day in the evolution of Acquia:

  • Tom has decided it's time for him step down as CEO, allowing him flexibility with his personal time and act more as an advisor to companies, the role that brought him to Acquia in the first place.
  • We're going to search for a new CEO for Acquia. When we find that business partner, Tom will be stepping down as CEO. After the search is completed, Tom will remain on Acquia's Board of Directors, where he can continue to help advise and guide the company.
  • We are formalizing the working relationship I've had with Tom during the past 8 years by creating an Office of the CEO. I will focus on product strategy, product development, including product architecture and Acquia's roadmap; technology partnerships and acquisitions; and company-wide hiring and staffing allocations. Tom will focus on sales and marketing, customer success and G&A functions.

The time for these changes felt right to both of us. We spent the first decade of Acquia laying down the foundation of a solid business model for going out to the market and delivering customer success with Drupal – Tom's core strengths from his long career as a technology executive. Acquia's next phase will be focused on building confidently on this foundation with more product innovation, new technology acquisitions and more strategic partnerships – my core strengths as a technologist.

Tom is leaving Acquia in a great position. This past year, the top industry analysts published very positive reviews based on their dealings with our customers. I'm proud that Acquia made the most significant positive move of all vendors in last year's Gartner Magic Quadrant for Web Content Management and that Forrester recognized Acquia as the leader for strategy and vision. We increasingly find ourselves at the center of our customer's technology and digital strategies. At a time when digital experiences means more than just web content management, and data and content intelligence play an increasing role in defining success for our customers, we are well positioned for the next phase of our growth.

I continue to love the work I do at Acquia each day. We have a passionate team of builders and dreamers, doers and makers. To the Acquia team around the world: 2017 will be a year of changes, but you have my commitment, in every way, to lead Acquia with clarity and focus.

To read Tom's thoughts on the transition, please check out his blog post. Michael Skok, Acquia's lead investor, also covered it on his blog.

Tom and dries

Jeroen De Dauw: Generic Entity handling code

$
0
0

In this blog post I outline my thinking on sharing code that deals with different types of Entities in your domain. We’ll cover what Entities are, code reuse strategies, pitfalls such as Shotgun Surgery and Anemic Domain Models and finally Bounded Contexts.

Why I wrote this post

I work at Wikimedia Deutschland, where amongst other things, we are working on a software called Wikibase, which is what powers the Wikidata project. We have a dedicated team for this software, called the Wikidata team, which I am not part of. As an outsider that is somewhat familiar with the Wikibase codebase, I came across a writeup of a perceived problem in this codebase and a pair of possible solutions. I happen to disagree with what the actual problem is, and as a consequence also the solutions. Since explaining why I think that takes a lot of general (non-Wikibase specific) explanation, I decided to write a blog post.

DDD Entities

Let’s start with defining what an Entity is. Entities are a tactical Domain Driven Design pattern. They are things that can change over time and are compared by identity rather than by value, unlike Value Objects, which do not have an identity.

Wikibase has objects which are conceptually such Entities, though are implemented … oddly from a DDD perspective. In the above excerpt, the word entity, is confusingly, not referring to the DDD concept. Instead, the Wikibase domain has a concept called Entity, implemented by an abstract class with the same name, and derived from by specific types of Entities, i.e. Item and Property. Those are the objects that are conceptually DDD Entities, yet diverge from what a DDD Entity looks like.

Entities normally contain domain logic (the lack of this is called an Anemic Domain Model), and don’t have setters. The lack of setters does not mean they are immutable, it’s just that actions are performed through methods in the domain language (see Ubiquitous Language). For instance “confirmBooked()” and “cancel()” instead of “setStatus()”.

The perceived problem

What follows is an excerpt from a document aimed at figuring out how to best construct entities in Wikibase:

Some entity types have required fields:

  • Properties require a data type
  • Lexemes require a language and a lexical category (both ItemIds)
  • Forms require a grammatical feature (an ItemId)

The ID field is required by all entities. This is less problematic however, since the ID can be constructed and treated the same way for all kinds of entities. Furthermore, the ID can never change, while other required fields could be modified by an edit (even a property’s data type can be changed using a maintenance script).

The fact that Properties require the data type ID to be provided to the constructor is problematic in the current code, as evidenced in EditEntity::clearEntity:

// FIXME how to avoid special case handling here?
if ( $entity instanceof Property ) {
  /** @var Property $newEntity */
  $newEntity->setDataTypeId( $entity->getDataTypeId() );
}

…as well as in EditEntity::modifyEntity():

// if we create a new property, make sure we set the datatype
if ( !$exists && $entity instanceof Property ) {
  if ( !isset( $data['datatype'] ) ) {
     $this->errorReporter->dieError( 'No datatype given', 'param-illegal' );
  } elseif ( !in_array( $data['datatype'], $this->propertyDataTypes ) ) {
     $this->errorReporter->dieError( 'Invalid datatype given', 'param-illegal' );
  } else {
     $entity->setDataTypeId( $data['datatype'] );
  }
}

Such special case handling will not be possible for entity types defined in extensions.

It is very natural for (DDD) Entities to have required fields. That is not a problem in itself. For examples you can look at our Fundraising software.

So what is the problem really?

Generic vs specific entity handling code

Normally when you have a (DDD) Entity, say a Donation, you also have dedicated code that deals with those Donation objects. If you have another entity, say MembershipApplication, you will have other code that deals with it.

If the code handling Donation and the code handing MembershipApplication is very similar, there might be an opportunity to share things via composition. One should be very careful to not do this for things that happen to be the same but are conceptually different, and might thus change differently in the future. It’s very easy to add a lot of complexity and coupling by extracting small bits of what would otherwise be two sets of simple and easy to maintain code. This is a topic worthy of its own blog post, and indeed, I might publish one titled The Fallacy of DRY in the near future.

This sharing via composition is not really visible “from outside” of the involved services, except for the code that constructs them. If you have a DonationRepository and a MembershipRepository interface, they will look the same if their implementations share something, or not. Repositories might share cross cutting concerns such as logging. Logging is not something you want to do in your repository implementations themselves, but you can easily create simple logging decorators. A LoggingDonationRepostory and LoggingMembershipRepository could both depend on the same Logger class (or interface more  likely), and thus be sharing code via composition. In the end, the DonationRepository still just deals with Donation objects, the MembershipRepository still just deals with Membership objects, and both remain completely decoupled from each other.

In the Wikibase codebase there is an attempt at code reuse by having services that can deal with all types of Entities. Phrased like this it sounds nice. From the perspective of the user of the service, things are great at first glance. Thing is, those services then are forced to actually deal with all types of Entities, which almost guarantees greater complexity than having dedicated services that focus on a single entity.

If your Donation and MembershipApplication entities both implement Foobarable and you have a FoobarExecution service that operates on Foobarable instances, that is entirely fine. Things get dodgy when your Entities don’t always share the things your service needs, and the service ends up getting instances of object, or perhaps some minimal EntityInterface type.

In those cases the service can add a bunch of “if has method doFoobar, call it with these arguments” logic. Or perhaps you’re checking against an interface instead of method, though this is by and large the same. This approach leads to Shotgun Surgery. It is particularly bad if you have a general service. If your service is really only about the doFoobar method, then at least you won’t need to poke at it when a new Entity is added to the system that has nothing to do with the Foobar concept. If the service on the other hands needs to fully save something or send an email with a summary of the data, each new Entity type will force you to change your service.

The “if doFoobar exists” approach does not work if you want plugins to your system to be able to use your generic services with their own types of Entities. To enable that, and avoid the Shotgun Surgery, your general service can delegate to specific ones. For instance, you can have an EntityRepository service with a save method that takes an EntityInterface. In it’s constructor it would take an array of specific repositories, i.e. a DonationRepository and a MembershipRepository. In its save method it would loop through these specific repositories and somehow determine which one to use. Perhaps they would have a canHandle method that takes an EntityInterface, or perhaps EntityInterface has a getType method that returns a string that is also used as keys in the array of specific repositories. Once the right one is found, the EntitiyInterface instance is handed over to its save method.

interface Repository {
    public function save( EntityInterface $entity );
    public function canHandle( EntityInterface $entity ): bool;
}

class DonationRepository implements Repository { /**/ }
class MembershipRepository implements Repository { /**/ }

class GenericEntityRepository {
    /**
     * @var Repository[] $repositories
     */
    public function __construct( array $repositories ) {
        $this->repositories = $repositories;
    }

    public function save( EntityInterface $entity ) {
        foreach ( $this->repositories as $repository ) {
            if ( $repository->canHandle( $entity ) ) {
                $repository->save( $entity );
                break;
            }
        }
    }
}

This delegation approach is sane enough from a OO perspective. It does however involve specific repositories, which begs the question of why you are creating a general one in the first place. If there is no compelling reason to create the general one, just stick to specific ones and save yourself all this not needed complexity and vagueness.

In Wikibase there is a generic web API endpoint for creating new entities. The users provide a pile of information via JSON or a bunch of parameters, which includes the type of Entity they are trying to create. If you have this type of functionality, you are forced to deal with this in some way, and probably want to go with the delegation approach. To me having such an API endpoint is very questionable, with dedicated endpoints being the simpler solution for everyone involved.

To wrap this up: dedicated entity handling code is much simpler than generic code, making it easier to write, use, understand and modify. Code reuse, where warranted, is possible via composition inside of implementations without changing the interfaces of services. Generic entity handling code is almost always a bad choice.

On top of what I already outlined, there is another big issue you can run into when creating generic entity handling code like is done in Wikibase.

Bounded Contexts

Bounded Contexts are a key strategic concept from Domain Driven Design. They are key in the sense that if you don’t apply them in your project, you cannot effectively apply tactical patterns such as Entities and Value Objects, and are not really doing DDD at all.

“Strategy without tactics is the slowest route to victory. Tactics without strategy are the noise before defeat.” — Sun Tzu

Bounded Contexts allow you to segregate your domain models, ideally having a Bounded Context per subdomain. A detailed explanation and motivation of this pattern is out of scope for this post, but suffice to say is that Bounded Contexts allow for simplification and thus make it easier to write and maintain code. For more information I can recommend Domain-Driven Design Destilled.

In case of Wikibase there are likely a dozen or so relevant subdomains. While I did not do the analysis to create a comprehensive picture of which subdomains there are, which types they have, and which Bounded Contexts would make sense, a few easily stand out.

There is the so-called core Wikibase software, which was created for Wikidata.org, and deals with structured data for Wikipedia. It has two types of Entities (both in the Wikibase and in the DDD sense): Item and Property. Then there is (planned) functionality for Wiktionary, which will be structured dictionary data, and for Wikimedia Commons, which will be structured media data. These are two separate subdomains, and thus each deserve their own Bounded Context. This means having no code and no conceptual dependencies on each other or the existing Big Ball of Mud type “Bounded Context” in the Wikibase core software.

Conclusion

When standard approaches are followed, Entities can easily have required fields and optional fields. Creating generic code that deals with different types of entities is very suspect and can easily lead to great complexity and brittle code, as seen in Wikibase. It is also a road to not separating concepts properly, which is particularly bad when crossing subdomain boundaries.

Lionel Dricot: La démocratie effraie-t-elle nos élus ?

$
0
0

Comment les élus d’Ottignies-Louvain-la-Neuve semblent vouloir tout faire pour saboter une consultation populaire d’origine citoyenne.

Le 11 juin, dans ma ville d’Ottignies-Louvain-la-Neuve, se déroulera une consultation populaire. Chaque citoyen de 16 ans ou plus est appelé à se prononcer sur la question « Êtes-vous favorable à une extension du centre commercial ? ».

Demander aux citoyens de se prononcer sur l’avenir de leur ville, cela semble la base d’une société démocratique. Et pourtant, l’incroyable défi que représente cette simple consultation populaire m’emmène à une conclusion terrible mais limpide : les conseillers communaux d’Ottignies-Louvain-la-Neuve sont soit cruellement incompétents soit prêts à tout pour faire échouer cette consultation populaire.

L’histoire d’une initiative citoyenne

Selon le code belge de la démocratie locale, chaque commune est tenue d’organiser une consultation populaire si le projet est porté par au moins 10% des citoyens dans les communes de plus de 30.000 habitants (32.000 à Ottignies-Louvain-la-Neuve).

Peu connue, cette loi n’est que rarement utilisée. Le code de la démocratie locale limite d’ailleurs le nombre de consultation possible à 6 par législature de 6 ans avec minimum 6 mois entre chaque et aucune dans les 16 mois avant la prochaine élection communale.

Lorsque le centre commercial L’Esplanade, dont la construction avait déjà suscité de nombreux émois, a annoncé vouloir s’agrandir, un groupe motivé de citoyens s’est lancé dans la récolte de près de 3500 signatures, obligeant les édiles à organiser une consultation populaire.

Les citoyens enterrent le veau d’or lors de la parade des utopies.

Le bourgmestre Jean-Luc Roland, pourtant issu du parti Écolo, étant un grand défenseur du centre commercial, il y’a fort à parier que cette consultation fasse grincer des dents et que son organisation soit faite à contre-cœur. Je n’ai jamais compris cet engouement politique pour le centre commercial de la part d’un écologiste mais Monsieur Roland ne s’en cache pas.

L’histoire complète de cette consultation populaire est narrée avec force humour et détails par Stéphane Vanden Eede, conseiller CPAS Écolo de la ville.

Les oublis de la brochure officielle

Comme le stipule le code de la démocratie locale, la commune a fait parvenir aux habitants une brochure explicative détaillant l’enjeu et les modalités de la consultation populaire.

Surprise de taille : la brochure insiste plusieurs fois lourdement sur le fait que la participation à la consultation n’est pas obligatoire (contrairement aux élections).

Mais il n’est nul part indiqué que s’il n’y a pas au moins 10% de participation, les urnes ne seront même pas ouvertes ! Si 3200 citoyens de plus de 16 ans ne se déplacent pas, la consultation n’aura servi à rien. Au contraire, le message envoyé sera : « Nous, citoyens, ne voulons pas choisir ». Et oui, on compte bien 10% de la population, enfants compris, ce qui signifie que près de 15% des électeurs doivent participer.

Cette information me semble cruciale et je trouve particulièrement dommage qu’elle ait été omise de la brochure.

Moralité : quel que soit votre avis, allez voter à tout prix lors des consultations populaires et encouragez votre entourage à faire de même. Il est possible de donner procuration à un autre électeur si vous ne savez pas vous déplacer ce jour là. Le taux de participation est un élément crucial pour faire vivre le processus démocratique.

L’illisibilité du bulletin

La pétition signée par 3500 citoyens demandait une consultation populaire sur une question claire et précise :

« Aujourd’hui, le propriétaire de L’esplanade envisage d’agrandir sa surface commerciale. Êtes-vous favorable à une extension du centre commercial ? »

Cependant, un comité de conseillers communaux présidé par Michel Beaussart, échevin de la participation citoyenne, a décidé de rajouter 20 questions sur le bulletin de vote !

Ces 20 questions supplémentaires rendent le bulletin complètement illisible. La question principale, seule qui ait de l’importance, est reléguée sur un tout petit espace en haut à droit et il est facile de la manquer !

Les réactions de citoyens confrontés au bulletin de vote démontrent une confusion certaine : Quelle est la question principale qui a de la valeur ? Est-ce grave si certaines de mes réponses sont en contradiction l’une avec l’autre ? Comment seront dépouillées mes réponses ? À la phrase « Il n’y a pas de nécessité d’agrandir le centre commercial et d’augmenter l’offre commerciale. », je dois répondre oui ou non si je suis contre ?

Force est de constater que si on avait voulu embrouiller les citoyens, on ne s’y serait pas pris autrement. Je pense que si le taux de votes blancs à la première question est important, on pourra sans hésiter accuser la rédaction du bulletin. Ce long bulletin de vote risque également de ralentir le processus et de décourager d’éventuels votants en rallongeant inutilement les files.

L’impossibilité de dépouiller les bulletins

Toute personne un peu au fait de la sociologie vous le dira : rédiger une enquête d’opinion est un travail difficile. La méthodologie d’interprétation des résultats doit être étudiée, testée et validée.

Quand je vois un tel bulletin, je suis très curieux de savoir quel sera le protocole de dépouillement et d’interprétation des résultats.

Toutes les personnes que j’ai consulté m’ont confirmé l’amateurisme apparent de ce formulaire. Si 10.000 citoyens se rendent aux urnes et remplissent consciencieusement les 21 questions, la commune sera tout simplement assise sur une masse de données inexploitable.

Ces 20 questions ne servent donc à rien. Si ce n’est à rendre le bulletin particulièrement illisible, induire les électeurs en erreur et rallonger les files.

Un vote qui n’est plus secret

Mais là où l’incompétence est la plus tangible, c’est que ces 20 questions supplémentaires annulent l’anonymat du vote. Le code de la démocratie locale exige que le vote soit secret. Or, avec un tel bulletin, il ne l’est plus.

En effet, outre la question principale (la seule qui ait de la valeur), il y’a 2^20 bulletins possibles. Ce qui fait plus d’un million !

Il est possible pour une personne mal intentionnée de faire pression pour imposer un vote.

Exemple concret : un employeur annonce à ses 100 employés qu’il exige d’eux de voter pour l’agrandissement du centre commercial. À chaque employé, il donne une combinaison unique de réponses aux 20 questions. Par exemple « 9 oui – 1 non – 9 oui – 1 non ».

Le patron annonce alors que ses agents vont assister au dépouillement et guetter les bulletins qui suivront cette combinaison pour vérifier le vote des employés.

Si aucun bulletin ne répond à cette combinaison, l’employé est viré. Si le ou les bulletins correspondant sont tous contre l’extension, l’employé est viré.

Bien sûr, il est possible que plusieurs bulletins aient la même combinaison. Mais comme il y’a un million de combinaison pour maximum 10.000 ou 20.000 votants, la probabilité d’avoir la même combinaison est d’une pour cent ou une pour cinquante !

Sans compter que certaines combinaisons sont illogiques et que le patron peut accorder le bénéfice du doute si deux bulletins ont la même combinaison mais que l’un est pour et l’autre contre.

Le 11 juin, ne votez que pour la toute première question, bien cachée en haut à droite. Laissez les autres blanches !

Alors, incompétence ou malveillance ?

Sans être un expert en la matière et sans avoir suivi le dossier de près, j’ai relevé ces problèmes essentiels en quelques minutes à peine.

En conséquence, je suis forcé d’accuser publiquement Michel Beaussart, échevin de la participation citoyenne et tous les conseillers communaux qui ont validé ce bulletin d’être soit incompétents soit malveillants par rapport à l’organisation de cette consultation populaire.

Si Monsieur Beaussart me répond être de bonne foi, ce que je présume, il doit adresser les 3 points que j’ai soulevé, notamment en publiant un protocole validé d’interprétation des résultats.

Faute de réponse correcte, je pense que toute personne un peu soucieuse de la démocratie comprendra qu’il est indispensable de modifier d’urgence le bulletin de vote pour que celui-ci ne comporte que la question initialement demandée par la pétition.

En tant qu’échevin en charge, cette modification incombe à Monsieur Beaussart. Selon ma lecture amateur du code de la démocratie locale, rien ne s’oppose à la modification du bulletin de vote en dernière minute.

Un bulletin de vote difficilement lisible et ne permettant pas de garantir le secret du vote est un manquement gravissime au bon fonctionnement démocratique et devrait entraîner la nullité des résultats.

Si l’incompétence me semble dramatique, je peux reconnaître que l’erreur de bonne foi est humaine et excusable lorsqu’il y’a une volonté de réparer son erreur. Faute de cette volonté, les électeurs seront forcés de tirer la seule conclusion qui s’impose : il ne s’agit plus d’une erreur mais d’un acte délibéré de saboter le processus démocratique par ceux-là même qui ont été élus pour nous représenter. Ou, au mieux, le camouflage irresponsable d’une incompétence dangereuse.

Dans tous les cas, j’invite les électeurs à faire de cette consultation du 11 juin un véritable succès de participation, à ne répondre qu’à la première question et à se souvenir des réactions à cet argumentaire lorsqu’ils voteront en 2018. Et à se demander si le régime sous lequel nous vivons est bel et bien une démocratie.

Photo de couverture par Manu K.

Vous avez aimé votre lecture ? Soutenez l’auteur sur Tipeee, Patreon, Paypal ou Liberapay. Même un don symbolique fait toute la différence ! Retrouvons-nous ensuite sur Facebook, Medium, Twitter ou Mastodon.

Ce texte est publié sous la licence CC-By BE.

Claudio Ramirez: So, what about (Perl 6) dependencies?

$
0
0

DependenciesWhen I need to program something, most of the time I use Perl 5, Go or Perl 6. Which one depends on the existence and maturity of libraries and the deployment strategy (and I must admit, probably my mood). Most applications I write at work are not that big, but they need to be stable and secure. Some end up in production as an extension or addition to the software that is the core of our authentication and authorisation infrastructure. Some programs are managed by other teams, e.g. of sysadmin-type applications like the monitoring of a complex chain of microservices. Finally, proof of concept code is often needed when designing a new architecture. I believe that If your software is cumbersome/fragile to install and maintain, people won’t use it. Or worse, stick with an old version.

Hence, I like CPAN. A lot. I love how easy it is to download, build, test and install Perl 5 libraries. cpanminus made the process even more zero-conf. When not using Docker, tools like App::Fatpacker and Carton can bundle libraries and you end with a mostly self-contained application (thx mst and miyagawa).

Go, a compiled language, took a different path and opted for static binaries. The included (Go) libraries are not downloaded and built when you’re deploying, but when you’re developing. Although this is a huge advantage, I am not too fond of the dependency system: you mostly end up downloading random versions from the master branch of random Github repos (the workaround is using external webservices like gopkg.in, not ideal). The only sane way is to “vendor in” (also with a tool) your dependencies pretty much the same way Carton does: you copy the libs in your repository (but still without versioning). I hear the Go community is working at this, but so far there are only workarounds.

In the Perl 6 world, the zef module manager does provide a kind of cpanminus-like experience. However, in contrast with cpanminus it does this by downloading code from a zillion Github repo’s where the versioning is questionable. The is no clear link between the version fixed in the metadata (META6.json) and branches/tags on the repo. Like mentioned above, Go gets away with this due to static compiling, although the price is high: your projects will have dozens of versions of the same lib, probably even with a different API… and no way to declare the version in the code.

The centralised Perl 5 approach approach is fairly complex. It works because of the maturity of the ecosystem (the “big” modules are pretty stable) and the taken-for-granted testing culture (thank you toolchain and testing people!). Actually, in my opinion, the only projects that really solved the dependency management problem are the Linux & BSD distributions by boxing progress in long release cycles. Developers want the last shiny lib, so that won’t work.

The Perl 6 devs have no static compiling on the agenda, so it’s clear that the random Github repo situation is far from ideal. That’s why I was pretty excited to read on #perl6 that Perl 6 code can now be uploaded to CPAN (with Shoichi Kaji’s mi6) and installed (with Nick Logan’s zef). Today, the Perl 6 ecosystem has neither the maturity of the one of Perl 5 nor its testing culture. The dependency chain can be pretty fragile at times. Working within a central repository with an extensive and mature testing infrastructure will certainly help over time. One place to look for libraries, rate them, find the documentation, and so on. Look at their state and the state of its dependencies. This is huge. But I don’t think that CPAN will fix the problems of a young ecosystem right away. I think there is an opportunity here to build on the shoulders on CPAN, while keeping the advantages of a new language: find out what works.

Personally, I would love to have a built-in packaging solution like Carton –or even App::Fatpacker– out of the box. I think there is something to be said for the “vendoring-in” of the dependencies in the application repo (putting all the dependencies in a directory in the repo). The Perl 6 language/compiler has advantages over Perl 5. You can specify the compiler you target so your code doesn’t break when your compiler (also) targets a more recent milestone (allowing the core devs to advance by breaking stuff). Soon, you’ll be able to You can even load different versions of the same library in the same program (thx for the correction, nine).

The same tool could even vendor (and update) different version of the same library. At “package time” this tool would look at your sources and include only the versions of the libraries that are referenced. The result could be a tar or a directory with everything needed to run your application. As a bonus point, it would be nice to still support random repos for libraries-in-progress or for authors that opted not to use CPAN.

My use case is not everyone’s, so I wonder what people would like to see based on their experience or expectations. I think that now, with the possibility of a CPAN migration, it a good time to think about this. Let’s gather ideas. The implementation is for later :).


Filed under: Uncategorized Tagged: cpan, deployment, golang, Perl, perl6

Kristof Willen: Millenium Falcon

$
0
0
Hardware

My old netbook is currently seven years old, and shows its age : boot times up to two minutes, working in Chrome was a drag and took ages. And I'm not even talking about performing updates. All to blame on the slow CPU (never again an Atom !) and the slow hard drive. The last two occasions I used the laptop was on Config Management Days and Red Hat summit, and I can tell you the experience was unpleasant. So a new laptop was needed.

Luckily, the laptop market has reinvented itself after it collapsed during the tablet rise. Ultrabooks are now super slim, super light and extremely powerful. My new laptop needed to be :

  • fast : no Celeron or Atom chip was allowed. An i5 as minimum CPU
  • beautifull : I need a companion to my vanity. No plasticky stuff, well build and good quality.
  • well supportive for Linux : Linux would be installed, so the hardware needed to be supported
  • reasonable cheap : speaks for itself; a lot of nice ultrabooks are available, but I didn't want to pay an arm and a leg.
  • light and small : I carry this everywhere around the world, so the laptop shouldn't weigh more than 1.4kg

Soon, I saw 2 main candidates : first, the Dell XPS13 still is regarded as ultrabook king. It supports Linux nicely, and has that beautiful Infinity display. Disadvantages were that it was on the heavy side, and I wasn't fan of its design either. And a tad on the expensive side as well. On the other side, there was the Asus Zenbook 3 (UX390) which was stunningly beautiful, had a nice screen as well and was extremely light with its 0.9 kg.

However, I saw the silver variant in the shop, but found it a bit on the small side. So when I saw its 14 inch brother, UX430UQ, I was immediately sold. This is a 14 inch laptop - it is advertised as a 13inch laptop with a 14 inch screen, but don't believe that - which is as light as 1.25 kg, has a nice dark grey metal spun outerior and excellent keyboard and screen. Equipped with an i7 CPU and 16GB of RAM, it doesn't fail to deliver on the performance field. Shame that Asus doesn't provide a sleeve with this laptop, as it does with the UX390. Also, important, it doesn't has a safe lock hole, so don't leave this baby unattended.

I wiped the Windows 10 and booted the Fedora netinstall CD, but it seemed that both WiFi and trackpad were unsupported. I lost quite some time with this, but eventually decided to boot it with the Fedora LiveCD, to find out all was working out of the box. Probably the netinstall CD uses an older kernel. I baptised the laptop Millenium Falcon, as I switched to spaceship names on my hardware lately.

Xavier Mertens: HTTP… For the Good or the Bad

$
0
0

Tonight, I was invited by the OWASP Belgium Chapter (thank you again!) to present “something“. When I accepted the invitation, I did not really have an idea so I decided to compile the findings around my research about webshells. They are common tools used by bad guys: Once they compromized a server, they often install a webshell which is a kind of toolbox or a RAT (“Remote Access Tool”). It’s very interesting to analyze how such interfaces are protected from unauthorized accesses but also the mistakes that are present in their code. This is a very first version and more will come soon!

My slides are available on slideshare.net:

[The post HTTP… For the Good or the Bad has been first published on /dev/random]

Lionel Dricot: J’ai testé les matelas web

$
0
0

Comparatif des matelas Tediber, Eve et Ilobed

Lorsqu’il est devenu urgent de changer de matelas, plutôt que de me rendre dans un magasin de literie, je me suis tout naturellement tourné vers le web, curieux de voir ce qui se faisait en la matière.

J’y ai découvert que le matelas était un domaine grouillant d’activités avec des startups comme Tediber, Eve, Ilobed et Oscarsleep. Mais quel est le rapport entre un matelas et Internet ? Quel avantage à acheter un matelas sur le web ?

Rassurez-vous, pas de matelas connecté ! La particularité de ces startups matelas c’est qu’elles partagent un concept similaire, lancé par Tuft & Needle en 2012 et popularisé par Casper, deux startups américaines. Un modèle de matelas unique livré roulé sous vide, une période d’essai de 100 jours et un remboursement intégral en cas de non-satisfaction.

Contrairement à un matelas de magasin, vous pouvez donc réellement dormir pendant 100 nuits avant de faire votre choix ! Les matelas retournés sont donnés à des associations.

Chaque startup ne propose qu’un seul type de matelas mais en différentes tailles. L’idée est venue au créateur de Casper en réalisant que, dans les hôtels, on dort généralement très bien alors qu’on ne vous demande jamais le type de matelas que vous préférez. Il serait donc possible de créer un matelas « universel ».

Bref, une fois encore Internet prouve que l’on peut innover sans nécessairement faire de la haute technologie ou du tout connecté. Il n’y a même pas d’app mais seulement un concept commercial que je me devais de tester.

Tediber, le bleu nuit

Ne sachant que choisir, les caractéristiques techniques étant très similaires, je me suis tourné vers Twitter où les community managers de Tediber et Eve se sont affrontés un dimanche soir afin de me convaincre.

Ne pouvant tester le matelas, j’ai été séduit par l’image de Tediber : technique mais très classe avec un doux mélange blanc/bleu foncé évoquant pour moi l’apaisement et le sommeil. Le site, très simple et fonctionnel, met en avant le matelas et ses qualités.

Sur Twitter, le community manager de Tediber était très factuel, décrivant son produit. Le compte Eve, par contre, avait tendance à comparer voir à dénigrer les concurrents.

J’ai donc opté pour un matelas Tediber et, autant le dire tout de suite, le produit est magnifique.

La grande force de Tediber, c’est sa housse qui est tout simplement sublime. Du côté du sommier, le matelas est équipée d’une couche antidérapante particulièrement résistante. Du côté du dormeur, le matelas est d’une douceur incomparable et fait regretter d’avoir un drap de lit.

Le matelas est particulièrement moelleux et donne une douce impression de chaleur lorsqu’on s’y enfonce. Ce test ayant été réalisé en hiver, je suis curieux de savoir comment se comporte le matelas lors de fortes chaleurs.

Car, malheureusement, j’ai du renvoyer le matelas Tediber, aussi parfait soit-il. La raison ? Ma compagne, enceinte à l’époque, et moi-même étions aspirés par le centre où notre poids créait une légère dépression.

Peut-être est-ce dû à la taille choisie (140cm de large) ? Quoiqu’il en soit, je décide, un peu à contre-cœur, de renvoyer le matelas Tediber.

La communication, le retour et le remboursement se passent très bien.

Eve, le jaune

Mon second choix se porte en toute logique vers Eve. Comme je partage mon expérience sur Facebook, plusieurs d’entre vous se disent intéressés par un retour d’expérience, que vous êtes justement en train de lire. Je demande alors à Eve s’ils sont disposés à me faire une réduction en échange de mon test.

Ils acceptent de me faire le tarif “membre du personnel” (-30%) et je commande mon matelas Eve.

Contrairement à Tediber, Eve est une déception.

La housse glisse semble faite dans un tissu bon-marché, le jaune est absolument criard. Le matelas est bien moins moelleux que le Tediber mais, au moins, il ne se creuse pas au centre. Pour mon goût, il est soit trop mou, soit trop dur. Je n’arrive pas à trouver les mots mais je ne m’y sens pas bien. Ma compagne avoue avoir le même ressenti, elle qui préfère un matelas ferme.

Deux problèmes m’irritent particulièrement : le matelas glisse sur le sommier et la surface de la housse possède un relief en nid d’abeille que je trouve insupportable, malgré la présence d’une alèse et d’un drap de lit. (Eve m’affirme avoir réglé ces deux problèmes qui étaient des critiques récurrentes)

Bref, je n’aime pas le matelas Eve. Rien que l’idée d’utiliser du jaune pour symboliser le sommeil, quelle horreur !

Je décide de le remballer avec l’alèse que j’avais également commandée. Mais il m’est notifié que l’alèse ne dispose que de 30 jours d’essais, non 100 (la demande de retour ayant été fait aux alentours du 35ème jour). C’est un peu ballot…

Si la communication, le retour et le remboursement se passent bien, je garde un mauvais sentiment de cette expérience. Je n’aime pas les couleurs, le site un peu confus qui insiste plus sur des photos de modèles dénudés que sur le matelas, sur l’approche à la limite de la grosse boite industrielle, un matelas qui est plus beau en photo qu’en vrai. Notons que le site a été récemment simplifié et que les photos se centrent désormais sur le matelas.

Ilobed, le blanc

En désespoir de cause, je me tourne vers Ilobed, le dernier acteur qui n’avait pas participé à la guerre des community managers sur Twitter.

Et pour cause : contrairement aux deux précédents, Ilobed est auto-financé et est beaucoup plus petit. Je suis en contact direct avec Clément, fondateur d’Ilobed, qui répond gentiment à toutes mes questions et me propose 150€ de réduction lorsque je lui annonce écrire cet article. J’avais eu peu d’interaction sur Twitter car lui ne peut se permettre de passer son dimanche sur les réseaux sociaux et c’est très bien comme ça !

C’est également Clément qui me téléphone directement lorsqu’il réalise que ma commande est en Belgique dans une zone où un éventuel retour risque d’être difficile voire impossible. Il préfère me prévenir pour discuter avec moi et j’apprécie la démarche.

Ilobed mise sur le plus simple, moins cher. Le matelas est plus fin car, selon Clément, l’épaisseur n’est qu’un phénomène de mode. La housse est toute blanche, avec un motif agréable.

Des trois, Ilobed est certainement le plus ferme. Et nous y dormons désormais très bien.

Seul gros bémol : il glisse presqu’autant que le matelas Eve. J’ai fini par acheter sur Amazon un sous-matelas antidérapant à 20€ qui a fait des miracles mais c’est dommage. Sans compter que c’est le seul matelas pour lequel l’envers et l’endroit ne sont pas clairs du tout ! Une couche anti-dérapante résoudrait ces deux problèmes.

Le matelas Ilobed n’est clairement pas Tediber, il n’est pas enthousiasmant, il n’est pas moelleux. Mais sa sobriété est peut-être justement son meilleur atout. Et c’est celui que nous avons décidé de garder.

Oscarsleep, le gris foncé

Je me dois de citer Oscarsleep, l’acteur belge du marché du matelas francophone. Oscarsleep était plus cher et proposait un matelas retournables (on peut dormir sur les deux faces). Comme ils n’ont jamais répondu à mes requêtes, je ne l’ai pas testé. Je note cependant que le prix a baissé et que le matelas s’est aligné sur la technologie des 3 autres avec une couche à mémoire de forme du côté du dormeur.

J’avoue, je serais très curieux de l’essayer pour compléter ce test.

Conclusion

Un matelas est quelque chose de très subjectif et je sais que des centaines de personnes adorent leur matelas Eve. Mais je déteste quand ce genre de comparatif se termine par une conclusion qui n’en est pas une, disant que toutes les solutions ont plein de qualités et ne prenant pas un parti ferme.

Du coup, ma conclusion est simple : si le budget n’est pas un problème pour vous, testez Tediber. C’est un matelas enthousiasmant. Si vous avez été déçu par Tediber, si vous cherchez le meilleur rapport qualité prix ou que vous favorisez la sobriété et un matelas ferme, adoptez Ilobed.

Mais le plus important dans cette expérience n’est pas tellement le matelas que j’ai choisi. C’est la réalisation que plus jamais je ne retournerai dans un magasin de literie pour tester un matelas en trois minutes, tout habillé. Désormais, bénéficier de 100 nuits d’essai me semble indispensable avant d’acheter un matelas. Cela parait peut-être anecdotique mais ce genre d’innovations ne cesse de creuser l’écart entre le nouveau monde et les entreprises zombies.

Dans tous les cas, je vous souhaite une bonne nuit !

 

Remarque importante : ce blog est financé par ceux d’entre vous qui m’offrent un prix libre pour chaque série de 5 billets. Cela se passe sur Tipeee ou Patreon et je ne vous remercierai jamais assez pour votre contribution. Ce billet ayant déjà été financé par une réduction de 150€ sur l’achat de mon matelas Ilobed, il n’est pas payant et ne compte pas dans la prochaine série de 5.

 

Photo par Edgar Crook.

Vous avez aimé votre lecture ? Soutenez l’auteur sur Tipeee, Patreon, Paypal ou Liberapay. Même un don symbolique fait toute la différence ! Retrouvons-nous ensuite sur Facebook, Medium, Twitter ou Mastodon.

Ce texte est publié sous la licence CC-By BE.

Dries Buytaert: From imagination to (augmented) reality in 48 hours

$
0
0

Every spring, members of Acquia's Product, Engineering and DevOps teams gather at our Boston headquarters for "Build Week". Build Week gives our global team the opportunity to meet face-to-face, to discuss our product strategy and roadmap, to make plans, and to collaborate on projects.

One of the highlights of Build Week is our annual Hackathon; more than 20 teams of 4-8 people are given 48 hours to develop any project of their choosing. There are no restrictions on the technology or solutions that a team can utilize. Projects ranged from an Amazon Dash Button that spins up a new Acquia Cloud environment with one click, to a Drupal module that allows users to visually build page layouts, or a proposed security solution that would automate pen testing against Drupal sites.

This year's projects were judged on innovation, ship-ability, technical accomplishment and flair. The winning project, Lift HoloDeck, was particularly exciting because it showcases an ambitious digital experience that is possible with Acquia and Drupal today. The Lift Holodeck takes a physical experience and amplifies it with a digital one using augmented reality. The team built a mobile application that superimposes product information and smart notifications over real-life objects that are detected on a user's smartphone screen. It enables customers to interact with brands in new ways that improve a customer's experience.

At the hackathon, the Lift HoloDeck Team showed how augmented reality can change how both online and physical storefronts interact with their consumers. In their presentation, they followed a customer, Neil, as he used the mobile application to inform his purchases in a coffee shop and clothing store. When Neil entered his favorite coffee shop, he held up his phone to the posted “deal of the day”. The Lift HoloDeck application superimposes nutrition facts, directions on how to order, and product information on top of the beverage. Neil contemplated the nutrition facts before ordering his preferred drink through the Lift HoloDeck application. Shortly after, he received a notification that his order was ready for pick up. Because Acquia Lift is able to track Neil's click and purchase behavior, it is also possible for Acquia Lift to push personalized product information and offerings through the Lift HoloDeck application.

Check out the demo video, which showcases the Lift HoloDeck prototype:

The Lift HoloDeck prototype is exciting because it was built in less than 48 hours and uses technology that is commercially available today. The Lift HoloDeck experience was powered by Unity (a 3D game engine), Vuforia (an augmented reality library), Acquia Lift (a personalization engine) and Drupal as a content store.

The Lift HoloDeck prototype is a great example of how an organization can use Acquia and Drupal to support new user experiences and distribution platforms that engage customers in captivating ways. It's incredible to see our talented teams at Acquia develop such an innovative project in under 48 hours; especially one that could help reshape how customers interact with their favorite brands.

Congratulations to the entire Lift HoloDeck team; Ted Ottey, Robert Burden, Chris Nagy, Emily Feng, Neil O'Donnell, Stephen Smith, Roderik Muit, Rob Marchetti and Yuan Xie.


Xavier Mertens: [SANS ISC] Sharing Private Data with Webcast Invitations

$
0
0

I published the following diary on isc.sans.org: “Sharing Private Data with Webcast Invitations“.

Last week, at a customer, we received a forwarded email in a shared mailbox. It was somebody from another department that shared an invitation for a webcast “that could be interesting for you, guys!”. This time, no phishing attempt, no malware, just a regular email sent from a well-known security vendor. A colleague was interested in the webcast and clicked on the registration link… [Read more]

[The post [SANS ISC] Sharing Private Data with Webcast Invitations has been first published on /dev/random]

Xavier Mertens: [SANS ISC] Phishing Campaigns Follow Trends

$
0
0

I published the following diary on isc.sans.org: “Phishing Campaigns Follow Trends“.

Those phishing emails that we receive every day in our mailboxes are often related to key players in different fields (…) But the landscape of online services is ever changing and new actors (and more precisely their customers) become new interesting targets. Yesterday, while hunting, I found for the first time a phishing page trying to lure the Bitcoin operator: BlockChain. Blockchain[1] is a key player in the management of digital assets… [Read more]

[The post [SANS ISC] Phishing Campaigns Follow Trends has been first published on /dev/random]

Jeroen De Dauw: Review of Ayreon: The Source

$
0
0

In this post I review the source code of the Ayreon software. Well, actually not. This is a review of The Source, a progressive rock/metal album from the band Ayreon. Yes really. Much wow omg.

Overall rating

This album is awesome.

Like every Ayreon album, The Source features a crapton of singers each portraying a character in the albums story, with songs always featuring multiple of them, often with interleaving lines. The mastermind behind Ayreon is Arjen Anthony Lucassen, who for each album borrows some of the most OP singers and instrumentalists from bands all over the place. Hence if you are a metal or rock fan, you are bound to know some of the lineup.

What if you are not into those genres? I’ve seen Arjen described as a modern day Mozart and some of his albums as works of art. Art that can be appreciated even if you otherwise are not a fan of the genre.

Some nitpicks

The lyrics, while nice, are to me not quite as epic as those in the earlier Ayreon album 01011001. A high bar to set, since 01 is my favorite Ayreon album. (At least when removing 2 tracks from it that I really do not like. Which is what I did years ago so I don’t remember what they are called. Which is bonus points for The Source, which has no tracks I dislike.) One of the things I really like about it is that some of the lyrics have characters with opposite moral or emotional stances debate which course of action to take.

These are some of the lyrics of The Fifth Extinction (a song from 01011001), with one singers lines in green italics and the other in red normal font:

I see a planet, perfect for our needs
behold our target, a world to plant our seeds
There must be life
first remove any trace of doubt!
they may all die
Don’t you think we should check it out?
We have no choice, we waited far too long
this is our planet, this is where they belong.
We may regret this,
is this the way it’s supposed to be?
A cold execution, a mindless act of cruelty!

I see mainly reptiles
A lower form or intelligence
mere brainless creatures
with no demonstrable sentience
What makes us superior
We did not do so great ourselves!
A dying race, imprisoned in restricted shells

<3

The only other nitpick I have is that the background tone in Star of Sirrah is kinda annoying when paying attention to the song.

Given my potato sophistication when it comes to music, I can’t say much more about the album. Go get a copy, it’s well worth the moneys.

The story

Now we get to the real reason I’m writing this review, or more honestly, this rant. If you’re not a Ayreon fanboy like me, this won’t be interesting for you (unless you like rants). Spoilers on the story in The Source ahead.

In summary, the story in The Source is as follows: There is a human civilization on a planet called Alpha and they struggle with several ecological challenges. To fix the problems they give control to Skynet (yes I will call it that). Skynet shuts everything down so everyone dies. Except a bunch of people who get onto a spaceship and find a home on a new planet to start over again. The story focuses on these people, how they deal with Skynet shutting everything down, their coming together, their journey to the new planet and how they begin new lives there.

Originality

It’s an OK story. A bit cheesy and not very original. Arjen clearly likes the “relying on machines is bad” topic, as evidenced by 01011001 and Victims of the Modern Age (Star One). When it comes to originally in similar concept albums I think 01011001 does a way better job. Same goes for Cybion (Kalisia), which although focuses on different themes and is not created by Arjen (it does feature him very briefly), has a story with similar structure. (Perhaps comparing with Cybion is a bit mean, since that bar is so high it’s hidden by the clouds.)

Consistency

Then there are some serious WTFs in the story. For instance planet Alpha blows up after some time because of the quantum powercore melting down due to the cooling systems being deactivated. Why would Skynet let that happen? If it can take on an entire human civilization surely it knows what such deactivation will result into? Why would it commit suicide, and fail its mission to deal with the ecological issues? Of course, this is again a bit nitpicky. Logic and consistency in the story are not the most important thing on such an album of course. Still, it bugs me.

Specificness

Another difference with 01011001 is that story in The Source is more specific about things. If it was not, a lot of the WTFs would presumably be avoided, and you’d be more free to use your imagination. 01011001 tells the story of an Aquatic race called the Forever and how they create human kind to solve their wee bit of an apathy problem. There are no descriptions of what the Forever look like, beyond them being an Aquatic race, and no description of what their world and technology looks like beyond the very abstract.

Take this line from Age of Shadows, the opening song of 01011001:

Giant machines blot out the sun

When I first heard this song this line gave me the chills, as I was imagining giant machines in orbit around the systems star (kinda like a Dyson swarm) or perhaps just passing in between the planet and the star, still at significant distance from the planet. It took some months for me to realize that the lyrics author probably was thinking of surface based machines, which makes them significantly less giant and cool. The lyrics don’t specify that though.

The Ayreon story

Everything I described so far are minor points to me. What really gets me is what The Source does to the overall Ayreon story. Let’s recap what it looked like before The Source:

The Forever lose their emotions and create the human race to fix themselves. Humanity goes WW3 and blows itself up, despite the Forever helping them to avoid this fate, and perhaps due to the Forevers meddling to accelerate human evolution. Still, the Forever are able to awaken their race though the memories of the humans.

Of course this is just a very high level description, and there is much more to it then that. The Source changes this. It’s a prequel to 01011001 and reveals that the Forever are human, namely the humans that fled Alpha… Which turns the high level story into:

Humans on Alpha fuck their environment though the use of technology and then build Skynet. Some of them run away to a new planet (the water world they call Y) and re-engineer themselves to live there. They manage to fuck themselves with technology again and decide to create a new human race on earth. Those new humans also fuck themselves with technology.

So to me The Source ruins a lot of the story from the other Ayreon albums. Instead of having this alien race and the humans, each with their own problems, we now have just humans, who manage to fuck themselves over 3 times in a row and win the universes biggest tards award. Great. #GrumpyJeroenIsGrumpy

Conclusion

Even with all the grump, I think this is an awesome album. Just don’t expect too much from the story, which is OK, but definitely not as great as the rest of the package. Go buy a copy.

Sven Vermeulen: Structuring infrastructural deployments

$
0
0

Many organizations struggle with the all-time increase in IP address allocation and the accompanying need for segmentation. In the past, governing the segments within the organization means keeping close control over the service deployments, firewall rules, etc.

Lately, the idea of micro-segmentation, supported through software-defined networking solutions, seems to defy the need for a segmentation governance. However, I think that that is a very short-sighted sales proposition. Even with micro-segmentation, or even pure point-to-point / peer2peer communication flow control, you'll still be needing a high level overview of the services within your scope.

In this blog post, I'll give some insights in how we are approaching this in the company I work for. In short, it starts with requirements gathering, creating labels to assign to deployments, creating groups based on one or two labels in a layered approach, and finally fixating the resulting schema and start mapping guidance documents (policies) toward the presented architecture.

As always, start with the requirements

From an infrastructure architect point of view, creating structure is one way of dealing with the onslaught in complexity that is prevalent within the wider organizational architecture. By creating a framework in which infrastructural services can be positioned, architects and other stakeholders (such as information security officers, process managers, service delivery owners, project and team leaders ...) can support the wide organization in its endeavor of becoming or remaining competitive.

Structure can be provided through various viewpoints. As such, while creating such framework, the initial intention is not to start drawing borders or creating a complex graph. Instead, look at attributes that one would assign to an infrastructural service, and treat those as labels. Create a nice portfolio of attributes which will help guide the development of such framework.

The following list gives some ideas in labels or attributes that one can use. But be creative, and use experienced people in devising the "true" list of attributes that fits the needs of your organization. Be sure to describe them properly and unambiguously - the list here is just an example, as are the descriptions.

  • tenant identifies the organizational aggregation of business units which are sufficiently similar in areas such as policies (same policies in use), governance (decision bodies or approval structure), charging, etc. It could be a hierarchical aspect (such as organization) as well.
  • location provides insight in the physical (if applicable) location of the service. This could be an actual building name, but can also be structured depending on the size of the environment. If it is structured, make sure to devise a structure up front. Consider things such as regions, countries, cities, data centers, etc. A special case location value could be the jurisdiction, if that is something that concerns the organization.
  • service type tells you what kind of service an asset is. It can be a workstation, a server/host, server/guest, network device, virtual or physical appliance, sensor, tablet, etc.
  • trust level provides information on how controlled and trusted the service is. Consider the differences between unmanaged (no patching, no users doing any maintenance), open (one or more admins, but no active controlled maintenance), controlled (basic maintenance and monitoring, but with still administrative access by others), managed (actively maintained, no privileged access without strict control), hardened (actively maintained, additional security measures taken) and kiosk (actively maintained, additional security measures taken and limited, well-known interfacing).
  • compliance set identifies specific compliance-related attributes, such as the PCI-DSS compliancy level that a system has to adhere to.
  • consumer group informs about the main consumer group, active on the service. This could be an identification of the relationship that consumer group has with the organization (anonymous, customer, provider, partner, employee, ...) or the actual name of the consumer group.
  • architectural purpose gives insight in the purpose of the service in infrastructural terms. Is it a client system, a gateway, a mid-tier system, a processing system, a data management system, a batch server, a reporting system, etc.
  • domain could be interpreted as to the company purpose of the system. Is it for commercial purposes (such as customer-facing software), corporate functions (company management), development, infrastructure/operations ...
  • production status provides information about the production state of a service. Is it a production service, or a pre-production (final testing before going to production), staging (aggregation of multiple changes) or development environment?

Given the final set of labels, the next step is to aggregate results to create a high-level view of the environment.

Creating a layered structure

Chances are high that you'll end up with several attributes, and many of these will have multiple possible values. What we don't want is to end in an N-dimensional infrastructure architecture overview. Sure, it sounds sexy to do so, but you want to show the infrastructure architecture to several stakeholders in your organization. And projecting an N-dimensional structure on a 2-dimensional slide is not only challenging - you'll possibly create a projection which leaves out important details or make it hard to interpret.

Instead, we looked at a layered approach, with each layer handling one or two requirements. The top layer represents the requirement which the organization seems to see as the most defining attribute. It is the attribute where, if its value changes, most of its architecture changes (and thus the impact of a service relocation is the largest).

Suppose for instance that the domain attribute is seen as the most defining one: the organization has strict rules about placing corporate services and commercial services in separate environments, or the security officers want to see the commercial services, which are well exposed to many end users, be in a separate environment from corporate services. Or perhaps the company offers commercial services for multiple tenants, and as such wants several separate "commercial services" environments while having a single corporate service domain.

In this case, part of the infrastructure architecture overview on the top level could look like so (hypothetical example):

Top level view

This also shows that, next to the corporate and commercial interests of the organization, a strong development support focus is prevalent as well. This of course depends on the type of organization or company and how significant in-house development is, but in this example it is seen as a major decisive factor for service positioning.

These top-level blocks (depicted as locations, for those of you using Archimate) are what we call "zones". These are not networks, but clearly bounded areas in which multiple services are positioned, and for which particular handling rules exist. These rules are generally written down in policies and standards - more about that later.

Inside each of these zones, a substructure is made available as well, based on another attribute. For instance, let's assume that this is the architectural purpose. This could be because the company has a requirement on segregating workstations and other client-oriented zones from the application hosting related ones. Security-wise, the company might have a principle where mid-tier services (API and presentation layer exposures) are separate from processing services, and where data is located in a separate zone to ensure specific data access or more optimal infrastructure services.

This zoning result could then be depicted as follows:

Detailed top-level view

From this viewpoint, we can also deduce that this company provides separate workstation services: corporate workstation services (most likely managed workstations with focus on application disclosure, end user computing, etc.) and development workstations (most likely controlled workstations but with more open privileged access for the developer).

By making this separation explicit, the organization makes it clear that the development workstations will have a different position, and even a different access profile toward other services within the company.

We're not done yet. For instance, on the mid-tier level, we could look at the consumer group of the services:

Mid-tier explained

This separation can be established due to security reasons (isolating services that are exposed to anonymous users from customer services or even partner services), but one can also envision this to be from a management point of view (availability requirements can differ, capacity management is more uncertain for anonymous-facing services than authenticated, etc.)

Going one layer down, we use a production status attribute as the defining requirement:

Anonymous user detail

At this point, our company decided that the defined layers are sufficiently established and make for a good overview. We used different defining properties than the ones displayed above (again, find a good balance that fits the company or organization that you're focusing on), but found that the ones we used were mostly involved in existing policies and principles, while the other ones are not that decisive for infrastructure architectural purposes.

For instance, the tenant might not be selected as a deciding attribute, because there will be larger tenants and smaller tenants (which could make the resulting zone set very convoluted) or because some commercial services are offered toward multiple tenants and the organizations' strategy would be to move toward multi-tenant services rather than multiple deployments.

Now, in the zoning structure there is still another layer, which from an infrastructure architecture point is less about rules and guidelines and more about manageability from an organizational point of view. For instance, in the above example, a SAP deployment for HR purposes (which is obviously a corporate service) might have its Enterprise Portal service in the Corporate Services> Mid-tier> Group Employees> Production zone. However, another service such as an on-premise SharePoint deployment for group collaboration might be in Corporate Services> Mid-tier> Group Employees> Production zone as well. Yet both services are supported through different teams.

This "final" layer thus enables grouping of services based on the supporting team (again, this is an example), which is organizationally aligned with the business units of the company, and potentially further isolation of services based on other attributes which are not defining for all services. For instance, the company might have a policy that services with a certain business impact assessment score must be in isolated segments with no other deployments within the same segment.

What about management services

Now, the above picture is missing some of the (in my opinion) most important services: infrastructure support and management services. These services do not shine in functional offerings (which many non-IT people generally look at) but are needed for non-functional requirements: manageability, cost control, security (if security can be defined as a non-functional - let's not discuss that right now).

Let's first consider interfaces - gateways and other services which are positioned between zones or the "outside world". In the past, we would speak of a demilitarized zone (DMZ). In more recent publications, one can find this as an interface zone, or a set of Zone Interface Points (ZIPs) for accessing and interacting with the services within a zone.

In many cases, several of these interface points and gateways are used in the organization to support a number of non-functional requirements. They can be used for intelligent load balancing, providing virtual patching capabilities, validating content against malware before passing it on to the actual services, etc.

Depending on the top level zone, different gateways might be needed (i.e. different requirements). Interfaces for commercial services will have a strong focus on security and manageability. Those for the corporate services might be more integration-oriented, and have different data leakage requirements than those for commercial services.

Also, inside such an interface zone, one can imagine a substructure to take place as well: egress interfaces (for communication that is exiting the zone), ingress interfaces (for communication that is entering the zone) and internal interfaces (used for routing between the subzones within the zone).

Yet, there will also be requirements which are company-wide. Hence, one could envision a structure where there is a company-wide interface zone (with mandatory requirements regardless of the zone that they support) as well as a zone-specific interface zone (with the mandatory requirements specific to that zone).

Before I show a picture of this, let's consider management services. Unlike interfaces, these services are more oriented toward the operational management of the infrastructure. Software deployment, configuration management, identity & access management services, etc. Are services one can put under management services.

And like with interfaces, one can envision the need for both company-wide management services, as well as zone-specific management services.

This information brings us to a final picture, one that assists the organization in providing a more manageable view on its deployment landscape. It does not show the 3rd layer (i.e. production versus non-production deployments) and only displays the second layer through specialization information, which I've quickly made a few examples for (you don't want to make such decisions in a few hours, like I did for this post).

General overview

If the organization took an alternative approach for structuring (different requirements and grouping) the resulting diagram could look quite different:

Alternative general overview

Flows, flows and more flows

With the high-level picture ready, it is not a bad idea to look at how flows are handled in such an architecture. As the interface layer is available on both company-wide level as well as the next, flows will cross multiple zones.

Consider the case of a corporate workstation connecting to a reporting server (like a Cognos or PowerBI or whatever fancy tool is used), and this reporting server is pulling data from a database system. Now, this database system is positioned in the Commercial zone, while the reporting server is in the Corporate zone. The flows could then look like so:

Flow example

Note for the Archimate people: I'm sorry that I'm abusing the flow relation here. I didn't want to create abstract services in the locations and then use the "serves" or "used by" relation and then explaining readers that the arrows are then inverse from what they imagine.

In this picture, the corporate workstation does not connect to the reporting server directly. It goes through the internal interface layer for the corporate zone. This internal interface layer can offer services such as reverse proxies or intelligent load balancers. The idea here is that, if the organization wants, it can introduce additional controls or supporting services in this internal interface layer without impacting the system deployments themselves much.

But the true flow challenge is in the next one, where a processing system connects to a data layer. Here, the processing server will first connect to the egress interface for corporate, then through the company-wide internal interface, toward the ingress interface of the commercial and then to the data layer.

Now, why three different interfaces, and what would be inside it?

On the corporate level, the egress interface could be focusing on privacy controls or data leakage controls. On the company-wide internal interface more functional routing capabilities could be provided, while on the commercial level the ingress could be a database activity monitoring (DAM) system such as a database firewall to provide enhanced auditing and access controls.

Does that mean that all flows need to have at least three gateways? No, this is a functional picture. If the organization agrees, then one or more of these interface levels can have a simple pass-through setup. It is well possible that database connections only connect directly to a DAM service and that such flows are allowed to immediately go through other interfaces.

The importance thus is not to make flows more difficult to provide, but to provide several areas where the organization can introduce controls.

Making policies and standards more visible

One of the effects of having a better structure of the company-wide deployments (i.e. a good zoning solution) is that one can start making policies more clear, and potentially even simple to implement with supporting tools (such as software defined network solutions).

For instance, a company might want to protect its production data and establish that it cannot be used for non-production use, but that there are no restrictions for the other data environments. Another rule could be that web-based access toward the mid-tier is only allowed through an interface.

These are simple statements which, if a company has a good IP plan, are easy to implement - one doesn't need zoning, although it helps. But it goes further than access controls.

For instance, the company might require corporate workstations to be under heavy data leakage prevention and protection measures, while developer workstations are more open (but don't have any production data access). This not only reveals an access control, but also implies particular minimal requirements (for the Corporate> Workstation zone) and services (for the Corporate interfaces).

This zoning structure does not necessarily make any statements about the location (assuming it isn't picked as one of the requirements in the beginning). One can easily extend this to include cloud-based services or services offered by third parties.

Finally, it also supports making policies and standards more realistic. I often see policies that make bold statements such as "all software deployments must be done through the company software distribution tool", but the policies don't consider development environments (production status) or unmanaged, open or controlled deployments (trust level). When challenged, the policy owner might shrug away the comment with "it's obvious that this policy does not apply to our sandbox environment" or so.

With a proper zoning structure, policies can establish the rules for the right set of zones, and actually pin-point which zones are affected by a statement. This is also important if a company has many, many policies. With a good zoning structure, the policies can be assigned with meta-data so that affected roles (such as project leaders, architects, solution engineers, etc.) can easily get an overview of the policies that influence a given zone.

For instance, if I want to position a new management service, I am less concerned about workstation-specific policies. And if the management service is specific for the development environment (such as a new version control system) many corporate or commercially oriented policies don't apply either.

Conclusion

The above approach for structuring an organization is documented here in a high-level manner. It takes many assumptions or hypothetical decisions which are to be tailored toward the company itself. In my company, a different zoning structure is selected, taking into account that it is a financial service provider with entities in multiple countries, handling several thousand of systems and with an ongoing effort to include cloud providers within its infrastructure architecture.

Yet the approach itself is followed in an equal fashion. We looked at requirements, created a layered structure, and finished the zoning schema. Once the schema was established, the requirements for all the zones were written out further, and a mapping of existing deployments (as-is) toward the new zoning picture is on-going. For those thinking that it is just slideware right now - it isn't. Some of the structures that come out of the zoning exercise are already prevalent in the organization, and new environments (due to mergers and acquisitions) are directed to this new situation.

Still, we know we have a large exercise ahead before it is finished, but I believe that it will benefit us greatly, not only from a security point of view, but also clarity and manageability of the environment.

Xavier Mertens: SSTIC 2017 Wrap-Up Day #1

$
0
0

I’m in Rennes, France to attend my very first edition of the SSTIC conference. SSTIC is an event organised in France, by and for French people. The acronym means “Symposium sur la sécurité des technologies de l’information et des communications“. The event has a good reputation about its content but is also known to have a very strong policy to sell tickets. Usually, all of them are sold in a few minutes, spread across 3 waves. I was lucky to get one this year. So, here is my wrap-up! This is already the fifteen edition with a new venue to host 600 security people. A live streaming is also available and a few hundred people are following talks remotely.

The first presentation was performed by  Octave Klaba who’s the CEO of the OVH operator. OVH is a key player on the Internet with many services. It is known via the BGP AS16276. Octave started with a complete overview of the backbone that he build from zero a few years ago. Today, it has a capacity of 11Tpbs and handles 2500 BGP sessions. It’s impressive how this CEO knows his “baby”. The next part of the talk was a deep description of their solution “VAC” deployed to handle DDoS attacks. For information, OVH is handler ~1200 attacks per day! They usually don’t communicate with them, except if some customers are affected (the case of Mirai was provided as an example by Octave). They chose the name “VAC” for “Vacuum Cleaner“. The goal is to clean the traffic as soon as possible before it enters the backbone. An interesting fact about anti-DDoS solutions: it is critical to detect them as soon as possible. Why? Let’s assume that your solution detects a DDoS within x seconds, attackers will launch attacks of less than x seconds. Evil! The “VAC” can be seen as a big proxy and is based on multiple components that can filter specific types of protocols/attacks. Interesting: to better handle some DDoS, the OVH teams reversed some gaming protocols to better understand how they work. Octave described in deep details how the solution has been implemented and is used today… for any customer! This is a free service! It was really crazy to get so many technical details from a… CEO! Respect!

The second talk was “L’administration en silo” by Aurélien Bordes and focused on some best practices for Windows services administration. Aurélien started with a fact: When you ask a company how is the infrastructure organised, they speak usually about users, data, computers, partners but… they don’t mention administrative accounts. From where and how are managed all the resources? Basically, they are three categories of assets. They can be classified based on colours or tiers.

  • Red: resources for admins
  • Yellow: core business
  • Green: computers

The most difficult layer to protect is… the yellow one. After some facts about the security of AD infrastructure,  Aurélien explained how to improve the Kerberos protocol. The solution is based on FAST, a framework to improve the Kerberos protocol. Another interesting tool developed by Aurélien: The Terminal Server Security Auditor. Interesting presentation but my conclusion is that in increase the complexity of Kerberos which is already not easy to master.

During the previous talk, Aurélien presented a slide with potential privilege escalation issues in an Active Directory environment. One of them was the WSUS server. It’s was the topic of the research presented by Romain Coltel and Yves Le Provost. During a pentest engagement, they compromised a network “A” but they also discovered a network “B” completely disconnected from “A”. Completely? Not really, there were WSUS servers communicating between them. After a quick recap of the WSUS server and its features, they explained how they compromised the second network “B” via the WSUS server. Such a server is based on three major components:

  • A Windows service to sync
  • A web service web to talk to clients (configs & push packages)
  • A big database

This database is complex and contains all the data related to patches and systems. Attacking a WSUS server is not new. In 2015, there was a presentation at BlackHat which demonstrated how to perform a man-in-the-middle attack against a WSUS server. But today, Romain and Yves used another approach. They wrote a tool to directly inject fake updates in the database. The important step is to use the stored procedures to not break the database integrity. Note that the tool has a “social engineering” approach and fake info about the malicious patch can be injected too to entice the admin to allow the installation of the fake patch on the target system(s). To be deployed, the “patch” must be a binary signed by Microsoft. Good news, plenty of tools are signed and can be used to perform malicious tasks. They use the tool psexec for the demo:

psexec -> cmd.exe -> net user /add

The DB being synced between different WSUS servers, it was possible to compromise the network “B”. The tool they developed to inject data into the WSUS database is called WUSpendu. A good recommendation is to put WSUS servers in the “red” zone (see above) and to consider them as critical assets. Very interesting presentation!

After two presentations focusing on the Windows world, back to the UNIX world and more precisely Linux with the init system called systemd. Since it was implemented in major Linux distribution, systemd has been the centre of huge debates between the pro-initd and pro-systemd. Same for me, I found it not easy to use, it introduces complexity, etc… But the presentation gave nice tips that could be used to improve the security of daemons started via systemd. A first and basic tip is to not use the root account but many new features are really interesting:

  • seccomp-bpf can be used to disable access to certain syscalls (like chroot() or obsolete syscalls)
  • capacities can be disabled (ex: CAP_NET_BIND_SERVICE)
  • name spaces mount (ex: /etc/secrets is not visible by the service)

Nice quick tips that can be easily implemented!

The next talk was about Landlock by Michael Salaün. The idea is to build a sandbox with unprivileged access rights and to run your application in this restricted space. The perfect example that was used by Michael is a multi-media player. This kind of application includes many parsers and is, therefore, a good candidate to attacks or bugs. The recommended solution is, as always, to write good (read: safe) code and the sandbox must be seen as an extra security control. Michael explained how the sandbox is working and how to implement it. The example with the media player was to allow it to disable write access to the filesystem except if the file is a pipe.

After the lunch, a set of talks was scheduled around the same topic: analysis of code. If started with “Static Analysis and Run-time Assertion checking” by Dillon Pariente, Julien Signoles. The presented Frama-C a framework of C code analysis.

Then Philippe Biondi, Raphaël Rigo, Sarah Zennou, Xavier Mehrenberger presented BinCAT (“Binary Code Analysis Tool”). It can analyse binaries (x86 only) but will never execute code. Just by checking the memory, the register and much other stuff, it can deduce a program behaviour. BinCAT is integrated into IDA. They performed a nice demo of a keygen tool. BinCAT is available here and can also be executed in a Docker container. The last talk in this set was “Désobfuscation binaire: Reconstruction de fonctions virtualisées” by Jonathan Salwan, Marie-Laure Potet, Sébastien Bardin. The principle of the binary protection is to make a binary more difficult to analyse/decode but without changing the original capabilities. This is not the same as a packer. Here there is some kind of virtualization that emulates proprietary bytecode. Those three presentations represented a huge amount of work but were too specific for me.

Then, Geoffroy CoupriePierre Chifflier presented “Writing parsers like it is 2017“. Writing parsers is hard. Just don’t try to write your own parser, you’ll probably fail. But parsers are available in many applications. They are hard to maintain (old code, handwritten, hard to test & refactor). Issues based on parsers can have huge security impacts, just remember the Cloudbleed bleed bug! The proposed solution is to replace classic parsers by something stronger. The criteria’s are: must be memory safe, called by / can call C code and, if possible, no garbage collection process. RUST is a language made to develop parsers like nom. To test it, it has been used in projects like the VLC player and the Suricata IDS. Suricata was a good candidate with many challenges: safety, performance. The candidate protocol was TLS. About VLC and parser, the recent vulnerability affecting the subtitles parser is a perfect example why parsers are critical.

The last talk of the day was about caradoc. Developed by the ANSSI (French agency), it’s a toolbox able to decode PDF files. The goal is not to extract and analyse potentially malicious streams from PDF files. Like the previous talk, the main idea was to avoid parsing issues. After reviewing the basics of the PDF file format, Guillaume Endignoux, Olivier Levillain made two demos. The first one was to open the same PDF file within two readers (Acrobat and Fox-It). The displayed content was not the same. This could be used in phishing campaigns or to defeat the analyst. The second demo was a malicious PDF file that crashed Fox-It but not Adobe (DDoS). Nice tool.

The day ended with a “rump” session (also called lighting talks by other conferences). I’m really happy with the content of the first day. Stay tuned for more details tomorrow! If you want to follow live talks, the streaming is available here.

[The post SSTIC 2017 Wrap-Up Day #1 has been first published on /dev/random]

Xavier Mertens: SSTIC 2017 Wrap-Up Day #2

$
0
0

Here is my wrap-up for the second day. From my point of view, the morning sessions were quite hard with a lot of papers based on hardware research.

Anaïs Gantet started with “CrashOS : recherche de vulnérabilités système dans les hyperviseurs”. The motivations behind this research are multiple: virtualization of computers is everywhere today, not only on servers but also on workstations. The challenge for the hypervisor (the key component of a virtualization system) is to simulate the exact same hardware platform (same behaviour) for the software. It virtualizes access to the memory and devices. But do they do this in the right way? Hypervisors are software and software have bugs. The approach explained by Anaïs is to build a very specific light OS that could perform a bunch of tests, like fuzzing, against hypervisors. The name of this os is logically “CrashOS“. It proposes an API that is used to script test scenarios. Once booted, tests are executed and results are sent to the display but also to the serial port for debugging purposes. Anaïs demonstrated some tests. Up to today, the following hypervisors have been tested: Ramooflax (project developed by Airbus Security), VMware and Xen. Some tests that returned errors:

  • On VMware, a buffer overflow and crash of the VM when writing a big buffer to COM1.
  • On Xen, a “FAR JMP” instruction should generate a “general protection” failure but it’s not the case.

CrashOS is available here. A nice presentation to start the day!

The next presentation went deeper and focused again on the hardware, more precisely, the PCI Express that we find in many computers. The title was “ProTIP: You Should Know What To Expect From Your Peripherals” by Marion Daubignard, Yves-Alexis Perez. Why could it be interesting to keep an eye on our PCIe extensions? Because they all run some software and have usually a direct access to the host computer resources like memory (for performance reasons). What if the firmware of your NIC could contain some malicious code and search for data in the memory? They describe the PCIe standard which can be seen as a network with CPU, memory, a PCI hierarchy (a switch) and a root complex. How to analyse all the flows passing over a PCIe network? The challenge is to detect the possible paths and alternatives. The best language to achieve this is Prolog (a very old language that I did not use since my study) but still alive. The tool is called “ProTIP” for “Prolog Tester for Information Flow in PCIe networks” and is available here. The topic was interesting when you realise what a PCIe extension could do.

Then, we got a presentation from Chaouki Kasmi, José Lopes Esteves, Mathieu Renard, Ryad Benadjila: “From Academia to Real World: a Practical Guide to Hitag-2 RKE System Analysis“. The talk was dedicated to the Hitag-2 protocols used by “Remote Keyless Entry” with our modern cars. Researches in this domain are not brand new. There was already a paper on it presented at Usenix. The talk really focussing on Hitag-2 (crypto) and was difficult to follow for me.

After the lunch break, Clémentine Maurice talked about accessing the host memory from a browser with Javascript: “De bas en haut : attaques sur la microarchitecture depuis un navigateur web“. She started with a deeply detailed review of how the DRAM memory is working and how to read operations make use a “row buffer” (like a cache). The idea is to be able to detect key presses in the URL bar of Firefox. The amount of work is pretty awesome from an educational point of view but I’ve just one question: how to use this in the real world? If you’re interested, Clémentine published all her publications are available here.

The next talk was interesting for people working on the blue team side. Binacle is a tool developed to make a full-text search on binaries. Guillaume Jeanne explained why full-text search is important and how it fails with classic methods to index binary files. The goal is not only to index “strings” like IP addresses, FQDN but also suite of bytes. After testing several solutions, he found a good one which is not too resources consuming. The tool and his features were explained, with the Yara integration (also a feature to generate new signatures). To be tested for sure! Binacle is available here.

The next tool presented by YaCo: “Rétro-Ingénierie Collaborative” by Benoît Amiaux, Frédéric Grelot, Jérémy Bouétard, Martin Tourneboeuf, Valerian Comiti. YaCo means “Yet another collaborative tool”. The idea is to add a “multi-user” layer to the IDA debugger. By default, users have a local DB used by IDA. The idea is to sync those databases via a Ggitlab server. The synchronisation is performed via a Python plugin. They made a cool demo. YaCo is available here.

Sibyl was the last tool presented today by Camille Mougey. Sibyl helps to identify libraries used in the malicious code. Based on Miasm2, it identifies functions and their side effect. More information is available on the Github repository.

The next talk was about the Android platform: “Breaking Samsung Galaxy Secure Boot through Download mode” presented by Frédéric Basse. He explained the attacks that can be launched against the bootloader of a Samsung Galaxy smartphone via a bug.

Finally, a non-technical talk presented by Martin Untersinger: “Oups, votreélection a été piratée… (Ou pas)”. Martin is a journalist working for the French newspaper “Le Monde”. He already spoke at SSTIC two years ago and came back today to give his view of the “buzz” around the hacking of the election processes around the world. Indeed, today when elections are organised, there are often rumours that this democratic process has been altered due to state-sponsored hackers. It started in the US and also reached France with the Macronleak. A first fact reported by Martin is that information security goes today way beyond the “techies”… Today all the citizens are aware that bad things may happen. It’s not only a technical issue but also a geopolitical issue. Therefore, it is very interesting for journalists. Authorities do not always disclose information about the attribution of the attack because it can be wrong and alter the democratic process of elections. Today documents are published but the attribution remains a political decision. It touchy and may lead to diplomatic issues. Journalists are also facing challenges:

  • Publish leaked docs or not?
  • Are they real or fake?
  • Ignore the information or maybe participle to the disinformation campaign?

But it is clear that good a communication is a key element.

The day closed with the second rump sessions with a lot of submissions (21!). Amongst them, some funny ideas like using machine learning to generate automatic submissions of paper to the SSTIC call for paper, an awesome analysis of the LinkedIn leaked passwords, connected cars, etc… Everybody moved to the city centre to attend the social event with nice food, drinks and lot of interesting conversations.

Today, a lot of tools were presented. The balance between the two types of presentation is interesting. Indeed, if pure security research is interesting, sometimes it is very difficult to use it in the real context of an information system. However, presented tools were quick talks with facts and solutions that can be easily implemented.

[The post SSTIC 2017 Wrap-Up Day #2 has been first published on /dev/random]

Xavier Mertens: SSTIC 2017 Wrap-Up Day #3

$
0
0

Here is my wrap-up for the last day. Hopefully, after the yesterday’s social event, the organisers had the good idea to start later… The first set of talks was dedicated to presentation tools.

The first slot was assigned to Florian Maury, Sébastien Mainand: “Réutilisez vos scripts d’audit avec PacketWeaver”. When you are performed audit, the same tasks are already performed. And, as we are lazy people, Florian & Sébastien’s idea was to automate such tasks. They can be to get a PCAP, to use another tool like arpspoof, to modify packets using Scapy, etc… The chain can quickly become complex. By automating, it’s also more easy to deploy a proof-of-concept or a demonstration. The tool used a Metasploit-alike interface. You select your modules, you execute them but you can also chain them: the output of script1 is used as input of script2. The available modules are classified par ISO layer:

  • app_l7
  • datalink_l2
  • network_l3
  • phy_l1
  • transport_l4

The tool is available here.

The second slot was about “cpu_rec.py”. This tool has been developed to help in the reconnaissance of architectures in binary files. A binary file contains instructions to be executed by a CPU (like ELF or PE files). But not only files. It is also interesting to recognise firmware’s or memory dumps. At the moment, cpu_rec.py recognise 72 types of architectures. The tool is available here.

And we continue with another tool using machine learning. “Le Machine Learning confronté aux contraintes opérationnelles des systèmes de détection” presented by Anaël Bonneton and Antoine Husson. The purpose is to detect intrusions based on machine learning. The classic approach is to work with systems based on signatures (like IDS). Those rules are developed by experts but can quickly become obsolete to detect newer attacks. Can machine learning help? Anaël and Antoine explained the tool that that developed (“SecuML”) but also the process associated with it. Indeed, the tool must be used in a first phase to learning from samples. The principle is to use a “classifier” that takes files in input (PDF, PE, …) and return the conclusions in output (malicious or not malicious). The tool is based on the scikit-learn Python library and is also available here.

Then, Eric Leblond came on stage to talk about… Suricata of course! His talk title was “À la recherche du méchant perdu”. Suricata is a well-known IDS solution that don’t have to be presented. This time, Eric explained a new feature that has been introduced in Suricata 4.0. A new “target” keyword is available in the JSON output. The idea arise while a blue team / read team exercise. The challenge of the blue team was to detect attackers and is was discovered that it’s not so easy. With classic rules, the source of the attack is usually the source of the flow but it’s not always the case. A good example of a web server returned an error 4xx or 5xx. In this case, the attacker is the destination. The goal of the new keyword is to be used to produce better graphs to visualise attacks. This patch must still be approved and merge in the code. It will also required to update the rules.

The next talk was the only one in English: “Deploying TLS 1.3: the great, the good and the bad: Improving the encrypted web, one round-trip at a time” by Filippo Valsorda & Nick Sullivan. After a brief review of the TLS 1.2 protocol, the new version was reviewed. You must know that, if TLS 1.0, 1.1 and 1.2 were very close to each others, TLS 1.3 is a big jump!. Many changes in the implementation were reviewed. If you’re interested here is a link to the specifications of the new protocol.

After a talk about crypto, we switched immediately to another domain which also uses a lot of abbreviations: telecommunications. The presentation was performed by  Olivier Le Moal, Patrick Ventuzelo, Thomas Coudray and was called “Subscribers remote geolocation and tracking using 4G VoLTE enabled Android phone”. VoLTE means “Voice over LTE” and is based on VoIP protocols like SIP. This protocols is already implemented by many operators around the world and, if your mobile phone is compatible, allows you to perform better calls. But the speakers found also some nasty stuff. They explained how VoLTE is working but also how it can leak the position (geolocalization) of your contact just by sending a SIP “INVITE” request.

To complete the first half-day, a funny presentation was made about drones. For many companies, drones are seen as evil stuff and must be prohibited to fly over some  places. The goal of the presented tool is just to prevent drones to fly over a specific place and (maybe) spy. There are already solutions for this: DroneWatch, eagles, DroneDefender or SkyJack. What’s new with DroneJack? It focuses on drones communicating via Wi-Fi (like the Parrot models). Basically, a drone is a flying access point. It is possible to detected them based on their SSID’s and MAC addresses using a simple airodump-ng. Based on the signal is it also possible to estimate how far the drone is flying. As the technologies are based on Wi-Fi there is nothing brand new. If you are interested, the research is available here.

When you had a lunch, what do you do usually? You brush your teeth. Normally, it’s not dangerous but if your toothbrush is connected, it can be worse! Axelle Apvrille presented her research about a connected toothbrush provided by an health insurance company in the USA. The device is connected to a smart phone using a BTLE connection and exchange a lot of data. Of course, without any authentication or any other security control. The toothbrush even continues to expose his MAC address via bluetooth all the tile (you have to remove the battery to turn it off). Axelle did not attached the device itself with reverse the mobile application and the protocol used to communicate between the phone and the brush. She wrote a small tool to communicate with the brush. But she also write an application to simulate a rogue device and communicate with the mobile phone. The next step was of course to analyse the communication between the mobile app and the cloud provided by the health insurance. She found many vulnerabilities to lead to the download of private data (up to picture of kids!). When she reported the vulnerability, her account was just closed by the company! Big fail! If you pay your insurance less by washing your teeth correctly, it’s possible to send fake data to get a nice discount. Excellent presentation from Axelle…

To close the event, the ANSSI came on stage to present a post-incident review of the major security breach that affected the French TV channel TV5 in 2015. Just to remember you, the channel was completely compromised up to affecting the broadcast of programs for several days. The presentation was excellent for everybody interested in forensic investigation and incident handling. In a first part, the timeline of all events that lead to the full-compromise were reviewed. To resume, the overall security level of TV5 was very poor and nothing fancy was used to attack them: contractor’s credentials used, lack of segmentation, default credentials used, expose RDP server on the Internet etc. An interesting fact was the deletion of firmwares on switches and routers that prevented them to reboot properly causing a major DoS. They also deleted VM’s. The second part of the presentation was used to explain all the weaknesses and how to improve / fix them. It was an awesome presentation!

My first edition of SSTIC is now over but I hope not the last one!

[The post SSTIC 2017 Wrap-Up Day #3 has been first published on /dev/random]


Frank Goossens: See you at WordCamp EU next week?

Ruben Vermeersch: CoreOS Fest 2017

$
0
0

CoreOS Fest 2017 happened earlier this month in San Francisco. I had the joy of attending this conference. With a vendor-organized conference there’s always the risk of it being mostly a thinly-veiled marketing excercise, but this didn’t prove to be the case: there was a good community and open-source vibe to it, probably because CoreOS itself is for the most part an open-source company.

Not bad for a view

Also fun was encountering a few old-time GNOME developers such as Matthew Garrett (now at Google) and Chris Kühl (who now runs kinvolk). It’s remarkable how good of a talent incubator the GNOME project is. Look at any reasonably successful project and chances are high you’ll find some (ex-)GNOME people.

Main room

I also had the pleasure of presenting the experiences and lessons learned related to introducing Kubernetes at Ticketmatic. Annotated slides and a video of the talk can be found here.

Making your company cloud‑native: the Ticketmatic story


Comments | More on rocketeer.be | @rubenv on Twitter

Jan De Dobbeleer: DocOps Part I - No time to rest

$
0
0

Recently, I got the chance to assist a team of frontend and back-end developers to do a bit of open heart surgery. The scope of the project is as follows, migrate a BBOM monolith towards a new BSS system but keep the frontend part, and convert another web frontend and one mobile app to the same BSS system. To facilitate this, and because it’s common sense, the decision was made to create our own REST API in between. But, we were faced with an issue. Time is limited and we wanted to start creating everything at once. Without a working API implementation and the need for a defined interface, we decided to look for a tool to assist us in this process.

Gotta have swag

We began to create our API using API Blueprint in Apiary, but that soon turned out to be quite annoying because of a few reasons. One, everything exists within the same file. This implies the file grows quite large once you start adding endpoints, examples and responses. Secondly, there’s no nice way to start working on this as a team, unless you get a Standard Plan. We could debate about whether or not migrating to another plan would have solved our problem, but let’s be honest, I’d rather invest in the team than spend it on unnecessary tooling.

I began a venture to migrate this to another tool, and eventually ended up playing with Swagger. First off, Swagger also supports yaml, which is a great way to describe these things. Secondly, the ecosystem is a bit more mature which allows us to do things API Blueprint does not provide, such as split the specification into smaller parts. I found this great blog post by Mohsen Azimi which explains exactly this, and following his example, I added a compile.js file that collects the .yaml references and combines those into one big swagger.json file.

The advantages are interesting as we can now split the Swagger specification into folders for context and work on different parts without creating needless overhead all the time, like merge conflicts for example. To make sure we know the changes comply with the Swagger definition, I added a check after compiling swagger.json using swagger-parser to validate the output. Combined with a docker container to do the compilation and validation, we’ve got ourself a nice way to proceed with certainty. Adding this to a CI is peanuts, as we can use the same docker image to run all the necessary checks. The project is currently being built using Travis, you can find a sample .travis.yml file in the repository.

The setup of the project is as follows. The explanation of the components is listed inline, be aware I only listed the parts which need an explanation. Refer to the repository for a complete overview.

.
├── definitions // the data model used by the API
|   ├── model.yaml // model definition
|   └── index.yaml // list of model definitions
├── examples // sample json output
|   ├── sample.json
|   └── second_sample.json
├── parameters
|   ├── index.yaml // header and query string parameters
├── paths
|   ├── path.yaml // path definition
|   └── index.yaml / list of path definitions
├── swagger-ui // folder containing custom Swagger-UI
├── gulpfile.js // build and development logic
├── makefile // quick access to commands
└── swagger.yaml // swagger spec base file

While this sample contains model, path and parameter definitions in the root of each sub folder, nothing stops you from creating more folders to structure the definitions inside. As the compile function in gulpfile.js (previously compile.js) takes care of stitching the YAML files into one JSON spec, it can be as flexible as you want. The makefile contains a few handy commands so everyone can use the project without the need for specific setup or docker knowledge.

To change the spec you can use any editor of choice, I have Visual Studio Code setup together with the Swagger Viewer plugin. This way I can work on the spec and have it preview in a tab next to me. In case I need to validate the changes, I can also use the pre-configured validate task to quickly get feedback in my editor console. The tasks are added to the project to get you started using Visual Studio Code. If you do, make sure to also add a key binding to spawn the tasks. Open keybindings.json and enter the following (change the key combo if needed).

{"key":"ctrl+shift+r","command":"workbench.action.tasks.runTask"}

On top of that, one of my colleagues, Joery Hendrickx, extended the setup by creating a watch function inside the gulpfile.js file that automatically reloads changes in Swagger-UI while you adjust files. This way, there’s no need for a specific setup and you can use any editor you like. As an extra bonus, it will also display the errors on top of the page.

To run the swagger specification, use the make swagger command or the swagger task in Visual Studio Code. By default, Swagger UI will be available at localhost:3000, unless you specify another port using the SWAGGER_PORT environment variable. To enable the watch function, make use of the make watch command or watch task in Visual Studio Code.

Are you mocking me?

This leaves us with one open item. How do we create a mock service using our Swagger specification? As it turns out, there’s a very useful tool out there called Prism that does just that. Part of the Stoplight tool set, their CLI tool allows you to create a mock server by simply using a Swagger spec. This provides you with all you need to design, test and move fast.

The docker image has been extended to also pull in the latest version of Prism and add it to our path. You can run the mock server through the make mock command or the mock task in Visual Studio Code. By default, the mock server will run on localhost:8010, unless you specify another port using the PRISM_PORT environment variable.

Starting the mock server prints the available endpoints. You now have the ability to start developing and use the mocked API, or validate your work via Postman, curl or any http request tool of choice. Using this repository, the curl following command will output a mocked result.

curl -X GET http://localhost:8010/v1/ping -H 'authorization: Basic trololol'

If for any reason you need to debug inside the container, you can use the make interactive command. This will open a shell inside the container for you to mess around in. I never needed it until now, but it’s there. Just in case.

The setup we have at work currently uses Jenkins to validate the spec which is deployed to Heroku every time the build on master succeeds (which is, well, every time). This way we have a single place of truth when it comes to our Swagger specification and accompanying mock service for developers or partners to play with. We can prototype fast while collecting feedback, or change current implementations fast and knowing the impact. Our production API is tested against the Swagger specification, which is integrated in that repository as a submodule to decouple designing and implementation. To get a more behavioral representation of a real API, we created middleware in Python which can keep track of the data you send and respond accordingly for certain processes. Changes to this part are also validated against the specification in order to reduce the chance of creating errors.

Feel free to mess around, ask questions or even create issues and pull requests on GitHub and let me know what you think. And stay tuned for Part II which covers technical documentation!

Source code

Xavier Mertens: [SANS ISC] Systemd Could Fallback to Google DNS?

$
0
0

I published the following diary on isc.sans.org: “Systemd Could Fallback to Google DNS?“.

Google is everywhere and provides free services to everyone. Amongst the huge list of services publicly available, there are the Google DNS, well known as 8.8.8.8, 8.8.4.4 (IPv4) and 2001:4860:4860::8888, 2001:4860:4860::8844 (IPv6)… [Read more]

 

[The post [SANS ISC] Systemd Could Fallback to Google DNS? has been first published on /dev/random]

Lionel Dricot: Les 4 manières de dépenser de l’argent

$
0
0

Pourquoi les abus financiers des politiciens sont inévitables dans une démocratie représentative

À chaque fois que quelqu’un se décide à creuser les dépenses du monde politique, des scandales éclatent. La conclusion facile est que les politiciens sont tous pourris, qu’il faut voter pour ceux qui ne le sont pas. Ou qui promettent de ne pas l’être.

Pourtant, depuis que la démocratie représentative existe, cela n’a jamais fonctionné. Et si c’était le système lui-même qui rendait impossible une gestion saine de l’argent public ?

Selon Milton Friedman, il n’y a que 4 façons de dépenser de l’argent : dépenser son argent pour soi, son argent pour les autres, l’argent des autres pour soi, l’argent des autres pour les autres.

Son argent pour soi

Lorsqu’on dépense l’argent qu’on a gagné, on optimise toujours le rendement pour obtenir le plus possible en dépensant le moins possible. Vous réfléchissez à deux fois avant de faire de grosses dépenses, vous comparez les offres, vous planifiez, vous calculez l’amortissement même de manière intuitive.

Si vous dépensez de l’argent inutilement, vous vous en voudrez, vous vous sentirez soit coupable de négligence, soit floué par d’autres.

Son argent pour les autres

Si l’intention de dépenser pour d’autres est toujours bonne, vous ne prêterez généralement pas toujours attention à la valeur que les autres recevront. Vous fixez généralement le budget qui vous semble socialement acceptable pour ne pas paraître pour un radin et vous dépensez ce budget de manière assez arbitraire.

Il y’a de grandes chances que votre cadeau ne plaise pas autant qu’il vous a couté, qu’il ne réponde pas à un besoin important ou immédiat voire, même, qu’il finisse directement à la poubelle.

Économiquement, les cadeaux et les surprises sont rarement une bonne idée. Néanmoins, comme vous tentez généralement de ne pas dépasser un budget donné, les dommages économiques sont faibles. Et, parfois, un cadeau fait extrêmement plaisir. Idée : offrez un ForeverGift !

L’argent d’autrui pour soi

Lorsqu’on peut dépenser sans compter, par exemple lorsque votre entreprise couvre tous vos frais de voyages ou que vous avez une carte essence, l’optimisation économique devient catastrophique.

En fait, ce cas de figure relève même généralement de l’anti-optimisation. Vous allez sans remords choisir un vol qui vous permet de dormir une heure plus tard même s’il est plus cher de plusieurs centaines d’euros que le vol matinal. Dans les cas extrêmes, vous allez tenter de dépenser le plus possible, même inutilement, pour avoir l’impression d’obtenir plus que votre salaire nominal.

Cette anti-optimisation peut être compensée par plusieurs facteurs : un sentiment de devoir moral vis-à-vis de l’entreprise, surtout dans les petites structures, ou une surveillance des notes de frais voire un plafond.

Le plafond peut cependant avoir un effet inverse. Si un employé bénéficie d’une carte essence avec une limite, par exemple de 2000 litres par an, il va avoir tendance à rouler plus ou à partir en vacances avec la voiture pour utiliser les 2000 litres auxquels il estime avoir droit.

C’est la raison pour laquelle cette situation économique est très rare et devrait être évitée à tout pris.

L’argent d’autrui pour les autres

Par définition, les instances politiques sont dans ce dernier cas de figures. Les politiciens sont en effet à la tête d’une énorme manne d’argent récoltée de diverses manières chez les citoyens. Et ils doivent décider comment les dépenser. Voir comment augmenter encore plus la manne, par exemple avec de nouveaux impôts.

Comme je l’ai expliqué dans un précédent billet, gagner de l’argent est l’objectif par défaut de tout être humain dans notre société.

Les politiciens vont donc tout naturellement tenter de bénéficier par tous les moyens possibles de la manne d’argent dont ils sont responsables. Chez les plus honnêtes, cela se fera inconsciemment mais cela se fera quand même, de manière indirecte. Pour les plus discrets, le politicien pourra par exemple accorder des marchés publics sans recevoir aucun bénéfice immédiat mais en se créant un réseau de relation lui permettant de siéger par après dans de juteux conseils d’administration. Pour les plus cyniques, de véritables systèmes seront mis en place, ce que j’appelle des boucles d’évaporation, permettant de transférer, le plus souvent légalement, l’argent public vers les poches privées.

Tout cela étant complètement opaque et noyé dans la bureaucratie, il est généralement impossible pour le citoyen de faire le lien entre l’euro qu’il a payé en impôt et l’euro versé de manière scandaleuse à certains politiciens. Surtout que la notion de “scandaleux” est subjective. À partir de quand un salaire devient-il scandaleux ? À partir de combien d’administrateurs une intercommunale devient-elle une machine à payer les amis et à évaporer l’argent public ? À partir de quel degré de connaissance un politicien ne peut-il plus engager sa famille et ses amis ou les faire bénéficier d’un contrat public ?

Les politiciens sont nos employés à qui nous fournissons une carte de crédit illimitée, sans aucun contrôle et avec le pouvoir d’émettre de nouvelles cartes pour leurs amis.

Que faire ?

Il ne faut donc pas s’empresser de voter pour ceux qui se promettent moins pourris que les autres. S’ils ne le sont pas encore, cela ne devrait tarder. Le pouvoir corrompt. Fréquenter des riches et d’autres politiciens qui font tous la même chose n’aide pas à garder la tête froide. Ces comportements deviennent la norme et les limites fixées par la loi ne sont, tout comme la carte essence sus-citée, plus des limites mais des dûs auxquels ils estiment avoir légitimement le droit. En cas de scandale, ils ne comprendront même pas ce qu’on leur reproche en se réfugiant derrière le « C’est légal ». Ce que nous pensons être une corruption du système n’en est en fait que son aboutissement mécanique le plus logique !

La première étape d’une solution consiste par exiger la transparence totale des dépenses publiques. Le citoyen devrait être en mesure de suivre les flux financiers de chaque centime public jusqu’au moment où il arrive dans une poche privée. L’argent public versé à chaque mandataire devrait être public. S’engager en politique se ferait avec la connaissance qu’une partie de notre vie privée devient transparente et que toutes les rémunérations seront désormais publiques, sans aucune concession.

Cela demande beaucoup d’effort de simplification mais, avec un peu de volonté, c’est aujourd’hui tout à fait possible. Les budgets secrets devraient être dûment budgétisé et justifié afin que le public puisse au moins suivre leur évolution au cours du temps.

Curieusement, cela n’est sur le programme d’aucun politicien…

 

Billet rédigé en collaboration avec Mathieu Jamar. Photo par feedee P.

Vous avez aimé votre lecture ? Soutenez l’auteur sur Tipeee, Patreon, Paypal ou Liberapay. Même un don symbolique fait toute la différence ! Retrouvons-nous ensuite sur Facebook, Medium, Twitter ou Mastodon.

Ce texte est publié sous la licence CC-By BE.

Viewing all 4959 articles
Browse latest View live