Advertisement
opexxx

KaliLinux

Sep 28th, 2016
1,764
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.74 KB | None | 0 0
  1. Most cmmon Linux Commands
  2.  
  3. Linux Repositories
  4. leafpad /etc/apt/sources.list
  5. File must contain these two entries
  6.  
  7.  
  8. Rolling Repository for Agressive Linux Configuration Kali 2.0 from Kia and Jarred
  9.  
  10. # deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160120-18:39]/ kali-rolling contrib main non-free
  11. #deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160120-18:39]/ kali-rolling contrib main non-free
  12. deb http://http.kali.org/kali kali-rolling main non-free contrib
  13. # deb-src http://http.kali.org/kali kali-rolling main non-free contrib
  14. deb http://http.kali.org/kali sana main non-free contrib
  15. deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
  16.  
  17. Repositories to add for backward compatibility and Veil Install
  18. deb http://http.kali.org/kali sana main non-free contrib
  19. deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
  20.  
  21. To create a live buid to the following
  22. apt-get install git live-build cdebootstrap
  23. git clone git://git.kali.org/live-build-config.git
  24. cd live-build-config
  25. ./build.sh --distribution kali-rolling --verbose
  26.  
  27. To add packages to the build
  28.  
  29. live-build-config/kali-config/variant-default/package-lists/kali.list.chroot:
  30.  
  31. # Kali applications
  32.  
  33. # You can customize the set of Kali applications to install
  34. # (-full is the default, -all is absolutely everything, the rest
  35. # corresponds to various subsets)
  36. kali-linux-full
  37. # kali-linux-all
  38. # kali-linux-sdr
  39. # kali-linux-gpu
  40. # kali-linux-wireless
  41. # kali-linux-web
  42. # kali-linux-forensic
  43. # kali-linux-voip
  44. # kali-linux-pwtools
  45. # kali-linux-top10
  46. # kali-linux-rfid
  47.  
  48. # Graphical desktop
  49. kali-desktop-gnome
  50.  
  51. guake
  52. veil-evasion
  53. veil-catapult
  54. x11vnc
  55. open-vm-tools-desktop
  56. fuse
  57. libreoffice
  58. ddclient
  59.  
  60. ## Regular repositories
  61. deb http://http.kali.org/kali kali main non-free contrib
  62. deb http://security.kali.org/kali-security kali/updates main contrib non-free
  63. ## Source repositories
  64. deb-src http://http.kali.org/kali kali main non-free contrib
  65. deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
  66. deb http://repo.kali.org/kali kali-bleeding-edge main
  67.  
  68. Reset Kali Interface Scaling for enlarge screen
  69. gsettings set org.gnome.desktop.interface scaling-factor 1
  70.  
  71. Change command shell
  72. chsh - change shell
  73.  
  74.  
  75. Dictory and File Operationsls
  76. ls or la -a List the dir
  77. pwd - Show the current directory
  78. cd -change directory
  79. cd ~ -change to home dir
  80. cd\ -change to home dir
  81. mkdir -make directory
  82. rm -remove directory or file
  83. rm -fr -remove directory in trash
  84. chmod +x filename -modify file attributes
  85. chmod 744 filename -modify file attributes
  86. find / -name filename or directory -file files or folders
  87. cp -copy one or more files to another location
  88. df -h -display free disk space
  89. du -estimate file space usage
  90. gzip -compress or decompress named file(s)
  91. uname -a -show system informaion
  92. whoami -show how you are logged in
  93. scripts #!/bin/bash
  94. less - list a file contents
  95. env -view environment varables
  96. Trash -located in .local/share/Trash
  97. systemctl enable service name Start automatically
  98.  
  99. Install and Update Apps
  100. aptitude install kali-linux-full
  101. apt-get update
  102. apt-get upgrade
  103. apt-get dist-upgrade will install the latest distribution.
  104. apt-get purge package Delete package and config files
  105. apt-get remove packate Remove package but not config files
  106. apt-get install kali-linux-all
  107. apt-get install kali-linux-full
  108. apt-get install openofficce.org
  109. apt-get install flashplugin-nonfree
  110. apt-get install openssh-server
  111. apt-get install metasploit-framework
  112. apt-get Install isc-dhcp-server
  113. apt-get install fern-wifi-cracker
  114. apt-get install wireless-tools - needed for debian standard install
  115. apt-cache search firmware wireless
  116. apt-get install ap-utils
  117. apt-get install firmware-realtek
  118. apt-get install veil or
  119. git clone https://github.com/Veil-Framework/Veil.git
  120. git clone https://github.com/Veil-Framework/Veil-Evasion
  121. git clone https://github.com/trustedsec/social-engineer-toolkit.git
  122.  
  123.  
  124.  
  125. Network
  126. iwlist wlan0 scan -to find out what access points are out there.
  127. ifconfig -find wired net configuration
  128. iwconfig -find wireles
  129. s networks
  130. lsusb -list usb devices connected
  131. ifdown -down a particular interface
  132. kill PID Number -kill a particular process
  133.  
  134. Wireless on Radxa Pro
  135. isusb -Find wirless
  136.  
  137. Media
  138. ALT+F2 for run command
  139. smb//servername/sharename Mount a windows share.
  140. fdisk -l -used to find out what name your block device file uses
  141. 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
  142. mount -a -this will mount all devices that are not yet mounted
  143.  
  144.  
  145. Services
  146. service -–status-all -show services
  147. service ssh start -start ssh
  148. ssh-keygen -t rsa -install certificates
  149. service network start -start netwwok
  150. service network stop
  151.  
  152. Kali 20 ssh issue
  153. 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.
  154.  
  155. 1: On your Kali box, edit the file /etc/ssh/sshd_config.
  156. 2: In that file, find the line "PermitRootLogin without-password"
  157. 3: Edit it to "PermitRootLogin yes"
  158. 4: When you are done editing, restart the sshd service: "systemctl restart sshd"
  159. 5: You should now be able to SSH in to your Kali machine as root as you could before.
  160.  
  161. Matasploit
  162.  
  163. service postgresql start
  164. msfconsole -r <handler name>
  165. exec bundle install
  166.  
  167. Simple Ducky
  168. java -jar duckencode.jar -i payload.txt
  169.  
  170.  
  171. Apache Web Server
  172. systemctl start apache2
  173. systemctl enable apache2
  174. Start Apache2 and Mysql at startup
  175. systemcel enable mysql
  176. systemctl enable postgresql
  177. Make the default web directory var/www
  178. nano /etc/apache2/sites-available/000.default.conf
  179. Change the default Documentroot to //var/www - remove the refference to the html folder
  180.  
  181.  
  182.  
  183. NG tools
  184. Kali Linux 20. airmon-ng
  185. ifconfig wlan0mon down
  186. iwconfig wlan0mon mode monitor
  187. ifconfig wlan0mon up
  188.  
  189. airmin-ng check wlan0 - check to see if any proecess need to be killed defore going into monitor mode.
  190. airmon-ng start wlan0
  191. airodump-ng mon0
  192. airodump-ng –c Ch# mon0 = isolate the channel
  193. airodump-ng –w myffile –c 1 --bssid MAC Address mon0
  194. aireplay-ng -0 2 –a MACADDR mon0 --ignoe-negative-zero = DeAuth command
  195. Aircrack-ng ourfile-01.cap –w Darknew.lst
  196.  
  197.  
  198. Poweroff and Shutdown
  199. poweroff
  200. shutdown
  201.  
  202.  
  203. Install and configure remote desktop
  204.  
  205. apt-get install x11vnc
  206. x11vnc -storepasswd
  207. Run Startx at least one time to
  208. automatically create the .config and
  209. autostart directory
  210. cd .config
  211. cd autostart
  212. nano x11vnc.desktop
  213.  
  214. [Desktop Entry]
  215. Encoding=UTF-8
  216. Type=Application
  217. Name=X11VNC
  218. Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
  219. StartupNotify=false
  220. Terminal=false
  221. Hidden=false
  222.  
  223.  
  224. Raspberry PI AutoLogin xfce4
  225. I made the following changes to /etc/lightdm/lightdm.conf:
  226. Under the heading [Seat:0] (should be below the [SeatDefaults] section), I set the following options:
  227. The new rolling needs the folling instead of Seat:0
  228. [Seat:*]
  229. pam-service=lightdm
  230. pam-autologin-service=lightdm-autologin
  231. autologin-user=root
  232. autologin-user-timeout=0
  233.  
  234. This enables the Pluggable Authentication Module (PAM) service for LightDM autologins, allowing it to authenticate users without intervention.
  235. Information sourced from the ArchWiki: https://wiki.archlinux.org/index.php/LightDM#Enabling_autologin
  236.  
  237. Raspberry PI Guake Install
  238. nano Guake.desktop
  239.  
  240. [Desktop Entry]
  241. Encoding=UTF-8
  242. Version=0.9.4
  243. Type=Application
  244. Name=Guake
  245. Comment=
  246. Exec=guake
  247. OnlyShowIn=XFCE;
  248. StartupNotify=false
  249. Terminal=false
  250. Hidden=false
  251.  
  252.  
  253.  
  254. Download and Install Nessus
  255. open vass
  256. Nexpose
  257. Nessus
  258. www.tenable.com
  259. dpkg -i filename
  260. - You can start nessusd by typing /etc/init.d/nessusd start
  261. - Then go to https://kali:8834/ to configure your scanner
  262. Nessus Must be Registered
  263. http://www.nessus.org/plugins/index.php
  264.  
  265. Shell Script files
  266. login shell
  267. non-login shell
  268. ~/.bashrc - non-login shell and sometime login shell
  269. /etc/profile - non login shell system wide
  270. ~/.bash_profile
  271. ~/.bash_login - login shell
  272. ~/.profile - login shell
  273. ~/.bash_logout - login shell
  274.  
  275. Auto login
  276. nano /etc/inittab
  277. Find
  278. 1:2345:respawn:/sbin/getty 115200 tty1 add the following
  279. #1:2345:respawn:/sbin/getty 115200 tty1
  280. 1:2345:respawn:/bin/login -f root tty1 </dev/tty1 >/dev/tty1 2>&1
  281.  
  282.  
  283. Auto Start startx
  284. nano /etc/profile
  285.  
  286. type startx at the bottom
  287.  
  288. Change wlan1 to wlan0
  289. open the file located at
  290. /etc/udev/rules.d/ and change the network name
  291. reboot the machine or stop and start the network
  292. #To start Linux network service:
  293. service network start
  294.  
  295. #To stop Linux network service:
  296. service network stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement