{{ ipc-modem or other programs <-> libsamsung-ipc <-> Linux kernel <-> VHCI <-> software sending USB packets We have several choices for the Linux kernel: | Kernels | Comments | | User mode Linux (ARCH=um) | (+) Very lightweight, runs completely in userspace (-) Requires patches for USB / VHCI | | Linux + libvirt + kvm | (-) Require some virtualization setup that requires dedicated RAM (+) Probably works unpatched | And there is already some projects emulating usb devices: | Project | Description | comments | | gnuk | USB token software | can build for gnulinux | | choptix | Library used by gnuk | More simple examples | | simtrace2 ? | SIM tracing and MITM tool | Probably uses vusb for testing too | So it might be possible to modify them to send some simple USB packets captured with wireshark / tshark / tcpdump. h4. user mode Linux I've already managed to find a configuration that works in an FSDG compliant way: | Settings | Status | | *kernel*: kernel_replicant_linux (replicant-11-test branch at the time of writing) *compilation settings*: ARCH=um *Host architecture*: x86_64 *kernel defconfig*: x86_64_defconfig *Target Distribution*: Parabola x86_64 *commandline arguments*: ./linux mem=2047M ubd0=parabola.img root=/dev/ubda1 | Boots fine | | *kernel*: kernel_replicant_linux or upstream Linux *compilation settings*: ARCH=um *Host architecture*: i686 or x86_64 *kernel defconfig*: i686_defconfig | Fails to compile | h5. Booting Parabola To run Parabola first you need to create an image. Then you need to chroot (with arch-chroot) insde the image and change the password. Once you exited the chroot and unmounted the image and removed the loop mapping, you can boot it. During boot you'll see a message like that at the end:
Virtual console 1 assigned device '/dev/pts/4'
You can then login in this way:
$ sudo picocom /dev/pts/4 
picocom v3.1

port is        : /dev/pts/4
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready

parabola login: root
Password: 
[root@parabola ~]# cat /etc/os-release 
NAME="Parabola"
PRETTY_NAME="Parabola GNU/Linux-libre"
ID=parabola
ID_LIKE=arch
BUILD_ID=rolling
ANSI_COLOR="1;35"
HOME_URL="https://www.parabola.nu/"
DOCUMENTATION_URL="https://wiki.parabola.nu/"
SUPPORT_URL="irc://chat.freenode.net#parabola"
BUG_REPORT_URL="https://labs.parabola.nu/"
LOGO=parabola
[root@parabola ~]# 
h5. User Mode Linux TODO * We probably need to make i686 and armv7 to work too. * We need to find and port the USB patches on top of kernel_replicant_linux * We also need to setup USB somehow with vhci_hcd and so on * We still need to find a very simple stack to send URBs.