CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/DLLHijackAuditKit/regenerate_binaries.rb
Views: 11765
1
#!/usr/bin/env ruby
2
3
dllbase = File.expand_path(File.dirname(__FILE__))
4
msfbase = File.expand_path(File.join(dllbase, "..", "..", ".."))
5
msfv = File.join(msfbase, "msfvenom")
6
7
Dir.chdir(dllbase)
8
9
system("ruby #{msfv} -p windows/exec CMD=calc.exe -f exe -o runcalc.exe")
10
system("ruby #{msfv} -p windows/exec CMD=calc.exe -f dll -o runcalc.dll")
11
system("ruby #{msfv} -p windows/exec CMD='cmd.exe /c echo yes > exploited.txt' -f dll -o runtest.dll")
12
system("ruby #{msfv} -p windows/exec CMD='cmd.exe /c echo yes > exploited.txt' -f exe -o runtest.exe")
13
14
15