2021年12月6日 星期一

Elasticsearch alert (ElastElert) 安裝

Reference:
 

yum install -y python36 gcc python36-devel git
python3 -m pip install --upgrade pip
pip3 install elastalert
mkdir elastalert
cd elastalert
git clone https://github.com/Yelp/elastalert.git
cd elastalert
cp config.yaml.example config.yaml
mkdir rules

2021年11月25日 星期四

資安筆記

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

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


2021年11月24日 星期三

Fortigate 100D send syslog to linux

Reference:
 
Fortigate 100D網頁管理畫面沒有可以設定將 syslog 傳到外部的 log server。
必須用 putty 連上 console 下指令設定。
 
config log syslogd setting
    set status enable
    set server "192.168.1.171"
    set facility alert
    set source-ip 192.168.1.254
end

Mariadb (Mysql) enable audit log

Reference:
 
#login mysql
mysql -u root -p

#確認plugin目錄 (in mysql)
SHOW GLOBAL VARIABLES LIKE 'plugin_dir';
+---------------+--------------------------+
| Variable_name | Value                    |
+---------------+--------------------------+
| plugin_dir    | /usr/lib64/mysql/plugin/ |
+---------------+--------------------------+

2021年11月22日 星期一

Fortigate disable port 5060, 2000, 541

Reference:
 
port 5060, 2000:
 
To disable the SIP helper /  ALG i used the following code

config system settings
set default-voip-alg-mode kernel-helper-based
end

Important is that you need to configure it on all the VDOM`s

A reboot is not necessary, Clearing the sessions worked for us:

diagnose sys session filter
diagnose sys session filter dport 5060
diagnose sys session clear
diagnose sys session filter dport 2000
diagnose sys session clear
 
PS. port 2000關不掉,找時間重開機試試看。
 
port 541:
config system interface
edit <wan-interface>
unselect allowaccess fgfm
set ident-accept enable
end

2021年11月17日 星期三

Bacula 11.0.5 client setup

Reference:
 
Linux client:
  • yum install wget -y
  • wget https://www.bacula.org/downloads/Bacula-4096-Distribution-Verification-key.asc --no-check-certificate
  • rpm --import Bacula-4096-Distribution-Verification-key.asc
  • vi /etc/yum.repos.d/Bacula.repo
    • [Bacula-Community]
      name=CentOS - Bacula - Community
      baseurl=http://www.bacula.org/packages/[access key]/rpms/11.0.5/el7/
      enabled=1
      protect=0
      gpgcheck=1
    • access key請參考 Bacula 11.0.5 install with rpm