Linux ব্যাসিক থেকে শুরু করে Privilege Escalation, Forensics, Hardening, Kali Linux Tools — সাইবার সিকিউরিটিতে যা যা দরকার সব কিছু এক জায়গায়।From Linux basics to Privilege Escalation, Forensics, Hardening, and Kali Linux Tools — everything you need for cybersecurity in one place.
Linux হলো একটি ওপেন সোর্স অপারেটিং সিস্টেম Kernel যা ১৯৯১ সালে Linus Torvalds তৈরি করেছিলেন। এটি Unix-এর আদলে তৈরি কিন্তু সম্পূর্ণ আলাদা কোড। Linux Kernel + GNU Tools + অন্যান্য সফটওয়্যার মিলে একটি পূর্ণাঙ্গ OS তৈরি হয় যাকে Linux Distribution বলে।
Linux Architecture:
┌─────────────────────────────────────────────┐
│ User Space │
│ ┌─────────┐ ┌─────────┐ ┌───────────────┐ │
│ │ bash │ │ Firefox │ │ Wireshark │ │
│ └────┬────┘ └────┬────┘ └───────┬───────┘ │
│ │ │ │ │
│ ┌────▼───────────▼───────────────▼────────┐ │
│ │ GNU C Library (glibc) │ │
│ └────────────────┬────────────────────────┘ │
└───────────────────│─────────────────────────┘
│ System Calls
┌───────────────────▼─────────────────────────┐
│ Kernel Space │
│ ┌──────────┐ ┌──────────┐ ┌─────────────┐ │
│ │ Process │ │ Memory │ │ Network │ │
│ │ Manager │ │ Manager │ │ Stack │ │
│ └──────────┘ └──────────┘ └─────────────┘ │
│ ┌──────────────────────────────────────────┐│
│ │ Device Drivers ││
│ └──────────────────────────────────────────┘│
└─────────────────────────────────────────────┘
Hardware (CPU, RAM, Disk)
Kernel হলো OS-এর কেন্দ্রীয় অংশ। এটি Hardware ও Software-এর মধ্যে মধ্যস্থতা করে। সিকিউরিটির দৃষ্টিকোণ থেকে — Kernel Exploit হলো সবচেয়ে শক্তিশালী অ্যাটাক কারণ এটি পুরো সিস্টেমের নিয়ন্ত্রণ দেয়।
| Distribution | Base | উদ্দেশ্য | সিকিউরিটি ব্যবহার | কঠিনতা |
|---|---|---|---|---|
| Kali Linux | Debian | Penetration Testing | ⭐⭐⭐⭐⭐ সেরা | মাঝারি |
| Parrot OS | Debian | Security + Privacy | ⭐⭐⭐⭐ ভালো | সহজ |
| Ubuntu | Debian | General Purpose | ⭐⭐⭐ ঠিক আছে | সহজ |
| Arch Linux | Independent | Customizable | ⭐⭐⭐ কাস্টম | কঠিন |
| BlackArch | Arch | Pentesting | ⭐⭐⭐⭐⭐ ২৮০০+ টুল | কঠিন |
| REMnux | Ubuntu | Malware Analysis | ⭐⭐⭐⭐⭐ Forensics | মাঝারি |
| TAILS | Debian | Anonymity | ⭐⭐⭐⭐ Privacy | সহজ |
| Fedora | RPM | Development | ⭐⭐⭐ SELinux built-in | মাঝারি |
| বিষয় | Linux | Windows |
|---|---|---|
| ডিফল্ট User | Non-root (নিরাপদ) | Admin (ঝুঁকিপূর্ণ) |
| ভাইরাস সংখ্যা | অনেক কম | লক্ষাধিক |
| Source Code | Open (দেখা যায়) | Closed (লুকানো) |
| Patching | দ্রুত | ধীর |
| Log Access | সহজ (/var/log) | Event Viewer (জটিল) |
| Process Control | শক্তিশালী | সীমিত |
| Attack টার্গেট | সার্ভার অ্যাটাক বেশি | Desktop অ্যাটাক বেশি |
Linux-এ সব কিছু একটি root (/) ডিরেক্টরি থেকে শুরু হয়। Windows-এর মতো C:\ D:\ নেই — সব কিছু একটি tree structure-এ।
/ (Root) ├── bin/ → Essential commands (ls, cp, mv, cat) ├── boot/ → Boot files, GRUB, Linux Kernel ├── dev/ → Device files (sda, tty, null, random) ├── etc/ → ⭐ System configuration files [সবচেয়ে গুরুত্বপূর্ণ!] ├── home/ → User home directories (/home/saimum) ├── lib/ → Shared libraries ├── media/ → Removable media mount points ├── mnt/ → Temporary mount points ├── opt/ → Optional/third-party software ├── proc/ → ⭐ Virtual filesystem — running processes ├── root/ → ⭐ Root user's home directory ├── run/ → Runtime data (PIDs, sockets) ├── sbin/ → System binaries (admin commands) ├── srv/ → Service data (web server files) ├── sys/ → Virtual filesystem — kernel/hardware ├── tmp/ → ⚠️ Temporary files (world-writable!) ├── usr/ → User programs and data │ ├── bin/ → User commands │ ├── lib/ → Libraries │ ├── local/ → Locally installed software │ └── share/ → Shared data └── var/ → ⭐ Variable data (logs, mail, databases) ├── log/ → System logs ├── www/ → Web server files └── mail/ → Mail spool
| ফাইল | কাজ | সিকিউরিটি গুরুত্ব |
|---|---|---|
/etc/passwd | User অ্যাকাউন্ট তথ্য | ⭐⭐⭐⭐⭐ সব user দেখা যায় |
/etc/shadow | Hashed পাসওয়ার্ড | ⭐⭐⭐⭐⭐ Root only! Crack করা যায় |
/etc/group | Group তথ্য | ⭐⭐⭐⭐ Group membership |
/etc/sudoers | Sudo অনুমতি | ⭐⭐⭐⭐⭐ Privilege Escalation! |
/etc/ssh/sshd_config | SSH সার্ভার কনফিগ | ⭐⭐⭐⭐⭐ Remote access নিয়ন্ত্রণ |
/etc/hosts | Local DNS | ⭐⭐⭐ DNS Spoofing সম্ভব |
/etc/crontab | Scheduled tasks | ⭐⭐⭐⭐⭐ Persistence! |
/etc/fstab | Filesystem mount | ⭐⭐⭐ Mount point info |
/etc/network/interfaces | নেটওয়ার্ক কনফিগ | ⭐⭐⭐ Network setup |
/etc/iptables/rules.v4 | Firewall rules | ⭐⭐⭐⭐⭐ Security rules |
/etc/environment | System environment | ⭐⭐⭐ PATH injection |
/etc/profile | Login shell script | ⭐⭐⭐⭐ Persistence |
| Log ফাইল | কী থাকে | সিকিউরিটি ব্যবহার |
|---|---|---|
/var/log/auth.log | Authentication ইভেন্ট | Login attempt, sudo use ট্র্যাক |
/var/log/syslog | System messages | System activity মনিটর |
/var/log/kern.log | Kernel messages | Kernel exploit চেষ্টা |
/var/log/apache2/access.log | Web requests | Web attack detection |
/var/log/apache2/error.log | Web errors | Exploitation চেষ্টা |
/var/log/fail2ban.log | Blocked IPs | Brute force detection |
/var/log/wtmp | Login history | last কমান্ড দিয়ে পড়া |
/var/log/btmp | Failed logins | lastb কমান্ড দিয়ে পড়া |
~/.bash_history, ~/.ssh/ এবং /etc/shadow চেক করো। প্রায়ই এখানে পাসওয়ার্ড বা SSH key পাওয়া যায়।
Linux-এর মূল দর্শন — "Everything is a file"। ডিভাইস, প্রসেস, নেটওয়ার্ক সংযোগ — সব কিছু ফাইল হিসেবে উপস্থাপন করা হয়।
ls -la /etc/passwd এর output: -rw-r--r-- 1 root root 2847 Jan 10 12:00 /etc/passwd │││││││││└── File name │││││││││ │││││││└──── Group permission: r-- (read only) │││││└────── Owner permission: rw- (read+write) │││└──────── File type: - (regular file) │││ │││ মোট ৯ বিট = ৩ সেট × ৩ বিট (rwx) │││ │├┴───────── Owner (user) │└─────────── Group └──────────── Others (everyone else)
| Symbol | বাইনারি | মান | অর্থ |
|---|---|---|---|
r | 100 | 4 | Read — পড়তে পারবে |
w | 010 | 2 | Write — লিখতে পারবে |
x | 001 | 1 | Execute — চালাতে পারবে |
- | 000 | 0 | কোনো permission নেই |
SUID বিট থাকলে ফাইলটি owner-এর privilege দিয়ে চলে, চালানো user-এর নয়। যেমন /usr/bin/passwd — সাধারণ user root হিসেবে /etc/shadow পরিবর্তন করতে পারে।
Sticky Bit থাকলে /tmp ডিরেক্টরিতে শুধু ফাইলের owner মুছতে পারবে।
sudo -l চালাও। অনেক সময় NOPASSWD পাবে বা কোনো binary-তে sudo access পাবে যা দিয়ে root shell পাওয়া যায়।
প্রোগ্রাম চালু হলে একটি Process তৈরি হয়। প্রতিটি Process-এর একটি PID (Process ID) আছে।
Cron হলো Linux-এর Task Scheduler। সিকিউরিটিতে দুটো দিক — Automation এবং Persistence (হ্যাকার backdoor বসায়)।
Privilege Escalation মানে কম সুবিধার account থেকে বেশি সুবিধার account (বিশেষত root) পাওয়া। CTF ও Real-world Pentest-এ এটি সবচেয়ে গুরুত্বপূর্ণ পদক্ষেপ।
| ফাইল/টুল | অবস্থান | ব্যবহার |
|---|---|---|
| rockyou.txt | /usr/share/wordlists/rockyou.txt.gz | পাসওয়ার্ড ক্র্যাক |
| dirbuster wordlist | /usr/share/wordlists/dirbuster/ | Directory brute force |
| SecLists | /usr/share/seclists/ (ইনস্টল করতে হবে) | সব ধরনের wordlist |
| webshells | /usr/share/webshells/ | PHP/ASP webshell |
| nmap scripts | /usr/share/nmap/scripts/ | NSE scripts |
| Metasploit modules | /usr/share/metasploit-framework/modules/ | Exploit modules |
🐧 "In the world of Linux, the terminal is your superpower."
এই ডকুমেন্ট সম্পূর্ণ শিক্ষামূলক উদ্দেশ্যে।This document is entirely for educational purposes.
সব সময় authorized environment-এ প্র্যাকটিস করো।Always practice in an authorized environment.
| Platform | ধরনType | কার জন্যFor Whom | খরচCost |
|---|---|---|---|
| TryHackMe | Guided Learning | একদম নতুনদের জন্যComplete beginners | Free + Premium |
| HackTheBox | CTF / Labs | মাঝারি ও এগিয়ে যাওয়াIntermediate & advanced | Free + VIP |
| PortSwigger Web Academy | Web Hacking | Web security শিখতেFor web security | Free |
| PicoCTF | CTF | শিক্ষার্থীদের জন্যFor students | Free |
| VulnHub | VMs | Offline practiceOffline practice | Free |
| OWASP | Web Standard | Web security referenceWeb security reference | Free |
| Exploit-DB | Exploit DB | CVE ও exploit খোঁজাFind CVEs and exploits | Free |
| GTFOBins | PrivEsc Reference | Linux PrivEscLinux PrivEsc | Free |
| টুলTool | গতিSpeed | নির্ভুলতাAccuracy | বিশেষত্বSpecialty | কখন ব্যবহার করবেWhen to Use |
|---|---|---|---|---|
| Nmap | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | NSE Scripts, OS detection | সব সময় প্রথম পছন্দAlways first choice |
| Masscan | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | অতিদ্রুতUltra fast | বড় নেটওয়ার্ক দ্রুত স্ক্যানLarge network quick scan |
| Rustscan | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | Rust-based, fast | CTF-এ দ্রুত সব পোর্টQuick all-port scan in CTF |
| Netcat | ⭐⭐⭐ | ⭐⭐⭐ | Banner grabbing | Manual port checkManual port check |
| টুলTool | ধরনType | ভালো দিকStrengths | দুর্বল দিকWeaknesses | ব্যবহারUse Case |
|---|---|---|---|---|
| Metasploit | Framework | সব কিছু built-in, সহজEverything built-in, easy | IDS detect করে সহজেEasily detected by IDS | CVE exploit, post-exploitCVE exploit, post-exploit |
| SQLmap | Web | Automated SQL injectionAutomated SQL injection | শুধু SQL injectionSQL injection only | Web database attackWeb database attack |
| Burp Suite | Web Proxy | সব web attackAll web attacks | GUI, manual interventionGUI, manual intervention | Web app pentestingWeb app pentesting |
| BeEF | Browser | Browser hookingBrowser hooking | JS requiredJS required | XSS-এর পরেAfter XSS |
| Exploit-DB / searchsploit | Database | Offline exploit খোঁজাOffline exploit search | Manual executionManual execution | CVE এর public exploitPublic exploit for CVE |
| টুলTool | ধরনType | GPU supportGPU Support | কখন ব্যবহারWhen to Use |
|---|---|---|---|
| Hydra | Online BF | ❌ | Live service (SSH, FTP, HTTP)Live service (SSH, FTP, HTTP) |
| Medusa | Online BF | ❌ | Hydra-এর বিকল্পAlternative to Hydra |
| John the Ripper | Offline | ⚠️ Limited | Linux shadow, ZIP, SSH keyLinux shadow, ZIP, SSH key |
| Hashcat | Offline | ✅ Best | GPU দিয়ে দ্রুত crackFast crack with GPU |
| CrackStation | Online | N/A | Simple hash online lookupSimple hash online lookup |
| টুলTool | ইন্টারফেসInterface | বিশেষত্বSpecialty | ব্যবহারUse Case |
|---|---|---|---|
| Wireshark | GUI | Packet analysisPacket analysis | Network traffic বিশ্লেষণ, CTF forensicsNetwork traffic analysis, CTF forensics |
| tcpdump | CLI | দ্রুত captureFast capture | Remote server-এ packet capturePacket capture on remote server |
| Tshark | CLI | Wireshark CLI versionWireshark CLI version | Script দিয়ে packet analysisScripted packet analysis |
| Netcat (nc) | CLI | Multi-purposeMulti-purpose | Port scan, reverse shell, file transferPort scan, reverse shell, file transfer |
| ss / netstat | CLI | Local socket infoLocal socket info | Open port ও connection দেখাView open ports & connections |
| টুলTool | কাজPurpose |
|---|---|
| Nmap | স্ক্যানিংScanning |
| Metasploit | এক্সপ্লয়েটExploiting |
| Burp Suite | ওয়েব অ্যাটাকWeb attack |
| Hashcat | পাসওয়ার্ড ক্র্যাকPassword crack |
| LinPEAS | PrivEsc খোঁজাFind PrivEsc |
| Mimikatz | Credential dumpCredential dump |
| টুলTool | কাজPurpose |
|---|---|
| Snort / Suricata | IDS/IPSIDS/IPS |
| Fail2Ban | Brute force blockBlock brute force |
| Wazuh / OSSEC | SIEM / Log analysisSIEM / Log analysis |
| Wireshark | Traffic বিশ্লেষণTraffic analysis |
| auditd | Audit loggingAudit logging |
| Lynis | Security auditSecurity audit |
| Distro | সেরা ব্যবহারBest Use | প্রি-ইনস্টলড টুলPre-installed Tools | আমাদের রেটিংOur Rating |
|---|---|---|---|
| Kali Linux | Penetration TestingPenetration Testing | 600+ | ⭐⭐⭐⭐⭐ সেরা পছন্দBest choice |
| Parrot OS | Security + PrivacySecurity + Privacy | 400+ | ⭐⭐⭐⭐ হালকা মেশিনেFor light machines |
| BlackArch | Advanced PentestingAdvanced Pentesting | 2800+ | ⭐⭐⭐⭐⭐ Expert-দের জন্যFor experts |
| REMnux | Malware AnalysisMalware Analysis | 100+ | ⭐⭐⭐⭐⭐ ForensicsForensics |
| TAILS | AnonymityAnonymity | 50+ | ⭐⭐⭐⭐ PrivacyPrivacy |
| Ubuntu Server | Blue Team Lab SetupBlue Team Lab Setup | 0 | ⭐⭐⭐ Practice targetPractice target |
🐧 "In the world of Linux, the terminal is your superpower."
এই ডকুমেন্ট সম্পূর্ণ শিক্ষামূলক উদ্দেশ্যে। সব সময় authorized environment-এ প্র্যাকটিস করো। This document is entirely for educational purposes. Always practice in an authorized environment.
v2.0 — Roadmap + Cheat Sheet + Tools Comparison + Bilingual + Dark Mode