From 30e13c9040abaacf587e6fdcfea01ecd5df6c2c9 Mon Sep 17 00:00:00 2001 From: dledda-r7 Date: Fri, 20 Dec 2024 08:13:52 -0500 Subject: [PATCH] fix: fix mismatch between prepend name and stub in linux/armle --- lib/msf/core/payload/linux/armle/prepends.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/msf/core/payload/linux/armle/prepends.rb b/lib/msf/core/payload/linux/armle/prepends.rb index 90612a220791..7fb9557a4726 100644 --- a/lib/msf/core/payload/linux/armle/prepends.rb +++ b/lib/msf/core/payload/linux/armle/prepends.rb @@ -14,17 +14,18 @@ def prepends_map { # 'PrependFork' => "", - # setresuid(0, 0, 0) - 'PrependSetresuid' => "\x00\x00\x20\xe0" + # eor r0, r0, r0 # + # + # setuid(0) + 'PrependSetuid' => "\x00\x00\x20\xe0" + # eor r0, r0, r0 # "\x17\x70\xa0\xe3" + # mov r7, #23 # "\x00\x00\x00\xef", # svc # - # setuid(0) - 'PrependSetuid' => "\x00\x00\x20\xe0" + # eor r0, r0, r0 # - "\x01\x10\x21\xe0" + # eor r1, r1, r1 # - "\x02\x20\x22\xe0" + # eor r2, r2, r2 # - "\xa4\x70\xa0\xe3" + # mov r7, #0xa4 # - "\x00\x00\x00\xef" # svc # + # setresuid(0, 0, 0) + 'PrependSetresuid' => "\x00\x00\x20\xe0" + # eor r0, r0, r0 # + "\x01\x10\x21\xe0" + # eor r1, r1, r1 # + "\x02\x20\x22\xe0" + # eor r2, r2, r2 # + "\xa4\x70\xa0\xe3" + # mov r7, #0xa4 # + "\x00\x00\x00\xef" # svc # } end