[+] Qemu user-mode emulation


[*] Using jchroot for building more secure chroot environments
[*] This module creates a working copy of the firmware filesystem in the log directory /logs.

[*] Create a firmware backup for emulation ...
[*] Firmware backup for emulation created in /logs/s115_usermode_emulator/firmware
[*] Root directory auto detection for /logs/s115_usermode_emulator/firmware (could take some time)

[*] Found 2 different root directories:
[+] Found the following root directory: /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract via binary interpreter / dir names / busybox.
[+] Found the following root directory: /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/ via binary interpreter / dir names / busybox.
[*] Detected 2 root directories:

[*] Detected root path: /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract
[*] Running emulation processes in /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract root path (1/2).
[*] Create unique binary array for /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract root path (1/2).
[*] Testing 20 unique executables in root dirctory: /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract (1/2).

==> Preparation phase

[*] Preparing the environment for usermode emulation
[*] Creating dev area for user mode emulation
[*] Creating /dev/console
[*] Creating /dev/null
[*] Creating /dev/zero
[*] Creating /dev/ptmx
[*] Creating /dev/tty
[*] Creating /dev/random
[*] Creating /dev/urandom
[*] Creating /dev/mem
[*] Creating /dev/kmem
[*] Creating /dev/armem
[*] Creating /dev/tty0
[*] Creating /dev/ttyS0 - ttyS3
[*] Creating /dev/adsl0
[*] Creating /dev/ppp
[*] Creating /dev/hidraw0
[*] Creating and populating /dev/mtd
[*] Creating and populating /dev/mtdblock
[*] Creating and populating /dev/tts

[*] Currently mounted areas:
    proc on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/proc type proc (rw,relatime)
    tmpfs on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/run type tmpfs (rw,nosuid,nodev,noexec,relatime,inode64)
    sysfs on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/sys type sysfs (rw,nosuid,nodev,noexec,relatime)

[*] Final fixes of the root filesytem in a chroot environment



[*] Initial CPU detection process of binary libmbedcrypto.so.0 with CPU configuration .
[*] Initial CPU detection process of binary libssl.so.1.0.0 with CPU configuration .
[*] Initial CPU detection process of binary libmp4v2.so.2.0.0 with CPU configuration .
[*] Initial CPU detection process of binary libcrypto.so.1.0.0 with CPU configuration .
[*] Initial CPU detection process of binary libzbar.so.0.2.0 with CPU configuration .
[*] Initial CPU detection process of binary libcurl.so.4.3.0 with CPU configuration .
[*] Initial CPU detection process of binary libjson-c.so.2.0.1 with CPU configuration .
[*] Initial CPU detection process of binary libfftw3.so.3.4.4 with CPU configuration .
[*] Initial CPU detection process of binary libfaac.so.0.0.0 with CPU configuration .
[*] Initial CPU detection process of binary libnl-3.so.200.21.0 with CPU configuration .
[*] Initial CPU detection process of binary libnl-genl-3.so.200.21.0 with CPU configuration .
[*] Initial CPU detection process of binary libmbedtls.so.10 with CPU configuration .
[*] Initial CPU detection process of binary libmbedx509.so.0 with CPU configuration .
[*] Initial CPU detection process of binary boa with CPU configuration .
[*] Initial CPU detection process of binary hello.cgi with CPU configuration .
[*] Initial CPU detection process of binary iperf with CPU configuration .
[*] Initial CPU detection process of binary libstdc++.so.6.0.17 with CPU configuration .
[*] Initial CPU detection process of binary libgcc_s.so.1 with CPU configuration .
[*] Initial CPU detection process of binary busybox with CPU configuration .
[*] Initial CPU detection process of binary flash_erase with CPU configuration .

[*] Detected root path: /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/
[*] Running emulation processes in /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/ root path (2/2).
[*] Create unique binary array for /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/ root path (2/2).
[*] Testing 2 unique executables in root dirctory: /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/ (2/2).

==> Preparation phase

[*] Preparing the environment for usermode emulation
[*] Creating dev area for user mode emulation
[*] Creating /dev/console
[*] Creating /dev/null
[*] Creating /dev/zero
[*] Creating /dev/ptmx
[*] Creating /dev/tty
[*] Creating /dev/random
[*] Creating /dev/urandom
[*] Creating /dev/mem
[*] Creating /dev/kmem
[*] Creating /dev/armem
[*] Creating /dev/tty0
[*] Creating /dev/ttyS0 - ttyS3
[*] Creating /dev/adsl0
[*] Creating /dev/ppp
[*] Creating /dev/hidraw0
[*] Creating and populating /dev/mtd
[*] Creating and populating /dev/mtdblock
[*] Creating and populating /dev/tts

[*] Currently mounted areas:
    proc on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/proc type proc (rw,relatime)
    tmpfs on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/run type tmpfs (rw,nosuid,nodev,noexec,relatime,inode64)
    sysfs on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/sys type sysfs (rw,nosuid,nodev,noexec,relatime)

[*] Final fixes of the root filesytem in a chroot environment



[*] Initial CPU detection process of binary libstdc++.so.6.0.17 with CPU configuration .
[*] Initial CPU detection process of binary libgcc_s.so.1 with CPU configuration .
[*] Initial strace run with jchroot on the command ./thirdlib/libmbedcrypto.so.0 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libssl.so.1.0.0 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libmp4v2.so.2.0.0 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libcrypto.so.1.0.0 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libzbar.so.0.2.0 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libcurl.so.4.3.0 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libjson-c.so.2.0.1 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libfftw3.so.3.4.4 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libfaac.so.0.0.0 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libnl-3.so.200.21.0 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libnl-genl-3.so.200.21.0 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libmbedtls.so.10 to identify missing areas
[*] Initial strace run with jchroot on the command ./thirdlib/libmbedx509.so.0 to identify missing areas
[*] Initial strace run with jchroot on the command ./usr/boa/boa to identify missing areas
[*] Initial strace run with jchroot on the command ./usr/www/cgi-bin/hello.cgi to identify missing areas
[*] Initial strace run with jchroot on the command ./usr/bin/iperf to identify missing areas
[*] Initial strace run with jchroot on the command ./lib/libstdc++.so.6.0.17 to identify missing areas
[*] Initial strace run with jchroot on the command ./lib/libgcc_s.so.1 to identify missing areas
[*] Initial strace run with jchroot on the command ./bin/busybox to identify missing areas
[*] Initial strace run with jchroot on the command ./sbin/flash_erase to identify missing areas
[*] Initial strace run with jchroot on the command ./libstdc++.so.6.0.17 to identify missing areas
[*] Initial strace run with jchroot on the command ./libgcc_s.so.1 to identify missing areas


==> Cleanup phase

[*] Terminating qemu processes - check it with ps
[*] Cleaning the emulation environment


[*] Umounting proc, sys and run
[*] Unmounting proc on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/proc type proc (rw,relatime)
[*] Unmounting tmpfs on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/run type tmpfs (rw,nosuid,nodev,noexec,relatime,inode64)
[*] Unmounting sysfs on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/sys type sysfs (rw,nosuid,nodev,noexec,relatime)
[*] Unmounting proc on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/proc type proc (rw,relatime)
[*] Unmounting tmpfs on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/run type tmpfs (rw,nosuid,nodev,noexec,relatime,inode64)
[*] Unmounting sysfs on /logs/s115_usermode_emulator/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/sys type sysfs (rw,nosuid,nodev,noexec,relatime)

==> Reporting phase

[+] Emulated binary flash generated output in /logs/s115_usermode_emulator/qemu_tmp_flash_erase.txt.
[+] Emulated binary hello.cgi generated output in /logs/s115_usermode_emulator/qemu_tmp_hello.cgi.txt.
[+] Emulated binary iperf generated output in /logs/s115_usermode_emulator/qemu_tmp_iperf.txt.
[+] Emulated binary busybox generated output in /logs/s115_usermode_emulator/qemu_tmp_busybox.txt.
[+] Emulated binary boa generated output in /logs/s115_usermode_emulator/qemu_tmp_boa.txt.
[*] Remove firmware copy from emulation directory.