Skip to content

The Story of Mel, a Real Programmer

When looking at the source code of some of the less known parts of the OpenSolaris kernel, I couldn’t but remember the classic Story of Mel, a real Programmer, by Ed Nather, posted May 21st, 1983 on Usenet:

Continue reading ‘The Story of Mel, a Real Programmer’ »

An Algorithm for Resilient Botnets

Current botnets are not immune to legal attacks against the DNS infrastructure of their Command and Control (C&C) servers. While this is good news to spam fighters and every respectable netizen, it is bad news to those who would use botnet-based techniques to disseminate useful information in a hostile environment (like, say, whistle blowers, dissidents, file sharers, …). Fortunately — or unfortunately, depending on how we look at it — those legal attacks are easily circumvented.

Continue reading ‘An Algorithm for Resilient Botnets’ »

Microsoft censors cryptome.org

Microsoft is at its usual worst again, when it comes to the sensible matter of stifling freedom of expression that puts them in a bad light with heavy-handed yet still ineffective legal means. Or are they actually giving their customers a heads up and being the good guys despite all appearances?

Continue reading ‘Microsoft censors cryptome.org’ »

Good Bye, Kamp DSL!

Kamp Netzwerkdienste GmbH, my long-time German ISP (dating back to long gone 56kbps modem days!) has just sent me a formal notice of termination for my local DSL account. In their letter, they said that they abandoned the private DSL customers segment altogether, and wanted to concentrate on business customers and server hosting.

Continue reading ‘Good Bye, Kamp DSL!’ »

Self-modifying Code in FreeBSD Assembly

In the previous post, we’ve explored the observer effect in IT by writing a program that behaved differently under a debugger session than standalone. In this post, we’ll extend selfmod1_amd64.S and selfmod1_i386.S in such a way, that they won’t crash anymore, irrespectively of the environment they run in.

Continue reading ‘Self-modifying Code in FreeBSD Assembly’ »

Observer Effect in FreeBSD Assembly

If you’re an experienced developer, you may have encountered a strange phenomenon: a program can run perfectly fine under a debugger, yet still crash when executed standalone, i.e. outside a debugger session. The mere act of observing the program under a debugger yields to different results than running the program as-is.

Even very simple programs can be affected by this observer effect, which one would usually suspect in the field of physics (i.e. Heisenberg Uncertainty Principle) rather than that of our deterministic machines and computers!

In this post, I’ll illustrate the observer effect with a very simple assembly program, written both for FreeBSD/amd64 and FreeBSD/i386 platforms.

Continue reading ‘Observer Effect in FreeBSD Assembly’ »

Return Values of FreeBSD Syscalls in Assembly

This post is a little follow-up of the Hello World in FreeBSD Assembly tutorial.
At the end of the previous episode, I’ve suggested that you write an assembly program that writes “hello, world!\n” into a file. This is exactly what we’ll do here.

Continue reading ‘Return Values of FreeBSD Syscalls in Assembly’ »

Printing woes on FreeBSD 8 with CUPS

After a recent update to FreeBSD 8, my USB attached HP LaserJet 1320 stopped printing via CUPS. No hint at all why, and /var/log/cups/error_log was of no help either. Print jobs simply accumulated in the print queue, but there was no LED blinking on the printer. Sending PostScript directly to /dev/ulpt0 worked, but sending it via CUPS didn’t do any good.

Continue reading ‘Printing woes on FreeBSD 8 with CUPS’ »

Google’s governmental backdoor

Bruce Schneier’s new op-ed in CNN regarding government-mandated secret backdoors in communication software and equipment, and how Chinese government may have misused a (possible) backdoor in Google’s GMail that was designed to allow remote access to the U.S. government, doesn’t come as a surprise. It’s just funny how badly secured those remote access capabilities are, and how easily they can be used by third parties.

Continue reading ‘Google’s governmental backdoor’ »

Hello World in FreeBSD Assembly

Have you ever wondered how a simple hello, world! program looks like in assembly language? Or, more precisely, in assembly for the FreeBSD/i386 and FreeBSD/amd64 platforms?

In this tutorial, I’ll show you how to write such a bare-bones hello, world! program in assembler for both platforms. We’ll start with zero knowledge about the current OS architecture, using only the assembler output of the C compiler gcc. Then, we’ll gradually trim that output until we reach a minimalist assembler program, learning how to use tools like ktrace(1), kdump(1), objdump(1), gdb(1), and, of course as(1) and ld(1).

Don’t worry, the learning curve will be more or less gentle, if you know a little bit of C and assembler (you don’t need any FreeBSD-specific knowledge). Enjoy the trip.

Continue reading ‘Hello World in FreeBSD Assembly’ »