Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Ce document décrit un type de résultat de menace dans Security Command Center. Les résultats de menace sont générés par les détecteurs de menaces lorsqu'ils détectent une menace potentielle dans vos ressources cloud. Pour obtenir la liste complète des résultats de menace disponibles, consultez l'index des résultats de menace.
Présentation
Un modèle de machine learning a identifié un code Python exécuté comme malveillant. Les pirates informatiques peuvent utiliser Python pour transférer des outils et exécuter des commandes sans binaire. Il est important de rendre vos conteneurs immuables. Pour cela, suivez les bonnes pratiques.
L'utilisation de scripts pour transférer des outils imite la technique de transfert d'outils d'entrée des pirates informatiques (Ingress Tool Transfer) et peut entraîner des détections indésirables.
Pour répondre à ce résultat, procédez comme suit :
Examiner les détails des résultats
Ouvrez le résultat Execution: Malicious Python executed comme indiqué dans la section Examiner les résultats.
Consultez les détails dans les onglets Résumé et JSON.
Dans l'onglet Récapitulatif, examinez les informations des sections suivantes :
Ce qui a été détecté, en particulier les champs suivants :
Binaire du programme : détails concernant l'interpréteur qui a appelé le script.
Script : chemin d'accès absolu du nom du script sur le disque. Cet attribut n'apparaît que pour les scripts écrits sur le disque, et non pour l'exécution de scripts littéraux (par exemple, python3 -c).
Arguments : arguments fournis lors de l'appel du script.
Ressource concernée, en particulier les champs suivants :
Liens associés, en particulier les champs suivants :
Indicateur VirusTotal : lien vers la page d'analyse VirusTotal
Dans l'onglet JSON, notez les champs suivants :
finding :
processes :
script :
contents : contenu du script exécuté, qui peut être tronqué pour des raisons de performances. Cela peut faciliter votre enquête.
sha256 : hachage SHA-256 de script.contents
resource :
project_display_name : nom du projet contenant le composant.
Recherchez les résultats associés qui se sont produits à peu près au même moment pour le conteneur concerné. Par exemple, si le script dépose un binaire, recherchez les résultats liés au binaire. De tels résultats peuvent indiquer que cette activité était malveillante, plutôt qu'un manquement aux bonnes pratiques.
Vérifiez la valeur de hachage SHA-256 du fichier binaire signalé comme malveillant sur VirusTotal en cliquant sur le lien dans l'indicateur VirusTotal. VirusTotal est un service appartenant à Alphabet qui fournit du contexte sur les fichiers, URL, domaines et adresses IP potentiellement malveillants.
Pour élaborer un plan d'intervention, combinez les résultats de vos enquêtes avec les recherches MITRE et l'analyse VirusTotal.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/05 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/05 (UTC)."],[],[],null,["| Premium and Enterprise [service tiers](/security-command-center/docs/service-tiers)\n\nThis document describes a threat finding type in Security Command Center. Threat findings are generated by\n[threat detectors](/security-command-center/docs/concepts-security-sources#threats) when they detect\na potential threat in your cloud resources. For a full list of available threat findings, see [Threat findings index](/security-command-center/docs/threat-findings-index).\n\nOverview\n\nA machine learning model identified executed Python code as malicious. Attackers\ncan use Python to transfer tools and execute commands without binaries. Keeping\nyour containers immutable is an important\n[practice](https://kubernetes.io/docs/concepts/containers/#container-images).\nUsing scripts to transfer tools mimics the attacker technique of [ingress tool\ntransfer](https://attack.mitre.org/techniques/T1105/) and can result in unwanted\ndetections.\n\nDetection service\n\n[Cloud Run Threat Detection](/security-command-center/docs/cloud-run-threat-detection-overview)\n\nHow to respond\n\nTo respond to this finding, do the following:\n\nReview finding details\n\n1. Open the `Execution: Malicious Python executed` finding as directed in [Reviewing\n findings](/security-command-center/docs/how-to-investigate-threats#reviewing_findings).\n Review the details on the **Summary** and **JSON** tabs.\n\n2. On the **Summary** tab, review the information in the following sections:\n\n - **What was detected** , especially the following fields:\n - **Program binary**: details about the interpreter that invoked the script\n - **Script** : absolute path of the name of the script on disk; this attribute only appears for scripts written to disk, not for literal script execution---for example, `python3 -c`\n - **Arguments**: the arguments provided when invoking the script\n - **Affected resource** , especially the following fields:\n - **Resource full name** : the [full resource name](/apis/design/resource_names) of the affected Cloud Run resource\n - **Related links** , especially the following fields:\n - **VirusTotal indicator**: link to the VirusTotal analysis page\n3. On the **JSON** tab, note the following fields:\n\n - `finding`:\n - `processes`:\n - `script`:\n - `contents`: contents of the executed script, which might be truncated for performance reasons; this can aid in your investigation\n - `sha256`: the SHA-256 hash of `script.contents`\n - `resource`:\n - `project_display_name`: the name of the project that contains the asset.\n4. Look for related findings that occurred at a similar time for the affected\n container. For example, if the script drops a binary, check for findings\n related to the binary. Such findings might indicate that this activity was\n malicious, instead of a failure to follow best practices.\n\n5. Review the settings of the affected container.\n\n6. Check the logs for the affected container.\n\nResearch attack and response methods\n\n1. Review the MITRE ATT\\&CK framework entries for this finding type: [Command and Scripting\n Interpreter](https://attack.mitre.org/techniques/T1059/) and [Ingress Tool Transfer](https://attack.mitre.org/techniques/T1105/).\n2. Check the SHA-256 hash value for the binary flagged as malicious on [VirusTotal](https://www.virustotal.com) by clicking the link in **VirusTotal indicator**. VirusTotal is an Alphabet-owned service that provides context on potentially malicious files, URLs, domains, and IP addresses.\n3. To develop a response plan, combine your investigation results with the MITRE research and VirusTotal analysis.\n\nImplement your response\n\nFor response recommendations, see [Respond to Cloud Run threat\nfindings](/security-command-center/docs/respond-cloud-run-threats).\n\nWhat's next\n\n- Learn [how to work with threat\n findings in Security Command Center](/security-command-center/docs/how-to-investigate-threats).\n- Refer to the [Threat findings index](/security-command-center/docs/threat-findings-index).\n- Learn how to [review a\n finding](/security-command-center/docs/how-to-investigate-threats#reviewing_findings) through the Google Cloud console.\n- Learn about the [services that\n generate threat findings](/security-command-center/docs/concepts-security-sources#threats)."]]