Back to skill

Security audit

Network Toolbox

Security checks for vulnerabilities and agentic risk

Overview

This network toolkit is mostly purpose-aligned, but it silently disables HTTPS certificate verification in security-relevant checks, which can give users misleading results.

Review before installing. Use this only for hosts and networks you are authorized to test, and treat its HTTPS and SSL results cautiously because certificate validation is silently disabled in important paths. The public IP feature contacts external services and the port scanner can generate noticeable traffic.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/net_http.py:12
Finding

HTTPS certificate and hostname verification disabled in HTTP inspection

Content
View full analysis

Vulnerability Details

File Location: scripts/net_http.py, lines 12–18
Vulnerability Type: Improper TLS certificate validation
Risk Level: High

python
try:
    if follow:
        resp = urllib.request.urlopen(req, timeout=timeout)
    else:
        ctx = ssl.create_default_context()
        ctx.check_hostname = False
        ctx.verify_mode = ssl.CERT_NONE
        resp = urllib.request.urlopen(req, timeout=timeout, context=ctx)

Technical Analysis

The default execution path, used when --follow is not specified, explicitly disables both certificate-chain validation and hostname verification. Consequently, an HTTPS connection succeeds even when the server presents a self-signed, forged, expired, or wrong-host certificate.

This behavior is unnecessary for ordinary HTTP diagnostics and violates secure-by-default TLS handling. It also does not correctly implement the documented redirect option: urllib.request.urlopen follows redirects by default, independently of the disabled TLS settings.

Attack Path

  1. A user invokes net_http.py for an HTTPS endpoint without --follow.
  2. An attacker able to influence the network path, DNS resolution, proxy, or destination endpoint intercepts the request.
  3. The attacker presents an arbitrary TLS certificate.
  4. The script accepts the certificate because chain and hostname verification are disabled.
  5. The attacker supplies forged status codes, headers, redirects, or response-body content.
  6. The script displays the attacker-controlled response as if it originated from the requested HTTPS endpoint.

Impact Assessment

Exploitation requires control over, or influence on, the network path, name resolution, proxy configuration, or destination server. It does not directly grant local operating-system privileges or code execution. However, it destroys the authenticity and integrity guarantees expected from HTTPS.

An attacker can falsify d ...[truncated 180 chars]

Remediation
View remediation

Remediation Suggestions

  • Retain the secure defaults provided by ssl.create_default_context(); do not set check_hostname to False or verify_mode to ssl.CERT_NONE.
  • Implement redirect suppression separately with a custom urllib.request.HTTPRedirectHandler rather than changing TLS validation.
  • Make verified HTTPS requests the default in every operational mode.
  • If unverified inspection is genuinely required, place it behind an explicit option such as --insecure, print a prominent warning, and label the resulting data as unauthenticated.
  • Add tests confirming rejection of self-signed, expired, and hostname-mismatched certificates.
  • Add separate tests verifying that redirect behavior matches the --follow option.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/net_ssl.py:7
Finding

SSL certificate checker accepts unauthenticated certificates

Content
View full analysis

Vulnerability Details

File Location: scripts/net_ssl.py, lines 7–17
Vulnerability Type: Improper TLS certificate validation
Risk Level: High

python
def get_cert(host, port=443, timeout=10):
    ctx = ssl.create_default_context()
    ctx.check_hostname = False
    ctx.verify_mode = ssl.CERT_NONE

    try:
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.settimeout(timeout)
        sock.connect((host, port))
        ssock = ctx.wrap_socket(sock, server_hostname=host)
        cert = ssock.getpeercert()
        ssock.close()
        return cert

Technical Analysis

The certificate-inspection function disables certificate-chain and hostname verification before establishing the TLS session. It therefore cannot determine whether the certificate is trusted for the requested host.

This is particularly problematic for a tool advertised as performing SSL certificate checks: a forged, self-signed, expired, or hostname-mismatched certificate can be accepted without a clear trust failure. With CERT_NONE, Python may also return an empty decoded dictionary from getpeercert(), reducing the reliability of the displayed certificate information.

Inspecting certificates from misconfigured endpoints can be legitimate, but unverified retrieval must be clearly separated from certificate validation. The current implementation silently treats unverified retrieval as the only mode.

Attack Path

  1. A user invokes net_ssl.py to assess a remote TLS endpoint.
  2. An attacker controls the endpoint or can intercept its network traffic through DNS, proxy, routing, or local-network manipulation.
  3. The attacker presents an arbitrary certificate that would normally fail validation.
  4. The script completes the TLS handshake because all certificate verification is disabled.
  5. The script returns incomplete or unauthenticated certificate information without establishing that the ...[truncated 600 chars]
Remediation
View remediation

Remediation Suggestions

  • Use ssl.create_default_context() without overriding hostname or certificate verification for the primary validation path.
  • Report chain-validation, expiration, and hostname-validation failures explicitly.
  • If certificates must be retrieved from invalid endpoints, provide a separate, explicit unverified-inspection mode and clearly label all resulting data as unauthenticated.
  • For unverified inspection, retrieve the binary certificate with getpeercert(binary_form=True) and decode it through a safe, documented mechanism rather than relying on an empty decoded dictionary.
  • Distinguish certificate retrieval from certificate validation in both output and documentation.
  • Ensure sockets are closed through context managers or finally blocks when handshakes or parsing fail.
  • Add tests for trusted certificates, self-signed certificates, expired certificates, and certificates issued for a different hostname.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

For non-follow requests, the code explicitly disables both TLS certificate validation and hostname verification before calling urlopen. This allows man-in-the-middle interception or spoofing of HTTPS endpoints, so the tool may report attacker-controlled headers, status, and body content while implying it inspected the real target.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code disables TLS certificate verification and hostname checking without any explicit user notice or consent. In a network inspection tool, this is especially dangerous because users may trust the reported HTTPS results even though the connection authenticity was never verified, increasing the chance of silent interception.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The function makes outbound requests to third-party IP discovery services without any prior user disclosure or consent flow. While the feature is expected for a network-info utility, it still exposes the user's IP address, user agent, and request metadata to external services, creating a privacy risk and a dependency on untrusted third parties.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/net_ping.py (reported line 19)May include surrounding context.

python
try:
        # -c count, -W timeout (seconds) on Linux
        start = time.time()
        r = subprocess.run(
            ['ping', '-c', str(count), '-W', str(timeout), host],
            capture_output=True, text=True, timeout=timeout * count + 2
        )

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This tool presents itself as an SSL/TLS certificate inspection utility, but it explicitly disables certificate verification and hostname checking before connecting. That allows it to retrieve and report certificate details from an unauthenticated peer, so a man-in-the-middle or spoofed endpoint could supply arbitrary certificate data and mislead users into trusting incorrect results.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly encourages network diagnostics against arbitrary hosts and external services but does not warn that using these commands will transmit data to third-party systems and may expose the user's IP, query targets, headers, or other metadata. While the functionality is legitimate, the missing disclosure can cause unintended privacy, policy, or authorization issues when users run scans, DNS lookups, WHOIS queries, or public-IP checks against external infrastructure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code performs outbound HTTP requests and can retrieve response bodies, which is a safety-relevant network operation for a code file. While the script name and CLI help indicate inspection behavior, there is no explicit warning, confirmation, or comment disclosing that user-supplied URLs will be contacted over the network and that response content may be fetched and printed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The UDP socket connection to 8.8.8.8 reveals network activity to an external address solely to infer the default interface, without clearly informing the user. Although no payload is meaningfully exchanged beyond routing-related traffic, it still creates undisclosed outbound network interaction and can be problematic in restricted or privacy-sensitive environments.

Content

No source excerpt is available for this finding.