Skip to content

Various fixes - #4

Open
pufi656 wants to merge 7 commits into
mainfrom
fixes
Open

Various fixes#4
pufi656 wants to merge 7 commits into
mainfrom
fixes

Conversation

@pufi656

@pufi656 pufi656 commented Jun 11, 2024

Copy link
Copy Markdown

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies a set of fixes across the Dockerized Zeratool gRPC service, the Zeratool exploiter client, and project packaging/docs to improve runtime behavior and dependency handling.

Changes:

  • Updates container/service execution flow (temp binary creation/cleanup; container lifecycle and connection behavior).
  • Expands and adjusts Python dependencies and Docker image build steps (Python 3.11, added tooling/libs).
  • Tweaks CLI output formatting and installation instructions.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
README.md Adds a setup step to include zeratool_lib on PYTHONPATH.
pyproject.toml Adds several dependencies and enables editable (develop=true) zeratool_lib.
docker/zeratool_lib_service.py Switches temp-binary handling to a named temp file, adds cleanup, and adjusts win-func parsing.
docker/Dockerfile.zeratool_lib Bumps Python base image, adjusts dependency conversion flags, clones commons, and installs Radare2 + 32-bit libc.
automatic_exploit_generation/exploiters/zeratool/zeratool.py Changes Docker container run parameters and gRPC connection target/wait logic.
automatic_exploit_generation/cli.py Simplifies payload printing to a single hexdump and adjusts output formatting.
Suppressed comments (1)

docker/Dockerfile.zeratool_lib:40

  • The Radare2 install downloads and installs a remote .deb without any integrity verification (e.g., SHA256) and relies on dpkg -i without handling missing dependencies. This can make builds brittle and increases supply-chain risk; consider verifying the artifact and/or installing via a trusted package source with dependency resolution.
# Install Radare2
RUN set -xe; \
    wget https://github.com/radareorg/radare2/releases/download/5.9.0/radare2_5.9.0_amd64.deb; \
    dpkg -i radare2_5.9.0_amd64.deb; \
    rm radare2_5.9.0_amd64.deb \

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

)

container.remove(force=True)
container.kill()
path = binary.name
finally:
binary.close()
os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
Comment on lines +41 to +44
print("temp_path: ", temp_path)
print("overflow_only: ", overflow_only)
print("format_only: ", format_only)
print("win_funcs_used: ", win_funcs_used)
Comment on lines +23 to +24
# Download the commons library
RUN git clone https://github.com/CyberReasoningSystem/commons /commons
Comment on lines 75 to 78
print(
"The exploiter could generate an exploit with the outcome of"
f" {generated_exploit.outcome.name} and the following payloads:"
f" {generated_exploit.outcome.name} and the following payloads:\n"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants