Recorded Future サンドボックス - API - サンプル管理

Secops_threat.png

APIドキュメントの移動

API ドキュメントはdocs.recordedfuture.comでご覧いただけます。最新のドキュメントにアクセスするには、新しいサイトをブックマークしてください。

GET /検索

検索 API エンドポイントは、Web インターフェースを通じて使用できるすべてのフィルターとクエリをサポートしており、さまざまな IoC またはファイル特性について利用可能な分析を検索できます。

検索クエリは、 query GETパラメータ。

利用可能なオプションの詳細については、専用の検索ドキュメントをご覧ください。ここ

さらに詳しい情報は以下をご覧ください。このブログ投稿そしてトリアージの検索ページ

検索例

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 'https://sandbox.recordedfuture.com/api/v0/search?query=family:emotet'
{ "データ" : [ {"id":"201026-n8zz26cd4s","status":"reported","kind":"file","filename":"888d012fd36d8fa86ab57e0d547eb429e68303fcdf76b08191942e9307a74f78","private":false,"submitted":"2020-10-26T16:51:31Z","completed":"2020-10-26T16:52:55Z"} ,
 ...
 ] , "次へ" : "2020-10-26T16:51:21.232458Z" }

GET /サンプル

とりあえずー 依頼者から提出されたサンプルのコレクション。

クエリパラメータ

  • subset (デフォルトowned )、に設定されている場合owned 、要求元のユーザーがアクセスできるすべてのサンプルが返されます。設定した場合publicすべてのユーザーが閲覧できるすべてのサンプルが返されます (この機能はパブリック クラウドでのみ使用できます)。設定した場合org 、すべての組織サンプルがリストされます。

POST /サンプル

分析のために新しいサンプルを送信します。このエンドポイントでは、ファイルとURLの両方を送信できます。 kindどちらかのフィールドに"file"または"url"それぞれ。

タイプ 説明
親切 1つ"file" "url"または"fetch"
相互の作用 ブール値 true に設定すると、静的分析が完了した後に分析プロファイルを手動で選択する必要があります。オプション。
パスワード 提供されたファイル (通常はアーカイブ (zip/rar など)) を復号化するために使用できるパスワード。
プロフィール 配列 1 つ以上のファイルを 1 つ以上のプロファイルにマッピングします。
URL サンプルとして使用する URL。必要kindに設定する"url"または"fetch"
ファイル ファイル アップロードされたファイル。必要kindに設定する"file"

ファイルの送信

ファイルの提出は、 multipart/form-data JSON の代わりにスキームを使用します。

アップロードしたファイルの名前はfileフォームにファイル名が付きます。その他のパラメータは、JSONオブジェクトにエンコードする必要があります。 _json

もしinteractive trueに設定すると、サンプルのステータスがstatic_analysis 。続行するには、手動で分析を開始する必要があります。

URLの送信

URL を送信するには、通常の JSON リクエストが必要です。URLを送信するには、 kind"url"サンプルのURLを次のように記載します。 url

URLからサンプルを取得する

一部のユースケースでは、トリアージがサンプル自体をダウンロードする URL を送信することが望ましい場合があります。 たとえば、サンプルは AWS S3、独自の Web サイトなどに配置できます。

トリアージに URL からサンプルを取得させるには、 kind"fetch"サンプルのURLを次のように記載します。 url

注意: Fetch は、アドレスからファイルを直接ダウンロードできる場合にのみ機能します。リダイレクトなどがある場合は機能しません。

プロフィールの選択

プロフィールを選択できるのは、企業に登録されているユーザーのみです。

デフォルトでは、 interactive false に設定されている場合、プロファイルは自動的に選択され、分析プロセスとの対話は必要ありません。

プロファイルを手動で選択すると、サンプルの実行に使用される仮想環境をより細かく制御できます。プロフィールを選択するにはinteractive誤りである。プロファイルは、 profiles配列は以下のようになります。

{ "profiles" : [ {// The ID or name of the profile to use."profile":"myprofilename"// If an archive is submitted, specify the filename in the archive this// profile should be used for (as per this example). This field can be// omitted if a single file is submitted (alternatively "sample" also// selects the submitted file)."pick":"unpack001/something.exe"} ] , // その他のオプション}

ファイルは異なるプロファイルで複数回選択できるため、異なる環境で実行されます。

詳細については、ドキュメントを参照してください。 POST /samples/ {sampleID} /profile

ファイルの送信:

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 -X ポスト \
 -F 'file=@<YOUR_SAMPLE_FILE_PATH>' \
 -F '_json= {"kind":"file","interactive":false} ' \
 'https://sandbox.recordedfuture.com/api/v0/samples'
// レスポンス: {"id":"190724-hakvlwz8cx","status":"running","kind":"file","filename":"evil.bat","private":true,"submitted":"2019-07-24T13:32:07.253524Z"}

パスワード保護された.zipファイルの送信ファイル:

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 -X ポスト \
 -F 'file=@<YOUR_ZIP_FILE_PATH>' \
 -F '_json= {"kind":"file","interactive":false,"password":"password"} ' \
 'https://sandbox.recordedfuture.com/api/v0/samples'
// レスポンス: {"id":"200924-pfnwh8hhrs","status":"running","kind":"file","filename":"evil.zip","private":true,"submitted":"2020-09-24T13:31:36Z"}

URL の送信:

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 -H 'コンテンツタイプ: application/json' \
 -d ' {"kind": "url", "url": "http://example.org/"} '
 'https://sandbox.recordedfuture.com/api/v0/samples'

URL からサンプルを取得する:

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 -H 'コンテンツタイプ: application/json' \
 -d ' {"kind": "fetch", "url": "https://hostname.tld/sample.exe"} '
 'https://sandbox.recordedfuture.com/api/v0/samples'...

パブリック クラウドから分析をインポートします。

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 -H 'コンテンツタイプ: application/json' \
 -d ' {"kind": "import", "url": "https://tria.ge/220202-rs4ehsacen"} '
 'https://sandbox.recordedfuture.com/api/v0/samples'

なお、完全な https://tria.ge/ の代わりに、サンプル/分析 ID (この場合は「220202-rs4ehsacen」) のみを指定することもできます。URL。

GET /サンプル/ {sampleID}

指定したIDのサンプルを取得します。

例:

$ curl -H '認証: Bearer '<YOUR_ACCESS_KEY> \
 'https://sandbox.recordedfuture.com/api/v0/samples/<SAMPLE_ID> '
// レスポンス: {"id":"190724-hakvlwz8cx","status":"reported","kind":"file","filename":"evil.bat","private":true,"submitted":"2019-07-24T13:32:07.253524Z"}

エラー

  • サンプルが存在しない場合は、 404, "NOT_FOUND"

GET /サンプル/ {sampleID} /サンプル

選択した分析 ID のサンプルをダウンロードします。

UI ダウンロードとは異なり、これらは圧縮/暗号化されていないことに注意してください。

例:

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 'https://sandbox.recordedfuture.com/api/v0/samples/<SAMPLE_ID>/sample'\
 --output sample.bin

GET /サンプル/ {sampleID} /概要

サンプルとその分析タスクの簡単な概要を返します。

例:

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 'https://sandbox.recordedfuture.com/api/v0/samples/<SAMPLE_ID>/summary'
// レスポンス: { "sample" : "200606-l5dz9871we" , "status" : "reported" , "custom" : "frontend:7de1d1a3-f39b-4dd6-8a8d-b9d6bc0e7c81" , "owner" : "shark2.ams5.hatching.io" , "target" : "05af0cf40590aef24b28fa04c6b4998b7ab3b7f26e60c507adb84f3d837778f2" , "created" : "2020-06-06T00:03:27Z" , "completed" : "2020-06-06T00:06:10Z" , "score" : 10 , "sha256" : "05af0cf40590aef24b28fa04c6b4998b7ab3b7f26e60c507adb84f3d837778f2" , "タスク" : { "200606-l5dz9871we-behavioral1" : {"kind":"behavioral","status":"reported","tags":["evasion","trojan","persistence","ransomware"],"score":10,"target":"05af0cf40590aef24b28fa04c6b4998b7ab3b7f26e60c507adb84f3d837778f2.exe","backend":"horse2","resource":"win7v200430","platform":"windows7_x64","queue_id":1353974} , "200606-l5dz9871we-behavioral2" : {"kind":"behavioral","status":"reported","tags":["evasion","trojan","ransomware","persistence"],"score":10,"target":"05af0cf40590aef24b28fa04c6b4998b7ab3b7f26e60c507adb84f3d837778f2.exe","backend":"horse2","resource":"win10v200430","platform":"windows10_x64","queue_id":1353975} , "200606-l5dz9871we-static1" : {"kind":"static","status":"reported"} } } }

エラー

  • サンプルが存在しない場合は、 404, "NOT_FOUND"

/samples/ {sampleID} /overview.json を取得します。

サンプルとその分析タスクの概要を返します。概要には、マルウェアの構成、署名、スコアリングなど、サンプルに関連するすべての高レベルの情報が記載された 1 ページの資料が含まれています。

Golangプログラミング言語で記述されたOverviewレポートの正確な定義は、 Overviewレポートページ。

例:

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 'https://sandbox.recordedfuture.com/api/v0/samples/<SAMPLE_ID>/overview.json'
// レスポンス: { "version" : "0.2.2" , "sample" : {"id":"200916-w52vg1yl1a","target":"131.doc","size":547328,"md5":"3e241f5a1e7be77f25078560c8660351","sha1":"ba25c371e75d1a52c1f41c163dc8840626423948","sha256":"22d653dab4765e13c5fce0bf46a28a098d05582148fdf3101093f3687b42a5f1","sha512":"4f031f6a3e44687ca65ceec847aacf3053feec0882bd5c07febef85ba1a7570ec1f4357446dfc84226448e1d8eb342066eeb3e6e7394d53caadd66223a2ff345"} , "tasks" : { "200916-w52vg1yl1a-behavioral1" : {"kind":"behavioral","status":"reported","tags":["spyware","trojan","banker","family:trickbot"],"score":10,"target":"131.doc","backend":"fu1m1","resource":"win10v200722","platform":"windows10_x64","task_name":"300 seconds - Win. 10","queue_id":1911088} , "200916-w52vg1yl1a-static1" : {"kind":"static","status":"reported"} } , "analysis" : {"score":10} , "targets" : [ { "tasks" : [ "behavioral1" ] , "score" : 10 , "target" : "131.doc" , "size" : 547328 , "md5" : "3e241f5a1e7be77f25078560c8660351" , "sha1" : "ba25c371e75d1a52c1f41c163dc8840626423948" , "sha256" : "22d653dab4765e13c5fce0bf46a28a098d05582148fdf3101093f3687b42a5f1" , "sha512" : "4f031f6a3e44687ca65ceec847aacf3053feec0882bd5c07febef85ba1a7570ec1f4357446dfc84226448e1d8eb342066eeb3e6e7394d53caadd66223a2ff345" , "タグ" : [ "スパイウェア"  "トロイの木馬"  "バンカー"  "ファミリー:トリックボット" ]  "ファミリー" : [ "トリックボット" ]  "署名" : [ {"label":"trickbot","name":"Trickbot","score":10,"tags":["trojan","banker","family:trickbot"],"desc":"Developed in 2016, TrickBot is one of the more recent banking Trojans."} 
 ...
 ] } ]  "抽出" : [
 ...
 { "tasks" : [ "behavioral1" ] , "dumped_file" : "extracted/trickbot.payload-3" , "resource" : "behavioral1/memory/3212-19-0x0000000000A20000-0x0000000000A56000-memory.dmp" , "config" : { "family" : "trickbot" , "rule" : "Trickbot2019" , "c2" : [ "51.89.163.40:443" , "89.223.126.186:443" , "45.67.231.68:443" , "148.251.185.165:443、194.87.110.144:443、213.32.84.27:443、185.234.72.35:443、45.89.125.148:443、195.123.240.104:443、185.99.2.243:443、5.182.211.223:443、195.123.240.113:443、85.204.116.173:443、5.152.210.188:443  103.36.48.103:449」、「36.94.33.102:449」、「36.91.87.227:449」、「177.190.69.162:449」、「103.76.169.213:449」、「179.97.246.23:449」、「200.24.67.161:449」、「181.143.186.42:449」、「190.99.97.42:449」、「179.127.88.41:449」、「117.252.214.138:449  "117.222.63.145:449" , "45.224.213.234:449" , "45.237.241.97:449" , "125.165.20.104:449" ] , "バージョン" : "1000514" , "ボットネット" : "ono76" , "キー" : [ {"kind":"ecc_pubkey.base64","key":"ecc_pubkey","value":"RUNTMzAAAADzIIbbIE3wcze1+xiwwK+Au/P78UrAO8YAHyPvHEwGVKOPphl8QVfrC7x/QaFYeXANw6E4HF7ietEp+7ZVQdWOx8c+HvO0Z2PTUPVbX9HAVrg4h9u1RNfhOHk+YysDLsg="} ] , "属性" : { "自動実行" : [ {"name":"pwgrab","control":""} ] } } } } ] }

エラー

  • サンプルが存在しない場合は、 404, "NOT_FOUND"

/samples/ {sampleID}を削除

指定された ID のサンプルを削除します。

注: 当社のパブリッククラウドユーザーと研究者はないサンプルを独自に削除できます。その場合はサポートにお問い合わせください。

例:

$ curl -H '認証: Bearer '<YOUR_ACCESS_KEY> \
 -X 削除 \
 'https://sandbox.recordedfuture.com/api/v0/samples/<SAMPLE_ID> '# {}

エラー

  • サンプルが存在しない場合は、 404, "NOT_FOUND"

POST /samples/ {sampleID} /profile

サンプルがstatic_analysisステータスが「なし」の場合、続行するにはプロファイルを選択する必要があります。

タイプ 説明
自動車 ブール値 システムが自動的にプロファイルを選択するかどうか。
選ぶ 配列 アーカイブが送信された場合、自動プロファイルで実行されるファイルのセット。
プロフィール 配列 1 つ以上のファイルを 1 つ以上のプロファイルにマッピングします。

提出方法についてはサンプルを参照してくださいprofiles指定する必要があります。

pickの値は、 .files[].relpathから静的レポート。

例:

プロファイルを自動的に設定します:

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 -X ポスト \
 --data-raw ' {"auto":true} ' \
 'https://sandbox.recordedfuture.com/api/v0/samples/<SAMPLE_ID>/profile'# {}

ID または名前を指定してプロファイルを手動で設定します。

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 -X ポスト \
 --data-raw '{"プロファイル":[ {"profile":"<PROFILE_ID>"} ]}' \
 'https://sandbox.recordedfuture.com/api/v0/samples/<SAMPLE_ID>/profile'# {}

アーカイブが送信され、ファイルのカスタム選択を行う必要があるが、使用するプロファイルをシステムが決定する場合:

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 -X ポスト \
 --data-raw ' {"pick":["unpack001/file.exe"]} ' \
 'https://sandbox.recordedfuture.com/api/v0/samples/<SAMPLE_ID>/profile'# {}

エラー

  • サンプルが存在しない場合は、 404, "NOT_FOUND"
  • 409, "PROFILE_NOT_SETTABLE" 、サンプルのステータスが不明なため、プロファイルを設定できませんでした。 static_analysisまたは分析がインタラクティブではない。

GET /サンプル/ {sampleID} /レポート/静的

生成された静的レポート

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>'
 https://sandbox.recordedfuture.com/api/v0/samples/<SAMPLE_ID>/reports/static| jq

エラー

  • サンプルが存在しない場合は、 404, "NOT_FOUND"
  • 404, "REPORT_NOT_AVAILABLE" 、サンプルのステータスが以前の場合"static_analysis"またはステータスが"failed"

/samples/ {sampleID} / {taskID} /report_triage.json を取得します。

単一のタスクに対して生成されたトリアージ レポートを取得します。

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 https://sandbox.recordedfuture.com/api/v0/samples/<SAMPLE_ID>/behavioral1/report_triage.json | jq

エラー

  • サンプルが存在しない場合は、 404, "NOT_FOUND"
  • 404, "REPORT_NOT_AVAILABLE" 、タスクのステータスが"reported"

GET /サンプル/ {sampleID} /イベント

開くNDJSONサンプルの進行状況をリアルタイムで追跡します。ストリームは、ラベルの付いた一連のイベントで構成されています。 sampleペイロードとして JSON でエンコードされたサンプル オブジェクトを使用します。

接続が開かれると、サンプルの現在のステータスが常に送信されます。

終了ステータス( "reported"のサンプルの後、 "failed" )が送信されると、接続は閉じられます。これ以上の更新は送信されないため、クライアントは再接続を試みるべきではありません。

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 'https://sandbox.recordedfuture.com/api/v0/samples/<SAMPLE_ID>/events'

エラー

  • サンプルが存在しない場合は、 404, "NOT_FOUND"

/samples/events を取得する

クエリを実行するユーザーが表示できるすべてのサンプルの状態の変更を中継する NDJSON イベント ストリームを開きます。フォーマットは/samples/ {sampleID} /eventsただし、初期状態は送信されません。

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 'https://sandbox.recordedfuture.com/api/v0/samples/events'

/samples/ {sampleID} / {taskID} /logs/onemon.json を取得します。

カーネル モニターの出力を JSON 形式で取得します。

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 'https://sandbox.recordedfuture.com/api/v0/samples/ {sampleID} / {taskID} /logs/onemon.json'\
 --output log.json

/サンプル/ {sampleID} / {taskID} /dump.pcap を取得します

さらに手動で分析するために、分析の PCAP を取得します。

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 'https://sandbox.recordedfuture.com/api/v0/samples/ {sampleID} / {taskID} /dump.pcap'\
 --output dump.pcap

GET /samples/ {sampleID} / {taskID} /dump.pcapng

復号化された HTTPS を含むすべてのトラフィックを含む分析用の PCAPNG を取得します。

この形式を開くには、Wireshark/TShark バージョン 3 以上が必要であることに注意してください。

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 'https://sandbox.recordedfuture.com/api/v0/samples/ {sampleID} / {taskID} /dump.pcapng'\
 --output dump.pcapng

GET /サンプル/ {sampleID} / {taskID} /ファイル/ {fileName}

サンプルによってダンプされたファイルを取得します。名前は「ダンプ」セクションにあります。 report_triage.jsonファイル

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 'https://sandbox.recordedfuture.com/api/v0/samples/ {sampleID} / {taskID} /files/ {fileName} '\
 --出力ファイル.exe

GET /サンプル/ {sampleID} /マジック

このサンプルに関連付けられたマジック トークンを取得します。最終的な URL を作成するために使用できます。

$ curl -H '認証: Bearer <YOUR_ACCESS_KEY>' \
 'https://sandbox.recordedfuture.com/api/v0/samples/ {sampleID} /マジック'<magictoken>「 」

 # マジックトークンを含むサンプル URL は次のようになります。# https://sandbox.recordedfuture.com/ {sampleID} /マジック/ {magic}

サンプルオブジェクト

{// The unique ID of this sample."id":"190329-rerrjddcaj",// string// The current status of the analysis process. Can be any of the values// listed below://// "pending"// A sample has been submitted and is queued for static analysis or the// static analysis is in progress.//// "static_analysis"// The static analysis report is ready. The sample will remain in this// status until a profile is selected.//// "scheduled"// All parameters for sandbox analysis have been selected. The sample is// scheduled for running on the sandbox.//// "running"// The sample is being run by the sandbox.//// "processing"// The sandbox has finished running the sample and the resulting metrics// are being processed into reports.//// "reported"// The sample has reports that can be retrieved. This status is terminal.//// "failed"// Analysis of the sample has failed. Any other status may transition into// this status. This status is terminal."status":"reported",// string// The sample kind that was submitted. Either "file" or "url"."kind":"file",// string// If the sample kind is file, this is the name of the uploaded file.// Otherwise, this field is omitted."filename":"evil.bat"// string// If the sample kind is url, this is the url that was submitted. Otherwise,// this field is omitted."url":"http://example.com/evil.js",// string// If true, the sample can be viewed by only the requesting user or// organization the user belongs to. If false, the sample can be viewed by// anyone with a Hatching Triage account."private":false,// bool// The time this sample was submitted."submitted":"2019-04-05T13:37:00Z",// timestamp string// The time the analysis has been completed and a behavioral report has been// generated. Only present if the status is equal to "reported"."completed":"2019-04-05T13:42:00Z",// timestamp string}
This content is confidential. Do not distribute or download content in a manner that violates your Recorded Future license agreement. Sharing this content outside of licensed Recorded Future users constitutes a breach of the terms and/or agreement and shall be considered a breach by your organization.
この記事は役に立ちましたか?
1人中1人がこの記事が役に立ったと言っています

このセクションの記事

もっと見る