Recorded Future サンドボックス - API - Yara

APIドキュメントの移動

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

Yara API エンドポイントを使用すると、Yara ルールをアップロード、操作、削除できます。ルールは互換性をチェックするためにコンパイルされていることに注意してください。互換性の詳細については、次のドキュメントを参照してください。カスタムYaraドキュメント

GET /yara

ユーザーがアクセスできる yara ルールのリストを返します。

  • nameクエリで現在のルール名を指定する/v0/yara/bazar.yaraルールの詳細なリストを取得します。

すべてのYaraルールを取得する

curl --request GET \
 --url https://sandbox.recordedfuture.com/api/v0/yara\
 --header '認証: Bearer <YOUR_ACCESS_KEY>'

結果:

{ "ルール" : [ {"name":"msrule.yara"} , {"name":"bzrule.yara"} ] }

特定のヤラルールを取得する

curl --request GET \
 --url https://sandbox.recordedfuture.com/api/v0/yara/arkei.yara \
 --header '認証: Bearer <YOUR_ACCESS_KEY>'

結果:

{ "warnings" : [ "info: ルール family_arkei: に triage_score メタデータがありません" , "info: ルール family_arkei: に triage_description メタデータがありません" ] , "rule" : "ルール family_arkei {\n    meta:\n        author = \"Nikos 'n0t' Totosis\"\n        description = \"Arkei Stealer Payload\"\n        triage_family = \"arkei\"\n        triage_tags = \"stealer\"\n\n    strings:\n        $c1 = \"/c timeout /t 5 & del /f /q \\\"%s\\\" & exit\" ascii\n        $c2 = \"BCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\" ascii\n\n        $s1 = \"%dx%d\" ascii\n        $s2 = \"%d/%d/%d %d:%d:%d\" ascii\n        $s3 = \"%s / %s\" ascii\n        $s4 = \"%d MB\" ascii\n        $s5 = \"UTC%d\" ascii\n        $s6 = \"JohnDoe\" ascii\n        $s7 = \"HAL9TH\" ascii\n\n    condition:\n        1 of ($c*) and 4 of ($s*)\n} \n" , "name" : "arkei.yara" }

存在しないルール:

{"error":"NOT_FOUND","message":"could not get yara rule: file not found"}

POST /yara

新しいヤラルールを作成する

curl --request POST \
 --url https://sandbox.recordedfuture.com/api/v0/yara\
 --header '認証: Bearer <YOUR_ACCESS_KEY>' \
 --header 'コンテンツタイプ: application/json' \
 - データ '{
 "名前": "arkei.yara","ルール": "ルール family_arkei {\n    meta:\n        author = \"Nikos '\''n0t'\'' Totosis\"\n        description = \"Arkei Stealer Payload\"\n        triage_family = \"arkei\"\n        triage_tags = \"stealer\"\n\n    strings:\n        $c1 = \"/c timeout /t 5 & del /f /q \\\"%s\\\" & exit\" ascii\n        $c2 = \"BCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\" ascii\n\n        $s1 = \"%dx%d\" ascii\n        $s2 = \"%d/%d/%d %d:%d:%d\" ascii\n        $s3 = \"%s / %s\" ascii\n        $s4 = \"%d MB\" ascii\n        $s5 = \"UTC%d\" ascii\n        $s6 = \"JohnDoe\" ascii\n        $s7 = \"HAL9TH\" ascii\n\n    condition:\n        1 of ($c*) and 4 of ($s*)\n} "
 }'

結果

成功:

{}

その名前の既存のルール:

{"error":"ERRONEOUS_FILENAME","message":"filename is invalid"}

コンパイルエラー:

{"error":"COMPILE_ERROR","message":"Compile Source failed to compile: duplicated identifier \"family_arkei\""}

PUT /yara

既存のYaraルールを更新する

注:

  • yara ルールを更新すると、コンパイルが失敗する場合があります。その場合、ルール名は更新されますが、古いルールの内容はそのまま残ります。
  • 属性の 1 つだけを変更する場合でも、名前とルールの両方を常に入力する必要があります。

クエリパラメータ

  • nameクエリで現在のルール名を指定する/v0/yara/bazar.yara名前とファイルの内容を更新します:
curl --request PUT \
 --url https://sandbox.recordedfuture.com/api/v0/yara/arkei.yara \
 --header '認証: Bearer <YOUR_ACCESS_KEY>' \
 --header 'コンテンツタイプ: application/json' \
 - データ '{
 「名前」: 「arkei_new.yara」"ルール": "ルール family_arkei {\n    meta:\n        author = \"Nikos 'n0t' Totosis\"\n        description = \"Arkei Stealer Payload\"\n        triage_family = \"arkei\"\n        triage_tags = \"stealer\"\n\n    strings:\n        $c1 = \"/c timeout /t 5 & del /f /q \\\"%s\\\" & exit\" ascii\n        $c2 = \"BCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\" ascii\n\n        $s1 = \"%dx%d\" ascii\n        $s2 = \"%d/%d/%d %d:%d:%d\" ascii\n        $s3 = \"%s / %s\" ascii\n        $s4 = \"%d MB\" ascii\n        $s5 = \"UTC%d\" ascii\n        $s6 = \"JohnDoe\" ascii\n        $s7 = \"HAL9TH\" ascii\n\n    condition:\n        1 of ($c*) and 4 of ($s*)\n} "
 }'

結果

成功:

{}

その名前の既存のルール:

{"error":"ERRONEOUS_FILENAME","message":"filename is invalid"}

コンパイルエラー:

{"error":"COMPILE_ERROR","message":"Compile Source failed to compile: duplicated identifier \"family_arkei\""}

存在しないルール:

{"error":"NOT_FOUND","message":"could not get yara rule: file not found"}

削除 /yara

既存のYaraルールを削除する

curl --request DELETE \
 --url https://sandbox.recordedfuture.com/api/v0/yara/arkei.yara \
 --header '認証: Bearer <YOUR_ACCESS_KEY>'

成功:

{}

存在しないルール:

{"error":"NOT_FOUND","message":"could not get yara rule: file not found"}
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.
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています

このセクションの記事

もっと見る