{"id":13616391,"url":"https://github.com/lunixbochs/usercorn","last_synced_at":"2025-04-12T17:41:42.289Z","repository":{"id":36880395,"uuid":"41187380","full_name":"lunixbochs/usercorn","owner":"lunixbochs","description":"dynamic binary analysis via platform emulation","archived":false,"fork":false,"pushed_at":"2023-06-01T18:36:00.000Z","size":1299,"stargazers_count":890,"open_issues_count":139,"forks_count":98,"subscribers_count":42,"default_branch":"master","last_synced_at":"2024-10-30T00:33:10.238Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lunixbochs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-08-22T03:03:09.000Z","updated_at":"2024-10-15T06:10:55.000Z","dependencies_parsed_at":"2022-07-09T03:01:11.829Z","dependency_job_id":"8654aa6e-9218-4509-97e0-9938deb03ee7","html_url":"https://github.com/lunixbochs/usercorn","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunixbochs%2Fusercorn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunixbochs%2Fusercorn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunixbochs%2Fusercorn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunixbochs%2Fusercorn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lunixbochs","download_url":"https://codeload.github.com/lunixbochs/usercorn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248607969,"owners_count":21132643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T20:01:27.900Z","updated_at":"2025-04-12T17:41:42.265Z","avatar_url":"https://github.com/lunixbochs.png","language":"Go","funding_links":[],"categories":["Go","Go (531)","Exploit Development"],"sub_categories":[],"readme":"usercorn\n----\n\n[![Build Status](https://travis-ci.org/lunixbochs/usercorn.svg?branch=master)](https://travis-ci.org/lunixbochs/usercorn)\n[![GoDoc](https://godoc.org/github.com/lunixbochs/usercorn?status.svg)](https://godoc.org/github.com/lunixbochs/usercorn)\n[![Slack](https://lunixbochs.herokuapp.com/badge.svg)](https://lunixbochs.herokuapp.com/)\n\nBuilding\n---\n\nUsercorn depends on Go 1.6 or newer, as well as the latest unstable versions of Capstone, Unicorn, and Keystone.\n\n`make deps` (requires `cmake`) will attempt to install all of the above dependencies into the source tree under `deps/`.\n\n`make` will update Go packages and build `usercorn`\n\nExample Commands\n---\n\n    usercorn run bins/x86.linux.elf\n    usercorn run bins/x86_64.linux.elf\n    usercorn run bins/x86.darwin.macho\n    usercorn run bins/x86_64.darwin.macho\n    usercorn run bins/x86.linux.cgc\n    usercorn run bins/mipsel.linux.elf\n\n    usercorn run -trace bins/x86.linux.elf\n    usercorn run -trace -to trace.uc bins/x86.linux.elf\n    usercorn trace -pretty trace.uc\n    usercorn run -repl bins/x86.linux.elf\n\nWhat.\n----\n\n- Usercorn is an analysis and emulator framework, with a base similar to qemu-user.\n- It can run arbitrary binaries on a different host kernel, unlike qemu-user.\n- While recording full system state at every instruction.\n- to a serializable compact format capable of rewind and re-execution.\n- It's useful out of the box for debugging and dynamic analysis.\n- With an arch-neutral powerful lua-based scripting language and debugger.\n- It's also easy to extend and use to build your own tools.\n\nUsercorn could be used to emulate 16-bit DOS, 32-bit and 64-bit ARM/MIPS/x86/SPARC binaries for Linux, Darwin, BSD, DECREE, and even operating systems like Redux.\n\nRight now, x86\\_64 linux and DECREE are the best supported guests.\n\nWhy?\n----\n\n- Usercorn aims to be a framework to simplify emulating and deeply hooking a userspace environment for many target architectures and kernel ABIs.\n- Debug stubborn binaries. I had a binary gdb refused to debug (\"Program exited during startup.\"). No problem. Usercorn can single-step into the program for you.\n- Debug foreign architecture and OS binaries. You don't need a MIPS box. You don't need qemu-user. You don't even need Linux.\n- Write tools, like fuzzers, static analyzers, recompilers, memory and register analysis, overlay code coverage and machine state into IDA/Binary Ninja.\n- Selectively call functions from within a binary. Usercorn will map a binary and emulate the kernel for you.\n- Whatever you want. Open an issue if you have a cool debugging / reverse engineering idea I didn't think about - I may just implement it.\n\nCaveats\n----\n\n- Your userspace might be incredibly confusing to the target binary.\n- No API for memory mapped files yet (kinda, if mmap() currently gets a file descriptor argument it will manually copy the file into memory).\n- I only have maybe 20% of the posix syscalls implemented, which is enough to run basic binaries. Busybox works great.\n\n[See Also](https://xkcd.com/1406/) (credit: XKCD)\n----\n![Universal converter](https://imgs.xkcd.com/comics/universal_converter_box.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunixbochs%2Fusercorn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flunixbochs%2Fusercorn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunixbochs%2Fusercorn/lists"}