日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
使用 Linux 安全工具進(jìn)行滲透測(cè)試

使用 Kali linux 和其他開源工具來發(fā)現(xiàn)系統(tǒng)中的安全漏洞和弱點(diǎn)。

成都地區(qū)優(yōu)秀IDC服務(wù)器托管提供商(成都創(chuàng)新互聯(lián)).為客戶提供專業(yè)的德陽機(jī)房服務(wù)器托管,四川各地服務(wù)器托管,德陽機(jī)房服務(wù)器托管、多線服務(wù)器托管.托管咨詢專線:18982081108

眾多被廣泛報(bào)道的大型消費(fèi)企業(yè)入侵事件凸顯了系統(tǒng)安全管理的重要性。幸運(yùn)的是,有許多不同的應(yīng)用程序可以幫助保護(hù)計(jì)算機(jī)系統(tǒng)。其中一個(gè)是 Kali,一個(gè)為安全和滲透測(cè)試而開發(fā)的 Linux 發(fā)行版。本文演示了如何使用 Kali Linux 來審視你的系統(tǒng)以發(fā)現(xiàn)弱點(diǎn)。

Kali 安裝了很多工具,它們都是開源的,默認(rèn)情況下安裝了它們會(huì)讓事情變得更容易。

本文使用的系統(tǒng)是:

  1. kali.usersts.redhat.com:這是我將用來啟動(dòng)掃描和攻擊的系統(tǒng)。它擁有 30GB 內(nèi)存和 6 個(gè)虛擬 CPU(vCPU)。
  2. vulnerable.usersys.redhat.com: 這是一個(gè) Red Hat 企業(yè)版 Linux 8 系統(tǒng),它會(huì)成為目標(biāo)。它擁有 16GB 內(nèi)存和 6 個(gè) vCPU。它是一個(gè)相對(duì)較新的系統(tǒng),但有些軟件包可能已經(jīng)過時(shí)。
  3. 這個(gè)系統(tǒng)包括 httpd-2.4.37-30.module+el8.3.0+7001+0766b9e7.x86_64、 mariadb-server-10.3.27-3.module+el8.3.0+8972+5e3224e9.x86_64、 tigervnc-server-1.9.0-15.el8_1.x86_64、 vsftpd-3.0.3-32.el8.x86_64 和一個(gè) 5.6.1 版本的 WordPress。

我在上面列出了硬件規(guī)格,因?yàn)橐恍┤蝿?wù)要求很高,尤其是在運(yùn)行 WordPress 安全掃描程序(WPScan)時(shí)對(duì)目標(biāo)系統(tǒng) CPU 的要求。

探測(cè)你的系統(tǒng)

首先,我會(huì)在目標(biāo)系統(tǒng)上進(jìn)行基本的 Nmap 掃描(你可以閱讀 使用 Nmap 結(jié)果幫助加固 Linux 系統(tǒng) 一文來更深入地了解 Nmap)。Nmap 掃描是一種快速的方法,可以大致了解被測(cè)系統(tǒng)中哪些端口和服務(wù)是暴露的。

默認(rèn)掃描顯示有幾個(gè)你可能感興趣的開放端口。實(shí)際上,任何開放端口都可能成為攻擊者破壞你網(wǎng)絡(luò)的一種方式。在本例中,端口 21、22、80 和 443 是不錯(cuò)的掃描對(duì)象,因?yàn)樗鼈兪浅S梅?wù)的端口。在這個(gè)早期階段,我只是在做偵察工作,盡可能多地獲取有關(guān)目標(biāo)系統(tǒng)的信息。

我想用 Nmap 偵察 80 端口,所以我使用 -p 80 參數(shù)來查看端口 80,-A 參數(shù)來獲取操作系統(tǒng)和應(yīng)用程序版本等信息。

關(guān)鍵信息有:

PORT   STATE SERVICE VERSION
80/tcp open  http       Apache httpd 2.4.37 ((Red Hat Enterprise Linux))
|_http-generator: WordPress 5.6.1

現(xiàn)在我知道了這是一個(gè) WordPress 服務(wù)器,我可以使用 WPScan 來獲取有關(guān)潛在威脅的信息。一個(gè)很好的偵察方法是嘗試找到一些用戶名,使用 --enumerate u 告訴 WPScan 在 WordPress 實(shí)例中查找用戶名。例如:

┌──(rootkali)-[~]
└─# wpscan --url vulnerable.usersys.redhat.com --enumerate u
_______________________________________________________________
        __              _______   _____
        \ \     / /  __ \ / ____|
        \ \  /\  / /| |__) | (___   ___  __ _ _ __ ?
        \ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \
                \  /\  /  | |   ____) | (__| (_| | | | |
                \/  \/   |_|    |_____/ \___|\__,_|_| |_|

        WordPress Security Scanner by the WPScan Team
                        Version 3.8.10
        Sponsored by Automattic - https://automattic.com/
        @_WPScan_, @ethicalhack3r, @erwan_lr, @firefart
_______________________________________________________________

[+] URL: http://vulnerable.usersys.redhat.com/ [10.19.47.242]
[+] Started: Tue Feb 16 21:38:49 2021

Interesting Finding(s):
...
[i] User(s) Identified:

[+] admin
 | Found By: Author Posts - Display Name (Passive Detection)
 | Confirmed By:
 |  Author Id Brute Forcing - Author Pattern (Aggressive Detection)
 |  Login Error Messages (Aggressive Detection)

[+] pgervase
 | Found By: Author Posts - Display Name (Passive Detection)
 | Confirmed By:
 |  Author Id Brute Forcing - Author Pattern (Aggressive Detection)
 |  Login Error Messages (Aggressive Detection)

這顯示有兩個(gè)用戶:admin 和 pgervase。我將嘗試使用密碼字典來猜測(cè) admin 的密碼。密碼字典是一個(gè)包含很多密碼的文本文件。我使用的字典大小有 37G,有 3,543,076,137 行。

就像你可以選擇不同的文本編輯器、Web 瀏覽器和其他應(yīng)用程序 一樣,也有很多工具可以啟動(dòng)密碼攻擊。下面是兩個(gè)使用 Nmap 和 WPScan 的示例命令:

# nmap -sV --script http-wordpress-brute --script-args userdb=users.txt,passdb=/path/to/passworddb,threads=6 vulnerable.usersys.redhat.com
# wpscan --url vulnerable.usersys.redhat.com --passwords /path/to/passworddb --usernames admin --max-threads 50 | tee nmap.txt

這個(gè) Nmap 腳本是我使用的許多腳本之一,使用 WPScan 掃描 URL 只是這個(gè)工具可以完成的許多任務(wù)之一。你可以用你喜歡的那一個(gè)。

WPScan 示例在文件末尾顯示了密碼:

┌──(rootkali)-[~]
└─# wpscan --url vulnerable.usersys.redhat.com --passwords passwords.txt --usernames admin
_______________________________________________________________
        __              _______   _____
        \ \     / /  __ \ / ____|
        \ \  /\  / /| |__) | (___   ___  __ _ _ __ ?
        \ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \
                \  /\  /  | |   ____) | (__| (_| | | | |
                \/  \/   |_|    |_____/ \___|\__,_|_| |_|

        WordPress Security Scanner by the WPScan Team
                        Version 3.8.10
        Sponsored by Automattic - https://automattic.com/
        @_WPScan_, @ethicalhack3r, @erwan_lr, @firefart
_______________________________________________________________

[+] URL: http://vulnerable.usersys.redhat.com/ [10.19.47.242]
[+] Started: Thu Feb 18 20:32:13 2021

Interesting Finding(s):

......

[+] Performing password attack on Wp Login against 1 user/s
Trying admin / redhat Time: 00:01:57 <==================================================================================================================> (3231 / 3231) 100.00% Time: 00:01:57
Trying admin / redhat Time: 00:01:57 <=========================================================                                                         > (3231 / 6462) 50.00%  ETA: ??:??:??
[SUCCESS] - admin / redhat                                                                                                                                                                      

[!] Valid Combinations Found:
 | Username: admin, Password: redhat

[!] No WPVulnDB API Token given, as a result vulnerability data has not been output.
[!] You can get a free API token with 50 daily requests by registering at https://wpscan.com/register

[+] Finished: Thu Feb 18 20:34:15 2021
[+] Requests Done: 3255
[+] Cached Requests: 34
[+] Data Sent: 1.066 MB
[+] Data Received: 24.513 MB
[+] Memory used: 264.023 MB
[+] Elapsed time: 00:02:02

在末尾的“找到有效組合”部分包含了管理員用戶名和密碼,3231 行只用了兩分鐘。

我還有另一個(gè)字典文件,其中包含 3,238,659,984 行,使用它花費(fèi)的時(shí)間更長并且會(huì)留下更多的證據(jù)。

使用 Nmap 可以更快地產(chǎn)生結(jié)果:

┌──(rootkali)-[~]
└─# nmap -sV --script http-wordpress-brute --script-args userdb=users.txt,passdb=password.txt,threads=6 vulnerable.usersys.redhat.com
Starting Nmap 7.91 ( https://nmap.org ) at 2021-02-18 20:48 EST
Nmap scan report for vulnerable.usersys.redhat.com (10.19.47.242)
Host is up (0.00015s latency).
Not shown: 995 closed ports
PORT    STATE SERVICE VERSION
21/tcp   open  ftp      vsftpd 3.0.3
22/tcp   open  ssh      OpenSSH 8.0 (protocol 2.0)
80/tcp   open  http     Apache httpd 2.4.37 ((Red Hat Enterprise Linux))
|_http-server-header: Apache/2.4.37 (Red Hat Enterprise Linux)
| http-wordpress-brute:
|   Accounts:
|       admin:redhat - Valid credentials              <<<<<<<
|       pgervase:redhat - Valid credentials         <<<<<<<
|_  Statistics: Performed 6 guesses in 1 seconds, average tps: 6.0
111/tcp  open  rpcbind 2-4 (RPC #100000)
| rpcinfo:
|   program version     port/proto  service
|   100000  2,3,4       111/tcp   rpcbind
|   100000  2,3,4       111/udp   rpcbind
|   100000  3,4         111/tcp6  rpcbind
|_  100000  3,4         111/udp6  rpcbind
3306/tcp open  mysql   MySQL 5.5.5-10.3.27-MariaDB
MAC Address: 52:54:00:8C:A1:C0 (QEMU virtual NIC)
Service Info: OS: Unix

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 7.68 seconds

然而,運(yùn)行這樣的掃描可能會(huì)在目標(biāo)系統(tǒng)上留下大量的 HTTPD 日志消息:

10.19.47.170 - - [18/Feb/2021:20:14:01 -0500] "POST /wp-login.php HTTP/1.1" 200 7575 "http://vulnerable.usersys.redhat.com/" "WPScan v3.8.10 (https://wpscan.org/)"
10.19.47.170 - - [18/Feb/2021:20:14:00 -0500] "POST /wp-login.php HTTP/1.1" 200 7575 "http://vulnerable.usersys.redhat.com/" "WPScan v3.8.10 (https://wpscan.org/)"
10.19.47.170 - - [18/Feb/2021:20:14:00 -0500] "POST /wp-login.php HTTP/1.1" 200 7575 "http://vulnerable.usersys.redhat.com/" "WPScan v3.8.10 (https://wpscan.org/)"
10.19.47.170 - - [18/Feb/2021:20:14:00 -0500] "POST /wp-login.php HTTP/1.1" 200 7575 "http://vulnerable.usersys.redhat.com/" "WPScan v3.8.10 (https://wpscan.org/)"
10.19.47.170 - - [18/Feb/2021:20:14:00 -0500] "POST /wp-login.php HTTP/1.1" 200 7575 "http://vulnerable.usersys.redhat.com/" "WPScan v3.8.10 (https://wpscan.org/)"
10.19.47.170 - - [18/Feb/2021:20:14:00 -0500] "POST /wp-login.php HTTP/1.1" 200 7575 "http://vulnerable.usersys.redhat.com/" "WPScan v3.8.10 (https://wpscan.org/)"
10.19.47.170 - - [18/Feb/2021:20:14:02 -0500] "POST /wp-login.php HTTP/1.1" 200 7575 "http://vulnerable.usersys.redhat.com/" "WPScan v3.8.10 (https://wpscan.org/)"
10.19.47.170 - - [18/Feb/2021:20:14:02 -0500] "POST /wp-login.php HTTP/1.1" 200 7575 "http://vulnerable.usersys.redhat.com/" "WPScan v3.8.10 (https://wpscan.org/)"
10.19.47.170 - - [18/Feb/2021:20:14:02 -0500] "POST /wp-login.php HTTP/1.1" 200 7575 "http://vulnerable.usersys.redhat.com/" "WPScan v3.8.10 (https://wpscan.org/)"

為了獲得關(guān)于在最初的 Nmap 掃描中發(fā)現(xiàn)的 HTTPS 服務(wù)器的信息,我使用了 sslscan 命令:

┌──(rootkali)-[~]
└─# sslscan vulnerable.usersys.redhat.com
Version: 2.0.6-static
OpenSSL 1.1.1i-dev  xx XXX xxxx

Connected to 10.19.47.242

Testing SSL server vulnerable.usersys.redhat.com on port 443 using SNI name vulnerable.usersys.redhat.com

  SSL/TLS Protocols:
SSLv2   disabled
SSLv3   disabled
TLSv1.0   disabled
TLSv1.1   disabled
TLSv1.2   enabled
TLSv1.3   enabled

它顯示了有關(guān)啟用的 SSL 協(xié)議的信息,在最下方,是關(guān)于 Heartbleed 漏洞的信息:

  Heartbleed:
TLSv1.3 not vulnerable to heartbleed
TLSv1.2 not vulnerable to heartbleed

防御或減輕攻擊的技巧

有很多方法可以保護(hù)你的系統(tǒng)免受大量攻擊。幾個(gè)關(guān)鍵點(diǎn)是:

  • **了解你的系統(tǒng):**包括了解哪些端口是開放的,哪些端口應(yīng)該開放,誰應(yīng)該能夠看到這些開放的端口,以及使用這些端口服務(wù)的預(yù)期流量是多少。Nmap 是了解網(wǎng)絡(luò)系統(tǒng)的一個(gè)絕佳工具。
  • 使用當(dāng)前的最佳實(shí)踐: 現(xiàn)在的最佳實(shí)踐可能不是未來的最佳實(shí)踐。作為管理員,了解信息安全領(lǐng)域的最新趨勢(shì)非常重要。
  • 知道如何使用你的產(chǎn)品: 例如,與其讓攻擊者不斷攻擊你的 WordPress 系統(tǒng),不如阻止他們的 IP 地址并限制嘗試登錄的次數(shù)。在現(xiàn)實(shí)世界中,阻止 IP 地址可能沒有那么有用,因?yàn)楣粽呖赡軙?huì)使用受感染的系統(tǒng)來發(fā)起攻擊。但是,這是一個(gè)很容易啟用的設(shè)置,可以阻止一些攻擊。
  • 維護(hù)和驗(yàn)證良好的備份: 如果攻擊者攻擊了一個(gè)或多個(gè)系統(tǒng),能從已知的良好和干凈的備份中重新構(gòu)建可以節(jié)省大量時(shí)間和金錢。
  • 檢查日志: 如上所示,掃描和滲透命令可能會(huì)留下大量日志,這表明攻擊者正在攻擊系統(tǒng)。如果你注意到它們,可以采取先發(fā)制人的行動(dòng)來降低風(fēng)險(xiǎn)。
  • 更新系統(tǒng)、應(yīng)用程序和任何額外的模塊: 正如 NIST Special Publication 800-40r3 所解釋的那樣,“補(bǔ)丁通常是減輕軟件缺陷漏洞最有效的方法,而且通常是唯一完全有效的解決方案?!?/li>
  • 使用供應(yīng)商提供的工具: 供應(yīng)商有不同的工具來幫助你維護(hù)他們的系統(tǒng),因此一定要充分利用它們。例如,紅帽企業(yè) Linux 訂閱中包含的 Red Hat Insights 可以幫助你優(yōu)化系統(tǒng)并提醒你注意潛在的安全威脅。

了解更多

本文對(duì)安全工具及其使用方法的介紹只是冰山一角。深入了解的話,你可能需要查看以下資源:

  • Armitage,一個(gè)開源的攻擊管理工具
  • Red Hat 產(chǎn)品安全中心
  • Red Hat 安全頻道
  • NIST 網(wǎng)絡(luò)安全頁面
  • 使用 Nmap 結(jié)果來幫助加固 Linux 系統(tǒng)


分享名稱:使用 Linux 安全工具進(jìn)行滲透測(cè)試
本文網(wǎng)址:http://www.5511xx.com/article/coohhje.html