Ilias

@galarius
4 Followers
19 Following
12 Posts

macOS software developer working in cybersec.


Here on Mastodon to share insights and notes from the various fields I've encountered over the years.

GitHubhttps://galarius.github.io

Set myself a mini-marathon: build something small but useful from scratch in ~2-3 weeks and ship it to the App Store. Mostly to see if I can still push through the last annoying 10% - and how well I can estimate a new project.

Result: an app showing recycling spots across Finland 🇫🇮♻️

Had a pretty good idea what to do - and of course still got ambushed by a couple of unexpected gotchas. Nevertheless, finished on time - and App Store approval on the first try 🎉

https://apps.apple.com/fi/app/kierrätyskartta/id6757157926

While on vacation I hacked together a macOS Console-like app that monitors XPC connections. It shows details about the initiating process and the XPC service being contacted.

Right now it includes streaming mode, search tokens, and some basic anomaly detection. Pretty niche, I know, but I’ve got some promising ideas to make it genuinely useful for security researchers and developers… if Apple approves the distribution entitlement I need to release it.

https://xpc-monitor.github.io

SPM + GTest

If you need to expose a C++ library with #gtest via #spm, there is a straightforward way to wrap existing tests with #xctest:

1. Add gmock as a .systemLibrary target in your Package.swift and link it to your .testTarget.

2. Create a module map and an umbrella header for gmock.

3. Create an Obj-C++ adapter that wraps GoogleTest with XCTestCase.

🚀 CMD + U

🐞 Debugging Story: Weakly Linked Frameworks

I noticed that a product with extensive XPC communication was missing some data in its UI. There were no crashes, log errors, XPC interruptions — just an unexpected behavior. The issue? A few classes from a weakly linked framework were used in a variant not meant to rely on the framework. When the framework was absent, the dynamic linker nullified the weakly linked symbols, which unfortunately were never checked for nil.
(min. example below)

While implementing the “8080” instruction set, I tried to make extensive use of Google Tests framework for testing. However, it is not fully compatible with SystemC because: a) all components and connections must be set up before starting the simulation; and b) the simulation cannot be restarted, which makes testing components with dedicated threads problematic. In the project, I have workarounds for both issues.
I have now implemented the following components as SystemC modules: the ALU, Memory, Multiplexer, Register, and Control Unit. The data and address buses don't seem to require separate modules, so they are simply represented as connected ports. The model is still far from fully accurate or complete, but its design is fairly close.
When implementing a hardware simulation, a dilemma arises regarding how many components should actually be simulated. Here’s a slightly exaggerated example: I can either use the logical negation operator (!) provided by the programming language or implement it as a NOT gate, which serves the same function at the hardware level (see the attached image). A more practical example would be the implementation of a register (e.g. sc_uint<8> vs sc_module).

Quickly deploying a Telegram #bot with #Cloudflare Worker

I used to create T-bots with Python and host them on Heroku, but I recently sought alternatives. Having used Cloudflare’s WARP for years, I decided to try their "Workers and Pages" service. My new bot checks the traffic bandwidth of my VPN servers. While I initially couldn’t run Python code as a Cloudflare Worker (due to limitations), replicating the functionality in JS was quick, and I got my bot up and running on a free plan. See pics.

Using #FreeCAD to create patent-ready illustrations.

I recently completed a patent application for a cardiac device, which required technical illustrations. To ensure I could easily make adjustments, I learned key FreeCAD functionalities, created a 3D model from a prototype photo, and used the TechDraw workshop to generate patent-ready illustrations. Although the patent didn’t proceed as planned, the experience of learning FreeCAD was highly valuable. Attached is an example (wired electrodes).