├── README.md ├── install.sh ├── lightdm-autologin └── lightdm.conf /README.md: -------------------------------------------------------------------------------- 1 | # Setup 2 | Just run install.sh after giving execute permission to file. And your PNP-Portable-Hacking-Machine will be configured. 3 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | echo "**********************Performing update************************" 2 | apt-get update 3 | echo "**********************Installing xfce4 GUI**********************" 4 | apt-get install kali-defaults kali-root-login desktop-base xfce4 xfce4-places-plugin xfce4-goodies 5 | apt-get install lightdm 6 | dpkg-reconfigure lightdm 7 | echo "**********************Installing Vino************************" 8 | apt-get -y install vino 9 | gsettings set org.gnome.Vino prompt-enabled false 10 | gsettings set org.gnome.Vino require-encryption false 11 | 12 | echo "VNC server setup done" 13 | mkdir /root/.config/autostart 14 | 15 | echo "**********************Making autorun VNC script************************" 16 | echo "[Desktop Entry] 17 | Encoding=UTF-8 18 | Type=Application 19 | Name=VINO 20 | Comment= 21 | Exec=/usr/lib/vino/vino-server 22 | StartupNotify=false 23 | Terminal=false 24 | Hidden=false" > /root/.config/autostart/vino.desktop 25 | 26 | echo "VNC autorun on startup done" 27 | 28 | echo "****************Enabling autologin***************" 29 | 30 | mv /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.bak 31 | mv /etc/pam.d/lightdm-autologin /etc/pam.d/lightdm-autologin.bak 32 | cp lightdm.conf /etc/lightdm/lightdm.conf 33 | cp lightdm-autologin /etc/pam.d/lightdm-autologin 34 | -------------------------------------------------------------------------------- /lightdm-autologin: -------------------------------------------------------------------------------- 1 | #%PAM-1.0 2 | 3 | # Block login if they are globally disabled 4 | auth requisite pam_nologin.so 5 | 6 | # Load environment from /etc/environment and ~/.pam_environment 7 | session required pam_env.so readenv=1 8 | session required pam_env.so readenv=1 envfile=/etc/default/locale 9 | 10 | # Allow access without authentication 11 | #auth required pam_succeed_if.so user != root quiet_success 12 | auth required pam_permit.so 13 | 14 | @include common-account 15 | 16 | # SELinux needs to be the first session rule. This ensures that any 17 | # lingering context has been cleared. Without out this it is possible 18 | # that a module could execute code in the wrong domain. 19 | # When the module is present, "required" would be sufficient (When SELinux 20 | # is disabled, this returns success.) 21 | session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close 22 | 23 | session required pam_limits.so 24 | session required pam_loginuid.so 25 | @include common-session 26 | 27 | # SELinux needs to intervene at login time to ensure that the process 28 | # starts in the proper default security context. Only sessions which are 29 | # intended to run in the user's context should be run after this. 30 | session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open 31 | # When the module is present, "required" would be sufficient (When SELinux 32 | # is disabled, this returns success.) 33 | 34 | # Can't change password 35 | password required pam_deny.so 36 | 37 | @include common-password 38 | -------------------------------------------------------------------------------- /lightdm.conf: -------------------------------------------------------------------------------- 1 | # 2 | # General configuration 3 | # 4 | # start-default-seat = True to always start one seat if none are defined in the configuration 5 | # greeter-user = User to run greeter as 6 | # minimum-display-number = Minimum display number to use for X servers 7 | # minimum-vt = First VT to run displays on 8 | # lock-memory = True to prevent memory from being paged to disk 9 | # user-authority-in-system-dir = True if session authority should be in the system location 10 | # guest-account-script = Script to be run to setup guest account 11 | # logind-check-graphical = True to on start seats that are marked as graphical by logind 12 | # log-directory = Directory to log information to 13 | # run-directory = Directory to put running state in 14 | # cache-directory = Directory to cache to 15 | # sessions-directory = Directory to find sessions 16 | # remote-sessions-directory = Directory to find remote sessions 17 | # greeters-directory = Directory to find greeters 18 | # backup-logs = True to move add a .old suffix to old log files when opening new ones 19 | # 20 | [LightDM] 21 | #start-default-seat=true 22 | #greeter-user=lightdm 23 | #minimum-display-number=0 24 | #minimum-vt=7 25 | #lock-memory=true 26 | #user-authority-in-system-dir=false 27 | #guest-account-script=guest-account 28 | #logind-check-graphical=false 29 | #log-directory=/var/log/lightdm 30 | #run-directory=/var/run/lightdm 31 | #cache-directory=/var/cache/lightdm 32 | #sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions 33 | #remote-sessions-directory=/usr/share/lightdm/remote-sessions 34 | #greeters-directory=/usr/share/lightdm/greeters:/usr/share/xgreeters 35 | #backup-logs=true 36 | 37 | # 38 | # Seat configuration 39 | # 40 | # Seat configuration is matched against the seat name glob in the section, for example: 41 | # [Seat:*] matches all seats and is applied first. 42 | # [Seat:seat0] matches the seat named "seat0". 43 | # [Seat:seat-thin-client*] matches all seats that have names that start with "seat-thin-client". 44 | # 45 | # type = Seat type (xlocal, xremote, unity) 46 | # pam-service = PAM service to use for login 47 | # pam-autologin-service = PAM service to use for autologin 48 | # pam-greeter-service = PAM service to use for greeters 49 | # xserver-command = X server command to run (can also contain arguments e.g. X -special-option) 50 | # xmir-command = Xmir server command to run (can also contain arguments e.g. Xmir -special-option) 51 | # xserver-config = Config file to pass to X server 52 | # xserver-layout = Layout to pass to X server 53 | # xserver-allow-tcp = True if TCP/IP connections are allowed to this X server 54 | # xserver-share = True if the X server is shared for both greeter and session 55 | # xserver-hostname = Hostname of X server (only for type=xremote) 56 | # xserver-display-number = Display number of X server (only for type=xremote) 57 | # xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true) 58 | # xdmcp-port = XDMCP UDP/IP port to communicate on 59 | # xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf) 60 | # unity-compositor-command = Unity compositor command to run (can also contain arguments e.g. unity-system-compositor -special-option) 61 | # unity-compositor-timeout = Number of seconds to wait for compositor to start 62 | # greeter-session = Session to load for greeter 63 | # greeter-hide-users = True to hide the user list 64 | # greeter-allow-guest = True if the greeter should show a guest login option 65 | # greeter-show-manual-login = True if the greeter should offer a manual login option 66 | # greeter-show-remote-login = True if the greeter should offer a remote login option 67 | # user-session = Session to load for users 68 | # allow-user-switching = True if allowed to switch users 69 | # allow-guest = True if guest login is allowed 70 | # guest-session = Session to load for guests (overrides user-session) 71 | # session-wrapper = Wrapper script to run session with 72 | # greeter-wrapper = Wrapper script to run greeter with 73 | # guest-wrapper = Wrapper script to run guest sessions with 74 | # display-setup-script = Script to run when starting a greeter session (runs as root) 75 | # display-stopped-script = Script to run after stopping the display server (runs as root) 76 | # greeter-setup-script = Script to run when starting a greeter (runs as root) 77 | # session-setup-script = Script to run when starting a user session (runs as root) 78 | # session-cleanup-script = Script to run when quitting a user session (runs as root) 79 | # autologin-guest = True to log in as guest by default 80 | # autologin-user = User to log in with by default (overrides autologin-guest) 81 | # autologin-user-timeout = Number of seconds to wait before loading default user 82 | # autologin-session = Session to load for automatic login (overrides user-session) 83 | # autologin-in-background = True if autologin session should not be immediately activated 84 | # exit-on-failure = True if the daemon should exit if this seat fails 85 | # 86 | [Seat:*] 87 | #type=xlocal 88 | #pam-service=lightdm 89 | #pam-autologin-service=lightdm-autologin 90 | #pam-greeter-service=lightdm-greeter 91 | #xserver-command=X 92 | #xmir-command=Xmir 93 | #xserver-config= 94 | #xserver-layout= 95 | #xserver-allow-tcp=false 96 | #xserver-share=true 97 | #xserver-hostname= 98 | #xserver-display-number= 99 | #xdmcp-manager= 100 | #xdmcp-port=177 101 | #xdmcp-key= 102 | #unity-compositor-command=unity-system-compositor 103 | #unity-compositor-timeout=60 104 | #greeter-session=example-gtk-gnome 105 | #greeter-hide-users=false 106 | #greeter-allow-guest=true 107 | #greeter-show-manual-login=false 108 | #greeter-show-remote-login=true 109 | #user-session=default 110 | #allow-user-switching=true 111 | #allow-guest=true 112 | #guest-session= 113 | #session-wrapper=lightdm-session 114 | #greeter-wrapper= 115 | #guest-wrapper= 116 | #display-setup-script= 117 | #display-stopped-script= 118 | #greeter-setup-script= 119 | #session-setup-script= 120 | #session-cleanup-script= 121 | #autologin-guest=false 122 | autologin-user=root 123 | autologin-user-timeout=0 124 | #autologin-in-background=false 125 | #autologin-session= 126 | #exit-on-failure=false 127 | 128 | # 129 | # XDMCP Server configuration 130 | # 131 | # enabled = True if XDMCP connections should be allowed 132 | # port = UDP/IP port to listen for connections on 133 | # listen-address = Host/address to listen for XDMCP connections (use all addresses if not present) 134 | # key = Authentication key to use for XDM-AUTHENTICATION-1 or blank to not use authentication (stored in keys.conf) 135 | # hostname = Hostname to report to XDMCP clients (defaults to system hostname if unset) 136 | # 137 | # The authentication key is a 56 bit DES key specified in hex as 0xnnnnnnnnnnnnnn. Alternatively 138 | # it can be a word and the first 7 characters are used as the key. 139 | # 140 | [XDMCPServer] 141 | #enabled=false 142 | #port=177 143 | #listen-address= 144 | #key= 145 | #hostname= 146 | 147 | # 148 | # VNC Server configuration 149 | # 150 | # enabled = True if VNC connections should be allowed 151 | # command = Command to run Xvnc server with 152 | # port = TCP/IP port to listen for connections on 153 | # listen-address = Host/address to listen for VNC connections (use all addresses if not present) 154 | # width = Width of display to use 155 | # height = Height of display to use 156 | # depth = Color depth of display to use 157 | # 158 | [VNCServer] 159 | #enabled=false 160 | #command=Xvnc 161 | #port=5900 162 | #listen-address= 163 | #width=1024 164 | #height=768 165 | #depth=8 166 | --------------------------------------------------------------------------------