2022年11月19日 星期六

[HackRF One] GUN Radio FM 收音機練習

安裝驅動:https://sourceforge.net/projects/libwdi/files/zadig/

安裝GNURADIO Windows版:https://github.com/ryanvolz/radioconda/releases

 參考來源:https://blog.csdn.net/qq_22762933/article/details/123687882





2022年11月6日 星期日

PN532 & Chameleon Mini 使用分享

全加密卡破解-取得第一把密鑰

  1. 連線 Chameleon 
  2. 勾選Slot 1 
  3. Mode :MF_DETECTION
  4. UID :欲破解卡UID
  5. Apply & Set Active




  1. 移除USB將 Chameleon 拿到讀卡器感應感應3~5次
  2. 重新連線 Chameleon 
  3. 勾選Slot 1
  4. 點擊mfkey32 拿到第一把密鑰


 

全加密卡破解-取得其他密鑰

  1. 連線PN532
  2. Hard Nested
  3. 輸入取得的密鑰進行破解





CMD 指令

部分log會亂碼改用cmd 切換語系
  1. 字典破解(需一密鑰)
    • chcp 936
    • nfc-bin\mfoc -k <KEY>" -O "log.txt"
    • nfc-bin\mfoc -f "key.dic" -O "log.txt"
    • 卡片無弱點可能無法使用
      • 使用扇区 00 的密钥开始解密
      • 该卡片不受Nested攻击
  2. 全加密爆破
    • nfc-bin\mfcuk -v 3 -C -R 1 -s 250 -S 250 -d <KEY>


2022年1月27日 星期四

ELK - client 憑證無法建立連線

 http 開啟TLS,使用 PKI 驗證 client 憑證

xpack.security.http.ssl.certificate_authorities: /etc/elasticsearch/certs/ca.crt xpack.security.http.ssl.verification_mode: certificate xpack.security.http.ssl.client_authentication: optional xpack.security.authc.realms.pki.realm1.order: 1

發現一直出現錯誤訊息,CA憑證是信任的但是還是建立連線失敗?
太詭異了!

[2022-01-21T16:51:33,810][WARN ][o.e.c.s.DiagnosticTrustManager] [ES01] failed to establish trust with client at [<unknown host>]; the client provided a certificate with subject name [CN=ES01,DC=TW] and fingerprint [d33df0ef4c412115585e3f90dfdbccc696044232]; the certificate is issued by [CN=ROOT CA,DC=TW]; the certificate is signed by (subject [CN=ROOT CA,DC=TW] fingerprint [2b2f8bc39a8a84d640b3cf6cdbe659316ffe1e97] {trusted issuer}) which is self-issued; the [CN=ROOT CA,DC=TW] certificate is trusted in this ssl context ([xpack.security.http.ssl])

錯誤訊息往下看

Extended key usage does not permit use for TLS client authentication

原來使用工具產生的憑證,extKeyUsage 都會包含 clientAuth 與 serverAuth
而我剛剛好是用公司的CA產出,少了clientAuth,難怪驗不過去!!
參考

  keyUsage :
    digitalSignature,keyEncipherment
  1.3.6.1.4.1.311.21.7 :
  extKeyUsage :
    serverAuth
  1.3.6.1.4.1.311.21.10 :

ELK - 無法連線至ES

 設定完TLS 發現只能本機用IP連,使用127.0.0.1及localhost無法連線

其他主機也都無法連線

 Comment

curl https://localhost:9200 curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:9200

在 elasticsearch_audit 發現

{"type":"audit", "timestamp":"2022-01-20T12:57:57,621+0800", "node.id":"tUCQb6ADSLaZHr4VU8w7WA", "event.type":"ip_filter", "event.action":"connection_denied", "origin.type":"rest", "origin.address":"127.0.0.1", "transport.profile":".http", "rule":"deny _all"}

原來是之前設定到,但沒啟用security所以沒生效

curl "https://IP:9200/_cluster/settings?pretty" { "persistent" : { "cluster" : { "max_shards_per_node" : "2000" }, "xpack" : { "monitoring" : { "collection" : { "enabled" : "true" } }, "security" : { "http" : { "filter" : { "allow" : "IP", "deny" : "_all", "enabled" : "true" } }, "transport" : { "filter" : { "allow" : "IP", "deny" : "_all", "enabled" : "false" } } } } }, "transient" : { } }

把它disable就沒事了!!

curl -X PUT "https://IP:9200/_cluster/settings" -H 'Content-Type: application/json' -d' { "persistent": { "xpack.security.http.filter.enabled": false } } '

預測2031/1/1可能 TWCA 憑證 IOS會出現不信任

緣由: TWCA CYBER Root CA 有兩張、兩個效期 (2030、2047年到期) 推測TWCA 預計 2030年12月會停用: TWCA CYBER Root CA (2030 年到期) TWCA Global Root CA 改用啟用: TWCA CYBER ...