Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSFvenom support for Nim shellcode #16973

Merged
merged 2 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ GEM
rex-socket
rex-text
rex-struct2 (0.1.3)
rex-text (0.2.44)
rex-text (0.2.45)
rex-zip (0.1.4)
rex-text
rexml (3.2.5)
Expand Down
6 changes: 6 additions & 0 deletions lib/msf/base/simple/buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def self.transform(buf, fmt = "ruby", var_name = 'buf', encryption_opts={})
buf = Rex::Text.encode_base64(buf)
when 'go','golang'
buf = Rex::Text.to_golang(buf)
when 'nim','nimlang'
buf = Rex::Text.to_nim(buf)
else
raise BufferFormatError, "Unsupported buffer format: #{fmt}", caller
end
Expand Down Expand Up @@ -97,6 +99,8 @@ def self.comment(buf, fmt = "ruby")
buf = Rex::Text.to_psh_comment(buf)
when 'go','golang'
buf = Rex::Text.to_golang_comment(buf)
when 'nim','nimlang'
buf = Rex::Text.to_nim_comment(buf)
else
raise BufferFormatError, "Unsupported buffer format: #{fmt}", caller
end
Expand All @@ -122,6 +126,8 @@ def self.transform_formats
'java',
'js_be',
'js_le',
'nim',
'nimlang',
'num',
'perl',
'pl',
Expand Down