pr0v3rbs / FirmAE

Towards Large-Scale Emulation of IoT Firmware for Dynamic Analysis
MIT License
642 stars 119 forks source link

How to start the webserver in ASUS firmware? #25

Open G3n351S opened 3 years ago

G3n351S commented 3 years ago

Hi,

Thanks for your effort for this project! I'm trying to emulate the asus firmware using FirmAE. However FirmAE wasn't able to start the asus web server. May I know how I can manually start the asus web server using FirmAE?

pr0v3rbs commented 3 years ago

To executes the web service manually, the emulated target firmware must be connectable by a shell.

There are two methods (socat and telnet) to connect to the emulated firmware.

First, use socat. (Check firmadyne/console).

  1. Run the emulated target firmware using scratch/${IID}/run.sh
  2. Execute sudo socat - UNIX-CONNECT:/tmp/qemu.${IID}.S1, sudo nc -U /tmp/qemu.${IID}.S1 2.1. debug.py helps to connect with the socat command.

Second, use telnet. It needs a network connection with the emulated target firmware.

  1. Check the network reachability of the target firmware by using run.sh script with -c mode
  2. After finish the check, enter the debugging mode by running the command ./run.sh -d [brand] [firmware]
wynn1212 commented 2 years ago

AFAIK, you have to run httpd services under /www directory. At least for me. It solve 404 not found error.