GeistHaus
log in · sign up
118 pages link to this URL
Unix executables

An executable is something that causes a computer to perform some tasks according to encoded instructions. It's in opposition to a data file which must be parsed by another program to be meaningful, for example an image or video. The instructions are usually in machine code, read by the cpu and so dependent on the cpu architecture. An ex...

0 inbound links article en venamdeliberatepsychologyphilosophyunixblog
shorne in japan

Stafford Horne's (shorne, stffrdhrn) Computer Engineering blog and home page.

0 inbound links en technologyjapanjavaverilogfpga
Beat The Clock: The CSIT InfoSecurity Challenge

Last month, the Centre for Strategic Infocomm Technologies (CSIT) invited local cybersecurity enthusiasts to tackle the InfoSecurity Challenge (TISC). The Challenge was organized in a capture-the-flag format, with 6 cybersecurity and programming challenges of increasing difficulty unlocked one after another.

0 inbound links article en posts binaryreverse engineering
Remote debugging attachment protocol

This protocol enables external tools to attach to a running CPython process and execute Python code remotely. Most platforms require elevated privileges to attach to another Python process. Disabli...

1 inbound link website en
How to execute an object file: Part 1

Ever wondered if it is possible to execute an object file without linking? Or use any object file as a library? Follow along to learn how to decompose an object file and import code from it along the way.

1 inbound link article en LinuxProgrammingDeep Dive
Unix Executables

(This is part of the podcast discussion extension) Unix Executables Link of the recording There are many Unix-like operating systems and each use their own executable formats. What is there to know ab

startingsystems1.md

Guide to Systems Programming, covering fundamentals such as bit manipulation, parsing, filesystems, input/output, syscalls, memory management, and signals.

Encoding Programs in QR Codes

QR codes are usually used for storing small amounts of textual data such as web links. However, they are capable of storing other arbitrary data. Here a small computer architecture is designed around a compact encoding of computer instructions in the textual data of QR codes. To experiement, I explore a small instruction-set, and create a small development environment (assembler & virtual machine) to experiment with some simple programs.

0 inbound links article en
Online RISC-V disassembler

Making a nicer disassembler I’ve had a rudimentary disassembler in the emuriscv emulator, but compared to other disassemblers out there it was not very refined. Debugging and fixing the emulator required me to read a lot of disassembled code, which I generated with GNU objdump, but the problem was that my tool printed out a slightly different output format compared to objdump. Having two separate disassembly listing formats to keep in my head was confusing enough, so I set out to achieve a comparable output to the reference tool.

0 inbound links article en emulation riscvassemblyinteractive
Google CTF (2018): Beginners Quest - Reverse Engineering Solutions

In my previous post “Google CTF (2018): Beginners Quest - Web Solutions” we covered the web challenges for the 2018 Google CTF, which covered a variety of security issues ranging from topics such as the improper use of client side scripts, and other simple vulnerabilities like cross-site scripting (also known as XSS).

0 inbound links article en
Room 101

A place to be (re)educated in Newspeak

What's in a Linux executable?

Executables have been fascinating to me ever since I discovered, as a kid, that they were just files. If you renamed a .exe to something else, you could open it in notepad! And if you renamed somet...

2 inbound links article en
Wasmtime 1.0: A Look at Performance

In preparation for our upcoming release of Wasmtime 1.0 on September20, we have prepared two blog posts describing the work we have putinto the compiler and runtime recently. This first post will describeperformance-related projects: mak...

1 inbound link website en
First contact with ATmega8 microcontroller - part 3

Now, I’m going to leave the hardware parts alone and start working with the software. At the end of this part, we will have our firmware ready to be written (programmed) into the microcontroller.

0 inbound links article en AVRATmega8GentooLinuxMicrocontrollerProgramming
What makes IoT so hard? The sheer scale, the power consumption – and that it is wireless.

As far as technical challenges go, the Internet of Things is as tough as it gets: The scale is large: everything is huge. The power is low: there is almost none of it available. Wireless is weird: it keeps changing and it wasn’t very nice to begin with. Today we look at these fundamental problems that every IoT platform must face and how we solve them in the Thingsquare IoT platform. Scale: When everything is large, all bets are off Many IoT deployments involve hundreds or thousands of individual devices. With large numbers of devices, even problems that normally would be unlikely to occur, are likely to occur. Large networks are difficult to monitor in the field. But are even more challenging to work with during development. At Thingsquare, we use these categories when we talk about development of IoT networks: Developer scale: 1-2 devices. When you have 1 or 2 wireless devices in front of you, it is relatively easy to understand what they are doing. You can add printouts or LEDs that blink when things happen, and as a developer, you can feel confident that you are in control. It is even possible to stop the execution of the software on one of the devices and single-step the program. Desktop scale: 2-5 devices. At this stage you can no longer control each device on its own, but you must treat them like a unit. They are still few enough to be able to monitor though, but you will have to use things like visually blink LEDs to allow you to see what is going on with them. Office scale: 5-10 devices. Now you have run out of space to fit the devices on a single desk and must spread them out over an area that begins to become difficult to monitor. And programming them with a new program starts to be a practical challenge, because you will have to physically connect and disconnect each device to the flash programmer. Floor scale: 10-100 devices. It now begins to be difficult to find space for all your devices in a single office and you will need to spread out over an entir

0 inbound links article en
What's in a Linux executable?

Executables have been fascinating to me ever since I discovered, as a kid, that they were just files. If you renamed a .exe to something else, you could open it in notepad! And if you renamed somet...

2 inbound links article en
RISC-V Bytes: Exploring a Custom ESP32 Bootloader

I recently acquired an ESP32-C3-DevKitC-02 module, and, as I tend to do, jumped right into reading about how the system boots and how the (pretty good!) tooling Espressif offers works. We have typically used QEMU in the RISC-V Bytes series, but getting our hands on physical hardware starts to make things feel a bit more real. In this first post on the ESP32, we’ll do some basic setup and look at a simple custom bootloader.

0 inbound links article en RISC-V Bytes blogdeveloperpersonal
How AI on Microcontrollers Actually Works: The Computation Graph

In our last post we explored operators and kernels in Tensorflow Lite, and how the ability to swap out kernels depending on the hardware capabilities available can lead to dramatic performance improvements when performing inference. We made an analogy of operators to instruction set architectures (ISAs), and kernels to the hardware implementation of instructions in a processor. Just like in traditional computer programs, the sequence of instructions in a model needs to be encoded and distributed in some type of file, such as an Executable and Linkable Format (ELF) on Unix-based systems or Portable Executable (PE) on Windows.

0 inbound links article en posts blogdeveloperpersonal
What did I do at Recurse Center?

Today is my last day at the [Recurse Center][RC] and I want to take a moment totalk about what I did here. I came here with big plans and then ended updoing ...

Understanding Arm Cortex-M Intel-Hex (ihex) files - Sticky Bits - Powered by Feabhas

Creating a flash image The primary purpose of the ihex file in the embedded space is to create a file that is used to program/reprogram a target system. There are various file formats around, with the Intel Hex (ihex) format being among the most widely used. The output of the linker stage of a build process is typically to generate a .elf file (Executable and Linkable Format). Many debuggers and programmers can work directly with the ELF file format. However, in many [...]

0 inbound links article en ARMBuild-systemsC/C++ ProgrammingCortexToolchain ARMelf
Disassembling a Cortex-M raw binary file with Ghidra - Sticky Bits - Powered by Feabhas

BlackHat Europe 2022 During the first week of December, I had the pleasure of attending a training course at BlackHat Europe 2022 titled Assessing and Exploiting Control Systems and IIoT run by Justin Searle. Part of the course involved Assessing and Exploiting Embedded Firmware by reading on-chip Flash using OpenOCD. Unfortunately, we ran out of time to finish the last labs during the training (we ran 9 am-6 pm each day). So I decided to follow along with the very comprehensive notes [...]

0 inbound links article en ARMCortexSecuritytraining firmwareGhidrahackinghowto
My Career So Far
0 inbound links en Career AMQPBashblogbook reviewbugC++careerCeleryclusteringFirefoxformal languagesGitHTTPJirajournalsLaTeXleadershipLinuxmanagementmockNeovimprogrammingprojectPythonRabbitMQresearchRustsocketsssdeepterminaltestingTmuxVimwebsiteWeeChat CC BY 4.0
shorne in japan

Stafford Horne's (shorne, stffrdhrn) Computer Engineering blog and home page.

0 inbound links en hardwareembeddedopenrisc
shorne in japan

Stafford Horne's (shorne, stffrdhrn) Computer Engineering blog and home page.

0 inbound links en softwaretoolchainopenrisc
shorne in japan

Stafford Horne's (shorne, stffrdhrn) Computer Engineering blog and home page.

0 inbound links en hardwarelinuxembeddedopenrisc
This Wasm interpreter fits in a QR code

2945 bytes. Less than 0.006% of Wasmtime, smaller than a C “Hello, world!”. Zero dependencies, no cheating: just a static x86-64 Linux executable. Scan the QR code above with zbarimg --raw -Sbinary or another QR decoder that supports binary data, or directly download the program from the GitHub repo, and you’re good to go.

2 inbound links article en
Improve Software Debugging with Binary Analysis

One of the seriously underutilized tools of the trade in the software development world, at least in my experience, has been binary analysis. We have linters, unit tests, correctness proofs, and static analysis tools to help catch bugs in our software. However, when a bug inevitably pops up that escapes all these checks, it could be hard to fix. Binary analysis can enhance our debugging toolkit by catching bugs that stem from the compiler. While most binary analysis is done in the field of security, many of those principles can be brought into normal software development to fix hard-to-detect problems as well.

0 inbound links article en
Fuzzer Development 1: The Soul of a New Machine

Introduction && Credit to Gamozolabs For a long time I’ve wanted to develop a fuzzer on the blog during my weekends and freetime, but for one reason or another, I could never really conceptualize a project that would be not only worthwhile as an educational tool, but also offer some utility to the fuzzing community in general. Recently, for Linux Kernel exploitation reasons, I’ve been very interested in Nyx. Nyx is a KVM-based hypervisor fuzzer that you can use to snapshot fuzz traditionally hard to fuzz targets. A lot of the time (most of the time?), we want to fuzz things that don’t naturally lend themselves well to traditional fuzzing approaches. When faced with target complexity in fuzzing (leaving input generation and nuance aside for now), there have generally been two approaches.

1 inbound link article en
LD_LIBRARY_PATH considered harmful

The purpose of the LD_LIBRARY_PATH environment variable is to instruct the linker to consider additional directories when searching for libraries. Its valid use case is the test of alternative library versions installed in non-standard locations. In contrast to that, globally setting the LD_LIBRARY_PATH (e.g. in the profile of a …

0 inbound links article en
Daily Rust: Slice Patterns

Rust 1.26 introduced a nifty little feature called Basic Slice Patterns which lets you pattern match on slices with a known length. Later on in Rust 1.42, this was extended to allow using .. to match on “everything else”. As features go this may seem like a small addition, but it gives developers an opportunity to write much more expressive code. The code written in this article is available in the various playground links dotted throughout. Feel free to browse through and steal code or inspiration.

0 inbound links article en posts blogdeveloperpersonalRustPattern MatchingSlices
First contact with ATmega8 microcontroller - part 3

Now, I’m going to leave the hardware parts alone and start working with the software. At the end of this part, we will have our firmware ready to be written (programmed) into the microcontroller.

0 inbound links article en AVRATmega8GentooLinuxMicrocontrollerProgramming
Goodbye Gnu-EFI!

The recommended way to link UEFI applications on linux was until now through GNU-EFI, a toolchain provided by the GNU Project that bridges from the ELF world into COFF/PE32+. But why don’t we compile directly to native UEFI? A short dive into the past of GNU Toolchains, its remnants, and a surprisingly simple way out.

0 inbound links article en
Demystifying the #! (shebang): Kernel Adventures

Clarifying the shebang (#!) mechanism: A step-by-step look using strace and kernel code shows how Linux handles script execution directly, revealing the shell isn't involved initially.

1 inbound link en programminggamedevhackingcodingphotographythoughts
Evil ELFs

In this post I am going to demonstrate how to easily find out what an evilELF is doing to your system. This can be useful if you have one that...

0 inbound links article en
On-demand linked libraries for Nix

This is a write up of some discussion ongoing with some folks on the #nix-community IRC chat primarily being driven by Mic92. Nixpkgs maintains the highest rating on Repology for having the most packages & which are up to date. Unfortunately even with the current ecosystem of packages, there will always be gaps, and for beginners in NixOS a common question is: “I’ve download a binary and would like to run it on NixOS” Take a look at this graph https://repology.org/repositories/graphs Can we do better & streamline running non-Nix software? 🤔 This was some of the questions posed by some…

2 inbound links article en
Writing portable ARM64 assembly

An unfortunate side effect of the rising popularity of Apple’s ARM-based computers is an increase in unportable assembly code which targets the 64-bit ARM ISA. This is because developers are writing these bits of assembly code to speed up their programs when run on Apple’s ARM-based computers, without considering the other 64-bit ARM devices out there, such as SBCs and servers running Linux or BSD. The good news is that it is very easy to write assembly which targets Apple’s computers as well as the other 64-bit ARM devices running operating systems other than Darwin.

0 inbound links article en 2023
Using Go as a scripting language in Linux

At Cloudflare we like Go. We use it in many in-house software projects as well as parts of bigger pipeline systems. But can we take Go to the next level and use it as a scripting language for our favourite operating system, Linux?

2 inbound links article en LinuxGoTech TalksDevelopersProgrammingDeep Dive
A Minimal Rust Kernel

In this post, we create a minimal 64-bit Rust kernel for the x86 architecture. We build upon the freestanding Rust binary from the previous post to cr…