顯示具有 資安 標籤的文章。 顯示所有文章
顯示具有 資安 標籤的文章。 顯示所有文章

2024年10月24日 星期四

Windows remote desktop session timeout

Reference:

執行 gpedit.msc
電腦設定 / 系統管理範本 / Windows元件 / 遠端桌面服務 / 遠端桌面工作階段主機 / 工作階段連線時間限制

第2, 3項不會把帳號登出(待測試),其它會把帳號登出。

2024年8月27日 星期二

Microsoft MFA在新手機重設

Microsoft相關服務已啟用MFA認證,如果購買新手機,重新導入MFA的方法如下:
1. 登入Microsoft服務網頁,Ex: https://portal.azure.com。網頁版的outlook, teams也可以。
2. 選擇右上角的帳號圖案,點選View account。

2023年11月10日 星期五

網站資安風險 Cloud Metadata Potentially Exposed

Reference:

狀況:OWASP ZAP掃描出高風險
High Cloud Metadata Potentially Exposed
Description The Cloud Metadata Attack attempts to abuse a misconfigured NGINX server in order to access the instance metadata maintained by cloud service providers such as AWS, GCP and Azure.
 
All of these providers provide metadata via an internal unroutable IP address '169.254.169.254' - this can be exposed by incorrectly configured NGINX servers and accessed by using this IP address in the Host header field.
 
URL https://xxx.com.tw/latest/meta-data/
Method GET
Parameter  
Attack 169.254.169.254
Evidence  
Instances 1
Solution Do not trust any user data in NGINX configs. In this case it is probably the use of the $host variable which is set from the 'Host' header and can be controlled by an attacker.
Reference https://www.nginx.com/blog/trust-no-one-perils-of-trusting-user-input/
CWE Id  
WASC Id  
Plugin Id 90034

2023年2月2日 星期四

OWASP ZAP 2.12.0 install

OWASP ZAP 是網站弱點掃描工具。 
Oracle Java SE看起來在公司使用要收費,所以安裝 OpenJDK。
 
安裝方式:
  • Java

2022年3月6日 星期日

CentOS 7 更新 sshd 版本

Reference:
 
安裝需要的工具
yum -y install wget tar gcc make perl
 
download zlib last version
到 https://zlib.net/ 確認最新版本
wget https://zlib.net/zlib-1.2.11.tar.gz

download openssl last version
到 https://www.openssl.org/source/ 確認最新版本
wget https://www.openssl.org/source/openssl-1.1.1m.tar.gz

download openssh last version
到 https://www.openssh.com/ 確認最新版本
https://www.openssh.com/portable.html
wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.9p1.tar.gz
 

2022年2月13日 星期日

Fortigate close port 2000, 5060

Reference:
 
從 CLI 調整:
config system session-helper
delete 13
end
 
config system settings
set default-voip-alg-mode kernel-helper-based
end

config voip profile
edit default
config sip
set status disable
end
end
 
清除 session:
diagnose sys session clear

再次用 nmap 測試,如果還是有 open port,
請從 GUI 檢查 System / Administrators / Trust Hosts 的設定。
先設定 Trust Hosts,再從非 Trust Hosts 測試。
因為 Trust Host 權限最大,如果 Trust Hosts 沒設定,預設全部都是 Trust Hosts。
 

2022年2月5日 星期六

滲透測試軟體 Burp Suite

Reference: 

本來我是用免錢的 OWASP ZAP,但是客戶說他們網站很重要,一定要用專業工具檢查。只好裝Burp Suite Professional 來檢查,可以試用 30 天。

安裝:
使用教學: 

2021年11月25日 星期四

資安筆記

若你使用此漏洞的lib開發前台,如論壇或留言版,會讓人在貼文時可植入一段有害的程式碼,觀文者即有可能受該程式碼影響。

X-Frame-Options Header Not Set
主要用途是釣魚網站。
比如我架一個釣魚網站,背後資料全捉你的公開站,連post資料也去你站上捉,久而久之,當人們可以從我這站登入你網站時,我這站即可取得使用者帳密。