{"id":21736197,"url":"https://github.com/audibleblink/ino","last_synced_at":"2025-04-13T01:55:45.179Z","repository":{"id":44783326,"uuid":"369044328","full_name":"audibleblink/ino","owner":"audibleblink","description":"In 'n Out - See what goes in and comes out of PEs","archived":false,"fork":false,"pushed_at":"2022-05-12T21:55:12.000Z","size":91,"stargazers_count":34,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T01:55:25.288Z","etag":null,"topics":["binary-analysis","reverse-engineering","winapi"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/audibleblink.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-20T01:23:08.000Z","updated_at":"2025-02-06T12:01:40.000Z","dependencies_parsed_at":"2022-09-03T05:01:34.837Z","dependency_job_id":null,"html_url":"https://github.com/audibleblink/ino","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audibleblink%2Fino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audibleblink%2Fino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audibleblink%2Fino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audibleblink%2Fino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/audibleblink","download_url":"https://codeload.github.com/audibleblink/ino/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654050,"owners_count":21140235,"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","reverse-engineering","winapi"],"created_at":"2024-11-26T05:17:24.319Z","updated_at":"2025-04-13T01:55:45.137Z","avatar_url":"https://github.com/audibleblink.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# In 'n Out\n\nParse and return PE information\n\n```json\nino -v comsvcs.dll\n\n{\n  \"Name\": \"\u003cstring\u003e\",\n  \"Path\": \"\u003cstring\u003e\",\n  \"Type\": \"\u003cstring file|directory\u003e\",\n  \"Imphash\": \"\u003cstring\u003e\",\n  \"Imports\": [{ \n  \t\"Host\": \"\u003cstring\u003e\", \n\t\"Functions\": [\"\u003cstring\u003e\",]},],\n  \"Exports\": [\"\u003cstring\u003e\",],\n  \"Forwards\": [\"\u003cstring\u003e\",],\n  \"PDB\": \"\u003cstring\u003e\",\n  \"Sections\": [{\n  \t\"Name\": \"\u003cstring\u003e\",\n\t\"Perm\": \"\u003cstring\u003e\",\n\t\"FileOffset\": int,\n\t\"VMA\": int, \n\t\"Size\": int,\n  }],\n}\n\n```\n\nIf compiled as a Windows EXE, there will be an additional property:\n\n```json\n\"DACL\": {\n      \"Owner\": \"\u003cstring\u003e\",\n      \"Group\": \"\u003cstring\u003e\",\n      \"Aces\": {\n            \"Principal\": \"\u003cstring\u003e\",\n            \"Rights\": [\"\u003cstring\u003e\", ...]\n      }\n}\n```\n\n\n```\nUsage of ino:\n  -def string\n        Print a .def file for a mathing dll\n        Ex: ino -def dbghelp.dll teams.exe\n  -dir string\n        Directory to recurse\n  -exports\n        Print Exports only\n  -forwards\n        Print Forwards only\n  -imphash\n        Print ImpHash only\n  -imports\n        Print Imports only\n  -type string\n        Use with --dir. Get [exe|dll]\n  -v    Print additional fields\n```\n\n### Cypher / Neo4j\n\n### Creating the Dataset\n\n```bash\nino -dir /windows/system32 -type dll \u003e sys32.dll.json\nino -dir /windows/system32 -type exe \u003e sys32.exe.json\n```\n\n### Importing the Dataset to Neo4j\n\n\u003e the below queries are for an old version of the JSON output. they remain as notes for me to reference\n\n```cypher\nCALL apoc.load.json(\"file:///sys32_dll.json\") \nYIELD value AS dllData\nMERGE (dll:DLL {name: dllData.Name, complete: false})\nSET dll.exports = dllData.Exports\nSET dll.path = dllData.Path\nSET dll.imphash = dllData.ImpHash\nSET dll.complete =  true\n\nWITH dll, dllData UNWIND dllData.Imports AS import\nMERGE (dll1:DLL {name: import.Host})\nFOREACH (i in CASE WHEN dll1.complete THEN [] ELSE [1] END |\n\tSET dll1.complete = false)\nWITH dll, dll1, import, dllData UNWIND import.Functions as func\nMERGE (dll)-[:IMPORTS {fn: func}]-\u003e(dll1)\n\nWITH dll, dllData UNWIND dllData.Forwards AS fwd\nMERGE (dll3:DLL {name: fwd.Host})\nFOREACH (i in CASE WHEN dll3.complete THEN [] ELSE [1] END |\n\tSET dll3.complete = false)\nWITH dll, dll3, fwd UNWIND fwd.Functions as func\nMERGE (dll)-[:FORWARDS {fn: func}]-\u003e(dll3)\n```\n\n```cypher\nCALL apoc.load.json(\"file:///sys32_exe.json\")\nYIELD value AS exeData\nMERGE (exe:EXE {name: exeData.Name, path: exeData.Path, imphash: exeData.ImpHash})\nSET exe.exports = exeData.Exports\n\nWITH exe, exeData UNWIND exeData.Imports AS import\nMERGE (dll:DLL {name: import.Host})\nFOREACH (i in CASE WHEN dll.complete THEN [] ELSE [1] END |\n\tSET dll.complete = false)\nWITH dll, exe, import, exeData UNWIND import.Functions as func\nMERGE (exe)-[:IMPORTS {fn: func}]-\u003e(dll)\n\nWITH exe, exeData UNWIND exeData.Forwards AS fwd\nMERGE (dll2:DLL {name: fwd.Host})\nFOREACH (i in CASE WHEN dll2.complete THEN [] ELSE [1] END |\n\tSET dll2.complete = false)\nWITH dll2, exe, fwd UNWIND fwd.Functions as func\nMERGE (exe)-[:FORWARDS {fn: func}]-\u003e(dll2)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudibleblink%2Fino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faudibleblink%2Fino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudibleblink%2Fino/lists"}