Unicorn Engine
QEMU
Our great sponsors
Unicorn Engine | QEMU | |
---|---|---|
13 | 184 | |
6,647 | 8,356 | |
2.2% | 2.6% | |
6.8 | 10.0 | |
27 days ago | 6 days ago | |
C | C | |
GNU General Public License v3.0 only | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Unicorn Engine
-
Show HN: Tetris, but the blocks are ARM instructions that execute in the browser
OFRAK Tetris is a project I started at work about two weeks ago. It's a web-based game that works on desktop and mobile. I made it for my company to bring to events like DEF CON, and to promote our binary analysis and patching framework called OFRAK.
In the game, 32-bit, little-endian ARM assembly instructions fall, and you can modify the operands before executing them on a CPU emulator. There are two segments mapped – one for instructions, and one for data (though both have read, write, and execute permissions). Your score is a four byte signed integer stored at the virtual address pointed to by the R12 register, and the goal is to use the instructions that fall to make the score value in memory as high as possible. When it's game over, you can download your game as an ELF to relive the glory in GDB on your favorite ARM device.
The CPU emulator is a version of Unicorn (https://www.unicorn-engine.org/) that has been cross-compiled to WebAssembly (https://alexaltea.github.io/unicorn.js/), so everything on the page runs in the browser without the need for any complicated infrastructure on the back end.
Since I've only been working on this for a short period of time leading up to its debut at DEF CON, there are still many more features I'd eventually like to implement. These include adding support for other ISAs besides ARM, adding an instruction reference manual, and lots of little cleanups, bug fixes, and adjustments.
My highest score is 509,644,979, but my average is about 131,378.
I look forward to feedback, bug reports, feature requests, and strategy discussions!
-
It Takes 6 Days to Change 1 Line of Code
Entails hundreds of hours of single-stepping through that opcode in Linux kernel using an indirect operand pointing toward its own opcode (self-modifying code).
Even the extraordinaire Fabrice Bellard (author of QEMU) admitted that it is broke and did a total rewrite, which fixed tons of other issues.
-
QEMU Version 7.0.0 Released
This is how I found out a snippet of assembly code that can actually distinguished between a KVM hypervisor and most of today’s emulator.
-
Can you make a MacOS Server on the Raspberry Pi for iMessage bridging server?
Actually, that gives me an idea. Unicorn Engine (https://github.com/unicorn-engine/unicorn) is FOSS and claims to be able to emulate many CPU architectures like x86. Do you think it could be possible to just run a regular Hackintosh setup through Unicorn Engine‘s x86 emulator? Definitely it would be very slow, and there is chance that it will just not work, but that would make the process fairly easy as Hackintosh setup is pretty well documented. Though I have to admit that I only just found Unicorn Engine and I can find almost no documentation for it other than on their github. I would be a bit skeptical of unicorn engine, but do you think that this could be possible?
-
TIL That Flatpak apps can emulate non-native apps like Apple Rosetta. (TL;DR on bottom)
https://www.unicorn-engine.org/ for example.
QEMU
-
Libsodium: A modern, portable, easy to use crypto library
For C/C++ projects that use meson as the build system, there is an excellent way to manage dependencies:
https://mesonbuild.com/Wrapdb-projects.html
https://mesonbuild.com/Wrap-dependency-system-manual.html
meson will download and build the libraries automatically and give you a variable which you pass as a regular dependency into the built target:
https://github.com/qemu/qemu/tree/005ad32358f12fe9313a4a0191...
https://github.com/harfbuzz/harfbuzz/tree/main/subprojects
https://github.com/harfbuzz/harfbuzz/blob/37457412b3212463c5...
Or, if you're using proper operating systems, they're managed by the usual package manager, just like everything else.
- Show HN: I'm 17 and wrote this guide on how CPUs run programs
-
UTM for Developers
In this tutorial, we set up macOS and Windows virtual machines on UTM, a macOS application that provides a GUI wrapper for QEMU, a powerful open-source emulator and virtualizer. UTM allows you to easily manage and run virtual machines without memorizing complex commands. It also has special handling for macOS, making it simpler to install compared to other virtual machine software.
-
Replace Docker Desktop with Podman in OSX
On Mac, each Podman machine is backed by a QEMU based virtual machine. Once installed, the podman command can be run directly from the Unix shell in Terminal, where it remotely communicates with the podman service running in the Machine VM.
-
VGA & RISCV: How do initialize vga in qemu-system-riscv64 ?
QEMU's "VGA" device is a typical PCI VGA adapter with Bochs SVGA extensions. First enumerate PCI so you can figure out how to talk to the device's I/O, then follow the Bochs SVGA specifications to write a driver. There's also some information on the wiki, although it seems to make a few x86-specific assumptions.
The links I gave you explain how to interact with it. This page explains how the Bochs SVGA registers are mapped in PCI devices. This page explains what the Bochs SVGA registers do. This page gives examples for how to use a Bochs SVGA device.
-
A simple hash table in C
I've had lately a look at QEMUs internals and saw their thread safe implementation of a hash table, capable of concurrent reads: qht [0].
If the author sees this, you might want to take a look at it.
-
Best virtualization solution with Ubuntu 22.04
TLDR; if you just want a simple VM, use gnome-boxes or qemu which is what gnome-boxes uses under the hood.
-
Intel Explores Transition to 64-Bit-Only X86S Architecture
QEMU [0] emulates many systems, including the 32-bit Intel architecture. For retro gaming specifically I can recommend PCem [1], which also emulates a wide range of sound and graphics cards, from IBM MDA to 3dfx Voodoo 2.
-
QEMU 8.0.0 – A generic and open source machine emulator and virtualizer
https://github.com/qemu/qemu/blob/ac5f7bf8e208cd7893dbb1a952...
But not the client side (vfio-user-pci). So, the feature is half-baked in the mainline project.
I don't know if any of the qemu devs browse HN but it would be nice to hear more about the plans for vfio-user.
What are some alternatives?
UTM - Virtual machines for iOS and macOS
TermuxArch - Experience the pleasure of the Linux command prompt in Android, Chromebook, Fire OS and Windows on smartphone, smartTV, tablet and wearable https://termuxarch.github.io/TermuxArch/
Vagrant - Vagrant is a tool for building and distributing development environments.
MicroPython - MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems
xemu - Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
capstone - Capstone disassembly/disassembler framework: Core (Arm, Arm64, BPF, EVM, M68K, M680X, MOS65xx, Mips, PPC, RISCV, Sparc, SystemZ, TMS320C64x, Web Assembly, X86, X86_64, XCore) + bindings. [Moved to: https://github.com/capstone-engine/capstone]
em-dosbox - An Emscripten port of DOSBox
virt-manager - Desktop tool for managing virtual machines via libvirt
Packer - Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
Reverse-Engineering-Tutorial - A FREE comprehensive reverse engineering tutorial covering x86, x64, 32-bit ARM & 64-bit ARM architectures.
oVirt - oVirt website