
Cobalt Strike向けポリモーフィックC2プロファイル生成ツール。HTTP、DNS、プロセスインジェクションのランダム化オプションを備えた回避型ビーコン構成の作成を自動化し、検出を低減します。
SourcePoint は、Go で書かれた Cobalt Strike C2 向けのポリモーフィック C2 プロファイル生成ツールです。SourcePoint を使用すると、その場でユニークな C2 プロファイルを生成でき、侵害指標(IoC)の削減に役立ち、オペレーターは最小限の労力で複雑なプロファイルを立ち上げられます。これは、記事 や パッチノート を広範囲にレビューして主要な機能や変更可能な設定を特定することで実現しました。SourcePoint は、C2 アクティビティを検出されにくくする方法の課題に取り組むために設計され、悪意のある IoC から疑わしい IoC への移行に焦点を当てています。目標は、IoC が本質的に悪意がなく、疑わしい性質を発見するために追加の調査が必要である場合、C2 の検出が難しくなることです。SourcePoint には、プロファイルを変更するための多くの設定可能なオプションが含まれており(多くの場合、空白のままにすると SourcePoint がランダムに選択します)、生成されたプロファイルは C2 のあらゆる側面を変更します。このプロジェクトの目標は、検出ベースの制御を回避するだけでなく、C2 トラフィックとアクティビティを環境に溶け込ませ、そのアクティビティを検出しにくくすることです。
go install github.com/Tylous/SourcePoint
$go get gopkg.in/yaml.v2
$go build SourcePoint.go
#./SourcePoint -h
_____ ____ _ __
/ ___/____ __ _______________ / __ \____ (_)___ / /_
\__ \/ __ \/ / / / ___/ ___/ _ \/ /_/ / __ \/ / __ \/ __/
___/ / /_/ / /_/ / / / /__/ __/ ____/ /_/ / / / / / /_
/____/\____/\__,_/_/ \___/\___/_/ \____/_/_/ /_/\__/
(@Tyl0us)
Usage of ./SourcePoint:
-Allocation string
Minimum amount of memory to request for injected content (must be higher than 4096)
-BeaconGate string
Specify beacon gate options (All, Comms, Core, Cleanup) or specific APIs
-CDN string
CDN cookie name (typically used for AzureEdge profiles)
-CDN-Value string
CDN cookie value (typically used for AzureEdge profiles)
-Customuri string
The base URI for custom HTTP GET/POST profile - Cannot be used with CustomuriGET or CustomuriPOST
-CustomuriGET string
The base URI for custom HTTP GET profile - Must be used with CustomuriPOST
-CustomuriPOST string
The base URI for custom HTTP POST profile - Must be used with CustomuriGET
-Datajitter string
Appends a value to HTTP-Get and HTTP-Post server output (default "50")
-Forwarder
Enabled the X-forwarded-For header (Good for when your C2 is behind a redirector)
-Host string
Team server domain name
-Httplib string
Select the default HTTP Beacon library:
[*] wininet
[*] winhttp' (default "winhttp")
-Injector string
Select the preferred method to allocate memory in the remote process:
[*] VirtualAllocEx (Great for cross architecture i.e x86 -> x64 and x64->x86)
[*] NtMapViewOfSection (A more stealthly option, however fails over to VirtualAllocEx, generating more events when it does)
-Jitter string
Jitter percentage for beacon call home
-Keylogger string
Select the preferred method the beacon will use to log keystrokes:
[*] GetAsyncKeyState (Uses GetAsyncKeyState API (Separate DLL for x86/x64 process))
[*] SetWindowsHookEx (Uses SetWindowsHookEx API)
-Keystore string
SSL keystore name
-Metadata string
Specifies how to transform and embed metadata into the HTTP request:
[*] base64
[*] base64url
[*] netbios
[*] netbiosu (default "base64url")
-Outfile string
Name of output file
-PE_Clone string
PE file beacon will mimic (Use the number):
[1] ActivationManager.dll
[2] audioeng.dll
[3] AzureSettingSyncProvider.dll
[4] BingMaps.dll
[5] DIAGCPL.dll
[6] EDGEHTML.dll
[7] FILEMGMT.dll
[8] FIREWALLCONTROLPANEL.dll
[9] GPSVC.dll
[10] gpupvdev.dll
[11] libcrypto.dll
[12] srvcli.dll
[13] srvsvc.dll
[14] Windows.Storage.Search.dll
[15] Windows.System.Diagnostics.dll
[16] Windows.System.Launcher.dll
[17] Windows.System.SystemManagement.dll
[18] Windows.UI.BioFeedback.dll
[19] Windows.UI.BlockedShutdown.dll
[20] Windows.UI.Core.TextInput.DLL
[21] winsqlite3.dll
[22] WMNetMgr.DLL
[23] wwanapi.dll
[24] WWANSVC.DLL
[25] wow64win.dll
[26] wow64.dll
[27] ctiuser.dll (Carbon Black's DLL)
[28] InProcessClient.dll (SentinelOne's DLL)
[29] umppc.dll (CrowdStrike's DLL)
[30] CyMemDef64.dll (Cylance's DLL)
-Password string
SSL certificate password
-PostEX_Name string
File Post-Ex activities will spawn and inject into (Use the number):
[1] WerFault.exe
[2] WWAHost.exe
[3] choice.exe
[4] bootcfg.exe
[5] dtdump.exe
[6] expand.exe
[7] fsutil.exe
[8] gpupdate.exe
[9] gpresult.exe
[10] logman.exe
[11] mcbuilder.exe
[12] mtstocom.exe
[13] pcaui.exe
[14] powercfg.exe
[15] svchost.exe
-Profile string
HTTP GET/POST profile (Use the number):
[1] Windowsupdate
[2] Slack
[3] Gotomeeting
[4] Outlook.Live
[5] Safebrowsing [Cloudfront Compatible]
[6] AzureEdge [AzureEdge Compatible]
[7] Field-Keyword [Cloudfront Compatible]
[8] Custom (Used with ProfilePath)
-ProfilePath string
Path of custom HTTP GET/POST profile...
-Sleep string
Initial beacon sleep time
-Stage string
Disable host staging (Default: False) (default "false")
-Syscall string
Defines the ability to use direct/indirect system calls instead of the standard Windows API functions calls:
[*] None
[*] Direct
[*] Indirect (default "None")
-TasksDnsProxyMaxSize string
The maximum size (in bytes) of proxy data to transfer via the DNS communication channel at a check in
-TasksMaxSize string
The maximum size (in bytes) of task(s) and proxy data that can be transferred through a communication channel at a check in
-TasksProxyMaxSize string
The maximum size (in bytes) of proxy data to transfer via the communication channel at a check in
-ThreadSpoof
Sets post-ex DLLs to spawn threads with a spoofed start address. These are generated randomly (default true)
-Uri string
The number URIs a profile for beacons to choose from
-Useragent string
UserAgent string for the beacon to use (Leave blank to randomly select one):
[*] Win10Chrome
[*] Win10Edge
[*] Win10IE
[*] Win10
[*] Win6.3
[*] Linux
[*] Mac
-Yaml string
Path to the Yaml config file
SourcePoint は主にプロファイルのビルドプロセスを自動化します。これらのプロファイルで変更されるすべての機能を理解することは非常に重要です。これらの機能を知ることで、成功率を大幅に向上させることができます。
SourcePoint のヘルプ機能には多くの設定と機能が記述されていますが、各プロファイルには組み込まれている数多くの重要な機能があり、これらを熟知することが重要です。それらの機能は次のとおりです:
プロファイルのこの部分は、ビーコンの動作方法を変更します。動作を変更するために使用される機能の一部は次のとおりです:
/9ZXq などの特定の値を持つ GET リクエストを送信した誰でもシェルコードを取得できますプロファイルのこの部分は、ビーコンのメモリへの読み込み方法を制御し、ビーコン DLL の内容を編集します。動作を変更するために使用される機能の一部は次のとおりです:
プロファイルのこの部分は、ビーコンが注入されたコンテンツを整形し、プロセスインジェクションの動作を制御する方法を制御します。動作を変更するために使用される機能の一部は次のとおりです:
プロファイルのこの部分は、ビーコンがポストエクスプロイトモジュールとコマンドを処理する方法を制御します。動作を変更するために使用される機能の一部は次のとおりです:
現在 SourcePoint は、既存のプロファイルに基づいて HTTP/HTTPS トラフィックプロファイル用に 7 つの組み込みオプションを提供しています。これらのうち 6 つは、次のものに影響を受け、基づいています:
3 つのプロファイルオプション(5、6、7)は、特に次のために設計されています:
最後のオプション(8)はカスタムプロファイルを入力するためのものです。このオプションは、オペレーターが完全にカスタムのトラフィックプロファイルを利用できるように設計されています。多くの場合、完全にユニークなトラフィックプロファイルは、これらのいずれかよりも高い成功率をもたらします。これにより、オペレーターはお気に入りのトラフィックプロファイルや普段使っているプロファイルと一緒に SourcePoint の柔軟な機能を利用することもできます。ユニークなプロファイルを可能にするため、SourcePoint で動作させるにはプロファイルを微調整および調整することが重要です。最低限:
header "Host" "acme.com"; を header "Host" "{{.Variables.Host}}"; に置き換える/pathtolegitpage/ を {{.Variables.HTTP_GET_URI}} に置き換える/pathtolegitpage/ を {{.Variables.HTTP_POST_URI}} に置き換えるこれを行うには、-Customuri と -ProfilePath を -Profile 8 とともに使用します。GET と POST で異なる URI ベースを使用するには、-CustomuriGET と -CustomuriPOST を -Customuri の代わりに使用します。プロファイルを開発する際は、ネイティブの ./c2lint を使用してすべてが機能することを確認することを強くお勧めします。
これらのオプションを 1 つのプロファイルに組み合わせることで、予防的および検出的な制御を回避できる非常に効果的なビーコンを作成できます。これは進化するいたちごっこではありますが、特定のセキュリティスタックに対して適切なオプションを組み合わせることは非常に効果的です。
Stage: "False"
Host: "acme-email.com"
Keystore: "acme-email.com.store"
Password: "Password"
Metadata: "netbios"
Injector: "VirtualAllocEx"
Outfile: "acme.profile"
PE_Clone: 20
Profile: 4
Allocation: 5312
Jitter: 30
Debug: true
Sleep: 35
Uri: 3
Useragent: "Mac"
Post-EX Processname: 11
Datajitter: 40
Keylogger: "SetWindowsHookEx"
Customuri:
CDN:
CDN_Value:
ProfilePath:
Syscall_method:
Httplib:
ThreadSpoof: true
Customuri:
CustomuriGET:
CustomuriPOST:
Forwarder: False
TasksMaxSize:
TasksProxyMaxSize:
TasksDnsProxyMaxSize:
プロファイルモード 1〜4 は有効な SSL なしでも使用できます。SourcePoint はプロファイルタイプに関連する自己署名証明書を生成します。ただし、有効な SSL 証明書はあらゆるタイプの C2 の成功に非常に重要です。多くの理由がありますが、証明書がないとトラフィックは暗号化されません(つまり、HTTP は決して使用すべきではありません)。しかし、自己署名証明書を使用すると明らかな制限があります。有効な SSL 証明書を取得してキーストアを作成する方法は多数ありますが、私の主な方法は、Cham423 によって作成された HTTPsC2DoneRight.sh の修正版を使用することです。
現在、DNS のカスタマイズは SourcePoint を通じて直接提供されていません。DNS ベースのビーコンを引き続き許可するために、生成されるすべてのプロファイルには dns-beacon 用のコメントアウトされたセクションがあります。