{"id":13547232,"url":"https://github.com/mongodb-labs/disasm","last_synced_at":"2025-12-30T00:14:29.018Z","repository":{"id":66714896,"uuid":"61579503","full_name":"mongodb-labs/disasm","owner":"mongodb-labs","description":"Interactive Disassembler GUI - This Repository is NOT a supported MongoDB product","archived":false,"fork":false,"pushed_at":"2016-11-04T22:01:15.000Z","size":7769,"stargazers_count":247,"open_issues_count":4,"forks_count":20,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-12-18T19:03:38.497Z","etag":null,"topics":["dissassembler","python"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/mongodb-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2016-06-20T20:52:30.000Z","updated_at":"2024-06-20T15:58:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"c60ffa71-627e-4950-8900-6a49857f46b3","html_url":"https://github.com/mongodb-labs/disasm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-labs%2Fdisasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-labs%2Fdisasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-labs%2Fdisasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-labs%2Fdisasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb-labs","download_url":"https://codeload.github.com/mongodb-labs/disasm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246880295,"owners_count":20848839,"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":["dissassembler","python"],"created_at":"2024-08-01T12:00:52.746Z","updated_at":"2025-12-30T00:14:28.991Z","avatar_url":"https://github.com/mongodb-labs.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"Interactive Disassembler GUI\n============================\n\n* [About](#about)\n* [Before running](#before-running)\n    * [IACA](#iaca)\n    * [Pypy](#pypy)\n* [Running](#running)\n    * [Options](#options)\n* [Features](#features)\n* [Bugs](#bugs)\n* [Contributors](#contributors)\n* [License](#license)\n\nAbout\n-----\n\nDisasm is a browser-based application, built on Flask, that allows you to disassemble ELF files into Intel x86 assembly. The assembly and analysis is displayed in a browser so that you can click around and interact with it.\n\nBefore running\n-----------------\n\n1. Install [Capstone](http://www.capstone-engine.org/download.html)\n2. Install the dependencies\n    * `$ pip install -r requirements.txt --ignore-installed`\n3. Replace the upload path and source code directory path in `config.py` with the appropriate relative paths on your machine.\n\n### IACA\n\nThere is optional IACA integration. To use it, you must first download IACA from [Intel's website](https://software.intel.com/en-us/articles/intel-architecture-code-analyzer-download) and update variables in your config.py accordingly.\n\n### PyPy\n\n[PyPy](http://pypy.org/) is an alternative implementation of python that provides a considerable speedup. To use it, there is a little more setup involved.\n\n1. Set up the requirements for pypy using either of the following methods:\n    * `pip_pypy install -r requirements.pypy.txt` (regular pip doesn't install to a directory that pypy can find)\n    * OR create a pypy virtualenv and `pip install -r requirements.pypy.txt` within that virtualenv\n2. Ensure that you have either `c++filt` or `gc++filt` on your machine and in your `$PATH`. The demangler library we use does not work with pypy so we use command line tools instead. If you know of a python demangler library that can run on pypy, please let us know!\n\nRunning\n-------\n\nYou can run the application with\n\n```python\npython run.py\n```\n\nThis will run the server on top of Gunicorn, a faster, more reliable, and more robust server than Werkzeug, the default Flask server. If Gunicorn isn't working for you, or if you'd like to use Werkzeug for any other reason, you can do so by running:\n\n```python\npython app/app.py\n```\n\nIf Pypy is installed, then you can run the application by running pypy instead of python:\n\n```python\npypy run.py\n```\n\n### Options\n\n* -f \u003cfile(s)\u003e, --files \u003cfile(s)\u003e\n    * File(s) that you want to disassemble.\n\nFeatures\n--------\n\nFeatures marked with an asterisk (*) require that the .dwarf_info section be defined in order to use it.\n\n### Disassembly\n\nThe main feature of the application, an ELF executable can be disassembled into x86 assembly and displayed in the browser.\n\n### Source code stack trace *\n\nAfter selecting a line of assembly, the source code that corresponds to it can be displayed, as well as the full stack trace of function calls that refer to it.\n\nNote: This feature requires that the source directory of the code that compiled into this executable be defined in config.py.\n\n![source code stack trace](screenshots/stack-trace.png \"Example of source code stack trace\")\n\n### IACA integration\n\nA sequence of instructions can be analyzed by Intel IACA.\n\nNote: In order to use this feature, you must first download IACA from [Intel's website](https://software.intel.com/en-us/articles/intel-architecture-code-analyzer-download) and update variables in your config.py accordingly.\n\n![intel iaca integration](screenshots/iaca.gif \"Using IACA to determine the throughput of a set of instructions\")\n\n### Register contents *\n\nWhenever possible, the contents of a register will be displayed, including the object's member that is being pointed to if a valid offset is given.\n\n![register tracking](screenshots/register-tracking.png \"Determine the contents of a register\")\n\n### Register tracking *\n\nObserve which instructions read and/or write to a particular register by right clicking on the desired register and selecting the appropriate option from the dropdown menu.\n\n![registers written to and read from](screenshots/relevant-registers.png \"Display all of the instructions that write to or read from this register\")\n\n### Flags read/written\n\nInstructions that write to a flag(s) will display a white flag next to the mnemonic. Instructions that read from a flag(s) will display a black flag next to the mnemonic. Hovering over the flag will display which flags are read to/written from in this operation.\n\n![flags written to and read from](screenshots/relevant-flags.png \"Display all of the flags that are written to or read from\")\n\n### Jump table resolution \n\nJump tables are parsed. Clicking on the jump table instruction displays the mapping between each condition value and the address to jump to. Clicking on each of these addresses jumps to the respective instruction.\n\n![jump table parsing](screenshots/jump-table.png \"Display the information relevant to the detected jump table\")\n\n### Rip-relative address resolution and interpretation\n\nA rip-relative adddress (e.g, `rip + 0x129d866`) can be resolved into a single address by right clicking on that part of the instruction. The value at this address can also be read from the file as an 8/16/32/64-bit signed decimal/unsigned decimal/hexadecimal/binary number, single/double precision floating point number, or null-terminated C String (up to 128 bytes).\n\n![rip relative resolution and interpretation](screenshots/rip-relative.gif \"Resolving the RIP-relative address and interpreting the data at that address\")\n\n### Type analysis *\n\nYou can search for a type that is defined in this file in order to obtain obtain in-depth information about this type, including its size, subtype, and member variables. When displaying member variables, you can also see their types, their offsets, and their name.\n\n![type analysis](screenshots/type-analysis.gif \"Obtaining information about a given type\")\n\n### Jumping\n\nClicking on the address of a jump or call instruction will allow you to jump to the address.\n\n![jumping](screenshots/jumping.gif \"Following instruction jumps\")\n\n### Number conversion\n\nBy right clicking on an immediate value, you can convert it to/from decimal (signed and unsigned), hexadecimal, and binary. If the number is less than 128 in unsigned decimal, then it can also be converted to ASCII.\n\n![number conversion](screenshots/number-conversion.gif \"Converting numbers\")\n\n### Instruction documentation\n\nHovering over an instruction mnemonic will display a short explaination of what it does. Clicking on an instruction mnemonic will display an in-depth explaination.\n\n![short description](screenshots/short-description.png \"Short description of what the instruction does\")\n\n![full description](screenshots/full-description.png \"Full documentation for the instruction\")\n\n### File upload\n\nWhen a file is uploaded, it will be stored on the server for quicker lookup later. These files can also be deleted.\n\n![file upload](screenshots/file-upload.png \"Display the list of files previously uploaded\")\n\n### NOP byte size\n\nNOP operations (which are essentially meaningless) are replaced with the size of the NOP.\n\n![NOP byte size](screenshots/nop-byte-size.png \"Display the size of the NOP instruction\")\n\n### Keyboard shortcuts\n\n#### Function search\n\n* Up/down: Navigate through the list of functions\n* Enter: Disassemble the currently selected function\n* ?: Display the help menu\n\n#### Disassembly\n\n* Up/down: Navigate through the instructions\n* Right Arrow\n    * On jmp/call: Go to target address\n    * On ret: Return to the calling function (only available if this function was reached by entering going through a call instruction)\n* Left Arrow\n    * Undo previous jump/call (if applicable)\n* Enter: Open the analysis window relevant to this instruction\n\n##### Analysis window open\n\n* Shift + up/down: Go up/down the function stack\n* Tab: Cycle through the analysis tabs\n* Escape: Close the analysis window\n\nBugs\n----\nIf you find any bugs, please contact `hareldan95@gmail.com` or `dorothchen@gmail.com` with as much of the following information as possible:\n\n* Version of python being run\n* Source code language and version\n* A link to download the executable, along with the name of the function that prodeced the bug.\n* If an error/exception was raised, then the full stack trace of the error/exception.\n* The browser and version of the browser being used.\n* Anything else you think might be relevant.\n\nContributors\n------------\n\n* Dorothy Chen\n* Dan Harel\n\nLicense\n-------\n\nCopyright 2016 MongoDB Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-labs%2Fdisasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb-labs%2Fdisasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-labs%2Fdisasm/lists"}