KALI LINUX SERIES
🗡️

Kali Linux — Part 1

Basic Commands & Recon Tools — সম্পূর্ণ বাংলা গাইড Basic Commands & Recon Tools — Complete Guide

Kali Linux-এর সব বেসিক কমান্ড থেকে শুরু করে Nmap, Whois, theHarvester, Recon-ng, DNSrecon সহ সব Reconnaissance টুলের সম্পূর্ণ command reference। From essential Kali Linux commands to Nmap, Whois, theHarvester, Recon-ng, DNSrecon — a complete command reference for all Reconnaissance tools.

root@kali:~# nmap -A -sV -p- target.com
root@kali:~# theHarvester -d target.com -b all
root@kali:~# recon-ng -w myworkspace
📟 Basic Commands 🌐 Nmap 🔍 Whois / Dig 📡 Netdiscover 📧 theHarvester 🕵️ Recon-ng 🗂️ DNSrecon 🕸️ Maltego
01
📋 বিষয়সূচি — Part 1Table of Contents — Part 1
00 Kali Linux পরিচিতি ও SetupKali Linux Intro & Setup
Kali কী, কেন ব্যবহার করব, Terminal basicsWhat is Kali, why use it, Terminal basics
01 Kali Linux Basic CommandsKali Linux Basic Commands
Navigation, ফাইল অপারেশন, Text ProcessingNavigation, File Operations, Text Processing
Network commands, System Info, User/PermissionNetwork commands, System Info, User/Permission
grep, awk, sed, find, curl, wget
02 Nmap — Network ScannerNmap — Network Scanner
Host Discovery, Port Scan typesHost Discovery, Port Scan types -sS -sU -sV -O
NSE Scripts, Output formats, EvasionNSE Scripts, Output formats, Evasion
03 Whois, Dig, Host, Nslookup — DNS ReconWhois, Dig, Host, Nslookup — DNS Recon
Domain info, DNS record lookup, Zone TransferDomain info, DNS record lookup, Zone Transfer
04 Netdiscover — Network DiscoveryNetwork Discovery
ARP scanning, LAN-এ সব device খোঁজাARP scanning, finding all devices on LAN
05 theHarvester — OSINT Email & SubdomainOSINT Email & Subdomain
Email, subdomain, IP harvest করা বিভিন্ন source থেকেHarvesting emails, subdomains, IPs from various sources
06 Recon-ng — Recon FrameworkRecon Framework
Module-based recon, Workspace managementModule-based recon, Workspace management
07 DNSrecon — DNS EnumerationDNS Enumeration
Brute force subdomain, Zone Transfer, Reverse lookupBrute force subdomain, Zone Transfer, Reverse lookup
08 Maltego & অন্যান্য Recon টুলMaltego & Other Recon Tools
Maltego, Shodan, Dmitry, Fierce
CHAPTER 00
🐧 Kali Linux পরিচিতি ও Terminal SetupKali Linux Intro & Terminal Setup
Kali কী, Terminal কীভাবে কাজ করে, সিকিউরিটিতে কেন দরকারWhat is Kali, how the terminal works, why it's essential for security

🐉 Kali Linux কী?What is Kali Linux?

Kali Linux হলো Offensive Security তৈরি একটি Debian-based Linux distribution যেটি বিশেষভাবে Penetration Testing, Digital Forensics এবং Security Auditing-এর জন্য তৈরি। এতে ৬০০+ pre-installed security tool রয়েছে।Kali Linux is a Debian-based Linux distribution by Offensive Security, specially built for Penetration Testing, Digital Forensics, and Security Auditing. It comes with 600+ pre-installed security tools.

Kali-র সুবিধাAdvantages of Kali

  • ৬০০+ security tool pre-installed600+ security tools pre-installed
  • OSCP, CEH, Bug Bounty-তে standardStandard for OSCP, CEH, Bug Bounty
  • Regular update ও patchRegular updates & patches
  • Custom kernel with patchesCustom kernel with patches
  • Root mode সহজে enableEasy root mode enable

⚙️ Setup optionsSetup Options

  • VirtualBox / VMware VM হিসেবেAs VirtualBox / VMware VM
  • Bootable USB (Persistent)Bootable USB (Persistent)
  • WSL2 (Windows Subsystem)WSL2 (Windows Subsystem)
  • Termux (Android — Limited)
  • Dual Boot (সর্বোচ্চ performance)Dual Boot (maximum performance)

⌨️ Terminal Shortcuts — জানা দরকারTerminal Shortcuts — Must Know

ShortcutকাজFunctionগুরুত্বImportance
Ctrl + Cচলমান process বন্ধ করোStop running processঅবশ্যই জানো
Ctrl + ZProcess suspend করো (background)Suspend process (background)জরুরি
Ctrl + LTerminal clear করোClear terminalদরকারী
TabAuto-complete command/pathAuto-complete command/pathঅবশ্যই জানো
↑ / ↓আগের command historyPrevious command historyঅবশ্যই জানো
Ctrl + RCommand history searchSearch command historyদরকারী
Ctrl + ALine-এর শুরুতে যাওGo to beginning of lineদরকারী
Ctrl + ELine-এর শেষে যাওGo to end of lineদরকারী
!!আগের command আবার চালাওRepeat last commandজরুরি
sudo !!আগের command sudo দিয়ে চালাওRun last command with sudoঅবশ্যই জানো
CHAPTER 01
📟 Kali Linux Basic Commands — সম্পূর্ণKali Linux Basic Commands — Complete
Navigation, ফাইল, নেটওয়ার্ক, সিস্টেম, grep/awk/sed সব একসাথেNavigation, files, network, system, grep/awk/sed all in one place

📁 Navigation CommandsNavigation Commands

কমান্ডCommandকাজFunctionউদাহরণExample
pwdবর্তমান directory দেখাওShow current directorypwd
lsDirectory-র contents দেখাওList directory contentsls -la
ls -laHidden file সহ সব file ও permission দেখাওShow all files including hidden, with permissionsls -la /etc
ls -lhHuman-readable size সহ file listList files with human-readable sizesls -lh /var/log
cd [dir]Directory বদলাওChange directorycd /opt/tools
cd ..একধাপ উপরে যাওGo up one levelcd ../..
cd ~Home directory-তে যাওGo to home directorycd ~
cd -আগের directory-তে ফিরে যাওGo back to previous directorycd -
treeDirectory tree structure দেখাওShow directory tree structuretree -L 2 /var

📄 File OperationsFile Operations

কমান্ডCommandকাজFunctionউদাহরণExample
catFile-এর content দেখাওShow file contentcat /etc/passwd
lessবড় file scroll করে দেখোView large files with scrollingless /var/log/syslog
head -nFile-এর প্রথম n লাইন দেখাওShow first n lines of filehead -n 20 log.txt
tail -nFile-এর শেষ n লাইন দেখাওShow last n lines of filetail -n 50 log.txt
tail -fReal-time-এ file update দেখো (live log)Watch file updates in real-time (live log)tail -f /var/log/auth.log
cpFile copy করোCopy filecp file.txt /tmp/
cp -rDirectory সহ copy করোCopy directory recursivelycp -r /opt/tool /tmp/
mvFile move বা rename করোMove or rename filemv old.txt new.txt
rmFile delete করোDelete filerm file.txt
rm -rfDirectory সহ force delete ⚠️Force delete directory ⚠️rm -rf /tmp/folder
mkdirনতুন directory তৈরি করোCreate new directorymkdir -p /opt/recon
touchনতুন empty file তৈরি করোCreate new empty filetouch output.txt
fileFile-এর type জানোDetermine file typefile malware.bin
wc -lFile-এ কতটি লাইন আছে গণনা করোCount number of lines in filewc -l wordlist.txt
diffদুটি file-এর পার্থক্য দেখাওShow difference between two filesdiff file1 file2
chmodFile permission পরিবর্তন করোChange file permissionschmod +x script.sh
chownFile-এর owner পরিবর্তন করোChange file ownerchown root:root file

🔍 Search ও Find CommandsSearch & Find Commands

কমান্ডCommandকাজFunctionউদাহরণExample
find / -nameনাম দিয়ে file খোঁজোFind file by namefind / -name "passwd"
find / -perm -4000SUID bit আছে এমন file খোঁজো (PrivEsc!)Find SUID files (PrivEsc!)find / -perm -4000 2>/dev/null
find / -writableWritable file/folder খোঁজোFind writable files/dirsfind / -writable -type d 2>/dev/null
find / -user rootRoot-owned file খোঁজোFind root-owned filesfind / -user root -type f
find / -mtime -7গত ৭ দিনে পরিবর্তিত file খোঁজোFind files modified in last 7 daysfind /etc -mtime -7
grep -r "text"Recursively text খোঁজোRecursively search for textgrep -r "password" /var/www/
grep -iCase-insensitive searchCase-insensitive searchgrep -i "admin" users.txt
grep -vPattern ছাড়া সব লাইন দেখাও (invert)Show lines NOT matching patterngrep -v "^#" config.conf
grep -nLine number সহ match দেখাওShow matches with line numbersgrep -n "error" log.txt
grep -EExtended regex দিয়ে searchSearch with extended regexgrep -E "pass|secret|key" file
locateDatabase থেকে দ্রুত file খোঁজোFast file search from databaselocate nmap.conf
whichCommand কোথায় installed দেখোShow where a command is installedwhich nmap
whereisBinary, source, manual সব খোঁজোFind binary, source and manualwhereis python3

🌐 Networking CommandsNetworking Commands

কমান্ডCommandকাজFunctionউদাহরণExample
ip aসব network interface ও IP দেখাওShow all interfaces and IPsip a
ip rRouting table দেখাওShow routing tableip r
ifconfigNetwork interface configure করোConfigure network interfacesifconfig eth0
pingHost alive কিনা check করোCheck if host is aliveping -c 4 google.com
traceroutePacket-এর path trace করোTrace the path of packetstraceroute target.com
netstat -tulnpOpen port ও listening service দেখাওShow open ports and listening servicesnetstat -tulnp
ss -tulnpnetstat-এর আধুনিক versionModern version of netstatss -tulnp
curlURL থেকে data transfer করোTransfer data from/to URLcurl -I https://target.com
curl -X POSTPOST request পাঠাওSend POST requestcurl -X POST -d "user=a" url
wgetFile download করোDownload fileswget https://site.com/file
nc (netcat)Port connect, listen, file transferConnect, listen, transfer files via portnc -lvnp 4444
nc -zv host portPort open কিনা check করোCheck if a port is opennc -zv 192.168.1.1 80
arp -aARP table দেখাও (LAN hosts)Show ARP table (LAN hosts)arp -a
ssh user@hostSSH দিয়ে remote connect করোConnect to remote host via SSHssh root@192.168.1.5
scpSSH দিয়ে file copy করোCopy file over SSHscp file.txt user@host:/tmp/

⚙️ System Info CommandsSystem Info Commands

কমান্ডCommandকাজFunctionউদাহরণExample
uname -aKernel version ও system info দেখাওShow kernel version and system infouname -a
uname -rশুধু Kernel version দেখাওShow kernel version onlyuname -r
hostnameSystem-এর hostname দেখাওShow system hostnamehostname -I
whoamiবর্তমান user কে তা জানোShow current userwhoami
idUser ID, Group ID দেখাওShow user and group IDsid
ps auxসব চলমান process দেখাওShow all running processesps aux | grep apache
top / htopReal-time resource monitorReal-time resource monitorhtop
df -hDisk space দেখাওShow disk space usagedf -h
free -hRAM usage দেখাওShow RAM usagefree -h
envEnvironment variables দেখাওShow environment variablesenv | grep PATH
historyCommand history দেখাওShow command historyhistory | tail -50
cat /etc/os-releaseOS version বিস্তারিত দেখাওShow detailed OS version infocat /etc/os-release
lsb_release -aDistro info দেখাওShow distribution infolsb_release -a
lscpuCPU info দেখাওShow CPU infolscpu

🔧 Text Processing — grep, awk, sed, cutText Processing — grep, awk, sed, cut

💡 কেন জানা দরকার?Why must you know this?
Security-তে output filter করা, log থেকে নির্দিষ্ট data বের করা, wordlist তৈরি করা — এই সব কাজে grep/awk/sed অপরিহার্য। In security, filtering output, extracting specific data from logs, creating wordlists — grep/awk/sed are indispensable for all these tasks.
কমান্ডCommandকাজFunctionউদাহরণExample
grep "pattern" filePattern match করা লাইন খোঁজোFind lines matching patterngrep "root" /etc/passwd
grep -oP "regex"Perl regex দিয়ে match-only outputPerl regex, print match onlygrep -oP '\d+\.\d+\.\d+\.\d+' log
awk '{print $1}'প্রথম column print করোPrint first columnawk '{print $1}' file.txt
awk -F: '{print $1}': দিয়ে split করে column বের করোSplit by : and extract columnawk -F: '{print $1}' /etc/passwd
awk '/pattern/'Pattern যুক্ত লাইন filter করোFilter lines with patternawk '/POST/' access.log
sed 's/old/new/g'Text replace করোReplace textsed 's/http/https/g' urls.txt
sed -n '5,10p'৫ থেকে ১০ নম্বর লাইন print করোPrint lines 5 to 10sed -n '5,10p' bigfile.txt
sed '/pattern/d'Pattern যুক্ত লাইন delete করোDelete lines with patternsed '/^#/d' config.conf
cut -d: -f1: দিয়ে split করে 1st field নাওSplit by : and take 1st fieldcut -d: -f1 /etc/passwd
sortAlphabetically sort করোSort alphabeticallysort -u ips.txt
uniqDuplicate লাইন সরাওRemove duplicate linessort file | uniq
trCharacter translate করোTranslate characterstr 'a-z' 'A-Z' < file
teeScreen-এ দেখাও ও file-এও লেখোShow on screen and write to filenmap target | tee scan.txt

📦 Package ManagementPackage Management

কমান্ডCommandকাজFunction
apt updatePackage list update করোUpdate package list
apt upgradeসব installed package upgrade করোUpgrade all installed packages
apt install [pkg]নতুন tool install করোInstall a new tool
apt remove [pkg]Tool uninstall করোUninstall a tool
apt search [name]Tool খোঁজোSearch for a tool
dpkg -lInstalled package list দেখাওList installed packages
pip3 installPython package install করোInstall Python package
gem installRuby gem install করোInstall Ruby gem

📟 Basic Commands — মনে রাখার বিষয়Basic Commands — Key Points

  • 🔑 find / -perm -4000 2>/dev/null — এই command টা PrivEsc-এর জন্য সবসময় মনে রাখোfind / -perm -4000 2>/dev/null — Always remember for PrivEsc
  • 📡 nc -lvnp 4444 — Reverse shell-এর জন্য listener চালু রাখোnc -lvnp 4444 — Keep listener running for reverse shell
  • 🔍 grep -r "password" /var/www/ — Web server-এ hardcoded password খোঁজোgrep -r "password" /var/www/ — Find hardcoded passwords in web server
  • 📊 Pipe (|) দিয়ে commands chain করো — output এক command থেকে পরেরটায় পাঠাওChain commands with pipe (|) — send output from one command to next
  • 💾 Scan output সবসময় tee বা > file দিয়ে save করোAlways save scan output using tee or > file
CHAPTER 02
🌐 Nmap — Network Scanner সম্পূর্ণ গাইডNetwork Scanner Complete Guide
Host Discovery থেকে Service Detection, NSE Scripts পর্যন্ত সব Nmap commandsAll Nmap commands from Host Discovery to Service Detection and NSE Scripts
🌐
nmap
Network Mapper — সবচেয়ে বেশি ব্যবহৃত port scanner ও network discovery toolNetwork Mapper — the most widely used port scanner and network discovery tool
Port Scanning Recon Service Detection OS Detection

🎯 Target Specification — কোথায় Scan করবTarget Specification — What to Scan

কমান্ডCommandকাজFunction
nmap 192.168.1.1একটি IP scan করোScan a single IP
nmap 192.168.1.1-254IP range scan করোScan an IP range
nmap 192.168.1.0/24পুরো subnet scan করো (CIDR)Scan entire subnet (CIDR)
nmap target.comDomain name দিয়ে scan করোScan by domain name
nmap -iL hosts.txtFile থেকে target list নাওRead targets from a file
nmap --exclude 192.168.1.5নির্দিষ্ট IP বাদ দিয়ে scan করোExclude specific IPs from scan
nmap -6 ::1IPv6 address scan করোScan IPv6 address

🔍 Host Discovery — কে কে Alive?Host Discovery — Who Is Alive?

FlagকাজFunctionউদাহরণExample
-snPing scan — port scan ছাড়া শুধু alive host খোঁজোPing scan — find alive hosts without port scannmap -sn 192.168.1.0/24
-PnPing disable করো — সব host alive ধরো (Firewall bypass)Skip ping — treat all hosts as alive (firewall bypass)nmap -Pn target.com
-PSTCP SYN ping দিয়ে host discover করোTCP SYN ping host discoverynmap -PS22,80,443 target
-PATCP ACK ping দিয়ে host discover করোTCP ACK ping host discoverynmap -PA80 target
-PEICMP Echo pingICMP Echo pingnmap -PE target
-PRARP ping (LAN-এ সবচেয়ে কার্যকর)ARP ping (most effective on LAN)nmap -PR 192.168.1.0/24
-nDNS resolution বন্ধ রাখো (দ্রুত scan)Disable DNS resolution (faster scan)nmap -n -sn 192.168.1.0/24

🔌 Port Scan Types — কীভাবে Scan করবPort Scan Types — How to Scan

FlagScan Typeকাজ ও বিবরণDescription
-sSSYN ScanTCP SYN scan — সবচেয়ে দ্রুত ও stealth। Connection সম্পন্ন করে না। Root দরকার।TCP SYN scan — fastest and stealthy. Never completes connection. Requires root.
-sTTCP Connectপূর্ণ TCP connection করে। Log-এ ধরা পড়ে। Root ছাড়াও চলে।Full TCP connection. Logged. Works without root.
-sUUDP ScanUDP port scan — ধীর কিন্তু DNS, SNMP-এর জন্য দরকার।UDP port scan — slow but needed for DNS, SNMP.
-sAACK ScanFirewall rules map করতে ব্যবহার হয়।Used to map firewall rules.
-sFFIN ScanFIN packet পাঠায় — IDS bypass করতে পারে।Sends FIN packets — may bypass IDS.
-sXXmas ScanFIN, PSH, URG flag set করে — stealth।Sets FIN, PSH, URG flags — stealthy.
-sNNull Scanকোনো flag set করে না — firewall bypass।No flags set — firewall bypass.
-sWWindow ScanTCP window size বিশ্লেষণ করে।Analyzes TCP window size.
-sMMaimon ScanBSD-based system-এ কাজ করে।Works on BSD-based systems.

🚪 Port Specification — কোন Port Scan করবPort Specification — Which Ports to Scan

FlagকাজFunctionউদাহরণExample
-p 80নির্দিষ্ট port scan করোScan specific portnmap -p 80 target
-p 80,443,8080Multiple specific port scan করোScan multiple specific portsnmap -p 80,443,8080 target
-p 1-1000Port range scan করোScan a port rangenmap -p 1-1000 target
-p-সব ৬৫৫৩৫ port scan করোScan all 65535 portsnmap -p- target
-FTop ১০০ port দ্রুত scan করোFast scan top 100 portsnmap -F target
--top-ports 1000Top N most common ports scan করোScan top N most common portsnmap --top-ports 1000 target
-p U:53,T:80UDP ও TCP port আলাদা করে specify করোSpecify UDP and TCP ports separatelynmap -p U:53,T:80,443 target

🔬 Service & OS DetectionService & OS Detection

FlagকাজFunctionউদাহরণExample
-sVService version detect করো (কোন service, কোন version)Detect service versionsnmap -sV target
-sV --version-intensityVersion detection intensity (0-9) — বেশি মানে ধীর কিন্তু accurateVersion detection intensity (0-9) — higher = slower but more accuratenmap -sV --version-intensity 9 target
-OOperating System detect করোDetect operating systemnmap -O target
--osscan-guessAggressively OS guess করোAggressively guess OSnmap -O --osscan-guess target
-AAggressive: OS+Version+Script+Traceroute (সব একসাথে)Aggressive: OS+Version+Script+Traceroute (all in one)nmap -A target
--tracerouteTarget-এ পৌঁছানোর path trace করোTrace path to targetnmap --traceroute target

📜 NSE Scripts — Nmap Scripting EngineNSE Scripts — Nmap Scripting Engine

🔧 NSE Scripts কী?
Nmap-এর Script Engine (NSE) দিয়ে vulnerability detection, brute force, exploit check সহ ৬০০+ কাজ করা যায়। Scripts থাকে /usr/share/nmap/scripts/ ফোল্ডারে। Nmap's Script Engine (NSE) can do 600+ tasks including vulnerability detection, brute force, exploit checks. Scripts are in /usr/share/nmap/scripts/.
Flag / ScriptকাজFunctionউদাহরণExample
-sCDefault scripts চালাওRun default scriptsnmap -sC target
--script=vulnVulnerability check scripts চালাওRun vulnerability check scriptsnmap --script=vuln target
--script=safeSafe scripts চালাও (non-intrusive)Run safe scripts (non-intrusive)nmap --script=safe target
--script=authAuthentication bypass script চালাওRun auth bypass scriptsnmap --script=auth target
--script=bruteBrute force scripts চালাওRun brute force scriptsnmap --script=brute target
--script=http-*HTTP-related সব scripts চালাওRun all HTTP-related scriptsnmap --script=http-* -p 80 target
--script=smb-vuln-*SMB vulnerability check (EternalBlue ইত্যাদি)SMB vulnerability check (EternalBlue etc.)nmap --script=smb-vuln-* -p 445 target
--script=ftp-anonFTP anonymous login check করোCheck for FTP anonymous loginnmap --script=ftp-anon -p 21 target
--script=ssh-bruteSSH brute force করোSSH brute forcenmap --script=ssh-brute -p 22 target
--script=dns-zone-transferDNS zone transfer চেষ্টা করোAttempt DNS zone transfernmap --script=dns-zone-transfer target
--script=http-sql-injectionHTTP SQL Injection test করোTest for HTTP SQL Injectionnmap --script=http-sql-injection -p 80 target
--script-help=vulnScript সম্পর্কে help দেখোShow help about a scriptnmap --script-help=vuln
--script-updatedbScript database update করোUpdate script databasenmap --script-updatedb

⏱️ Timing & SpeedTiming & Speed

FlagগতিSpeedবিবরণDescription
-T0Paranoidঅত্যন্ত ধীর — IDS evasion-এর জন্যExtremely slow — for IDS evasion
-T1Sneakyধীর — IDS evasionSlow — IDS evasion
-T2Politeধীরে ধীরে — network bandwidth কম ব্যবহারSlow — reduces bandwidth usage
-T3NormalDefault timingDefault timing
-T4Aggressiveদ্রুত — Reliable network-এ ব্যবহার করোFast — use on reliable networks
-T5Insaneঅত্যন্ত দ্রুত — accuracy কম হতে পারেExtremely fast — may miss results
--min-rate 5000Customপ্রতি সেকেন্ডে minimum packet rate set করোSet minimum packets per second
--max-retries 1CustomMaximum retry count কমাও (দ্রুত হবে)Reduce max retries (speeds up scan)

🥷 Evasion & Firewall BypassEvasion & Firewall Bypass

FlagকাজFunctionউদাহরণExample
-D RND:10১০টি decoy IP দিয়ে scan করো (IP spoof)Scan with 10 random decoy IPsnmap -D RND:10 target
-D decoy1,decoy2নির্দিষ্ট decoy IP ব্যবহার করোUse specific decoy IPsnmap -D 1.1.1.1,2.2.2.2 target
-S spoofed_ipSource IP spoof করোSpoof source IP addressnmap -S 192.168.1.100 target
--spoof-mac 0Random MAC address ব্যবহার করোUse random MAC addressnmap --spoof-mac 0 target
-fPacket fragment করো (IDS bypass)Fragment packets (IDS bypass)nmap -f target
--mtu 16Custom MTU size set করোSet custom MTU sizenmap --mtu 16 target
--data-length 25Packet-এ random data যোগ করোAppend random data to packetsnmap --data-length 25 target
--source-port 53DNS port থেকে scan পাঠাও (firewall bypass)Send scan from DNS port (firewall bypass)nmap --source-port 53 target
--proxies socks4://proxy:portProxy দিয়ে scan করোScan through a proxynmap --proxies socks4://127.0.0.1:9050 target

💾 Output FormatsOutput Formats

FlagকাজFunctionউদাহরণExample
-oN file.txtNormal text format-এ save করোSave in normal text formatnmap target -oN result.txt
-oX file.xmlXML format-এ save করো (Metasploit import হয়)Save in XML format (importable to Metasploit)nmap target -oX result.xml
-oG file.gnmapGreppable format-এ save করোSave in greppable formatnmap target -oG result.gnmap
-oA basenameতিনটি format-এই একসাথে save করোSave in all three formats at oncenmap target -oA scan_results
-vVerbose output (বিস্তারিত দেখাও)Verbose output (show more details)nmap -v target
-vvআরও বিস্তারিত verbose outputEven more verbose outputnmap -vv target
--reasonPort কেন open/closed সেটা দেখাওShow reason why port is open/closednmap --reason target
--openশুধু open port দেখাওShow only open portsnmap --open target

সবচেয়ে কাজের Nmap Command CombosMost Useful Nmap Command Combos

# Quick scan — top 1000 ports, fast root@kali:~# nmap -T4 -F target.com # Full scan — all ports + service + OS root@kali:~# nmap -sS -sV -O -p- -T4 target.com -oA fullscan # Aggressive scan — সব features একসাথে root@kali:~# nmap -A -p- target.com # Stealth scan — IDS এড়াতে root@kali:~# nmap -sS -T2 -D RND:5 -f target.com # Vulnerability scan root@kali:~# nmap -sV --script=vuln target.com -oN vuln_scan.txt # Subnet discovery — কোন host alive root@kali:~# nmap -sn 192.168.1.0/24 | grep "Nmap scan report" # UDP scan — DNS, SNMP port root@kali:~# nmap -sU -p 53,67,68,161,162 target.com # SMB vulnerability — EternalBlue check root@kali:~# nmap --script=smb-vuln-ms17-010 -p 445 target.com # HTTP title ও header দেখো root@kali:~# nmap --script=http-title,http-headers -p 80,443 target.com # Scan করে শুধু open ports filter করো root@kali:~# nmap -p- --min-rate 5000 target.com | grep "open"
CHAPTER 03
🔍 Whois, Dig, Host, Nslookup
Domain Information ও DNS Reconnaissance — Passive Recon-এর ভিত্তিDomain Information & DNS Reconnaissance — Foundation of Passive Recon
📋
whois
Domain registration তথ্য, registrar, name server, contact info বের করোRetrieve domain registration info, registrar, nameservers, contact details
Passive Recon OSINT
কমান্ডCommandকাজFunction
whois target.comDomain-এর registration তথ্য দেখাও (registrar, dates, nameservers)Show domain registration info (registrar, dates, nameservers)
whois 192.168.1.1IP address-এর owner তথ্য দেখাওShow IP address owner information
whois target.com | grep -i "name server"শুধু Name Server বের করোExtract only Name Servers
whois target.com | grep -i "registrant"Domain owner তথ্য বের করোExtract domain owner info
whois target.com | grep -i "expir"Domain expiry date দেখাওShow domain expiry date
🗂️
dig
DNS lookup tool — সব ধরনের DNS record query করোDNS lookup tool — query all types of DNS records
DNS Recon Passive Recon
কমান্ডCommandকাজFunction
dig target.comDefault A record (IP address) দেখাওShow default A record (IP address)
dig target.com AIPv4 A record দেখাওShow IPv4 A record
dig target.com AAAAIPv6 AAAA record দেখাওShow IPv6 AAAA record
dig target.com MXMail Exchange record — email server কোনটাMail Exchange record — which server handles email
dig target.com NSName Server record দেখাওShow Name Server records
dig target.com TXTTXT record (SPF, DKIM, verification tokens)TXT records (SPF, DKIM, verification tokens)
dig target.com SOAStart of Authority record দেখাওShow Start of Authority record
dig target.com CNAMECNAME (alias) record দেখাওShow CNAME (alias) records
dig target.com ANYসব ধরনের DNS record দেখাওShow all DNS record types
dig -x 93.184.216.34Reverse DNS lookup — IP থেকে hostname বের করোReverse DNS lookup — find hostname from IP
dig @8.8.8.8 target.comনির্দিষ্ট DNS server (Google) ব্যবহার করোUse specific DNS server (Google) for query
dig target.com AXFR @ns1.target.comZone Transfer চেষ্টা করো (সব subdomain expose হবে!)Attempt Zone Transfer (all subdomains exposed!)
dig +short target.comShort output — শুধু answer দেখাওShort output — show answer only
dig +noall +answer target.comশুধু answer section দেখাওShow only the answer section
📡
host & nslookup
Simple DNS lookup tool — dig-এর সহজ বিকল্পSimple DNS lookup tools — easier alternatives to dig
DNS Recon
কমান্ডCommandকাজFunction
host target.comDomain-এর IP দেখাওShow IP for domain
host -t MX target.comMail server দেখাওShow mail servers
host -t NS target.comName server দেখাওShow name servers
host 93.184.216.34Reverse lookup — IP থেকে domainReverse lookup — IP to domain
host -l target.com ns1.target.comZone transfer চেষ্টা করোAttempt zone transfer
nslookup target.comDNS lookup করো (interactive বা non-interactive)DNS lookup (interactive or non-interactive)
nslookup -type=mx target.comMX record দেখাও nslookup দিয়েShow MX records with nslookup
nslookup -type=any target.com 8.8.8.8Google DNS দিয়ে সব record দেখাওShow all records using Google DNS
CHAPTER 04
📡 Netdiscover — Network DiscoveryNetwork Discovery
LAN-এ ARP দিয়ে alive host ও MAC address খোঁজোFind alive hosts and MAC addresses on LAN using ARP
📡
netdiscover
ARP-based active/passive network scanner — LAN-এর সব device ও তাদের MAC address দেখায়ARP-based active/passive network scanner — shows all devices and MAC addresses on LAN
Network Discovery LAN Recon
কমান্ডCommandকাজFunction
netdiscoverAuto mode — সব common subnet scan করোAuto mode — scan all common subnets
netdiscover -r 192.168.1.0/24নির্দিষ্ট subnet scan করোScan a specific subnet
netdiscover -i eth0নির্দিষ্ট interface দিয়ে scan করোScan using a specific network interface
netdiscover -pPassive mode — শুধু listen করো, কোনো packet পাঠাবে না (stealth)Passive mode — only listen, don't send packets (stealth)
netdiscover -r 192.168.1.0/24 -i eth0 -PPrint mode — interactive screen-এর বদলে একবার print করে বেরিয়ে যাওPrint mode — print once and exit instead of interactive screen
netdiscover -r 10.0.0.0/8বড় Class A network scan করোScan large Class A network
netdiscover -fFast mode — কম accurate কিন্তু দ্রুতFast mode — less accurate but quicker
netdiscover -c 3প্রতি host-এ ৩টি ARP request পাঠাওSend 3 ARP requests per host
netdiscover -s 10প্রতি request-এর মধ্যে ১০ms বিরতি10ms sleep between each ARP request
netdiscover -r 192.168.1.0/24 -oN result.txtResult file-এ save করোSave results to file
💡 Netdiscover vs Nmap -sn
LAN-এ netdiscover দ্রুত কাজ করে কারণ এটা ARP ব্যবহার করে। Nmap-এর -sn flag-ও একই কাজ করে কিন্তু Nmap বেশি versatile। দুটোই একসাথে ব্যবহার করো confirmation-এর জন্য। On LAN, netdiscover is faster because it uses ARP. Nmap's -sn flag does the same but Nmap is more versatile. Use both together for confirmation.
# LAN-এ সব host খোঁজো root@kali:~# netdiscover -r 192.168.1.0/24 -i eth0 # Passive mode — শুধু শোনো (আরও stealth) root@kali:~# netdiscover -p -i eth0 # Output save করো এবং IP list বের করো root@kali:~# netdiscover -r 192.168.1.0/24 -P | awk '{print $1}' | grep -E "^[0-9]"
CHAPTER 05
📧 theHarvester — OSINT Tool
Email, Subdomain, IP, Employee name — বিভিন্ন public source থেকে তথ্য সংগ্রহGather emails, subdomains, IPs, employee names from multiple public sources
📧
theHarvester
Google, Bing, LinkedIn, Shodan সহ ২০+ source থেকে target সম্পর্কে publicly available তথ্য সংগ্রহ করোCollect publicly available information about target from 20+ sources including Google, Bing, LinkedIn, Shodan
OSINT Passive Recon

🔧 Basic UsageBasic Usage

FlagকাজFunctionউদাহরণExample
-d domainTarget domain specify করোSpecify target domain-d target.com
-b sourceData source specify করোSpecify data source-b google
-b allসব available source ব্যবহার করোUse all available sources-b all
-l 500Maximum result limit set করোSet maximum result limit-l 500
-f outputOutput file name দাও (HTML ও XML)Set output filename (HTML and XML)-f result
-nDNS reverse lookup করো discovered IP-তেDNS reverse lookup on discovered IPs-n
-cDNS brute force করো common names দিয়েDNS brute force with common names-c
-tDNS TLD expansion করোDNS TLD expansion-t
-s 0Google-এ কোন result থেকে শুরু করবStart from which Google result-s 0
-vVerbose mode — বিস্তারিত দেখাওVerbose mode — show more details-v

📌 Available Sources (সব source)Available Sources (All Sources)

🔍 Search Engines

  • google
  • bing
  • yahoo
  • baidu
  • duckduckgo
  • ask

💼 Professional/Social

  • linkedin
  • twitter
  • instagram
  • pgp
  • github

🔐 Security Sources

  • shodan
  • censys
  • virustotal
  • threatcrowd
  • hunter
  • dnsdumpster
# Basic — Google দিয়ে email ও subdomain খোঁজো root@kali:~# theHarvester -d target.com -b google # সব source ব্যবহার করো root@kali:~# theHarvester -d target.com -b all -l 500 # Output file-এ save করো root@kali:~# theHarvester -d target.com -b google,bing,linkedin -f output_report # DNS brute force + reverse lookup সহ root@kali:~# theHarvester -d target.com -b all -c -n -v # Shodan দিয়ে (API key লাগবে) root@kali:~# theHarvester -d target.com -b shodan # LinkedIn থেকে employee name খোঁজো root@kali:~# theHarvester -d target.com -b linkedin -l 200
CHAPTER 06
🕵️ Recon-ng — Recon FrameworkRecon Framework
Metasploit-style module-based OSINT framework — পেশাদার reconnaissance-এর জন্যMetasploit-style module-based OSINT framework — for professional reconnaissance
🕵️
recon-ng
Web-based open source reconnaissance framework — modules দিয়ে organized OSINT collection করোWeb-based open source recon framework — organized OSINT collection with modules
OSINT Framework

⚙️ Workspace ManagementWorkspace Management

কমান্ডCommandকাজFunction
recon-ngRecon-ng চালু করো (default workspace)Launch recon-ng (default workspace)
recon-ng -w myworkspaceনির্দিষ্ট workspace নিয়ে চালু করোLaunch with specific workspace
workspaces create target_coনতুন workspace তৈরি করোCreate new workspace
workspaces listসব workspace দেখাওList all workspaces
workspaces load target_coWorkspace switch করোSwitch to a workspace
workspaces remove target_coWorkspace delete করোDelete a workspace

📦 Module ManagementModule Management

কমান্ডCommandকাজFunction
marketplace searchসব available module দেখাওShow all available modules
marketplace search subdomainSubdomain-related module খোঁজোSearch for subdomain-related modules
marketplace install recon/domains-hosts/hackertargetনির্দিষ্ট module install করোInstall a specific module
marketplace install allসব module install করোInstall all modules
modules load recon/domains-hosts/hackertargetModule load করোLoad a module
modules listInstalled modules দেখাওList installed modules
infoLoaded module-এর তথ্য দেখাওShow info about loaded module

🎯 Recon OperationsRecon Operations

কমান্ডCommandকাজFunction
db insert domainsTarget domain database-এ add করোAdd target domain to database
show domainsDatabase-এ stored domains দেখাওShow stored domains in database
show hostsDiscovered hosts দেখাওShow discovered hosts
show contactsDiscovered contacts ও emails দেখাওShow discovered contacts and emails
options set SOURCE target.comModule-এর SOURCE set করোSet SOURCE for module
runModule চালাওRun the loaded module
keys listAPI keys দেখাওList API keys
keys add shodan_api KEYShodan API key যোগ করোAdd Shodan API key
backModule থেকে বেরিয়ে আসোExit current module
exitRecon-ng বন্ধ করোExit recon-ng

📊 ReportingReporting

# Report generate করো [recon-ng][default] > modules load reporting/html [recon-ng][default][html] > options set FILENAME /home/kali/report.html [recon-ng][default][html] > options set CREATOR Saimum [recon-ng][default][html] > run
# Complete recon workflow example root@kali:~# recon-ng -w target_co # Inside recon-ng: [recon-ng][target_co] > db insert domains domain (TEXT): target.com [recon-ng][target_co] > marketplace install recon/domains-hosts/hackertarget [recon-ng][target_co] > modules load recon/domains-hosts/hackertarget [recon-ng][target_co][hackertarget] > options set SOURCE target.com [recon-ng][target_co][hackertarget] > run [recon-ng][target_co] > show hosts

📋 কাজের Module ListUseful Module List

ModuleকাজPurpose
recon/domains-hosts/hackertargetSubdomain খোঁজোFind subdomains
recon/domains-contacts/whois_pocsWhois contact বের করোExtract Whois contacts
recon/hosts-hosts/resolveHostname resolve করোResolve hostnames
recon/domains-hosts/shodan_hostnameShodan দিয়ে host খোঁজোFind hosts via Shodan
recon/contacts-credentials/hibp_breachHaveIBeenPwned breach checkCheck HaveIBeenPwned breaches
reporting/htmlHTML report তৈরি করোGenerate HTML report
CHAPTER 07
🗂️ DNSrecon — DNS EnumerationDNS Enumeration
Zone Transfer, Brute force Subdomain, Reverse lookup — সব DNS information বের করোZone Transfer, Brute force Subdomains, Reverse lookup — extract all DNS information
🗂️
dnsrecon
Powerful DNS enumeration tool — subdomain brute force, zone transfer, reverse lookup, cache snooping সব পারেPowerful DNS enumeration — subdomain brute force, zone transfer, reverse lookup, cache snooping and more
DNS Recon Active Recon
FlagকাজFunctionউদাহরণExample
-d domainTarget domain specify করোSpecify target domain-d target.com
-t stdStandard DNS enumeration — A, NS, SOA, MX, SRV recordStandard enumeration — A, NS, SOA, MX, SRV recordsdnsrecon -d target.com -t std
-t axfrZone Transfer চেষ্টা করো (সব name server-এ)Attempt Zone Transfer on all name serversdnsrecon -d target.com -t axfr
-t brtBrute force subdomain খোঁজো wordlist দিয়েBrute force subdomains with wordlistdnsrecon -d target.com -t brt -D wordlist.txt
-t rvlReverse DNS lookup করো IP range-এReverse DNS lookup on IP rangednsrecon -r 192.168.1.0/24 -t rvl
-t gooGoogle dork দিয়ে subdomain খোঁজোFind subdomains using Google dorkingdnsrecon -d target.com -t goo
-t snoopDNS cache snooping করোPerform DNS cache snoopingdnsrecon -d target.com -t snoop -n ns1.target.com
-t srvSRV record enumerate করোEnumerate SRV recordsdnsrecon -d target.com -t srv
-t tldTLD enumeration করোTLD enumerationdnsrecon -d target -t tld
-D wordlist.txtBrute force-এর জন্য wordlist file দাওProvide wordlist file for brute force-D /usr/share/wordlists/subdomains.txt
-n ns1.target.comনির্দিষ্ট name server ব্যবহার করোUse specific name server-n ns1.target.com
-r rangeIP range-এ reverse lookup করোReverse lookup on IP range-r 192.168.1.1-192.168.1.254
-x output.xmlXML format-এ result save করোSave results in XML format-x dns_result.xml
-j output.jsonJSON format-এ result save করোSave results in JSON format-j dns_result.json
-c output.csvCSV format-এ result save করোSave results in CSV format-c dns_result.csv
-vVerbose outputVerbose output-v
# Standard DNS enumeration root@kali:~# dnsrecon -d target.com -t std # Zone Transfer (যদি misconfigured থাকে সব subdomain পাবে!) root@kali:~# dnsrecon -d target.com -t axfr # Subdomain brute force (Kali-র built-in wordlist ব্যবহার করো) root@kali:~# dnsrecon -d target.com -t brt -D /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt # সব ধরনের enumeration একসাথে + output save root@kali:~# dnsrecon -d target.com -t std,axfr,goo -j dns_full.json -v # IP range-এ reverse DNS lookup root@kali:~# dnsrecon -r 192.168.1.0/24 -t rvl
CHAPTER 08
🕸️ অন্যান্য Recon ToolsOther Recon Tools
Maltego, Shodan CLI, Dmitry, Fierce, Amass, Subfinder

🕸️ Maltego

🕸️ Maltego কী?
Maltego একটি GUI-based OSINT ও link analysis tool। এটা দিয়ে domain, IP, email, person, organization এর মধ্যে সম্পর্ক visually map করা যায়। Command-line-এর পরিবর্তে graphical interface ব্যবহার করে। Maltego is a GUI-based OSINT and link analysis tool. It visually maps relationships between domains, IPs, emails, persons, organizations. Uses a graphical interface instead of command-line.
কাজActionকীভাবেHow
Launch করোLaunchmaltego টার্মিনালে টাইপ করোtype in terminal
New Graph তৈরি করোCreate new graphFile → New Graph
Domain Entity যোগ করোAdd Domain entityEntity palette থেকে Domain drag করোDrag Domain from entity palette
Transform চালাওrunRight click → Run Transform
Report export করোExport reportFile → Export → PDF/CSV

🔭 Shodan CLI

🔭 Shodan কী?
Shodan হলো "hacker-এর Google" — internet-connected device-এর search engine। CLI দিয়ে directly query করা যায়। Shodan is the "hacker's Google" — a search engine for internet-connected devices. Can be queried directly via CLI.
কমান্ডCommandকাজFunction
shodan init API_KEYAPI key দিয়ে initialize করোInitialize with API key
shodan host 8.8.8.8নির্দিষ্ট IP-র সব info দেখাওShow all info for a specific IP
shodan search "apache 2.4"Apache 2.4 চালানো সব device খোঁজোFind all devices running Apache 2.4
shodan search "port:22 country:BD"Bangladesh-এ SSH open এমন host খোঁজোFind hosts with open SSH in Bangladesh
shodan count "nginx"Nginx চালানো কতটি device আছে count করোCount devices running nginx
shodan download results "apache"Result download করোDownload results
shodan stats --facets country "apache"Country-wise statistics দেখাওShow country-wise statistics
shodan myipতোমার নিজের public IP দেখাওShow your own public IP
shodan domain target.comDomain সম্পর্কে Shodan info দেখাওShow Shodan info about domain

💣 Dmitry — All-in-one ReconAll-in-one Recon

FlagকাজFunctionউদাহরণExample
-wWhois lookup করোPerform Whois lookupdmitry -w target.com
-eEmail address খোঁজোSearch for email addressesdmitry -e target.com
-sSubdomain খোঁজোSearch for subdomainsdmitry -s target.com
-nNetcraft info দেখাওGet Netcraft infodmitry -n target.com
-pTCP port scan করোPerform TCP port scandmitry -p target.com
-iWhois IP lookup করোWhois IP lookupdmitry -i target.com
-o fileOutput file-এ save করোSave output to filedmitry -wesnpo out target.com
# Dmitry — সব features একসাথে চালাও root@kali:~# dmitry -winsepbo output.txt target.com # w=whois i=ip-whois n=netcraft s=subdomain e=email p=portscan b=banner o=output

🦁 Fierce — DNS Subdomain ScannerDNS Subdomain Scanner

কমান্ডCommandকাজFunction
fierce --domain target.comBasic subdomain scan করোBasic subdomain scan
fierce --domain target.com --wordlist list.txtCustom wordlist দিয়ে scan করোScan with custom wordlist
fierce --domain target.com --dns-servers 8.8.8.8নির্দিষ্ট DNS server ব্যবহার করোUse specific DNS server
fierce --domain target.com --subdomains www mail ftpনির্দিষ্ট subdomain check করোCheck specific subdomains

🔎 Amass — Advanced Subdomain EnumerationAdvanced Subdomain Enumeration

কমান্ডCommandকাজFunction
amass enum -d target.comPassive subdomain enumerationPassive subdomain enumeration
amass enum -active -d target.comActive enumeration (DNS resolution সহ)Active enumeration with DNS resolution
amass enum -brute -d target.comBrute force subdomainBrute force subdomain
amass enum -d target.com -o subs.txtResult file-এ save করোSave results to file
amass intel -whois -d target.comWhois intelligence gatheringWhois intelligence gathering

🔭 Recon Workflow — পেশাদার পদ্ধতিRecon Workflow — Professional Method

  • 1️⃣ Passive First: whois, theHarvester, Google dork দিয়ে শুরু — কোনো packet target-এ যাবে নাPassive First: Start with whois, theHarvester, Google dork — no packets reach target
  • 2️⃣ DNS Enum: dig, dnsrecon দিয়ে সব DNS record ও subdomain বের করোDNS Enum: Extract all DNS records and subdomains using dig, dnsrecon
  • 3️⃣ Network Scan: Nmap দিয়ে open port, service, OS বের করোNetwork Scan: Use Nmap to find open ports, services, OS
  • 4️⃣ OSINT: Shodan, Recon-ng দিয়ে আরও তথ্য জমা করোOSINT: Gather more intel with Shodan, Recon-ng
  • 5️⃣ Document: সব findings একটি report-এ লেখোDocument: Record all findings in a report

🗡️ "Reconnaissance is the first step — the more you know, the better you attack or defend."

সব কিছু authorized environment-এ practice করো। অন্যের system-এ permission ছাড়া কোনো কিছু করা illegal। Practice everything in authorized environments only. Doing anything on others' systems without permission is illegal.

Kali Linux Series — Part 1 | v1.0 | Basic Commands & Recon Tools

Part 2: Web Hacking Tools (Burp Suite, Nikto, SQLmap, Gobuster) →