顯示具有 弱點掃描 標籤的文章。 顯示所有文章
顯示具有 弱點掃描 標籤的文章。 顯示所有文章

2018年9月27日 星期四

[Security] 弱點掃描修正 - How to disable the mDNS service on CentOS

Run the following commands to disable the mDNS service on CentOS 6 and lower:
service avahi-daemon stop
chkconfig avahi-daemon off

Or when you have CentOS 7:
systemctl stop avahi-daemon
systemctl disable avahi-daemon

What is the avahi-daemon service?
The Avahi mDNS/DNS-SD daemon implements Apple’s Zeroconf architecture 
(also known as “Rendezvous” or “Bonjour”). 

The daemon registers local IP addresses and static services using 
mDNS/DNS-SD and provides two IPC APIs for 
local programs to make use of the mDNS record 
cache the avahi-daemon maintains.

 First there is the so called “simple protocol” which is used exclusively 
by avahi-dnsconfd (a daemon which configures unicast DNS servers 
using server info published via mDNS) and nss-mdns 
(a libc NSS plugin, providing name resolution via mDNS). 
Finally there is the D-Bus interface which provides a rich 
object oriented interface to D-Bus enabled applications.

2018年9月22日 星期六

[Security] 弱點掃描修正 - SMB Signing Disabled

SMB Signing Disabled

弱點名稱:已停用 SMB 簽署 (SMB Signing Disabled)

弱點描述:遠端 SMB 伺服器不需要簽署。
未經驗證的遠端攻擊者可惡意利用此弱點,對 SMB 伺服器發動攔截式攻擊。
Signing is not required on the remote SMB server.
An unauthenticated, remote attacker can exploit this to conduct man-in-the-middle attacks against the SMB server.

描述:
這項原則設定決定 SMB 伺服器元件是否需要封包簽章.
伺服器訊息區(SMB) 通訊協定是 Microsoft 檔案及列印共用和許多其他網路作業 (例如遠端 Windows 系統管理) 的基礎.
為避免攔截式攻擊修改傳送中的 SMB 封包,SMB 通訊協定支援 SMB 封包的數位簽章.
這項原則設定決定允許和 SMB 用戶端進行進一步的通訊之前,
SMB 封包簽章是否必須經過交涉若啟用此設定,
Microsoft 網路伺服器將不會與 Microsoft 網路用戶端通訊, 除非該用戶端同意執行 SMB 封包簽章.
若停用此設定, 會在用戶端與伺服器之間交涉 SMB 封包簽章.
修補建議:
在主機的組態中強制訊息簽署。在 Windows 中,
此項目位於原則設定「Microsoft 網路伺服器:數位簽署通訊 (永遠)」中。
在 Samba 中,此設定稱為「伺服器簽署」。如需詳細資訊,請參閱「另請參閱」連結。
修正步驟:
1. 執行 gpedit.msc 打開本機群組原則編輯器
2. 選擇 [電腦設定\Windows 設定\安全性設定\本機原則\安全性選項]
3. 在右邊窗點擊 "Microsoft 網路伺服器:數位簽章伺服器的通訊(自動)".
4. 選擇 "啟用", 點擊 "確定" (GCB 設定值為 啟用)
CCE: CCE-9040-7
Nessus Plugin ID: 57608
轉自撲哧大大 : https://www.pu.idv.tw/2018/04/smb-signing-disabled.html

[Security] 弱點掃描修正 - Network Time Protocol (NTP) Mode 6 Scanner

Network Time Protocol (NTP) Mode 6 Scanner

修改NTP配置文件
#vi /etc/ntp.conf
添加以下內容(建議使用此方式):
restrict default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited
或在提供NTP查詢的網段加入noquery參數:
restrict 1.1.2.1 mask 255.255.255.0 nomodify notrap noquery
建議方法中兩條配置為高版本NTP中的默認配置,noquery參數限制了mode 6 query,可根據NTP服務端實際配置參考修改。
noquery:Deny ntpq and ntpdc queries. Time service is not affected.
notrap:Decline to provide mode 6 control message trap service to matching hosts.
nomodify:Deny ntpq and ntpdc queries which attempt to modify the state of the server.

參考文檔:http ://doc.ntp.org/current-stable/accopt.html
http://support.ntp.org/bin/view/Support/AccessRestrictions






作者:Shad0wpf
链接:https://www.jianshu.com/p/0106ff85df0b
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

[Security] 弱點掃描修正 - SSL Weak Cipher Suites Supported

SSL Weak Cipher Suites Supported

修改SSL配置文件中的的SSL Cipher參數
不同Web服務軟件的配置文件位置及參數名稱不同,需根據實際情況查找。
具體安全算法配置可參考此網站:https://cipherli.st/
如Apache修改以下內容:

驗證方法:
nmap -p 443 --script "ssl-enum-ciphers" xx.xx.xx.xx








作者:Shad0wpf
链接:https://www.jianshu.com/p/0106ff85df0b
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

[Security] 弱點掃描修正 - SSH Weak Algorithms Supported

SSH Weak Algorithms Supported

SSH的配置文件中加密算法沒有指定,默認支持所有加密算法,包括arcfour,arcfour128,arcfour256等弱加密算法。
整改測試參考:SSH&SSL弱加密算法漏洞修復.
修改SSH配置文件,添加加密算法:
vi /etc/ssh/sshd_config
最後面添加以下內容(去掉arcfour,arcfour128,arcfour256等弱加密算法):
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
ssh_config和sshd_config都是ssh服務器的配置文件,二者區別在於,前者是針對客戶端的配置文件,後者則是針對服務端的配置文件。
保存文件後重啟SSH服務:
service sshd restart or service ssh restart
驗證:
ssh -vv -oCiphers=aes128-cbc,3des-cbc,blowfish-cbc
ssh -vv -oMACs=hmac-md5
參考信息:http://linux.uits.uconn.edu/2014/06/25/ssh-weak-ciphers-and-mac-algorithms/
使用Nmap驗證:
nmap --script "ssh2*" 45.76.186.62


SSH Weak MAC Algorithms Enabled

與上述漏洞修復使用同樣的方式,sshd_config文件添加以下行:

MACs hmac-sha1,umac-64,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160





作者:Shad0wpf
链接:https://www.jianshu.com/p/0106ff85df0b
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

[Security] 弱點掃描修正 - SMB Signing Disabled

SMB Signing Disabled

Linux:修改smb配置文件
#vi /etc/samba/smb.conf
添加以下內容:
server signing = mandatory
https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html

Windows:編輯註冊表
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\Parameters
修改RequireSecuritySignature值為1








作者:Shad0wpf
链接:https://www.jianshu.com/p/0106ff85df0b
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。