SHARE
TWEET

Untitled

a guest Jan 12th, 2017 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Setting up xrdp on Kali Linux 2016.2 on AWS
  2.  
  3. AWS has an AMI for Kali 2016.2, but being remote, you need VNC or RDP to access the graphical tools.
  4.  
  5. VNC is easy to set up but very restrictive. RDP is harder to set up, but easier to use. These are the instructions I use to set up xrdp.
  6.  
  7. I use this config so that I connect to the Kali VM through an Apache Guacamole RDP proxy. This keeps Kali behind the firewall and in my pentesting lab. Guacamole also allows me to access the Kali box on SSH or RDP via a web interface from anywhere and any device.
  8.  
  9. OS: Kali Linux 2016.2
  10. AMI: Updated 19 Oct 2016
  11.  
  12. Bash:
  13.  
  14. # Upgrade OS
  15. sudo apt-get update -y && apt-get upgrade  -y
  16. sudo apt-get dist-upgrade -y
  17. sudo apt-get install xrdp lxde-core lxde tigervnc-standalone-server -y
  18.  
  19. sudo update-alternatives --config x-session-manager
  20. # choose xfce4-session
  21.  
  22. # New sudo user for Guacamole connection
  23. sudo useradd -m kali
  24. sudo passwd kali
  25. sudo usermod -a -G sudo kali
  26. sudo chsh -s /bin/bash kali
  27.  
  28. # edit xrdp.ini - reducing colour depth reduces bandwidth and can resolve black screen issues
  29. sudo nano /etc/xrdp/xrdp.ini
  30.     autorun=sesman-any
  31.     max_bpp=16
  32.   [sesman-any]
  33.     ip=127.0.0.1
  34.     # changed username and password to the kali user
  35.  
  36. # Allow more than root to access the system  
  37. sudo nano /etc/X11/Xwrapper.config
  38.     allowed_users=anybody
  39.  
  40. # start services
  41. sudo service xrdp start
  42. sudo service xrdp-sesman start
  43.  
  44. # configure services to auto-start on boot
  45. sudo update-rc.d xrdp enable
  46. sudo systemctl enable xrdp-sesman.service
RAW Paste Data
Top