الأربعاء، 18 سبتمبر 2013
11:49 م

NeXpose


نريد أن اقوم بعمل فحص على الشبكة من خلال NeXpose وفي حالة إكتشافه لثغرة قادر Metasploit على تنفيذها، أريده يقوم بإستغلالها … أذن لنبدأ معاً … أول شيء قم بإنشاء ملف في مجلد Metasploit مثلاً وسميه ما شئت (أنا سأستعمل الأسم NeXpose.rc):
vim NeXpose.rc
وضع فيه التالي:
db_create nexpose test.db
load nexpose
nexpose_connect nxadmin:password@localhost:3780
nexpose_scan -v -x -t pentest-audit 172.16.1.55
أغلق الملف وأحفظه … ولنوضح ما هي هذه السطور:
السطر الأول: قمنا بعملية إنشاء قاعدة بيانات لـ NeXpose …
السطر الثاني: قمنا بعملية تحميل NeXpose …
السطر الثالث: قمنا بعملية الإتصال على خادم NeXpose ووضعنا أسم المستخدم المراد إستعماله مع كلمة السر الخاصة به … في حالة كنت تستعمل NeXpose على خادم وتستعمل Metasploit من خادم آخر، قم بإسبتدال localhost بعنوان الـ IP الخاص بخادم NeXpose … أنا أستعمل خادم مركزي للامانة وأستعمل Metasploit من جهاز لاب توب قديم جداً ولا يتحمل أن يعمل عليه NeXpose ولهذا أستفيد من كونه عن بعد …
السطر الرابع: قمنا بتشغيل الفحص مع إختيار نوع الفحص والذي هنا هو pentest-audit وأيضاً أعطيناه الهدف المطلوب الفحص عليه، قم بإستبداله بما يناسبك … والخيار x هو لكي يقوم بتنفيذ أي إستغلال يكتشفه وقادر على إستغلاله بعد إنتهاء الفحص …

الآن لنقوم بالتنفيذ:
./msfconsole -r ./NeXpose.rc
ستظهر لك مثل هذا:
                                 _
| | o
_ _ _ _ _|_ __, , _ | | __ _|_
/ |/ |/ | |/ | / | / \_|/ \_|/ / \_| |
| | |_/|__/|_/\_/|_/ \/ |__/ |__/\__/ |_/|_/
/|
\|

=[ metasploit v3.3.4-dev [core:3.3 api:1.0]
+ -- --=[ 517 exploits - 245 auxiliary
+ -- --=[ 193 payloads - 23 encoders - 8 nops
=[ svn r8531 updated today (2010.02.17)

resource (./NeXpose.rc)> db_create nexpose_test.db
[*] The specified database already exists, connecting
[*] Successfully connected to the database
[*] File: nexpose_test.db
resource (./NeXpose.rc)> load nexpose

▄▄▄ ▄▄ ▄▄▄ ▄▄▄
███ ██ ██ ▄██
██▀█ ██ ▄████▄ ████ ██▄███▄ ▄████▄ ▄▄█████▄ ▄████▄
██ ██ ██ ██▄▄▄▄██ ██ ██▀ ▀██ ██▀ ▀██ ██▄▄▄▄ ▀ ██▄▄▄▄██
██ █▄██ ██▀▀▀▀▀▀ ████ ██ ██ ██ ██ ▀▀▀▀██▄ ██▀▀▀▀▀▀
██ ███ ▀██▄▄▄▄█ ██ ██ ███▄▄██▀ ▀██▄▄██▀ █▄▄▄▄▄██ ▀██▄▄▄▄█
▀▀ ▀▀▀ ▀▀▀▀▀ ▀▀▀ ▀▀▀ ██ ▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀ ▀▀▀▀▀
██

[*] NeXpose integration has been activated
[*] Successfully loaded plugin: nexpose
resource (./NeXpose.rc)> nexpose_connect nxadmin:password@localhost:3780
[*] Connecting to NeXpose instance at localhost:3780 with username nxadmin...
resource (./NeXpose.rc)> nexpose_scan -v -t pentest-audit 172.16.1.55
[*] Creating a new scan using template pentest-audit and 32 concurrent IPs against 172.16.1.55
[*] Scanning 1 addresses with template pentest-audit in sets of 32
[*] Scanning 172.16.1.55-172.16.1.55...
[*] >> Created temporary site #1
[*] >> Created temporary report configuration #1
[*] >> Scan has been launched with ID #1
[*] >> Found 0 devices and 0 unresponsive
[*] >> Found 1 devices and 0 unresponsive
[*] >> Scan has been completed with ID #1
[*] >> Waiting on the report to generate...
[*] >> Downloading the report data from NeXpose...
[*] >> Deleting the temporary site and report...
[*] Completed the scan of 1 addresses
الآن أنتهى الفحص لكي ترى النتائج، نفذ التالي:
msf > db_vulns
ستظهر لك قائمة بالنتائج حسب شبكتك والمشاكل التي عندك … وإذا كان قد تم إستغلال الجهاز من خلال ثغرة ما، فإنه يمكننا معرفة ذلك من خلال:
msf > sessions -l -v
أختر الـ Session الموجودة والباقي تعرفونه

0 التعليقات:

إرسال تعليق