{"id":17299000,"url":"https://github.com/egibs/rsd","last_synced_at":"2025-10-15T13:31:38.532Z","repository":{"id":243448389,"uuid":"812452998","full_name":"egibs/rsd","owner":"egibs","description":"Rust implemention of xxd -e -l 64","archived":false,"fork":false,"pushed_at":"2024-12-16T14:06:42.000Z","size":218,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-16T14:24:12.309Z","etag":null,"topics":["binary-analysis","elf","elf-header","elf-parser","linux","rust","xxd"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egibs.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-08T23:52:38.000Z","updated_at":"2024-12-16T14:06:40.000Z","dependencies_parsed_at":"2024-10-28T13:15:02.420Z","dependency_job_id":"5693b401-fbbf-4403-83a9-018e8531037c","html_url":"https://github.com/egibs/rsd","commit_stats":null,"previous_names":["egibs/rsd"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egibs%2Frsd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egibs%2Frsd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egibs%2Frsd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egibs%2Frsd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egibs","download_url":"https://codeload.github.com/egibs/rsd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236612459,"owners_count":19177092,"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":["binary-analysis","elf","elf-header","elf-parser","linux","rust","xxd"],"created_at":"2024-10-15T11:20:44.047Z","updated_at":"2025-10-15T13:31:33.229Z","avatar_url":"https://github.com/egibs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rsd\n\n`rsd` Rust implementation of something resembling `xxd -e -l 64`. Its functionality is limited to looking at the headers of ELF binaries and outputting the details in a mostly- human-readable format.\n\n## Why?\n\nI wanted to learn Rust a little better; I also wanted a more readable version of `xxd -e -l 64` when parsing ELF headers rather than parsing something like this:\n```\nced27abc2bef:/# xxd -e -l 64 /bin/sh\n00000000: 464c457f 00010102 00000000 00000000   .ELF............\n00000010: 00b70003 00000001 0000a780 00000000   ................\n00000020: 00000040 00000000 000a0348 00000000   @.......H.......\n00000030: 00000000 00380040 00400009 00180019   ....@.8...@.....\n```\nor this:\n```\nced27abc2bef:/# xxd -l 64 /bin/sh\n00000000: 7f45 4c46 0201 0100 0000 0000 0000 0000  .ELF............\n00000010: 0300 b700 0100 0000 80a7 0000 0000 0000  ................\n00000020: 4000 0000 0000 0000 4803 0a00 0000 0000  @.......H.......\n00000030: 0000 0000 4000 3800 0900 4000 1900 1800  ....@.8...@.....\n```\n\nI've been writing YARA rules recently and knowing how to locate information like this can prove useful, though making it more human-readable is more efficient as well.\n\n## What works for now?\n\n- Building locally via `rustc`, Docker, or Apko (via Melange)\n- ELF binaries\n\n## Usage\n\n`./rsd \u003cprogram name\u003e`\n\nExample (run from Wolfi):\n```\n./rsd /bin/sh\nFull header:\n7F 45 4C 46 02 01 01 00 00 00 00 00 00 00 00 00 03 00 B7 00 01 00 00 00 80 A7 00 00 00 00 00 00 40 00 00 00 00 00 00 00 48 03 0A 00 00 00 00 00 00 00 00 00 40 00 38 00 09 00 40 00 19 00 18 00 ELF File Type: Shared (0x03)\nMachine Type: AArch64 (0x00B7)\n\nELF Class: 64-bit\nData Encoding: Little-endian\nELF Version: 1\nEntry Point Address: 42880\nProgram Header Table Offset: 64\nSection Header Table Offset: 656200\nELF Header Size: 64 bytes\nProgram Header Table Entry Size: 56 bytes\nNumber of Program Header Table Entries: 9\nSection Header Table Entry Size: 64 bytes\nNumber of Section Header Table Entries: 25\nSection Header String Table Index: 24\n\nSegment Information:\nSegment 0:\n  Type: PT_NOTE (0x00000004)\n  Offset: 64\n  Virtual Address: 64\n  Physical Address: 64\n  File Size: 0x00000000000001F8 (504 bytes)\n  Memory Size: 0x00000000000001F8 (504 bytes)\n  Flags: Unknown (0x00000008)\n\nSegment 1:\n  Type: PT_NOTE (0x00000004)\n  Offset: 568\n  Virtual Address: 568\n  Physical Address: 568\n  File Size: 0x000000000000001B (27 bytes)\n  Memory Size: 0x000000000000001B (27 bytes)\n  Flags: R (0x00000001)\n\nSegment 2:\n  Type: PT_SHLIB (0x00000005)\n  Offset: 0\n  Virtual Address: 0\n  Physical Address: 0\n  File Size: 0x000000000008F118 (586008 bytes)\n  Memory Size: 0x000000000008F118 (586008 bytes)\n  Flags: Unknown (0x00010000)\n\nSegment 3:\n  Type: PT_PHDR (0x00000006)\n  Offset: 646864\n  Virtual Address: 646864\n  Physical Address: 646864\n  File Size: 0x0000000000002399 (9113 bytes)\n  Memory Size: 0x0000000000002A00 (10752 bytes)\n  Flags: Unknown (0x00010000)\n\nSegment 4:\n  Type: PT_PHDR (0x00000006)\n  Offset: 651720\n  Virtual Address: 651720\n  Physical Address: 651720\n  File Size: 0x0000000000000220 (544 bytes)\n  Memory Size: 0x0000000000000220 (544 bytes)\n  Flags: Unknown (0x00000008)\n\nSegment 5:\n  Type: PT_NOTE (0x00000004)\n  Offset: 596\n  Virtual Address: 596\n  Physical Address: 596\n  File Size: 0x0000000000000020 (32 bytes)\n  Memory Size: 0x0000000000000020 (32 bytes)\n  Flags: X (0x00000004)\n\nSegment 6:\n  Type: PT_NOTE (0x00000004)\n  Offset: 585820\n  Virtual Address: 585820\n  Physical Address: 585820\n  File Size: 0x0000000000000034 (52 bytes)\n  Memory Size: 0x0000000000000034 (52 bytes)\n  Flags: X (0x00000004)\n\nSegment 7:\n  Type: PT_PHDR (0x00000006)\n  Offset: 0\n  Virtual Address: 0\n  Physical Address: 0\n  File Size: 0x0000000000000000 (0 bytes)\n  Memory Size: 0x0000000000000000 (0 bytes)\n  Flags: Unknown (0x00000010)\n\nSegment 8:\n  Type: PT_NOTE (0x00000004)\n  Offset: 646864\n  Virtual Address: 646864\n  Physical Address: 646864\n  File Size: 0x0000000000002130 (8496 bytes)\n  Memory Size: 0x0000000000002130 (8496 bytes)\n  Flags: R (0x00000001)\n```\n\nRunning `rsd` from MacOS will result in this:\n```\n❯ ./rsd /bin/sh\n/bin/sh is not an ELF file (CAFEBABE).\n```\n\n## Will anything be added to this project?\n\nMaybe -- I want to start automating various things in whatever language seems right. \n\nAnalyzing Mach-O binaries (i.e., MacOS binaries) doesn't seem to be as common but would be something to support in a future PR.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegibs%2Frsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegibs%2Frsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegibs%2Frsd/lists"}