hackerschoice / segfault

345 stars 38 forks source link

X11 session #69

Closed SkyperTHC closed 1 year ago

SkyperTHC commented 1 year ago

Allow users to run X11 programs (GUI programs like browsers).

Needs to work for non-X11 clients (e.g. RDP or VNC protocol).

Various tools could be used

x11vnc works fine. Server

Xvfb :10 -screen 0 1920x1080x24 &
fluxbox -display :10 &
x11vnc -display :10   -xkb -nopw

client

ssh -L5900:10.11.0.6:5900 root@

Container's 64mb shm is insufficient. Needs to run with --shm-size=.

Need easy script that:

  1. Sets passwords (derived from SF_SECRET)
  2. Kills all processes if ssh sessions exits (or add to cleanup script or to destructor to ignore all processes below fluxbox.

RDP is problem

Server

service xrdp start

Xrdp insist of starting Xorg and wont use existing fluxbox/Xvfb. hacking into Xorg script wont help .

I only get this working if I use RDP -> VNC -> Xorg: Create /sbin/Xvnc with:

#! /bin/bash

Xvfb $1 -screen 0 1920x1080x24 &
sleep 1
x11vnc -display $1 -xkb -nopw -rfbport 5910

add this to /etc/xrdp/startwm.sh

fluxbox

Then select "Xvnc" during login via RDP. Brave still shows SIGTRAP on many webpages (cnn.com etc).

  1. It would be better to use RDP without VNC in between.

XPRA

Works great and can be viewed from any HTML5 web browser:

XPRA_PASSWORD=foobar xpra start --bind-tcp=0.0.0.0:9876,auth=env --html=on --start=xterm

or as standalone:

xpra start ssh://root@quotescene/ --start=xterm  --resize-display=1280x1024 --ssh=ssh --ssh-upgrade=no

Unfortunately not part of Kali Linux (and the ubuntu .deb depends on libprocps8, which has been deprecated a few weeks ago in Kali as well).

SkyperTHC commented 1 year ago

Done. https://www.thc.org/segfault/gui