Entangled ways of product development in the area of cybersecurity #3 - LogMan.io

🇨🇿 Česká verze je níže / Scroll down for Czech version.

The calm before the storm and a new force

At that time I lived in Prague for a short time, which is not a very friendly place to live, but it allowed me to go to the office almost every day. A bigger surprise awaited Vlaďka and Aleš when I told them that I was going to move to a house almost eighty kilometres from the office and that I would need to be mainly at the home office. "I'd be quite interested to know," said Aleš, "how you plan to lead the team and not be here." He looked seriously. "I think," I replied, "I can do it." It's just the way I have it planned, and it's up to you if you want me to continue working for you anyway." At that moment, Ales smiled. "A remote team is one idea," he said, "that I've always wanted to try." That was actually the second big demonstration of confidence, the first coming right at the beginning when I was hired as a student only part-time. We were all a little apprehensive about remote collaboration, but none of us knew what was about to happen in less than a year.

In the late summer of 2019 I managed to recruit two great people, Franta and Kuba. Although Kuba was a molecular biologist by background, he already had quite a bit of experience in data analysis. "I understand that you're hiring juniors," he told me at the interview, "I'm all about the people, the job, and being able to go on vacation during the year." For a moment I didn't understand. Kuba started laughing. "I don't care about money so much," he said, "because I don't have to deal with housing." Yeah, rents and mortgages are terrible things, I thought. Actually, Frant's reasons were also housing-related. "I live next door," he announced cheerfully.

The next six months represented the calm before the storm, but a storm that was pleasant in its own way and filled with interesting work and technology. I guess developing LogMan all over again was initially Vlaďka's idea. So, in early 2020, we had a meeting with our partners, to whom we presented BitSwan and the current state of LogMan.io. "It will be just another pump," Ales told me, "don't worry about it." However, our partners were not enthusiastic about analyzers written in Python. They needed something simpler, something configurable, in which they could write parsers and analyzers. They needed a declarative language.

Ales seemed a little bored at first, but when he realized the new direction LogMan.io was taking, his technological heart cheered. Of course, before that came a new type of coronavirus, and with it, work-from-home for everyone. Some colleagues couldn't handle it. On the other hand, the plum team got a new boost in the form of Kuba, who became its leader along with me. Kuba showed talent in deploying and configuring our programs as well as in interpersonal communication. While he took over from me the role of recruiting new team members (a role I first took over from Mila) and mentoring newcomers, I was more in control of the team's heartbeat, GIT commits, standups, and planning days. Franta then gradually set up his own team in indigo colors to specialize in the frontend and our library written in React.

LogMan.io, real-time cybersecurity and artificial intelligence

Ales was a bit suspicious of us at first, because Plum and Indigo, Plum and Indigo, are not exactly typical team names, and the former had practically two leaders. But the agile approach is not about processes, it's about people and communication, which we managed to manage despite the coronavirus situation, showing the power of this approach. The first outline of declarative language emerged quite quickly. Ales wrote the basis, which I expanded further. Together, we actually wrote all the basic parts of the new LogMan.io, including the collector, parser, correlator (parser), watcher (dynamic list management) and other components. Others then gave me the nickname Premoctopus, probably because I was at the birth of ASAB, BSPump and the individual LogMan.io microservices built on top of them. In short, I had tentacles everywhere.

In the early fall of 2021, Margarita left our company, which I was very sad to see happen. The direction of the company had changed a bit, so it was a logical move from her perspective. We started to convert our declarative language from Python to C and LLVM (optimized directly into machine language) at that time, because we wanted to be as optimal as possible and process up to hundreds of thousands of events, hundreds of thousands of logs in just one second. We also started using Cython a lot, which is used to combine and compile python and C code in symbiosis with each other.

We also got more into correlator and cyber threat detection, real-time anomalies, which I wrote about a year ago to try out in BitSwan. The correlator falls under the concept of artificial intelligence, so you can see for yourself that these are not super-smart killer robots - that's just a marketing ploy by some other companies, by the way. Of course, we have continued and are continuing to deploy LogMan.io and investigate possible data sources including logs from various firewalls, Windows, the cloud and so on.

The coronavirus pandemic has changed many people's priorities. After the completion of the electronic sales record project and the stabilization of LogMan.io, Mila left our company. I may not look it, but I'm a sensitive person inside. A lot of people left our company, but others gradually came in. Before Mila's departure, the green team members split between the plum and indigo teams, whereupon the green team disappeared. However, a new team was formed, focused purely on cybersecurity, writing declarations for correlators and for web dashboards.

At the November 2021 meeting, Ales presented the next vision for TeskaLabs and thanked us for the work done on LogMan.io, the next generation of SeaCat, C-Roads, the web environment, and individual deployments. He also mentioned our research on STIX, microservices in Go, and especially our rapidly evolving declarative language. "Basically, what we've been doing for a while now in our declarative language, SP-Lang," Ales said cheerfully, "right now someone is presenting in Silicon Valley and getting millions of dollars of investment to do it." He paused for a moment. "Maybe one of us should go there one day," he added.

Other parts of this series can be found here.

🇨🇿 Spletité cesty produktového vývoje v oblasti kybernetické bezpečnosti

Ticho před bouří a nová síla

V té době jsem na krátkou dobu bydlel v Praze, což sice není dvakrát přívětivé místo pro život, ale umožnilo mi chodit do kanceláře prakticky denně. O to větší překvapení pak čekalo na Vlaďku a Aleše, když jsem jim oznámil, že se chystám přestěhovat do domu skoro osmdesát kilometrů od kanceláře a že budu potřebovat být hlavně na home office. „Docela by mě zajímalo,“ řekl Aleš, „jak chceš vést tým a nebýt tady.“ Tvářil se vážně. „Myslím,“ odpověděl jsem, „že to zvládnu.“ Mám to zkrátka tak naplánované a záleží na vás, jestli chcete, abych pro vás dále pracoval i tak.“ V tu chvíli se Aleš usmál. „Vzdálený tým je jedna z možností,“ řekl, „kterou jsem vždycky chtěl zkusit.“ To byl vlastně druhý velký projev důvěry, první nastal hned na začátku, kdy mě nabrali jako studenta jen na částečný úvazek. Všichni jsme se trochu obávali vzdálené spolupráce, nikdo z nás však netušil, co se mělo odehrát za ani ne rok.

Koncem léta roku 2019 se mi povedlo nabrat dva skvělé lidi, Frantu a Kubu. Kuba byl sice původem molekulární biolog, ale měl už celkem bohaté zkušenosti s datovou analýzou. „Chápu, že nabíráte juniory,“ řekl mi na pohovoru, „mně jde hlavně o lidi, o práci a o to, abych mohl vyrážet na dovolenou i během roku.“ Chvíli jsem nechápal. Kuba se začal smát. „Mně o peníze zase tolik nejde,“ dodal, „nemusím totiž řešit bydlení.“ No jo, nájmy a hypotéky jsou strašné věci, pomyslel jsem si. Frantovy důvody byly vlastně také bydlícího rázu. „Já bydlím hned vedle,“ oznámil mi vesele.

Následující půlrok představoval ticho před bouří, ale bouří svým způsobem příjemnou a naplněnou zajímavou prací a technologiemi. Předpokládám, že znovu rozvíjet LogMana byl zpočátku nápad Vlaďky. Začátkem roku 2020 jsme se tak sešli s partnery, kterým jsme představili BitSwan a současný stav LogMan.io. „Bude to jen další pumpa,“ řekl mi Aleš, „neboj se toho.“ Ovšem naši partneři z analyzérů napsaných v Pythonu nadšení nebyli. Potřebovali něco jednoduššího, něco konfigurovatelného, v čem by mohli parsovací procesory a analyzéry psát. Potřebovali deklarativní jazyk.

Aleš mi přišel prvně trochu znuděný, když si ale uvědomil, jakým novým směrem se LogMan.io vydává, jeho technologické srdce zajásalo. Ovšem ještě předtím přišel nový typ koronaviru a s ním i práce z domova pro všechny. Někteří kolegové to nezvládli. Naopak švestkový tým dostal novou vzpruhu v podobě Kuby, který se stal spolu se mnou jeho vůdcem. Kuba projevil talent v nasazování a konfiguraci našich programů stejně jako v mezilidské komunikaci. Zatímco on po mně převzal roli nabírání nových členů týmu (tuto roli jsem já prvně převzal od Míly) a zaučování nováčků, já jsem spíš kontroloval srdeční tep týmu, commity v GITu, standupy a plánovací dny. Franta pak postupně založil svůj vlastní tým v barvě indiga, který se měl specializovat na frontend a naši knihovnu napsanou v Reactu.

LogMan.io, kybernetická bezpečnost a umělá inteligence v reálném čase

Aleš se k nám zprvu stavěl trochu podezřívavě, protože Plum a Indigo, švestkový a indigový, nejsou úplně typické názvy týmů, navíc první měl prakticky dva leadery. Ale agilní přístup není o procesech, ale o lidech a komunikaci, což se nám navzdory koronavirové situaci povedlo zvládnout a ukázat tak sílu tohoto přístupu. První nástřel deklarativního jazyka vznikl celkem rychle. Aleš napsal základ, který jsem dále rozšiřoval. Společně jsme napsali vlastně všechny základní části nového LogMan.io včetně kolektoru, parseru, korelátoru (analyzéru), watcheru (správa dynamických seznamů) a dalších komponent. Ostatní mi pak dali přezdívku Premoctopus, asi díky tomu, že jsem stál u zrodu ASABu, BSPump a jednotlivých mikroslužeb LogMan.io na nich postavených. Zkrátka jsem měl chapadla všude.

Začátkem podzimu roku 2021 naši firmu opustila Margarita, což mě velmi mrzelo. Směřování firmy se trochu pozměnilo, tak to byl z jejího pohledu logický krok. Náš deklarativní jazyk jsme v té době začali převádět z Pythonu do Cčka a LLVM (zoptimalizovaného přímo do strojového jazyka), protože jsme chtěli být co nejoptimálnější a zpracovávat až stovky tisíc událostí, stovky tisíc logů za pouhou vteřinu. Začali jsme také hodně používat Cython, který slouží pro kombinování a kompilaci pythonového a Cčkového kódu ve vzájemné symbióze.

Rovněž jsme se více věnovali korelátoru a detekci kybernetických hrozeb, anomálií v reálném čase, což jsem před asi rokem psal pro vyzkoušení do BitSwanu. Korelátor spadá pod pojem umělé inteligence, takže sami vidíte, že se nejedná o žádné superchytré vraždící roboty – to je ostatně jen marketingový tah některých jiných společností. Samozřejmě jsme pokračovali a pokračujeme v nasazování LogMan.io a zkoumání možných zdrojů dat včetně logů z různých firewallů, Windowsů, cloudu a podobně.

Pandemie koronaviru mnohým lidem změnila priority. Po dokončení projektu elektronické evidence tržeb a stabilizaci LogMan.io naši firmu opustil i Míla. Možná na to nevypadám, ale jsem uvnitř citlivý člověk. Mnoho lidí naši firmu opustilo, ale další postupně přicházeli. Ještě před Mílovým odchodem se členové zeleného týmu rozdělili mezi tým švestkový a indigový, načež zelený tým zanikl. Vzniká ovšem tým nový, zaměřený čistě na kybernetickou bezpečnost, psaní deklarací pro korelátory a pro webové dashboardy.

Na listopadové schůzi roku 2021 nám Aleš představil další vizi TeskaLabs a poděkoval za odvedenou práci na LogMan.io, nové generaci SeaCatu, C-Roads, webovém prostředí a za jednotlivá nasazení. Zmínil také náš výzkum STIXu, mikroslužeb v jazyce Go a hlavně náš rychle se vyvíjející deklarativní jazyk. „V podstatě to, co teď už nějakou dobu děláme v našem deklarativním jazyce SP-Lang,“ řekl Aleš zvesela, „právě teď někdo prezentuje v Silicon Valley a dostává na to milionové investice.“ Na chvíli se odmlčel. „Možná by se tam jednoho dne měl někdo z nás podívat,“ dodal.

Další části této série naleznete zde.

About the Author

Premysl Cerny

Software Developer at TeskaLabs




You Might Be Interested in Reading These Articles

Asynchronous Server App Boilerplate Video Tutorial

Asynchronous Server App Boilerplate (or ASAB for short) is a microservice platform for Python 3.5+ and asyncio. The aim of ASAB is to minimize the amount of code that needs to be written when building a microservice or an aplication server.

Continue reading ...

tutorial development asab

Published on May 01, 2019

Example of using BSPump with CSV files

Let us say we have a CSV file, no, wait, a lot of CSV files that are coming to our storage directory with flashing speed. We even do not have the slightest notion what names of the files are, the only thing we know is that we need to process their data and deliver them to our database as quickly as possible.

Continue reading ...

tutorial development asab

Published on August 19, 2018

Q&A: Mobile App Developers Asked How SeaCat Will Protect Their Apps, Backend, and the Data. Here Are the Answers

We've spent a great deal of time talking to mobile app developers to understand their approach to handling mobile application security. In this Q&A, we put together the answers to the most common questions asked by these app developers.

Continue reading ...

tech

Published on May 07, 2015