4ensiX

4ensiX

FPと言ったものはFPを選んだが表示はTPになっていることに気づいた。

LetsDefend level 1 alert SOC165 - Possible SQL Injection Payload Detected event-id 115

Details

EventID : 115
Event Time : Feb, 25, 2022, 11:34 AM
Rule : SOC165 - Possible SQL Injection Payload Detected
Level : Security Analyst
Hostname : WebServer1001
Destination IP Address : 172.16.17.18
Source IP Address : 167.99.169.17
HTTP Request Method : GET
Requested URL : https[:]//172.16.17.18/search/?q=%22%20OR%201%20%3D%201%20--%20-
User-Agent : Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1
Alert Trigger Reason : Requested URL Contains OR 1 = 1
Device Action : Allowed

playbook

Is Traffic Malicious?

Answer:Malicious

What Is The Attack Type?

https[:]//172.16.17.18/search/?q=%22%20OR%201%20%3D%201%20--%20-
Requested URL Contains OR 1 = 1

Answer:SQL Injection

Check If It Is a Planned Test

テストを行うというようなメールは見つからなかった.
Answer:Not Planned

What Is the Direction of Traffic?

167.99.169.17(Internet)  ->  172.16.17.18(Company Network)

Answer:Internet -> Company Network

Was the Attack Successful?

  • Log Management
Request URL: https[:]//172.16.17.18/search/?q=%22%20OR%201%20%3D%201%20--%20-
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1
Request Method: GET
Device Action: Permitted
HTTP Response Size:: 948
HTTP Response Status: 500

Answer:No

Add Artifacts

Value Type Comment
167.99.169.17 source ip - known as a malicious IP *1 IP Address
172.16.17.18 dest ip IP Address


*1 167.99.169.17

Do You Need Tier 2 Escalation?

アクセスは成功していないと思われる.
Answer:No

End

LetsDefend Challenge DFIR: Port Scan Activity writeup

LetsDefend Challenge DFIR: Port Scan Activity

Question1: What is the IP address scanning the environment?

一番沢山パケットを飛ばしていそうなのが怪しい.

$ tshark -r port\ scan.pcap -z conv,ip -q

================================================================================
IPv4 Conversations
Filter:<No Filter>
                                               |       <-      | |       ->      | |     Total     |    Relative    |   Duration   |
                                               | Frames  Bytes | | Frames  Bytes | | Frames  Bytes |      Start     |              |
10.42.42.25          <-> 10.42.42.253            3405    228014    2007    120664    5412    348678     0.607596000       603.2091
10.42.42.50          <-> 10.42.42.253            2044    137680    2027    122269    4071    259949     0.000000000       603.9423
10.42.42.56          <-> 10.42.42.253            2013    135910    2013    121868    4026    257778     0.607594000       605.4745
10.42.42.25          <-> 10.42.42.50               40      2996      60      4968     100      7964   183.844341000       360.7820
10.42.42.50          <-> 10.255.255.255             0         0      12      1104      12      1104   166.033287000        53.3117
10.42.42.25          <-> 10.255.255.255             0         0       4       368       4       368   183.843619000       360.4177
================================================================================


A. {10.42.42.253}

Question2: What is the IP address found as a result of the scan?

SYN,ACK,FINでFINまでしていて,ip.dstがスキャンしているipのものだと思われる.

$ tshark -r port\ scan.pcap -Y "tcp.flags.fin==1 && ip.dst==10.42.42.253"
13535 603.076261  10.42.42.50 → 10.42.42.253 NBSS 71 Negative session response, Unspecified error
13536 603.076264  10.42.42.50 → 10.42.42.253 TCP 66 135 → 43490 [FIN, ACK] Seq=1 Ack=33 Win=65503 Len=0 TSval=177445 TSecr=3450708
13546 603.080033  10.42.42.50 → 10.42.42.253 TCP 66 135 → 43492 [FIN, ACK] Seq=25 Ack=169 Win=65367 Len=0 TSval=177446 TSecr=3450709


A.{10.42.42.50}

Question3: What is the MAC address of the Apple system it finds?

$ tshark -r port\ scan.pcap -z conv,ip -q
================================================================================
IPv4 Conversations
Filter:<No Filter>
                                               |       <-      | |       ->      | |     Total     |    Relative    |   Duration   |
                                               | Frames  Bytes | | Frames  Bytes | | Frames  Bytes |      Start     |              |
10.42.42.25          <-> 10.42.42.253            3405    228014    2007    120664    5412    348678     0.607596000       603.2091
10.42.42.50          <-> 10.42.42.253            2044    137680    2027    122269    4071    259949     0.000000000       603.9423
10.42.42.56          <-> 10.42.42.253            2013    135910    2013    121868    4026    257778     0.607594000       605.4745
10.42.42.25          <-> 10.42.42.50               40      2996      60      4968     100      7964   183.844341000       360.7820
10.42.42.50          <-> 10.255.255.255             0         0      12      1104      12      1104   166.033287000        53.3117
10.42.42.25          <-> 10.255.255.255             0         0       4       368       4       368   183.843619000       360.4177
================================================================================
$ tshark -r port\ scan.pcap -z conv,eth -q
================================================================================
Ethernet Conversations
Filter:<No Filter>
                                               |       <-      | |       ->      | |     Total     |    Relative    |   Duration   |
                                               | Frames  Bytes | | Frames  Bytes | | Frames  Bytes |      Start     |              |
Apple_92:6e:dc       <-> QuantaCo_82:1f:4a       3405    228014    2007    120664    5412    348678     0.607596000       603.2091
QuantaCo_82:1f:4a    <-> CompalIn_51:d7:b2       2027    122269    2044    137680    4071    259949     0.000000000       603.9423
QuantaCo_82:1f:4a    <-> CompalIn_cb:1e:79       2013    121868    2013    135910    4026    257778     0.607594000       605.4745
Apple_92:6e:dc       <-> CompalIn_51:d7:b2         40      2996      60      4968     100      7964   183.844341000       360.7820
CompalIn_51:d7:b2    <-> Broadcast                  0         0      12      1104      12      1104   166.033287000        53.3117
Apple_92:6e:dc       <-> Broadcast                  0         0       4       368       4       368   183.843619000       360.4177
================================================================================


ipの統計と見比べると,どのipのmacaddrがAppleのか分かる.

Apple_92:6e:dc (00:16:cb:92:6e:dc)


A.{00:16:cb:92:6e:dc}

Question4: What is the IP address of the detected Windows system?

どうしたらwindowsのipが分かるのか少し考えたが,今回のipは4種類のみ

10.42.42.25 apple?
10.42.42.50 ??????
10.42.42.253 スキャナー
10.255.255.255 ブロードキャスト


こうやって見ると,一つに絞られる.
A.{10.42.42.50}

Blue Team Level 1 gold coinを獲得しました。

BTL1(Blue Team Level 1)の概要

名前の通りBlue Teamのための資格であって、

  • フィッシング攻撃の分析と対応
  • デジタル証拠の収集および分析するフォレンジック調査
  • SIEMプラットフォーム(splank)を使用して悪意のあるアクティビティの調査
  • マルウェア感染を含むログおよびネットワークトラフィック分析

等々の入り口のような実践的なスキルを学ぶことができる。

試験の準備

申し込み

通常価格は、£399です。399ポンドで高いなぁと常々思っていたが、ブラックフライデーのときに100ポンド安かったので買ってみました。

申し込み段階での自身のBlueTeam関連スキル

分かりやすい?ものだけピックアップ

  • CTFはForensicsだけを狙って1年半くらい集中していた
  • Enisa - Technicalにある無料コンテンツは、全て取り組み済み
  • CFReDSのHacking Caseだけは完走
  • Autopsy 8-Hour Online Trainingを完走

申し込み後にアクセスできるコンテンツ

購入後に、コンテンツやトレーニングコンテンツごとに用意されたラボ環境へのアクセスは今は4か月可能らしい。自分の場合には、たしか購入時に30日以内にコンテンツアクセスを始めるかどうか選べてすぐに始める方を購入した。その後、買ったまま他のコンテンツで学習していたので放置状態になり3か月くらい経って、そろそろやろうと思ったときにBTLの試験形態やコンテンツが大きく更新され、それに伴ってアクセス期間も3か月伸びていたのでさらに放置して、最後の2週間くらいで頑張りました。
アクセスできる学習コンテンツは、BlueTeamやサイバーセキュリティに関連する基礎知識や実践的なスキルの説明を読むだけのインプット系、そしてインプット系で得た知識を実践するLab環境がある。インプット系は公式の紹介ページにあるようなものを読むだけ。この読み物コンテンツは、特定の分野に偏ったものなので自分の場合には調べてもすぐに出てこないような話が沢山あって面白かったです。

インプットの学習コンテンツ(https://securityblue.team/why-btl1/ より)

Lab環境は、インプット系の学習コンテンツを読んでいるときに「次はLabに取り組みましょう」というようなときに関連スキルを実践できる。WebブラウザからアクセスするVNC
Lab環境(https://securityblue.team/why-btl1/ より)

Labは画像のように、必要なものが構築された環境(windowsのときもある)にそのときに取り組む問題ファイルが用意されており、ファイルを調査して問題に解答する。ここで仕方がないことだが、Lab環境が用意されている、つまりアクセス先は London, California, Sydney, Mumbaiでどこもping値が高い。自分の環境では、Californiaが一番マシで80~110のping値でweb vnc経由で環境を触っていた。お察しの通りまあまあ遅延があり偶に接続できなかったりフリーズすることもあるので、そういうのに耐えられない場合、まだ受けない方が良いかもしれません。ちなみに試験も、web vncの環境で調査を行うので同じように遅延に悩まされつつ取り組みました。自分の場合は、アパート備え付けのケーブルテレビのよわよわ回線なので光の良い回線を使っている人々はそんなに酷くないのかもしれません。Lab環境へのアクセスは、起動から6時間、全部合わせて100時間の制限があり時間を使いきった場合には追加(有料)できる。自分の場合はあまり使うことが無かったので94時間ほど残っている。
自分の場合のping

最初の説明では、「学習コンテンツに取り組まずに試験に取り組むこともできる」とあるが、新たな発見が必ずあるハズでもあるし、せっかくお金払ったのでやはり全部触り切ってから試験に臨むべきです。

申し込み後の追加学習

  • LetsDefendにサブスクしてMonitoringに沢山取り組む。
  • BTL1を提供してるところと同じところ?が運営しているBlue Team Lab Onlineの無料で取り組めるChallnegesに取り組む。
  • CyberDefendersの過去のCTFに取り組む

等々
LetsDefendのMonitoringに沢山取り組んだことで、Phishingの一般的な手口、ありがちなMalicious File形式等が見えてきたのでとても役立った。
自分の場合には試験でmalicious pdfがあり、どんなものか簡易的に確認するためにpdfの構造を知っていたので、このpdfの構造を調べるきっかけになったCyberDefendersのGetPDFに取り組んでおいて良かった。

試験

試験は学習コンテンツにアクセスするページからリクエストすると、5分くらいで始まる。Webカメラの設定や試験官とのコミュニケーション等は無く、本当に気づいたら始まっている。試験時間は24時間、問題は自分のときは20問あり、Lab環境のときと同じような問題形式になっている。試験環境はLab環境と同じような環境にアクセスし、自分の場合には主にphising mailの解析、侵害されたpcのイメージの解析、pcapの解析、splunkに溜まったログからインシデントに関するものの調査を行った。これらの調査により得られた情報から問題に解答する。問題は文章で答えるようなものではなく、一問一答の形式になっている。この問題を通して、インシデントの理解を進めていく。Lab環境と同じように試験環境も先の通りping値が高いので、遅延があっても落ち着いて急にフリーズしても焦らず取り組んだ。

試験では学習コンテンツで学ぶ内容だけでなく、他にも事前知識があった方がやはり取り組みやすい。例えば、

  • javascriptは読める
  • 学習コンテンツにあったもの以外のAutopsyの機能も難なく利用できる

等々。やはり、BTLが初級編と言っても事前知識は色々とあった方が楽なので学習コンテンツだけで満足せずに、他にも様々なリソースに触れておくべきです。

解答を提出すると、すぐに採点され結果が分かる。このとき70%以上で合格、90%以上(初回試験)でGold Coinに該当する。不合格の場合でも、1回だけは再試験の権利を持っている。

最後に一言

ping値で少しピンチな試験だった。

LetsDefend level 1 alert SOC105 - Requested T.I. URL address event-id 16

Details

EventID: 16
Event Time: Sept. 20, 2020, 10:54 p.m.
Rule: SOC105 - Requested T.I. URL address
Level: Security Analyst
Source Address 172.148.17.47
Source Hostname BillPRD
Destination Address 5.188.0.251
Destination Hostname pssd-ltdgroup.com
Username Mike01
Request URL https[:]//pssd-ltdgroup[.]com
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063
Device Action Allowed

playbook

Analyze Threat Intel Data

URL https[:]//pssd-ltdgroup[.]com/

VirusTotal 9/93: https://www.virustotal.com/gui/url/59da6e4583f0ceeb2b5d3933f883ccad9bfc91cd3bbfc0c4afb37c0eafc9ce48/detection
登録数は少ないが、Avira,Bitdefender,ESET,Fortinet,Sophosといった有名どころに登録されている。

Forcepoint ThreatSeeker  elevated exposure
Sophos  spyware and malware
Webroot Phishing and Other Frauds

Hybrid-Analysis: https://www.hybrid-analysis.com/sample/e06dcdb951cbef8ffddd75a9a2d38382d41a4c9ce98569409ab21133c8bfb981?environmentId=100
こちらでも、Maliciousの判定が出ている。

Domain pssd-ltdgroup[.]com

VirusTotal 9/90: https://www.virustotal.com/gui/domain/pssd-ltdgroup.com/relations
ドメインでも検知数はあまり変わらないが、Communicating Filesには明らかにマルウェアが多い。

5.188.0.251

AbuseIPDB: https://www.abuseipdb.com/check/5.188.0.251
登録はあるが、レポートは少ない。
ip-sc: https://ip-sc.net/ja/r/5.188.0.251
SCAMALYTICS: https://scamalytics.com/ip/5.188.0.251
ip-scでは脅威として登録されていないが、SCAMALYTICSではVery high Riskとなっている。
Connection type wireless?

Answer:Malicious

Interaction with TI data

Log

DATE TYPE SOURCE ADDRESS SOURCE PORT DESTINATION ADDRESS DESTINATION PORT
Sep, 20, 2020, 10:54 PM Firewall 172.16.17.47 54211 5.188.0.251 443
Sep, 20, 2020, 10:54 PM Proxy 172.16.17.47 54211 5.188.0.251 443
Main Process: Krankheitsmeldung_092020_07.xlsm
Request URL: https://pssd-ltdgroup.com

おや、xlsmからのURLへのアクセスのようだ。

Endpoint

Process History

Krankheitsmeldung_092020_07.xlsm
MD5:14970ce0a3d03c46a4180db69866d0d1
Path:c:/users/Bill/desktop/Krankheitsmeldung_092020_07.xlsm
Size:558.83 KB
Username:Bill01
Start Time:20.09.2020 22:51

ちなみに、
14970ce0a3d03c46a4180db69866d0d1 - VirusTotal 45/64: https://www.virustotal.com/gui/file/0e3a83e441951860929c99e24bf19e76fe281c3e1b1f7f3aea49b0a38673f873
Malicious!

Answer:Accessed

Containment

Add Artifacts

Value Type Comment
https[:]//pssd-ltdgroup[.]com URL Address accessed from malicious xlsm file
14970ce0a3d03c46a4180db69866d0d1 MD5 Hash Requested T.I. URL address

True Positive

End

f:id:Zarat:20220411205803p:plain
close alert event-id 16

LetsDefend level 1 alert SOC106 - Found Suspicious File - TI Data event-id 17

Details

EventID: 17
Event Time: Sept. 22, 2020, 11:10 a.m.
Rule: SOC106 - Found Suspicious File - TI Data
Level: Security Analyst
Source Address 172.148.17.150
Source Hostname ChanProd
File Name ChromeSetup.exe
File Hash 1430438f19e3d3e2b375d127c68254ab
File Size 63.65 MB
Device Action Cleaned
Download (Password:infected): 1430438f19e3d3e2b375d127c68254ab.zip

playbook

Check if the malware is quarantined/cleaned

Device Action Cleaned

であるので
Answer: Quarantined

Analyze Malware

まず該当ファイルは、

$ file ChromeSetup.exe 
ChromeSetup.exe: PE32 executable (GUI) Intel 80386, for MS Windows
$ md5sum ChromeSetup.exe 
1430438f19e3d3e2b375d127c68254ab  ChromeSetup.exe

VirusTotal: https://www.virustotal.com/gui/file/38dbb5166b28e62fbc482646618a55dc8430fa596d98df6f3eed257df0007db0
VTでは、Maliciousとの報告は無い。
ANYRUN: https://app.any.run/tasks/c8dfb3da-52c3-4df4-8c9e-d91bd4b03129/
ANYRUNでは、動作にはMaliciousの判定がある。ただ、公式から配布されているChromeSetupもMaliciousの判定がついているためANYRUNでは判断しづらい。
通信先は、Maliciousとして登録されているものは無いが怪しいロシアのサーバであるとのレポートも見られる。
redirector.gvt1[.]com - VirusTotal: https://www.virustotal.com/gui/domain/redirector.gvt1.com/community
ただ、ベンダーにMaliciousと登録されているものは無いのでMaliciousではないと判断する。
Answer: Non-malicious

Add Artifacts

Value Type Comment
1430438f19e3d3e2b375d127c68254ab MD5 Hash ChromeSetup.exe

False Positive

End

f:id:Zarat:20220408193747p:plain
close alert event id 17

導入当時は信頼できるものであったも、自動取得するようなセキュリティの情報元は定期的に見直すべきかもしれない。