I just can't figure out how to disassemble an .exe file using metasm. As far as I know the command should look something like:

ruby disassemble.rb [path-to-my-exe-file] > [path-to-output.asm]

But, that's not quite the thing.

  • How exactly not? An otherwise uninformed Google search suggests ruby ~/tools/metasploit/lib/metasm/samples/disassemble.rb raw_binary > asm_code.asm, which contains the full path to disassembly.rb. – usr2564301 Apr 26 '15 at 13:07
  • The disassemble.rb has in line 13 "require 'metasm'" and the error I get says "cannot load such file -- metasm (LoadError)" – SiltCrawler Apr 26 '15 at 13:18
  • @SiltCrawler Do you have metasm installed? That's what that error says to me; Ruby can't find it. – David Hoelzer May 2 '15 at 2:45

The solution is quite easy.

ruby disassemble.rb [path-to-my-exe-file] > [path-to-output.asm]

Is totally fine. I didn't copy metasm.rb and the metasm subfolder to the [ruby_dir]/lib/ruby/[version_number]/ directory.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.