### Install Requirements and Run Script Source: https://github.com/acecilia/openwrtinvasion/blob/master/README.md Install the necessary Python packages and then execute the main script. This method is for Mac or Linux users. ```shell pip3 install -r requirements.txt python3 remote_command_execution_vulnerability.py ``` -------------------------------- ### Install OpenWrt Snapshot Version Source: https://github.com/acecilia/openwrtinvasion/blob/master/README.md Download and flash a snapshot version of OpenWrt onto the router. It is crucial to verify the firmware checksum before flashing to prevent bricking the device. ```shell cd /tmp curl https://raw.githubusercontent.com/acecilia/OpenWRTInvasion/master/firmwares/OpenWrt/06-06-2020/openwrt-ramips-mt7621-xiaomi_mir3g-v2-squashfs-sysupgrade.bin --output firmware.bin # Put here the URL you want to use to download the firmware ./busybox sha256sum firmware.bin # Verify the firmware checksum before flashing, very important to avoid bricking your device! mtd -e OS1 -r write firmware.bin OS1 # Install OpenWrt ``` -------------------------------- ### Connect via Telnet Source: https://github.com/acecilia/openwrtinvasion/blob/master/README.md After the script is run, a telnet server is started on the router. Connect to it using the provided IP address and credentials. ```shell telnet ``` -------------------------------- ### Build and Run Docker Image Source: https://github.com/acecilia/openwrtinvasion/blob/master/README.md Use this command to build the Docker image for OpenWRTInvasion and then run it. This method is recommended for Windows users. ```bash docker build -t openwrtinvasion https://github.com/acecilia/OpenWRTInvasion.git docker run --network host -it openwrtinvasion ``` -------------------------------- ### Build OpenWrt Image with Docker Source: https://github.com/acecilia/openwrtinvasion/blob/master/README.md Use Docker to build a custom OpenWrt image from the latest source code. Mount the local bin directory to store the built image. ```shell docker pull openwrtorg/imagebuilder:ramips-mt7621-master docker run --rm -v "$(pwd)"/bin/:/home/build/openwrt/bin -it openwrtorg/imagebuilder:ramips-mt7621-master make PROFILE=xiaomi_mir3g-v2 image ``` -------------------------------- ### Check for Stock Firmware Update Source: https://github.com/acecilia/openwrtinvasion/blob/master/README.md Access the router's API to check for available stock firmware updates. This requires a valid session token. ```http http://192.168.31.1/cgi-bin/luci/;stok=/api/xqsystem/check_rom_update ``` -------------------------------- ### OpenWrt Invasion Payload Configuration Source: https://github.com/acecilia/openwrtinvasion/blob/master/extras/various/payload example/README.md This configuration snippet details the network parameters for the OpenWrt Invasion payload. Ensure these IP addresses and the port are correctly set for your environment. ```yaml netcat_port: 4444 attacker_ip_address: 192.168.0.13 router_ip_address: 192.168.0.21 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.