December 08 2023, 09:12

Yesterday Lisa shared a systems programming assignment. The course started in September. I recently wrote about a homework assignment where I had to reverse-engineer C code from assembly. What I saw yesterday is another level up. Essentially, it’s a practical task in reverse engineering under Linux.

Look, the assignment is a Linux-compiled executable file with all optimizations enabled. The file can only be run on a server, which is accessible via SSH. To make it interesting, it’s sort of a bomb, and you need to defuse it—supply a specific set of input data that will lead to victory messages, not an “explosion.” Figuring out which data to input requires analyzing the logic of the “black box.” Guessing won’t help; you need to take objdump disassembler in hand and go forward. Each run of the program reports the results back to the server. Every failed attempt deducts points. There are seven phases. You must “defuse” from the simplest to the most complex. If you falter at phase X, moving forward is pointless. There are also various secret levels which the program reports to the server, and nothing is known about them except that they exist somewhere.

The logic at phases five and six is quite complex. I mean, it’s complex everywhere, but especially at phase five and six. First, it has no other purpose but to be complex. For instance, there are recursions and some non-obvious checks and modifications added just “off the top of the head.” Secondly, finding the answer by brute force is either impossible or takes a very long time. Technically, you could, of course, (create a separate class in C, link it to the executable, and call these functions in a loop, cycling through options), but for most tasks there are too many variables to just stumble upon the right answer. Additionally, you must be cautious because you need to figure out if the program reports back to the server during such calls (and deducts points).

Binary Ninja helps a bit, but lies because of the enabled optimizations, and Angr, Ghidra, and similar tools also lie, each in different ways.

Each student receives a personalized assignment with their own functions, apparently generated randomly. So, it seems you cannot simply copy the answer.

In general, Lisa—the architect (of buildings, interiors) is leveling up. I can’t say how useful this will be to an architect, but kudos to the computer science department at university—they’ve done well.

Today she has an exam in this subject. Good luck!

December 08 2023, 08:46

Facebook is advertising me a department in Malaysia where the designer went overboard. Each interior photo is an illustration of “and then Ostap was carried away”. An approach completely opposite to the concept “Perfection is achieved not when there is nothing more to add, but when there is nothing more to take away”. Here, it seems the designer worked until there was simply no space left to add anything. Try to find the button (the only one) on the third screenshot.

December 07 2023, 10:05

Do any of my friends or friends of friends happen to be SwiftUI (Mac) programmers? I recently created a useful little app for myself, but the damn thing won’t work on the M3. It doesn’t show any errors or anything. It just doesn’t work. There’s no one I can ask for advice.

UPDATE: recompiled it, and it started working. But that didn’t reduce my number of questions. Looking for someone who wouldn’t mind sparing some time for me and my app. The app seems potentially useful for everyone in general.

December 06 2023, 23:17

First impressions of the MacBook M3 Max:

1) Cool screen. Very black black.

2) Hibernate on my M3 Max starts up in 31 seconds. On a MacBook with an Intel Core i9-9980HK CPU 2.40GHz 32Gb with SSD, the same code took 173 seconds. That’s 5.5 times slower. This is really cool.

3) The battery discharges much slower. I’ve been putting load on the CPU for over an hour, and 100% has turned into 91% 🙂 This is probably more of a contrast effect with a three-year-old laptop whose battery is already dying. The old laptop would have nearly drained by now.

December 06 2023, 14:55

Stole a picture from Pasha Kosenko. He bought purple tomatoes and was amazed. Pulling probably interesting stuff for my audience out of the comments.

This is a special breed of tomatoes, developed through genetic editing. Essentially, these are GMOs “on steroids”. But it’s one of the few examples where a GMO looks genuinely useful, not just pretty. Specifically, the Del/Ros1 and AtMYB12 genes (among others) have been introduced to induce the biosynthesis of anthocyanin, which not only gives a dark blue color but also acts as an antioxidant. Essentially, one tomato more or less equals a handful of currants of the same weight. The genes were taken from the common houseplant “snapdragon”, which produces a lot of it. The project was carried out by the John Innes Centre in Norwich.

We’re talking about anthocyanin. This pigment is found in various lilac and purple plants and berries (currants, blackberries). It has powerful protective properties. There are breeds of mice that die from cancer at 3 months old. If these mice are fed large doses of anthocyanin, they do not die from cancer. That is, if they eat anthocyanin, they do not get cancer. Ilya Kolmanovsky once said in an interview with Shikhman that one such tomato contains as much of this substance as a bucket of blackberries. My research shows that it’s not quite a bucket, but a good handful indeed, yet the point is, it’s quite beneficial (specifically, there’s 283.5 mg per 100g, in black currant – 190-270 mg/100g. But there are tomato varieties with up to 5000mg/100g, which is still far from a bucket of blackberries. There’s also a black crowberry or bearberry, where it’s about 4180 mg/100g). It’s also claimed that anthocyanins protect against bacteria, which is why such tomatoes don’t spoil for a long time.

December 06 2023, 02:50

Decided to set up my phone to record and ended up with a minute-long clip about how to quickly whip up a delicious lamb soup. From the moment of “maybe I should make some soup” to “there we go, it’s cooking, I can get back to work,” it takes less than 10 minutes, and another half hour until it’s a bowl on the table. The multicooker really is a cool device. There’s also a potato peeler and an onion slicer in the video 🙂 Someday I’ll add a carrot-potato slicer to save yet another minute. True, all these gadgets need to be washed afterwards.

December 05 2023, 18:55

Just a crazy demo of the StarEngine technology from Cloud Imperium Games (CIG), specifically from Chris Roberts, who is the “father” of Wing Commander. “Everything you see was captured in-engine in a single continuous shot with no loading screens.” The game Star Citizen, on which the demo is based, is criticized online, but our focus here is not on the game, but on the progress made.

The only game I play every day is chess, but it seems to have reached the limits of graphic capabilities, whereas here it’s simply leveling up.

There’s an engine called CryEngine, which originates from the 2004 shooter Far Cry and has undergone many iterations of development. With the right skills, projects developed with its help can surpass any games on Unreal Engine 4 or Unity in terms of picture quality. Amazon bought the licensing rights to CryEngine and created Lumberyard based on it.

Technologically, CIG’s brainchild is essentially CryEngine/Lumberyard on steroids. Their vice president of technology, Marco Corbetta, one of the original creators of CryEngine, and CIG essentially gave him and his team carte blanche in 2015 to expand the engine’s capabilities to the maximum. It seems to have paid off. But now they have legal disputes and issues with CryEngine. Formally, they transitioned from CryEngine to Amazon Lumberyard, a fork of CryEngine.

December 04 2023, 23:27

Today we sit behind the wheel, but the car won’t start. The new battery drained completely for no apparent reason. Friends helped jump-start the car, I reached the official dealer, where they charged me 200 bucks for diagnostics + firmware update.

It turned out that indeed, the firmware T-SB-0089-21 does fix some bug related to battery discharge. They assured me that I was not the only one, and now everything would be “hunky-dory” (as well as “nifty”, “tip-top”, etc.).