There are no reviews yet. Be the first to send feedback to the community and the maintainers!
What is mDNSResponder? ---------------------- The mDNSResponder project is a component of Bonjour, Apple's ease-of-use IP networking initiative: <http://developer.apple.com/bonjour/> Apple's Bonjour software derives from the ongoing standardization work of the IETF Zero Configuration Networking Working Group: <http://zeroconf.org/> The Zeroconf Working Group has identified three requirements for Zero Configuration Networking: 1. An IP address (even when there is no DHCP server to assign one) 2. Name-to-address translation (even when there is no DNS server) 3. Discovery of Services on the network (again, without infrastucture) Requirement 1 is met by self-assigned link-local addresses, as described in "Dynamic Configuration of IPv4 Link-Local Addresses" <http://files.zeroconf.org/draft-ietf-zeroconf-ipv4-linklocal.txt> Requirement 2 is met by sending DNS-like queries via Multicast (mDNS). Requirement 3 is met by DNS Service Dicsovery (DNS-SD). Self-assigned link-local address capability has been available since 1998, when it first appeared in Windows '98 and in Mac OS 8.5. Implementations for other platforms also exist. The mDNSResponder project allows us to meet requirements 2 and 3. It provides the ability for the user to identify hosts using names instead of dotted-decimal IP addresses, even if the user doesn't have a conventional DNS server set up. It also provides the ability for the user to discover what services are being advertised on the network, without having to know about them in advance, or configure the machines. The name "mDNS" was chosen because this protocol is designed to be, as much as possible, similar to conventional DNS. The main difference is that queries are sent via multicast to all local hosts, instead of via unicast to a specific known server. Every host on the local link runs an mDNSResponder which is constantly listening for those multicast queries, and if the mDNSResponder receives a query for which it knows the answer, then it responds. The mDNS protocol uses the same packet format as unicast DNS, and the same name structure, and the same DNS record types. The main difference is that queries are sent to a different UDP port (5353 instead of 53) and they are sent via multicast to address 224.0.0.251. Another important difference is that all "mDNS" names end in ".local." When a user types "yourcomputer.local." into their Web browser, the presence of ".local." on the end of the name tells the host OS that the name should be looked up using local multicast instead of by sending that name to the worldwide DNS service for resolution. This helps reduce potential user confusion about whether a particular name is globally unique (e.g. "www.apple.com.") or whether that name has only local significance (e.g. "yourcomputer.local."). About the mDNSResponder Code ---------------------------- Because Apple benefits more from widespread adoption of Bonjour than it would benefit from keeping Bonjour proprietary, Apple is making this code open so that other developers can use it too. Because Apple recognises that networks are hetrogenous environments where devices run many different kinds of OS, this code has been made as portable as possible. A typical mDNS program contains three components: +------------------+ | Application | +------------------+ | mDNS Core | +------------------+ | Platform Support | +------------------+ The "mDNS Core" layer is absolutely identical for all applications and all Operating Systems. The "Platform Support" layer provides the necessary supporting routines that are specific to each platform -- what routine do you call to send a UDP packet, what routine do you call to join multicast group, etc. The "Application" layer does whatever that particular application wants to do. It calls routines provided by the "mDNS Core" layer to perform the functions it needs -- * advertise services, * browse for named instances of a particular type of service * resolve a named instance to a specific IP address and port number, * etc. The "mDNS Core" layer in turn calls through to the "Platform Support" layer to send and receive the multicast UDP packets to do the actual work. Apple currently provides "Platform Support" layers for Mac OS 9, Mac OS X, Microsoft Windows, VxWorks, and for POSIX platforms like Linux, Solaris, FreeBSD, etc. Note: Developers writing applications for OS X do not need to incorporate this code into their applications, since OS X provides a system service to handle this for them. If every application developer were to link-in the mDNSResponder code into their application, then we would end up with a situation like the picture below: +------------------+ +------------------+ +------------------+ | Application 1 | | Application 2 | | Application 3 | +------------------+ +------------------+ +------------------+ | mDNS Core | | mDNS Core | | mDNS Core | +------------------+ +------------------+ +------------------+ | Platform Support | | Platform Support | | Platform Support | +------------------+ +------------------+ +------------------+ This would not be very efficient. Each separate application would be sending their own separate multicast UDP packets and maintaining their own list of answers. Because of this, OS X provides a common system service which client software should access through the "/usr/include/dns_sd.h" APIs. The situation on OS X looks more like the picture below: ------------------- / \ +---------+ +------------------+ +---------+ \ +---------+ | App 1 |<-->| daemon.c |<-->| App 2 | ->| App 3 | +---------+ +------------------+ +---------+ +---------+ | mDNS Core | +------------------+ | Platform Support | +------------------+ Applications on OS X make calls to the single mDNSResponder daemon which implements the mDNS and DNS-SD protocols. Vendors of products such as printers, which are closed environments not expecting to be running third-party application software, can reasonably implement a single monolithic mDNSResponder to advertise all the services of that device. Vendors of open systems which run third-party application software should implement a system service such as the one provided by the OS X mDNSResponder daemon, and application software on that platform should, where possible, make use of that system service instead of embedding their own mDNSResponder. See ReadMe.txt in the mDNSPosix directory for specific details of building an mDNSResponder on a POSIX Operating System. Compiling on Older C Compilers ------------------------------ We go to some lengths to make the code portable, but //-style comments are one of the modern conveniences we can't live without. If your C compiler doesn't understand these comments, you can transform them into classical K&R /* style */ comments with a quick GREP search-and-replace pattern. In BBEdit on the Mac: 1. Open the "Find" dialog window and make sure "Use Grep" is selected 2. Search For : ([^:])//(.*) 3. Replace With: \1/*\2 */ 4. Drag your mDNSResponder source code folder to the Multi-File search pane 5. Click "Replace All" For the more command-line oriented, cd into your mDNSResponder source code directory and execute the following command (all one line): find mDNSResponder \( -name \*.c\* -or -name \*.h \) -exec sed -i .orig -e 's,^//\(.*\),/*\1 */,' -e '/\/\*/\!s,\([^:]\)//\(.*\),\1/*\2 */,' {} \;
substrate
emusca
Power trace simulator using Unicorn Engine for side channel analysis attack testingxnu-trace
Tracing of iOS/macOS binaries using HW single step and Frida DBIamd-lm32-smu-exploit
Generic exploit for all version 7 (maybe others) LM32-based AMD SMU's used in APUs (and probably works on GPUs too)jevmachopp
Modern C++, range-based Mach-O parser designed for embedded use. Uses stack allocations only.pypcode-emu
Ghidra P-Code emulation and static LLVM lifting in Pythonriscv-smol-linux-kernel
Patched sources/configs for RISC-V Linux with musl-based toolchain targeting 8 MB RAMaes-over-pcie
A VHDL implementation of 128 bit AES encryption with a PCIe interface.litespih4x
SPI flash MITM and emulation (QSPI is a WIP)jevxpctrace
Hopefully an insightful XPC tracer that helps vulerability research by tracing server and client call stacksps3mfw-ng
PS3 Modified Firmware Builder - Next Generationbus-pirate
Bus Piratedagger
A decompilation framework based on LLVMliteluna
LiteX LUNA USB stack integrationpcie-mitm
LiteX-based PCIe MITM, sniffing, fuzzing, device emulationghidra-lm32
LM32 processor module for Ghidra. Useful for AMD SMU reverse engineering.llvm-qemu
Automatically exported from code.google.com/p/llvm-qemusurf
Surf - A digital waveform viewer for macOStegra-bootrom-utils
Utility for interacting with Tegra SoC bootromsmips--
A dual core MIPS subset CPU written in behavioral, synthesizable VHDLfrida-ptrace-hide
ptrace hider based on frida-gum injectable shared library and a JavaScript versionpresentations
Some presentations Iβve donelitelitedram
Minimal DRAM controllers for LiteXxfinity-stream-allow-airplay
Tweak that unlocks AirPlay functionality in the iOS Xfinity Stream appfpudump
A simple, header only library to dump x87 FPU statekernelcache-patcher
Library for reading and patching xnu KernelCaches and a tool to disable loading of AppleSerialShim for m1n1 UART debugging over USB-C aux lines.proxytap
Tunnel all connections from a TAP interface though a SOCKS proxyundefined-behavior-crimes
Various experiments/hacks that language lawyers would shoot me for writingFruitSU
Python library for Apple CDN formatsllvm-project-embedded-library-in-process
Clang/LLVM/LLD/libc++/etc all in process as an embeddable libraryes-injector
EndpointSecurity process injectorjev-elf-tools
ELF tools like external -> local symtab entry patchingpdf-unwm
Remove watermarks from PDFsusbip-toolkit
Python USB-IP server library to emulate devices with a focus on HDL cosimulationxnu-get-proc-path
Utility to get the path of an executable a given process is running.frida-panic-ventura-beta-7
This panics macOS Ventura beta 7 because why not?m1n1-apfs-umbrella
Umbrealla repo for m1n1 supporting APFS an macOS loadingpyenv-macos-dynamic-dyld-loading
Stub libpython.dylib/Python.framework to read .python-version and load the appropriate pyenv Python librarymodern-xcode-legacy-support
Use modern Xcodes with deprecated SDKs and architectureswine-rosetta-aot
Experiment to see if WINE can utilize Rosetta AOT instead of JIT using PE -> Mach-O translationps3-decr-stuff
Stuff related to the PS3 DECR development TOOLs.flash-adapter-pcbs
Various PCB adapters for flash memories and devices that use thembus-pirate-old
The Bus Pirate is an open source hacker multi-tool that talks to electronic stuff. Itβs got a bunch of features an intrepid hacker might need to prototype their next project.redirect-to-os-log
Command line utility to run a program and redirect its stdout and stderr to XNU's os_log facilities. Also includes an injectable dylib for the same purpose.debugserver-unsigned
Tweaks, Xcode plugin for using unsigned and super-entitled debugserver on jailbroken iOSpmod-qspi-flash
Simple Pmod PCB with a QSPI flash (targeted at PS4 reverse engineering tool development)CarlinKit4-CarPlay-Wired-to-WiFi-dongle-RE
Reverse engineering of the CarlinkKit4 CarPlay wired-to-WiFi adapterdelta-debug-verilog-test
Delta Debugging for Verilog/SystemVerilogpyfishhook
Python bindings and bundled build of fishhook: A library that enables dynamically rebinding symbols in Mach-O binaries running on macOS/iOS.iphonetunnel-usbmuxconnectbyport
Automatically exported from code.google.com/p/iphonetunnel-usbmuxconnectbyportinject-debugger-spawner
A library to inject via LD_PRELOAD to spawn a new terminal with an attached debuggerSlothNS
a proof-of-work based extension to DNSTorVTL
jevps
SDR GPS simulatorsneaker
Do crazy things with your socketsps3dotdir
keys n stuff for f0f ps3tools and naehrwert's scetoolriscv-smol-linux-qemu
Patched QEMU sources/configs for RISC-V Linux with musl-based toolchain targeting 8 MB RAMps3-gcc
Latest and greatest GCC for the ps3toolchainjev-lldb-helpers
Various LLDB Python helpersjev-pci-utils
Various PCI/PCIe utilities.nih-sftp-server
Single file (almost) SFTP server by Eddy Langley useful for integration into a multibin dropbear serverxpwn-modern-buid
A cross-platform custom NOR firmware loader and custom IPSW generator for the iPhone. Modern CMake build with no OpenSSL dependencylitex-fork-searchable
pyxcselect
Python bindings for libxcselect.dylib to find Xcode related pathsjeviterm
C++ library to interact with iTerm2 using protobufs and WebSocketsps4-kern-dump
PS4 kernel dump stuffaes-honeybadger
Tinkering with AES partial key brute forcing for side channel analysisaarch64-experimental-disasm
Experimental methods of decoding/disassembling AArch64 instructionssacd-ripper-google-code
Automatically exported from code.google.com/p/sacd-ripperplocate-xnu
plocate for XNU operating systemslitejtag-ext
LiteX JTAG extensionspycuse
py-cuse - CUSE (chardev in userspace) Python librarypytrofs
Python implementation of Tcl's trofs (Tcl Read-Only FileSystem)git-submodule-prep
Simple git submodule wrapper to track and merge changes to an upstream repobzip2-embedded
digital-waveform-samples
Digital waveforms (e.g. VCD) samples for testing and benchmarkingublaze-rev-utils
MicroBlaze reverse engineering utilitiesmusl-libc-aarch64-baremetal
musl libc for AArch64 baremetal applicationsqemu-microblaze-bflt
QEMU with hacks to load microblaze bFLT binariesriscv-smol-linux
RISC-V Linux with musl-based toolchain targeting 8 MB RAMjevutils
Various utilities I wrote for my use. My favorite so far is a find(1) alternative that searches using libmagicIOSurface-sandbox
Sandbox for playing around with IOSurfaces, compositing, and private CoreGraphs/CoreAnimation/SkyLight APIsld-audit-injector
A configurable shared library injector for Linux based on LD_AUDIT functionality found in glibcβs rtldAArch64-SHA-Crypto-Extensions
Implementations of SHA(s) digests using AArch64 Cryptography Extensionsauxv-dumper
Auxiliary Vector dumperfrida-konyutils-ng
Improved CenturionInfoSec/konyutils for decrypting/dumping Kony app JavaScript bundlescmake
jevshell
A node.js/socket.io shell on the webps3-bd-rev-util
Utilities for PS3 Blu-ray drive reverse engineeringfrida-trace-child-test
Testing child processes with frida-tracevolafox
Automatically exported from code.google.com/p/volafoxlibusb-cmake
libusb with CMake supportllvm-polly
pyclippy
Your favorite friend Clippy, easily accessible from Python!AppKitEnvVars
Shows env vars set by launchd and not your shell init scriptssmoke-cpp-tests
Automatically exported from code.google.com/p/smoke-cpp-testsflac-streamer
Stream FLAC audiopy-data-utils
Various python data utilitiesquartus-archiver
Quartus installer archiverdev-mem-nuevo-kext
kext to bring back /dev/mem and /dev/kmem on modern macOSLove Open Source and this site? Check out how you can help us