Kali Navigation
- Terminal
- pwd - current location
- cd - change directory . cd.. ( cd with 2 dots will take you back to one level)
- ls - list everything in current path
- cd root - will take to root directory.
- mkdir - mkdir to create folder
- rmdir - remove directory
- ls -la - list hidden and all files folders
- echo - to create file with data. eg echo "hi" > test.txt
- cp - copy file.
- rm - remove file
- locate - locate bash
- updatedb - to update files names folder names in the file system
- passwd - to change password
- man - manual for commands - man ls
____________________________________________________________________________________
Kali Network commands
- ifconfig or ifconfig- to check IP address and other details . MAC, subnet mask
- iwconfig - when extra wifi adaptor
- ping - to know the communication is happening or not
- arp -a - if arp do not work
- export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"
- netstat -ano
- active connections running on machine
- suppose i open firefox and start browsing then comes and enter netsta -ano command on terminal then it will be able to show firefox with specific port communication.
- route
- shows ip routing table.
- how your IP is reaching to its destination.
___________________________________________________________________________________
Viewing Creating and Editing Files
- echo : -
- write to file.
- echo "hey hello!!!" > h.txt
- cat: -
- cat h.txt - to view the content of file
- to append the file content : -
- echo " hey hello again today!!!" >> h.txt
- touch
- touch <<filename>>
- nano
- terminal text editor
____________________________________________________________________________________
Start Stopping Kali Services
- Web servers on kali
- apache
- to start the service
- service apache2 start
- apache server do not run by default so we need to start the service.
- to make it permanent
- systemctl enable postgresql
- to stop the service
- service apache2 stop
- Python
- python -m SimpleHTTPServer 8833
- python server will be created on the same location where you have run the above command.
- check on browser with IPaddress:port number
____________________________________________________________________________________
Installing updating tools
- apt update && apt upgrade - from the repository
- github - git clone
____________________________________________________________________________________
To find the content in kali
- locate - before using locate you need to use updatedb then use locate.
- find - The find command is a more aggressive search tool than locate or which. Find is able torecursively search any given path for various files.
- which - The which command searches through the directories that are defined in the $PATH environment variable for a given filename.
- passwd - for changing password
- ssh service - is used for remotely access computer (the secure shell). it works on port 22. systemctl start ssh. To confirm whether is it running or not use netstat -antp | grep sshd
____________________________________________________________________________________
- -rw-r--r-- [from above screenshot]
- - means it is a file
- drwxr-xr-x
- d means directory
- rwx ( read write executable)
- Three groups are available.
- first group = rwx = owner of the file full permission
- second group = r-x = members of the group, only read and executable permission cannot write
- third group = r-x = any other user, only read and executable permission cannot write
- tmp folder has full access, read write execute. also available another /var/tmp folder.
- chmod
- change mode
- chmod 777 <<filename>>
- 777 is for full permission
- adduser
- to add new user
- addusr xxxx
- add all necessary information which it asks.
- to confirm the user id added or not
- cat /etc/passwd
- shadow file has all password in encrypted form
- cat /etc/shadow
- hashcat to crack the password.
- su
- su - switch user
- su username
- give password
- non root user should be the part of sudoers file to change the permission of files and folders created by other.
Comments
Post a Comment