Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Most cmmon Linux Commands
- Linux Repositories
- leafpad /etc/apt/sources.list
- File must contain these two entries
- Rolling Repository for Agressive Linux Configuration Kali 2.0 from Kia and Jarred
- # deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160120-18:39]/ kali-rolling contrib main non-free
- #deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160120-18:39]/ kali-rolling contrib main non-free
- deb http://http.kali.org/kali kali-rolling main non-free contrib
- # deb-src http://http.kali.org/kali kali-rolling main non-free contrib
- deb http://http.kali.org/kali sana main non-free contrib
- deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
- Repositories to add for backward compatibility and Veil Install
- deb http://http.kali.org/kali sana main non-free contrib
- deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
- To create a live buid to the following
- apt-get install git live-build cdebootstrap
- git clone git://git.kali.org/live-build-config.git
- cd live-build-config
- ./build.sh --distribution kali-rolling --verbose
- To add packages to the build
- live-build-config/kali-config/variant-default/package-lists/kali.list.chroot:
- # Kali applications
- # You can customize the set of Kali applications to install
- # (-full is the default, -all is absolutely everything, the rest
- # corresponds to various subsets)
- kali-linux-full
- # kali-linux-all
- # kali-linux-sdr
- # kali-linux-gpu
- # kali-linux-wireless
- # kali-linux-web
- # kali-linux-forensic
- # kali-linux-voip
- # kali-linux-pwtools
- # kali-linux-top10
- # kali-linux-rfid
- # Graphical desktop
- kali-desktop-gnome
- guake
- veil-evasion
- veil-catapult
- x11vnc
- open-vm-tools-desktop
- fuse
- libreoffice
- ddclient
- ## Regular repositories
- deb http://http.kali.org/kali kali main non-free contrib
- deb http://security.kali.org/kali-security kali/updates main contrib non-free
- ## Source repositories
- deb-src http://http.kali.org/kali kali main non-free contrib
- deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
- deb http://repo.kali.org/kali kali-bleeding-edge main
- Reset Kali Interface Scaling for enlarge screen
- gsettings set org.gnome.desktop.interface scaling-factor 1
- Change command shell
- chsh - change shell
- Dictory and File Operationsls
- ls or la -a List the dir
- pwd - Show the current directory
- cd -change directory
- cd ~ -change to home dir
- cd\ -change to home dir
- mkdir -make directory
- rm -remove directory or file
- rm -fr -remove directory in trash
- chmod +x filename -modify file attributes
- chmod 744 filename -modify file attributes
- find / -name filename or directory -file files or folders
- cp -copy one or more files to another location
- df -h -display free disk space
- du -estimate file space usage
- gzip -compress or decompress named file(s)
- uname -a -show system informaion
- whoami -show how you are logged in
- scripts #!/bin/bash
- less - list a file contents
- env -view environment varables
- Trash -located in .local/share/Trash
- systemctl enable service name Start automatically
- Install and Update Apps
- aptitude install kali-linux-full
- apt-get update
- apt-get upgrade
- apt-get dist-upgrade will install the latest distribution.
- apt-get purge package Delete package and config files
- apt-get remove packate Remove package but not config files
- apt-get install kali-linux-all
- apt-get install kali-linux-full
- apt-get install openofficce.org
- apt-get install flashplugin-nonfree
- apt-get install openssh-server
- apt-get install metasploit-framework
- apt-get Install isc-dhcp-server
- apt-get install fern-wifi-cracker
- apt-get install wireless-tools - needed for debian standard install
- apt-cache search firmware wireless
- apt-get install ap-utils
- apt-get install firmware-realtek
- apt-get install veil or
- git clone https://github.com/Veil-Framework/Veil.git
- git clone https://github.com/Veil-Framework/Veil-Evasion
- git clone https://github.com/trustedsec/social-engineer-toolkit.git
- Network
- iwlist wlan0 scan -to find out what access points are out there.
- ifconfig -find wired net configuration
- iwconfig -find wireles
- s networks
- lsusb -list usb devices connected
- ifdown -down a particular interface
- kill PID Number -kill a particular process
- Wireless on Radxa Pro
- isusb -Find wirless
- Media
- ALT+F2 for run command
- smb//servername/sharename Mount a windows share.
- fdisk -l -used to find out what name your block device file uses
- mkdir /mnt/sbd1 -used to create a mount point - sbd1 may be what ever you want, but is typically named after the device as it makes life eaiser
- mount -a -this will mount all devices that are not yet mounted
- Services
- service -–status-all -show services
- service ssh start -start ssh
- ssh-keygen -t rsa -install certificates
- service network start -start netwwok
- service network stop
- Kali 20 ssh issue
- ssue: Kali 2.0, unlike Kali 1.x, requires authentication via keys alone, and will refuse even the correct root password with the default configuration. This was likely done to increase security.
- 1: On your Kali box, edit the file /etc/ssh/sshd_config.
- 2: In that file, find the line "PermitRootLogin without-password"
- 3: Edit it to "PermitRootLogin yes"
- 4: When you are done editing, restart the sshd service: "systemctl restart sshd"
- 5: You should now be able to SSH in to your Kali machine as root as you could before.
- Matasploit
- service postgresql start
- msfconsole -r <handler name>
- exec bundle install
- Simple Ducky
- java -jar duckencode.jar -i payload.txt
- Apache Web Server
- systemctl start apache2
- systemctl enable apache2
- Start Apache2 and Mysql at startup
- systemcel enable mysql
- systemctl enable postgresql
- Make the default web directory var/www
- nano /etc/apache2/sites-available/000.default.conf
- Change the default Documentroot to //var/www - remove the refference to the html folder
- NG tools
- Kali Linux 20. airmon-ng
- ifconfig wlan0mon down
- iwconfig wlan0mon mode monitor
- ifconfig wlan0mon up
- airmin-ng check wlan0 - check to see if any proecess need to be killed defore going into monitor mode.
- airmon-ng start wlan0
- airodump-ng mon0
- airodump-ng –c Ch# mon0 = isolate the channel
- airodump-ng –w myffile –c 1 --bssid MAC Address mon0
- aireplay-ng -0 2 –a MACADDR mon0 --ignoe-negative-zero = DeAuth command
- Aircrack-ng ourfile-01.cap –w Darknew.lst
- Poweroff and Shutdown
- poweroff
- shutdown
- Install and configure remote desktop
- apt-get install x11vnc
- x11vnc -storepasswd
- Run Startx at least one time to
- automatically create the .config and
- autostart directory
- cd .config
- cd autostart
- nano x11vnc.desktop
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
- Name=X11VNC
- Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
- StartupNotify=false
- Terminal=false
- Hidden=false
- Raspberry PI AutoLogin xfce4
- I made the following changes to /etc/lightdm/lightdm.conf:
- Under the heading [Seat:0] (should be below the [SeatDefaults] section), I set the following options:
- The new rolling needs the folling instead of Seat:0
- [Seat:*]
- pam-service=lightdm
- pam-autologin-service=lightdm-autologin
- autologin-user=root
- autologin-user-timeout=0
- This enables the Pluggable Authentication Module (PAM) service for LightDM autologins, allowing it to authenticate users without intervention.
- Information sourced from the ArchWiki: https://wiki.archlinux.org/index.php/LightDM#Enabling_autologin
- Raspberry PI Guake Install
- nano Guake.desktop
- [Desktop Entry]
- Encoding=UTF-8
- Version=0.9.4
- Type=Application
- Name=Guake
- Comment=
- Exec=guake
- OnlyShowIn=XFCE;
- StartupNotify=false
- Terminal=false
- Hidden=false
- Download and Install Nessus
- open vass
- Nexpose
- Nessus
- www.tenable.com
- dpkg -i filename
- - You can start nessusd by typing /etc/init.d/nessusd start
- - Then go to https://kali:8834/ to configure your scanner
- Nessus Must be Registered
- http://www.nessus.org/plugins/index.php
- Shell Script files
- login shell
- non-login shell
- ~/.bashrc - non-login shell and sometime login shell
- /etc/profile - non login shell system wide
- ~/.bash_profile
- ~/.bash_login - login shell
- ~/.profile - login shell
- ~/.bash_logout - login shell
- Auto login
- nano /etc/inittab
- Find
- 1:2345:respawn:/sbin/getty 115200 tty1 add the following
- #1:2345:respawn:/sbin/getty 115200 tty1
- 1:2345:respawn:/bin/login -f root tty1 </dev/tty1 >/dev/tty1 2>&1
- Auto Start startx
- nano /etc/profile
- type startx at the bottom
- Change wlan1 to wlan0
- open the file located at
- /etc/udev/rules.d/ and change the network name
- reboot the machine or stop and start the network
- #To start Linux network service:
- service network start
- #To stop Linux network service:
- service network stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement