Die wunderbare Welt von Isotopp

Never check for an error condition you don't know how to handle

Avatar of @isotopp@infosec.exchange Kristian Köhntopp - January 10, 2022

This is the english version of an older text in German

Computer scientists are weird. In their science there are a few rules that sound wrong when you hear them first, but make a lot of sense if you think about them. Some of them are making sense even outside of computer science.

One of those rules is

Never check for an error condition you don’t know how to handle.

When you encounter this the first time that sounds very questionable. There are known error conditions in my program that I know they can happen, and I should not check for them?

... and a happy new hack.

Avatar of @isotopp@infosec.exchange Kristian Köhntopp - January 1, 2022

Und das neue Jahr beginnt für uns mit einem Minecraft-Server, auf dem wichtige Personen, die sich nichts haben zuschulden kommen lassen, plötzlich gebannt sind.

Nach einem Unban an der Console: Der Spawn, der Eintrittspunkt für neue Spieler, ist komplett verwüstet.

Wir haben tägliche Backups, sodass das schnell behoben ist. Bleibt die Frage, was passiert ist.

Gehackt

Unter den Spielern ist die Frage schnell geklärt: “<user> wurde gehackt.”

Dein Kind will Minecraft spielen

Avatar of @isotopp@infosec.exchange Kristian Köhntopp - December 20, 2021

Nachdem mich jetzt das dritte Paar computer-affiner Eltern mal gefragt hat, was man denn braucht, sobald der Nachwuchs sich “Minecraft” wünscht, hier der Aufschrieb zum Thema.

Minecraft ist ursprünglich von der schwedischen Firma Mojang in Java entwickelt worden. Der Eigner, Markus “Notch” Persson, hat das Spiel und die Firma Mitte 2014 auf Twitter zum Verkauf angeboten, und Microsoft hat die Firma gekauft.

Spiel zu verkaufen - Minecraft ist auf Twitter angeboten worden. Jeder mit dem notwendigen Kleingeld – 2.5 Milliarden USD – konnte zuschlagen.

Es funktioniert wie spezifiziert

Avatar of @isotopp@infosec.exchange Kristian Köhntopp - December 14, 2021

Dieser Artikel basiert auf einem Twitter-Thread und ist in deutscher Sprache als Heise Kommentar erschienen.

Über den Java-Slogan “Write Once, Run Everywhere” wurden schon viele Witze gemacht. Den log4j-Exploit behandeln viele nun wie einen Bug – das ist er nicht.

Eine kritische Lücke in der Java-Bibliothek Log4j beherrscht gerade die Schlagzeilen. Die IT-Welt ruft “Warnstufe Rot” aus – weil offenbar der log4j-Code JNDI-Variablenexpansion vornehmen kann. Doch was ist JNDI? Jindi al Dap ist der Name eines alten arabischen Philosophen und Mathematik-Pioniers, der für Sun/Oracle gearbeitet hat, um ein System von Directory Lookups in Java zu entwickeln. Dieses System lädt irgendwie Code aus dem Internet nach. Aber selbst, wenn man länger auf das Systemdiagramm starrt, erkennt man nicht unbedingt sofort, an welcher Stelle sich der Java CLASSPATH so erweitert, dass er das gesamte Internet umfasst:

Discord Nitro Spam and 2FA

Avatar of @isotopp@infosec.exchange Kristian Köhntopp - November 30, 2021

This morning the Discord account of my son started to send “free nitro” spam to his friends on the friend list, and to some Discords he was a member of. He had 2FA (Google Authenticator) on the account. That fact alone made this a recoverable failure.

My son is playing minecraft, has a friend list of around 100 fellow players, and is member of around 40 Discords. He also connected his Discord to Spotify, YouTube and other services, and he authorized around 12 application services, mostly Discord/Minecraft bot services. It is pretty safe to say that his Discord account is very valuable to him, and plays a central part in his pandemic coping.

MySQL: Moving Average

Avatar of @isotopp@infosec.exchange Kristian Köhntopp - November 24, 2021

MySQL window functions can be used to calculate daily averages or moving averages for a 24h time window relatively easily. In an earlier article basic window functions were already discussed. In this article, we want to see how we can get daily buckets and moving averages.

A sample program is available, as usual, on GitHub .

Getting sample data

We will be working with a data table named data, with three columns: a sensor id, a measurement datetime d and a metric value m that was sampled at that time. The table definition looks like this:

Arista Type 7 Passwords

Avatar of @isotopp@infosec.exchange Kristian Köhntopp - November 22, 2021

A friend of mine wanted to provision BGP passwords for their Arista switch configuration.

So a config stanza such as

router bgp 65001
   router-id 10.1.1.1
   neighbor mydevices peer-group
   neighbor mydevices password 7 8kjYaye5DsQh0epELyKNe0oZ3E3zp39X

requires generation of the Password (actually “supersecretpassword”) in an encrypted form.

Arista switches can do this using CLI tools, apparently. They seem to have an onboard Linux, which seems to provide limited tooling, but is good enough to run a 32-bit Python 3.7. Arista provides modules to help with handling their configuration. Ryan Gelobter documented these in an article on Medium.

A01:2021 - Broken Access Control

Avatar of @isotopp@infosec.exchange Kristian Köhntopp - November 16, 2021

Dieser Artikel wurde von Lenz Grimmer auch ins Englische übersetzt.

In einem Twitter-Thread von Christian Basl ging es um die von zerforschte App “Learnu” . Basl schreibt:

Die Betreiber von Learnu sagen, sie hätten keine Fachkenntnisse in IT-Sicherheit und hätten sich auf externe Berater verlassen. So kam Learnu unbekannterweise unsicher auf den Markt.

In der sich entwickelnden Diskussion vertrat Andreas Dewes den Standpunkt

Die meisten Start-ups die ich kenne gehen durch eine Phase, in der IT-Sicherheit und Compliance eher im Hintergrund stehen. Wenn sie größer werden fangen sie an sich darüber Gedanken zu machen u.a. weil Kunden oder Partner Zertifizierungen verlangen, z.B. SOC 2 oder ISO-27001.

A01:2021 - Broken Access Control (en)

Avatar of @isotopp@infosec.exchange Kristian Köhntopp - November 16, 2021

Translation by Lenz Grimmer, German version here .

A twitter thread by Christian Basl discussed the dissection of the “Learnu” app . Basl wrote:

Learnu operators say they have no expertise in IT security and have relied on outside consultants. As a result, Learnu came to market insecurely, unbeknownst to them.

In the discussion that developed, Andreas Dewes took the view that

Most startups I know go through a phase where IT security and compliance tend to take a back seat. As they get bigger, they start to think about it, partly because customers or partners demand certifications, e.g. SOC 2 or ISO-27001.

Die kommende Kündigungswelle

Avatar of @isotopp@infosec.exchange Kristian Köhntopp - November 12, 2021

Ein guter Freund sinnierte gestern mit anderen Freunden von mir über die Situation auf der Arbeit und schrieb mir heute:

Wie man es auch dreht und wendet: Corona ist auch ein Lackmustest für Unternehmen in ihrer Rolle als Arbeitgeber. Anhand der vierten Welle lässt sich das hervorragend nachvollziehen.

Denn Unternehmen und Organisationen, denen am Wohl ihrer Mitarbeiter/-innen etwas liegt, haben schon vor Wochen überall dort, wo es möglich ist, ihre Leute kategorisch wieder ins Homeoffice geschickt und Präsenzveranstaltungen untersagt. Das hat selten etwas damit zu tun, dass diese Unternehmen herausragend schlau wären. Viel mehr schauen diese Unternehmen sich ausgehend vom Wunsch, die eigenen Leute nicht zu gefährden, ihr Corona-Handling dort ab, wo es funktioniert.