{"id":22951519,"url":"https://github.com/0xamined/elf-pwn","last_synced_at":"2025-04-01T22:47:06.851Z","repository":{"id":265260642,"uuid":"895620066","full_name":"0xAminED/elf-pwn","owner":"0xAminED","description":"A Python script for analyzing ELF (Executable and Linkable Format) files.","archived":false,"fork":false,"pushed_at":"2024-11-28T20:18:28.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T15:12:09.427Z","etag":null,"topics":["elf","elf-format","elf-parser","linux","malware-analysis","reverse-engineering"],"latest_commit_sha":null,"homepage":"","language":"Python","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/0xAminED.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-11-28T14:49:42.000Z","updated_at":"2024-11-28T20:28:46.000Z","dependencies_parsed_at":"2024-11-28T21:01:07.872Z","dependency_job_id":null,"html_url":"https://github.com/0xAminED/elf-pwn","commit_stats":null,"previous_names":["0xamined/elf-pwn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xAminED%2Felf-pwn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xAminED%2Felf-pwn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xAminED%2Felf-pwn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xAminED%2Felf-pwn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xAminED","download_url":"https://codeload.github.com/0xAminED/elf-pwn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246724798,"owners_count":20823544,"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":["elf","elf-format","elf-parser","linux","malware-analysis","reverse-engineering"],"created_at":"2024-12-14T15:16:22.547Z","updated_at":"2025-04-01T22:47:06.832Z","avatar_url":"https://github.com/0xAminED.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ELF-PWN\n\nA Python script for analyzing **ELF (Executable and Linkable Format)** files. This tool extracts detailed information about ELF file structures such as headers, sections, segments, symbols, and dynamic entries. It is useful for reverse engineering, system programming, and analyzing Linux-based executable files.\n\n---\n\n## Features\n\n- **ELF Header**: Displays basic information such as the magic number, entry point, machine type, and offsets for program and section headers.\n- **Sections**: Lists all sections in the ELF file with information like section type, address, size, and flags.\n- **Program Headers (Segments)**: Provides details about segments such as virtual address, physical address, file size, memory size, flags, and offset.\n- **Symbols**: Displays symbols in the ELF file, including their names and corresponding addresses (if available).\n- **Dynamic Section**: Displays entries from the dynamic section, useful for inspecting dynamically linked libraries.\n\n---\n\n## Requirements\n\n- Python 3.x\n- `pyelftools` library\n\n### Install dependencies\n\nYou can install the required library using pip:\n\n```bash\npip install pyelftools\n```\nOR\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\n### 1. Clone the Repository\nFirst, clone the repository to your local machine:\n\n```bash\ngit clone https://github.com/0xAminED/elf-pwn.git\ncd elf-pwn\n```\n### 2. Run the Script\nUse the following command to analyze a PE file. Replace \u003cpath_to_pe_file\u003e with the path to the PE file you want to analyze.\n```bash\npython elf_pwn.py \u003cpath_to_pe_file\u003e\n```\nExample:\n```bash\npython elf_pwn.py /path/to/your/file.elf\n```\n### 3. Output\nThe script will display detailed information about the ELF file, including headers, sections, segments, symbols, and dynamic entries. Here is an example of the output format:\n\n```bash\n====== ELF File Analysis ======\nFile: /path/to/your/file.elf\n\n== ELF Header ==\nMagic: b'\\x7fELF'\nClass: 2\nData Encoding: 1\nVersion: 1\nOS/ABI: 0\nType: 2\nMachine: 62\nEntry Point: 0x401000\nProgram Header Offset: 64\nSection Header Offset: 1234\nFlags: 0\nSize of Program Headers: 56\nSize of Section Headers: 40\nNumber of Program Headers: 8\nNumber of Section Headers: 30\n\n== Sections ==\nSection: .text\n  Type: 1\n  Address: 0x401000\n  Size: 0x500\n  Flags: 6\n\n...\n\n== Program Headers (Segments) ==\nSegment Type: 1\n  Virtual Address: 0x401000\n  Physical Address: 0x0\n  File Size: 0x1000\n  Memory Size: 0x1000\n  Flags: 4\n  Offset: 0\n\n...\n\n== Symbols (if any) ==\nSymbols in section: .symtab\n  _start at 0x401000\n\n== Dynamic Section ==\n  3 : 0x0000000000000000\n\n```\n\n## Supported File Formats\nThis tool works with ELF files, which are commonly used on Linux-based systems. Supported ELF file types include:\n- **Executable files (.elf)**\n- **Shared libraries (.so)**\n- **Object files (.o)**\n\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n\n## Acknowledgments\n\n- Thanks to the contributors for their valuable feedback and improvements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xamined%2Felf-pwn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xamined%2Felf-pwn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xamined%2Felf-pwn/lists"}