Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
A5t4t1ne committed Dec 9, 2024
1 parent 0ad175f commit 44585bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/encoders/aarch64/nonnull.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
#
# This module was developed during a semester projecter under the supervision of the CYD campus.
##

class MetasploitModule < Msf::Encoder
Expand All @@ -10,7 +12,8 @@ def initialize
super(
'Name' => 'AArch64 null-byte encoder',
'Description' => %q{
Output is guaranteed to be NULL-byte free.
This encoder produces an output that is guaranteed to be NULL-byte free.
Max payload size is 4136 Bytes.
},
'Author' => 'A5t4t1ne',
'Arch' => ARCH_AARCH64,
Expand Down Expand Up @@ -81,7 +84,6 @@ def min_jmp_back(enc_buf)
bytes_to_fill = val[1] - enc_buf.length
nops = (bytes_to_fill / 4) - 16 # loop lbl is 16 instructions above buffer

puts("nops: #{nops}, max size: #{val[0]}, buflen: #{enc_buf.length}")
return [val[2], "\x1f\x20\x03\xd5" * nops, val[3], val[4]]
end

Expand Down

0 comments on commit 44585bc

Please sign in to comment.