8 10 2023 Basic Linux CMD
8 10 2023 Basic Linux CMD
8 10 2023 Basic Linux CMD
File system
[here slash / mean root directory/folder]
[like bin directory store all program file like ls - what function
will run and how will run - these files are written ]
------------------------------------------------------
write a cmd in terminal
ls -l / [file system]
------------------------------------------------------
/bin - Basic programs or commands [ls, cd, mv ...]
essential user commands here.
boot - file of or for boot loader [in parrot]
/sbin - System Program [fdisk, sysctl, mkfs
[display system binary information]
dev - device information [parrot]
/etc - host file - here can make changes in host/network files/configuration
[same in window, Linux - kali, ubuntu, parrot]
[ Apache server/web server - local host ]
media
mnt - mount - cd/dvd/ shows attachment with system
[resource mount with Linux machine -it will display here ]
opt - [addon packages information]
sudo su
su useradd omk [create new user - omk ]
passwd omk [provide password]
-----------------
---------------------
man ls [provide manual of any linux cmd]
help [show basic cmd and there use]
---------------------
touch file.txt [to create file]
cat file.txt [used to see the text/word]
[To save and quit the cat command - press CTRL + D or ctrl+z
You will now return
to your shell prompt.]
like
-rw-r--r-- 1 kali kali 0 Jul 18 01:08 file.txt
----------------------------------------
whoami [in root or user]
==========================================
open Metasploit -------
https://www.geeksforgeeks.org/linux-metasploit-command/
==============================================================
==============================================================
==============================================================
==============================================================
==============================================================
ping 192.168.44.128 [check connectivity with ip/domain name]
nmap 192.168.44.129
-------------------------------------------------------------
host
open/close ports
operating system information
service running on the network
running processes on a network
identify vulnerabilities
-------------------------------------------------------------
https://www.interviewbit.com/blog/nmap-commands/
https://www.varonis.com/blog/nmap-commands
-------------------------------------------------------------
=============================================================
=============================================================
=============================================================
Basic Nmap commands
-------------------------------------------------------------
nmap -sn 192.168.44.128 [ vm Metasploit ip ]
[use for ping scan performance/host is up, it means machine is on]
──(kali㉿kali)-[~]
└─$ arp -e
Address HWtype HWaddress Flags Mask Iface
192.168.44.2 ether 00:50:56:fa:5e:d0 C eth0
192.168.44.130 ether 00:0c:29:68:18:4b C eth0
192.168.44.254 ether 00:50:56:f7:75:f9 C eth0
-----------------------------------
┌──(kali㉿kali)-[~]
└─$ sudo nmap -sn 192.168.44.130 -PR
[sudo] password for kali:
[sudo] password for kali:
Starting Nmap 7.93 ( https://nmap.org ) at 2023-07-18 03:56 EDT
Nmap scan report for 192.168.44.130
Host is up (0.00035s latency).
MAC Address: 00:0C:29:68:18:4B (VMware)
Nmap done: 1 IP address (1 host up) scanned in 0.22 seconds
--------------------------
-n [can cut name resolution part]
-Pn [we so not want to use ping
means do not want to send icmp
packet use]
[so -Pn block ping scan ]
============================================
============================================
┌──(kali㉿kali)-[~]
└─$ nmap -n facebook.com -Pn
Starting Nmap 7.93 ( https://nmap.org ) at 2023-07-18 04:12 EDT
Nmap scan report for facebook.com (157.240.198.35)
Host is up (0.014s latency).
Other addresses for facebook.com (not scanned): 2a03:2880:f144:82:face:b00c:0:25de
Not shown: 998 filtered tcp ports (no-response)
PORT STATE SERVICE
80/tcp open http
443/tcp open https
nmap -A <target>
[Aggressive Scan:]
nmap <network>/24
[Scan Network Range:]
nmap -F <target>
[Fast Scan:]